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")
|
@Excel(name = "申请时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
@Excel(name = "申请人")
|
//@Excel(name = "申请人")
|
||||||
@ApiModelProperty(value = "申请人")
|
@ApiModelProperty(value = "申请人")
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
|
|
@ -357,4 +357,16 @@ public class LeaseApplyInfo extends BaseEntity{
|
||||||
|
|
||||||
@ApiModelProperty(value = "发布数量")
|
@ApiModelProperty(value = "发布数量")
|
||||||
private BigDecimal publishNum;
|
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.BmProject;
|
||||||
import com.bonus.material.basic.domain.BmUnit;
|
import com.bonus.material.basic.domain.BmUnit;
|
||||||
import com.bonus.material.basic.mapper.BmUnitMapper;
|
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.domain.dto.SelectDto;
|
||||||
import com.bonus.material.common.service.SelectService;
|
import com.bonus.material.common.service.SelectService;
|
||||||
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
|
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
|
||||||
|
|
@ -15,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 10488
|
* @author 10488
|
||||||
|
|
@ -29,8 +31,17 @@ public class SelectController {
|
||||||
@Resource(name = "SelectService")
|
@Resource(name = "SelectService")
|
||||||
private SelectService service;
|
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 = "往来单位下拉选")
|
@ApiOperation(value = "往来单位下拉选")
|
||||||
@PostMapping("getUnitList")
|
@PostMapping("getUnitList")
|
||||||
|
|
|
||||||
|
|
@ -443,4 +443,25 @@ public interface SelectMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Type> getMaterialTypeList(BmProject bmProject);
|
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.back.domain.BackApplyInfo;
|
||||||
import com.bonus.material.basic.domain.BmProject;
|
import com.bonus.material.basic.domain.BmProject;
|
||||||
import com.bonus.material.basic.domain.BmUnit;
|
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.common.domain.dto.SelectDto;
|
||||||
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
|
import com.bonus.material.materialStation.domain.ProAuthorizeInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 10488
|
* @author 10488
|
||||||
* 统一下拉选
|
* 统一下拉选
|
||||||
|
|
@ -287,4 +290,11 @@ public interface SelectService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult getMaterialTypeList(BmProject bmProject);
|
AjaxResult getMaterialTypeList(BmProject bmProject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分公司下拉选
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MaterialRetainedEquipmentInfo> getImpUnitNameList(MaterialRetainedEquipmentInfo bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,6 @@ public class SelectServiceImpl implements SelectService {
|
||||||
@Resource(name = "SelectMapper")
|
@Resource(name = "SelectMapper")
|
||||||
private SelectMapper mapper;
|
private SelectMapper mapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private BmUnitMapper bmUnitMapper;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private MaterialLeaseInfoService materialLeaseInfoService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单位下拉类型树
|
* 单位下拉类型树
|
||||||
* @param bmUnit
|
* @param bmUnit
|
||||||
|
|
@ -538,8 +532,14 @@ public class SelectServiceImpl implements SelectService {
|
||||||
// 判断是否开启过滤
|
// 判断是否开启过滤
|
||||||
if (Objects.nonNull(bmProject) && Objects.nonNull(bmProject.getEnableFilter()) && bmProject.getEnableFilter()) {
|
if (Objects.nonNull(bmProject) && Objects.nonNull(bmProject.getEnableFilter()) && bmProject.getEnableFilter()) {
|
||||||
bmProject.setDeptId(thisLoginUserDeptId);
|
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> groupList = new ArrayList<>();
|
||||||
List<ProjectTreeNode> list = new ArrayList<>();
|
List<ProjectTreeNode> list = new ArrayList<>();
|
||||||
try {
|
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
|
@Override
|
||||||
public AjaxResult getDeviceTypeTree(SelectDto dto) {
|
public AjaxResult getDeviceTypeTree(SelectDto dto) {
|
||||||
List<TreeNode> groupList = new ArrayList<>();
|
List<TreeNode> groupList = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -1023,8 +1023,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sd.del_flag = '0'
|
sd.del_flag = '0'
|
||||||
AND sd.`status` = '0'
|
AND sd.`status` = '0'
|
||||||
AND bmp.del_flag = '0'
|
AND bmp.del_flag = '0'
|
||||||
<if test="deptId != null">
|
AND bmp.pro_id IN (
|
||||||
AND bmp.imp_unit = #{deptId}
|
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>
|
</if>
|
||||||
UNION
|
UNION
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
|
|
@ -1040,8 +1050,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND sd.del_flag = '0'
|
AND sd.del_flag = '0'
|
||||||
AND sd.`status` = '0'
|
AND sd.`status` = '0'
|
||||||
AND bmp.del_flag = '0'
|
AND bmp.del_flag = '0'
|
||||||
<if test="deptId != null">
|
AND bmp.pro_id IN (
|
||||||
AND bmp.imp_unit = #{deptId}
|
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>
|
</if>
|
||||||
) a
|
) a
|
||||||
ORDER BY
|
ORDER BY
|
||||||
|
|
@ -1329,4 +1349,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue