diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialMachineServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialMachineServiceImpl.java index 1357020d..1b2d5f07 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialMachineServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/service/impl/MaterialMachineServiceImpl.java @@ -259,26 +259,6 @@ public class MaterialMachineServiceImpl implements MaterialMachineService { @Override public List getMaCodeList(MaterialStorageInfo bean) { try { -// // 查询库管员 -// List 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 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 list = new ArrayList<>(); if (!StringHelper.isNullOrEmptyString(bean.getTeamId())){ list = materialMachineMapper.getMaCodeDetails(bean); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml index fc0bd8c8..f8ae8666 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/clz/MaterialMachineMapper.xml @@ -1058,16 +1058,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -1082,17 +1097,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE sai.is_slt = 0 AND bp.external_id IS NOT NULL + + AND bp.pro_name like concat('%',#{proName},'%') + - AND sd.dept_name = #{impUnitName} + AND sd.dept_name like concat('%',#{impUnitName},'%') - AND bp.pro_center = #{departName} + AND bp.pro_center like concat('%',#{departName},'%') - and bp.imp_unit = #{impUnit} + AND bp.imp_unit = #{impUnit} - and bp.external_id in + AND bp.external_id in #{item} @@ -1104,17 +1122,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" COUNT( DISTINCT bz.id ) FROM `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 - bz.bz_status = 3 - - AND bc.sszz = #{impUnitName} - + bp.external_id IS NOT NULL + AND bp.actual_end_date IS NULL - AND bz.project_name = #{proName} + AND bp.pro_name like concat('%',#{proName},'%') + + + AND sd.dept_name like concat('%',#{impUnitName},'%') + + + AND bp.pro_center like concat('%',#{departName},'%') + + + AND bp.imp_unit = #{impUnit} - and bz.project_id in + AND bp.external_id in #{item} @@ -1156,31 +1182,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND sai.end_time IS NULL AND sai.back_id IS NULL - AND sd.dept_name = #{impUnitName} + AND sd.dept_name like concat('%',#{impUnitName},'%') - AND bp.pro_name = #{proName} + AND bp.pro_name like concat('%',#{proName},'%') - AND bp.pro_center = #{departName} + AND bp.pro_center like concat('%',#{departName},'%') - AND bu.unit_name = #{teamName} + AND bu.unit_name like concat('%',#{teamName},'%') - AND mt2.type_name = #{typeName} + AND mt2.type_name like concat('%',#{typeName},'%') - AND mt.type_name = #{typeModelName} + AND mt.type_name like concat('%',#{typeModelName},'%') - and bp.external_id in + AND bp.external_id in #{item} - and bp.imp_unit = #{impUnit} + AND bp.imp_unit = #{impUnit} @@ -1217,31 +1243,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND sai.end_time IS NULL AND sai.back_id IS NULL - AND sd.dept_name = #{impUnitName} + AND sd.dept_name like concat('%',#{impUnitName},'%') - AND bp.pro_name = #{proName} + AND bp.pro_name like concat('%',#{proName},'%') - AND bp.pro_center = #{departName} + AND bp.pro_center like concat('%',#{departName},'%') - AND bu.unit_name = #{teamName} + AND bu.unit_name like concat('%',#{teamName},'%') - AND mt2.type_name = #{typeName} + AND mt2.type_name like concat('%',#{typeName},'%') - AND mt.type_name = #{typeModelName} + AND mt.type_name like concat('%',#{typeModelName},'%') - and bp.external_id in + AND bp.external_id in #{item} - and bp.imp_unit = #{impUnit} + AND bp.imp_unit = #{impUnit} @@ -1469,13 +1495,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND mt.type_name LIKE CONCAT('%', #{typeModelName}, '%') - and bp.external_id in + AND bp.external_id in #{item} - and bp.imp_unit = #{impUnit} + AND bp.imp_unit = #{impUnit} GROUP BY mt.type_id, bu.unit_name,