This commit is contained in:
parent
e844e4a0a3
commit
b123d9c2b7
|
|
@ -854,8 +854,7 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
|||
BigDecimal inRopeNum = BigDecimal.ZERO;
|
||||
|
||||
// 获取在用量
|
||||
//List<MaterialRetainedEquipmentInfo> useInfoList = materialMachineMapper.getRetainTotalInfo(bean);
|
||||
List<MaterialRetainedEquipmentInfo> useInfoList = materialMachineMapper.getUsInfoList(bean);
|
||||
List<MaterialRetainedEquipmentInfo> useInfoList = materialMachineMapper.getRetainTotalInfo(bean);
|
||||
// 分别获取useInfoList中以unitValue分组的usNum数量,展示出来
|
||||
if (!CollectionUtils.isEmpty(useInfoList)) {
|
||||
// 过滤掉不在未结算工程集合内的设备
|
||||
|
|
|
|||
|
|
@ -1175,7 +1175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="getRetainTotalInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||
SELECT
|
||||
mt.type_id,
|
||||
mt.type_id as typeId,
|
||||
mt4.type_name AS constructionType,
|
||||
mt4.type_id AS firstTypeId,
|
||||
mt3.type_name AS materialType,
|
||||
|
|
@ -1184,13 +1184,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt2.type_id AS thirdTypeId,
|
||||
mt.type_name AS typeModelName,
|
||||
SUM(IFNULL( sai.num, 0 )) AS usNum,
|
||||
bu.unit_id as teamId,
|
||||
bu.unit_name AS teamName,
|
||||
bp.pro_name as proName,
|
||||
bp.pro_id as proId,
|
||||
bp.external_id as externalId,
|
||||
bp.imp_unit AS impUnit,
|
||||
bu.bzz_idcard AS idCard,
|
||||
bp.pro_center AS proCenter,
|
||||
mt.unit_value AS unitValue
|
||||
df.project_dept AS departName,
|
||||
mt.unit_name AS unit,
|
||||
sd.dept_name AS impUnitName,
|
||||
CASE mt.manage_type WHEN 0 THEN '编码' ELSE '数量' END manageType,
|
||||
mt.unit_value AS unitValue,
|
||||
bz.ssfbdw AS subUnitName,
|
||||
CASE mt.jiju_type WHEN 2 THEN '安全工器具' ELSE '施工机具' END jiJuType
|
||||
FROM
|
||||
clz_slt_agreement_info sai
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
||||
|
|
@ -1201,6 +1208,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id AND bu.del_flag = '0'
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = bp.imp_unit
|
||||
LEFT JOIN `micro-tool`.bzgl_bz bz ON bp.external_id = bz.project_id AND bz.bzmc = bu.unit_name
|
||||
LEFT JOIN data_center.dx_fb_son df ON bp.external_id = df.id
|
||||
WHERE
|
||||
sai.`status` = '0'
|
||||
AND sai.end_time IS NULL
|
||||
|
|
@ -1208,22 +1217,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND bu.unit_name is not null
|
||||
AND bp.external_id is not NULL
|
||||
<if test="impUnitName != null and impUnitName != ''">
|
||||
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
||||
AND sd.dept_name LIKE CONCAT('%', #{impUnitName}, '%')
|
||||
</if>
|
||||
<if test="proName != null and proName != ''">
|
||||
AND bp.pro_name like concat('%',#{proName},'%')
|
||||
AND bp.pro_name LIKE CONCAT('%', #{proName}, '%')
|
||||
</if>
|
||||
<if test="departName != null and departName != ''">
|
||||
AND bp.pro_center like concat('%',#{departName},'%')
|
||||
AND bp.pro_center LIKE CONCAT('%', #{departName}, '%')
|
||||
</if>
|
||||
<if test="teamName != null and teamName != ''">
|
||||
AND bu.unit_name like concat('%',#{teamName},'%')
|
||||
AND bu.unit_name LIKE CONCAT('%', #{teamName}, '%')
|
||||
</if>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
AND mt2.type_name like concat('%',#{typeName},'%')
|
||||
AND mt2.type_name LIKE CONCAT('%', #{typeName}, '%')
|
||||
</if>
|
||||
<if test="typeModelName != null and typeModelName != ''">
|
||||
AND mt.type_name like concat('%',#{typeModelName},'%')
|
||||
AND mt.type_name LIKE CONCAT('%', #{typeModelName}, '%')
|
||||
</if>
|
||||
<if test="subUnitName != null and subUnitName != ''">
|
||||
AND bz.ssfbdw LIKE CONCAT('%', #{subUnitName}, '%')
|
||||
</if>
|
||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||
AND bp.external_id in
|
||||
|
|
@ -1234,7 +1246,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="impUnit != null and impUnit != ''">
|
||||
AND bp.imp_unit = #{impUnit}
|
||||
</if>
|
||||
GROUP BY mt.unit_value
|
||||
<if test="jiJuType != null and jiJuType != ''">
|
||||
AND mt.jiju_type = #{jiJuType}
|
||||
</if>
|
||||
GROUP BY
|
||||
mt.type_id, bu.unit_name, bp.pro_name
|
||||
</select>
|
||||
|
||||
<select id="getRetainStoreInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||
|
|
|
|||
Loading…
Reference in New Issue