This commit is contained in:
parent
6635f25c6f
commit
85f91ac8d7
|
|
@ -41,7 +41,7 @@ public class LeaseApplyInfo extends BaseEntity{
|
|||
@Excel(name = "申请时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@Excel(name = "申请人")
|
||||
//@Excel(name = "申请人")
|
||||
@ApiModelProperty(value = "申请人")
|
||||
private String createBy;
|
||||
|
||||
|
|
@ -357,4 +357,16 @@ public class LeaseApplyInfo extends BaseEntity{
|
|||
|
||||
@ApiModelProperty(value = "发布数量")
|
||||
private BigDecimal publishNum;
|
||||
|
||||
@ApiModelProperty(value = "新签署领料人id")
|
||||
private Long signId;
|
||||
|
||||
@ApiModelProperty(value = "新签署领料人签名URL")
|
||||
private String signUrl;
|
||||
|
||||
@ApiModelProperty(value = "新签署领料人签名类型")
|
||||
private int signType;
|
||||
|
||||
@ApiModelProperty(value = "项目部名称")
|
||||
private String departName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.bonus.material.back.domain.BackApplyInfo;
|
|||
import com.bonus.material.basic.domain.BmProject;
|
||||
import com.bonus.material.basic.domain.BmUnit;
|
||||
import com.bonus.material.basic.mapper.BmUnitMapper;
|
||||
import com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
import com.bonus.material.common.service.SelectService;
|
||||
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
|
||||
|
|
@ -15,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 10488
|
||||
|
|
@ -29,8 +31,17 @@ public class SelectController {
|
|||
@Resource(name = "SelectService")
|
||||
private SelectService service;
|
||||
|
||||
@Resource
|
||||
private BmUnitMapper bmUnitMapper;
|
||||
/**
|
||||
* 获取分公司下拉选
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "获取分公司下拉选")
|
||||
@GetMapping("/getImpUnitNameList")
|
||||
public AjaxResult getImpUnitNameList(MaterialRetainedEquipmentInfo bean) {
|
||||
List<MaterialRetainedEquipmentInfo> list = service.getImpUnitNameList(bean);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "往来单位下拉选")
|
||||
@PostMapping("getUnitList")
|
||||
|
|
|
|||
|
|
@ -443,4 +443,25 @@ public interface SelectMapper {
|
|||
* @return
|
||||
*/
|
||||
List<Type> getMaterialTypeList(BmProject bmProject);
|
||||
|
||||
/**
|
||||
* 根据用户名查询是否为技术员或项目总工
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
List<String> getDepartList(String username);
|
||||
|
||||
/**
|
||||
* 根据项目部名称查询工程信息
|
||||
* @param departName
|
||||
* @return
|
||||
*/
|
||||
List<String> getProjectByDepartName(String departName);
|
||||
|
||||
/**
|
||||
* 获取分公司下拉选
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<MaterialRetainedEquipmentInfo> getImpUnitNameList(MaterialRetainedEquipmentInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.material.back.domain.BackApplyInfo;
|
||||
import com.bonus.material.basic.domain.BmProject;
|
||||
import com.bonus.material.basic.domain.BmUnit;
|
||||
import com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo;
|
||||
import com.bonus.material.common.domain.dto.SelectDto;
|
||||
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 10488
|
||||
* 统一下拉选
|
||||
|
|
@ -287,4 +290,11 @@ public interface SelectService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult getMaterialTypeList(BmProject bmProject);
|
||||
|
||||
/**
|
||||
* 获取分公司下拉选
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<MaterialRetainedEquipmentInfo> getImpUnitNameList(MaterialRetainedEquipmentInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,12 +39,6 @@ public class SelectServiceImpl implements SelectService {
|
|||
@Resource(name = "SelectMapper")
|
||||
private SelectMapper mapper;
|
||||
|
||||
@Resource
|
||||
private BmUnitMapper bmUnitMapper;
|
||||
|
||||
@Resource
|
||||
private MaterialLeaseInfoService materialLeaseInfoService;
|
||||
|
||||
/**
|
||||
* 单位下拉类型树
|
||||
* @param bmUnit
|
||||
|
|
@ -538,8 +532,14 @@ public class SelectServiceImpl implements SelectService {
|
|||
// 判断是否开启过滤
|
||||
if (Objects.nonNull(bmProject) && Objects.nonNull(bmProject.getEnableFilter()) && bmProject.getEnableFilter()) {
|
||||
bmProject.setDeptId(thisLoginUserDeptId);
|
||||
// 根据项目部名称查询工程信息
|
||||
if (StringUtils.isNotBlank(bmProject.getDepartName())) {
|
||||
List<String> projectIdList = mapper.getProjectByDepartName(bmProject.getDepartName());
|
||||
if (!CollectionUtils.isEmpty(projectIdList)) {
|
||||
bmProject.setProjectIdList(projectIdList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ProjectTreeNode> groupList = new ArrayList<>();
|
||||
List<ProjectTreeNode> list = new ArrayList<>();
|
||||
try {
|
||||
|
|
@ -596,6 +596,16 @@ public class SelectServiceImpl implements SelectService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分公司下拉选
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MaterialRetainedEquipmentInfo> getImpUnitNameList(MaterialRetainedEquipmentInfo bean) {
|
||||
return mapper.getImpUnitNameList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getDeviceTypeTree(SelectDto dto) {
|
||||
List<TreeNode> groupList = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -1023,8 +1023,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sd.del_flag = '0'
|
||||
AND sd.`status` = '0'
|
||||
AND bmp.del_flag = '0'
|
||||
<if test="deptId != null">
|
||||
AND bmp.imp_unit = #{deptId}
|
||||
AND bmp.pro_id IN (
|
||||
SELECT bai.project_id
|
||||
FROM bm_agreement_info bai
|
||||
INNER JOIN slt_agreement_info sai ON bai.agreement_id = sai.agreement_id
|
||||
WHERE sai.is_slt = 0
|
||||
and bai.is_show != 0
|
||||
)
|
||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||
AND bmp.external_id in
|
||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
UNION
|
||||
SELECT DISTINCT
|
||||
|
|
@ -1040,8 +1050,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND sd.del_flag = '0'
|
||||
AND sd.`status` = '0'
|
||||
AND bmp.del_flag = '0'
|
||||
<if test="deptId != null">
|
||||
AND bmp.imp_unit = #{deptId}
|
||||
AND bmp.pro_id IN (
|
||||
SELECT bai.project_id
|
||||
FROM bm_agreement_info bai
|
||||
INNER JOIN slt_agreement_info sai ON bai.agreement_id = sai.agreement_id
|
||||
WHERE sai.is_slt = 0
|
||||
and bai.is_show != 0
|
||||
)
|
||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||
AND bmp.external_id in
|
||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
) a
|
||||
ORDER BY
|
||||
|
|
@ -1329,4 +1349,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getDepartList" resultType="java.lang.String">
|
||||
SELECT
|
||||
depart_id
|
||||
FROM
|
||||
`sbd_audit`.sg_project_post_personnel
|
||||
WHERE
|
||||
post_id IN ( '1095e9100f3611efa1940242ac130004', '2ca0d32b0f3611efa1940242ac130004' )
|
||||
AND cno = #{username}
|
||||
</select>
|
||||
|
||||
<select id="getProjectByDepartName" resultType="java.lang.String">
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
`data_center`.dx_fb_son
|
||||
WHERE
|
||||
project_dept = #{departName}
|
||||
</select>
|
||||
|
||||
<select id="getImpUnitNameList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||
SELECT
|
||||
DISTINCT sd.dept_name AS impUnitName
|
||||
FROM
|
||||
bm_project bp
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||
WHERE
|
||||
sd.dept_name IS NOT NULL
|
||||
and sd.dept_id not in (342,345,347,348,101,344)
|
||||
<if test="impUnitName != null and impUnitName != ''">
|
||||
AND sd.dept_name LIKE CONCAT('%', #{impUnitName}, '%')
|
||||
</if>
|
||||
<if test="proName != null and proName != ''">
|
||||
AND bp.pro_name LIKE CONCAT('%', #{proName}, '%')
|
||||
</if>
|
||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||
AND bp.external_id in
|
||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="impUnit != null and impUnit != ''">
|
||||
AND bp.imp_unit = #{impUnit}
|
||||
</if>
|
||||
GROUP BY sd.dept_name
|
||||
ORDER BY
|
||||
sd.order_num
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue