This commit is contained in:
parent
e844e4a0a3
commit
b123d9c2b7
|
|
@ -854,8 +854,7 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
||||||
BigDecimal inRopeNum = BigDecimal.ZERO;
|
BigDecimal inRopeNum = BigDecimal.ZERO;
|
||||||
|
|
||||||
// 获取在用量
|
// 获取在用量
|
||||||
//List<MaterialRetainedEquipmentInfo> useInfoList = materialMachineMapper.getRetainTotalInfo(bean);
|
List<MaterialRetainedEquipmentInfo> useInfoList = materialMachineMapper.getRetainTotalInfo(bean);
|
||||||
List<MaterialRetainedEquipmentInfo> useInfoList = materialMachineMapper.getUsInfoList(bean);
|
|
||||||
// 分别获取useInfoList中以unitValue分组的usNum数量,展示出来
|
// 分别获取useInfoList中以unitValue分组的usNum数量,展示出来
|
||||||
if (!CollectionUtils.isEmpty(useInfoList)) {
|
if (!CollectionUtils.isEmpty(useInfoList)) {
|
||||||
// 过滤掉不在未结算工程集合内的设备
|
// 过滤掉不在未结算工程集合内的设备
|
||||||
|
|
|
||||||
|
|
@ -1175,32 +1175,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getRetainTotalInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
<select id="getRetainTotalInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||||
SELECT
|
SELECT
|
||||||
mt.type_id,
|
mt.type_id as typeId,
|
||||||
mt4.type_name AS constructionType,
|
mt4.type_name AS constructionType,
|
||||||
mt4.type_id AS firstTypeId,
|
mt4.type_id AS firstTypeId,
|
||||||
mt3.type_name AS materialType,
|
mt3.type_name AS materialType,
|
||||||
mt3.type_id AS secondTypeId,
|
mt3.type_id AS secondTypeId,
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
mt2.type_id AS thirdTypeId,
|
mt2.type_id AS thirdTypeId,
|
||||||
mt.type_name AS typeModelName,
|
mt.type_name AS typeModelName,
|
||||||
SUM(IFNULL( sai.num, 0 )) AS usNum,
|
SUM(IFNULL( sai.num, 0 )) AS usNum,
|
||||||
bp.pro_name as proName,
|
bu.unit_id as teamId,
|
||||||
bp.pro_id as proId,
|
bu.unit_name AS teamName,
|
||||||
bp.external_id as externalId,
|
bp.pro_name as proName,
|
||||||
bp.imp_unit AS impUnit,
|
bp.pro_id as proId,
|
||||||
bu.bzz_idcard AS idCard,
|
bp.external_id as externalId,
|
||||||
bp.pro_center AS proCenter,
|
bp.imp_unit AS impUnit,
|
||||||
mt.unit_value AS unitValue
|
bu.bzz_idcard AS idCard,
|
||||||
|
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
|
FROM
|
||||||
clz_slt_agreement_info sai
|
clz_slt_agreement_info sai
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
LEFT JOIN ma_type mt ON mt.type_id = sai.type_id
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
LEFT JOIN clz_bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
|
LEFT JOIN clz_bm_agreement_info bai ON sai.agreement_id = bai.agreement_id
|
||||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
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 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 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
|
WHERE
|
||||||
sai.`status` = '0'
|
sai.`status` = '0'
|
||||||
AND sai.end_time IS NULL
|
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 bu.unit_name is not null
|
||||||
AND bp.external_id is not NULL
|
AND bp.external_id is not NULL
|
||||||
<if test="impUnitName != null and impUnitName != ''">
|
<if test="impUnitName != null and impUnitName != ''">
|
||||||
AND sd.dept_name like concat('%',#{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 like concat('%',#{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 like concat('%',#{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 like concat('%',#{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 like concat('%',#{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 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>
|
||||||
<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
|
||||||
|
|
@ -1234,7 +1246,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<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.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>
|
||||||
|
|
||||||
<select id="getRetainStoreInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
<select id="getRetainStoreInfo" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue