功能优化
This commit is contained in:
parent
c9f1e51d3f
commit
3e0b2ace75
|
|
@ -259,26 +259,6 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialStorageInfo> getMaCodeList(MaterialStorageInfo bean) {
|
public List<MaterialStorageInfo> getMaCodeList(MaterialStorageInfo bean) {
|
||||||
try {
|
try {
|
||||||
// // 查询库管员
|
|
||||||
// List<MaterialStorageInfo> list = materialMachineMapper.getMaCodeList(bean);
|
|
||||||
// MaterialUseStorageInfo materialUseStorageInfo = new MaterialUseStorageInfo();
|
|
||||||
// materialUseStorageInfo.setProId(StringUtils.isNotBlank(bean.getProId()) ? bean.getProId() : null);
|
|
||||||
// materialUseStorageInfo.setTypeId(bean.getTypeId() != null ? bean.getTypeId() : null);
|
|
||||||
// List<MaterialUseStorageInfo> userList = materialMachineMapper.getUserRecords(materialUseStorageInfo);
|
|
||||||
// if (CollectionUtils.isNotEmpty(list)) {
|
|
||||||
// if (CollectionUtils.isNotEmpty(userList)) {
|
|
||||||
// list.removeIf(info -> {
|
|
||||||
// for (MaterialUseStorageInfo useStorageInfo : userList) {
|
|
||||||
// if (info.getMaId()!=null && useStorageInfo.getMaId()!=null){
|
|
||||||
// if (info.getMaId().equals(useStorageInfo.getMaId())) {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
List<MaterialStorageInfo> list = new ArrayList<>();
|
List<MaterialStorageInfo> list = new ArrayList<>();
|
||||||
if (!StringHelper.isNullOrEmptyString(bean.getTeamId())){
|
if (!StringHelper.isNullOrEmptyString(bean.getTeamId())){
|
||||||
list = materialMachineMapper.getMaCodeDetails(bean);
|
list = materialMachineMapper.getMaCodeDetails(bean);
|
||||||
|
|
|
||||||
|
|
@ -1058,16 +1058,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectDepartNum" resultType="java.lang.Integer">
|
<select id="selectDepartNum" resultType="java.lang.Integer">
|
||||||
SELECT
|
SELECT
|
||||||
COUNT( project_dept_id )
|
COUNT( DISTINCT project_dept_id )
|
||||||
FROM
|
FROM
|
||||||
data_center.dx_fb_son
|
bm_project bp
|
||||||
|
LEFT JOIN data_center.dx_fb_son dx ON dx.id = bp.external_id
|
||||||
|
LEFT JOIN sys_dept sd ON bp.imp_unit = sd.dept_id
|
||||||
WHERE
|
WHERE
|
||||||
1 =1
|
bp.external_id IS NOT NULL
|
||||||
|
AND bp.actual_end_date IS NULL
|
||||||
|
<if test="proName != null and proName != ''">
|
||||||
|
AND bp.pro_name like concat('%',#{proName},'%')
|
||||||
|
</if>
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND apply_company = #{impUnitName}
|
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
AND project_dept = #{departName}
|
AND bp.pro_center like concat('%',#{departName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="impUnit != null and impUnit != ''">
|
||||||
|
AND bp.imp_unit = #{impUnit}
|
||||||
|
</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>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -1082,17 +1097,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
sai.is_slt = 0
|
sai.is_slt = 0
|
||||||
AND bp.external_id IS NOT NULL
|
AND bp.external_id IS NOT NULL
|
||||||
|
<if test="proName != null and proName != ''">
|
||||||
|
AND bp.pro_name like concat('%',#{proName},'%')
|
||||||
|
</if>
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND sd.dept_name = #{impUnitName}
|
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
AND bp.pro_center = #{departName}
|
AND bp.pro_center like concat('%',#{departName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="impUnit != null and impUnit != ''">
|
<if test="impUnit != null and impUnit != ''">
|
||||||
and bp.imp_unit = #{impUnit}
|
AND bp.imp_unit = #{impUnit}
|
||||||
</if>
|
</if>
|
||||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
and bp.external_id in
|
AND bp.external_id in
|
||||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
@ -1104,17 +1122,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
COUNT( DISTINCT bz.id )
|
COUNT( DISTINCT bz.id )
|
||||||
FROM
|
FROM
|
||||||
`micro-tool`.bzgl_bz bz
|
`micro-tool`.bzgl_bz bz
|
||||||
LEFT JOIN `micro-tool`.bzgl_bz_jccdj bc ON bz.id = bc.bz_id
|
LEFT JOIN bm_project bp ON bp.external_id = bz.project_id
|
||||||
|
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||||
WHERE
|
WHERE
|
||||||
bz.bz_status = 3
|
bp.external_id IS NOT NULL
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
AND bp.actual_end_date IS NULL
|
||||||
AND bc.sszz = #{impUnitName}
|
|
||||||
</if>
|
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
AND bz.project_name = #{proName}
|
AND bp.pro_name like concat('%',#{proName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
|
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="departName != null and departName != ''">
|
||||||
|
AND bp.pro_center like concat('%',#{departName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="impUnit != null and impUnit != ''">
|
||||||
|
AND bp.imp_unit = #{impUnit}
|
||||||
</if>
|
</if>
|
||||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
and bz.project_id in
|
AND bp.external_id in
|
||||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
@ -1156,31 +1182,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND sai.end_time IS NULL
|
AND sai.end_time IS NULL
|
||||||
AND sai.back_id IS NULL
|
AND sai.back_id IS NULL
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND sd.dept_name = #{impUnitName}
|
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
AND bp.pro_name = #{proName}
|
AND bp.pro_name like concat('%',#{proName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
AND bp.pro_center = #{departName}
|
AND bp.pro_center like concat('%',#{departName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="teamName != null and teamName != ''">
|
<if test="teamName != null and teamName != ''">
|
||||||
AND bu.unit_name = #{teamName}
|
AND bu.unit_name like concat('%',#{teamName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="typeName != null and typeName != ''">
|
<if test="typeName != null and typeName != ''">
|
||||||
AND mt2.type_name = #{typeName}
|
AND mt2.type_name like concat('%',#{typeName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="typeModelName != null and typeModelName != ''">
|
<if test="typeModelName != null and typeModelName != ''">
|
||||||
AND mt.type_name = #{typeModelName}
|
AND mt.type_name like concat('%',#{typeModelName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
and bp.external_id in
|
AND bp.external_id in
|
||||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="impUnit != null and impUnit != ''">
|
<if test="impUnit != null and impUnit != ''">
|
||||||
and bp.imp_unit = #{impUnit}
|
AND bp.imp_unit = #{impUnit}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -1217,31 +1243,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND sai.end_time IS NULL
|
AND sai.end_time IS NULL
|
||||||
AND sai.back_id IS NULL
|
AND sai.back_id IS NULL
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND sd.dept_name = #{impUnitName}
|
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
AND bp.pro_name = #{proName}
|
AND bp.pro_name like concat('%',#{proName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
AND bp.pro_center = #{departName}
|
AND bp.pro_center like concat('%',#{departName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="teamName != null and teamName != ''">
|
<if test="teamName != null and teamName != ''">
|
||||||
AND bu.unit_name = #{teamName}
|
AND bu.unit_name like concat('%',#{teamName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="typeName != null and typeName != ''">
|
<if test="typeName != null and typeName != ''">
|
||||||
AND mt2.type_name = #{typeName}
|
AND mt2.type_name like concat('%',#{typeName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="typeModelName != null and typeModelName != ''">
|
<if test="typeModelName != null and typeModelName != ''">
|
||||||
AND mt.type_name = #{typeModelName}
|
AND mt.type_name like concat('%',#{typeModelName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
and bp.external_id in
|
AND bp.external_id in
|
||||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="impUnit != null and impUnit != ''">
|
<if test="impUnit != null and impUnit != ''">
|
||||||
and bp.imp_unit = #{impUnit}
|
AND bp.imp_unit = #{impUnit}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -1469,13 +1495,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND mt.type_name LIKE CONCAT('%', #{typeModelName}, '%')
|
AND mt.type_name LIKE CONCAT('%', #{typeModelName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||||
and bp.external_id in
|
AND bp.external_id in
|
||||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="impUnit != null and impUnit != ''">
|
<if test="impUnit != null and impUnit != ''">
|
||||||
and bp.imp_unit = #{impUnit}
|
AND bp.imp_unit = #{impUnit}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY mt.type_id,
|
GROUP BY mt.type_id,
|
||||||
bu.unit_name,
|
bu.unit_name,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue