Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d1d7d0f479
|
|
@ -900,6 +900,9 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
|||
backApplyInfo.setAgreementId(agreementId);
|
||||
listL4 = mapper.getUseTypeTreeL4(backApplyInfo);
|
||||
if (!CollectionUtils.isEmpty(listL4)) {
|
||||
listL4 = listL4.stream()
|
||||
.filter(item -> StringUtils.isNotBlank(item.getMaterialName()) && StringUtils.isNotBlank(item.getTypeName()))
|
||||
.collect(Collectors.toList());
|
||||
// 将listL5中typeId相同的数据进行num相加
|
||||
for (TypeTreeNode node : listL4) {
|
||||
// 根据node中的typeId查询listL5中相同数据,如果在listL5中存在,则将num相加,反之将node添加到list5中
|
||||
|
|
@ -969,10 +972,9 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
|||
}
|
||||
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(listL5)) {
|
||||
for (TypeTreeNode node : listL5) {
|
||||
// 根据协议id以及typeId查询在用量
|
||||
if (bean.getAgreementId() != null) {
|
||||
// 根据工程和班组id查询协议id
|
||||
BmAgreementInfo info = materialLeaseInfoMapper.getAgreeId(bean);
|
||||
if (info != null) {
|
||||
Type maType = new Type();
|
||||
maType.setAgreementId(info.getAgreementId());
|
||||
maType.setTypeId(node.getTypeId());
|
||||
|
|
|
|||
|
|
@ -857,7 +857,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.unit_name as unitName,
|
||||
mt.unit_value as unitValue,
|
||||
mt.manage_type as manageType,
|
||||
SUM( CASE WHEN sai.agreement_id = #{agreementId} AND sai.STATUS = '0' THEN sai.num ELSE 0 END ) AS num,
|
||||
SUM( CASE WHEN sai.agreement_id = #{agreementId} THEN sai.num ELSE 0 END ) AS num,
|
||||
mt.LEVEL as level
|
||||
FROM
|
||||
ma_type mt
|
||||
|
|
@ -865,7 +865,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id and mt1.del_flag = '0'
|
||||
WHERE
|
||||
EXISTS ( SELECT 1 FROM clz_slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId}
|
||||
AND sai2.STATUS = '0' and IFNULL(sai.lease_type,0) = 0 and sai2.num > 0)
|
||||
AND IFNULL(sai.lease_type,0) = 0 AND sai2.num > 0)
|
||||
GROUP BY
|
||||
mt.type_id
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and mt.type_name like concat('%', #{maModel}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
mm.ma_code
|
||||
mm.ma_id
|
||||
</select>
|
||||
|
||||
<select id="getRetainedEquipmentList" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
|
||||
|
|
@ -668,7 +668,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and mt.type_name like concat('%', #{maModel}, '%')
|
||||
</if>
|
||||
GROUP BY
|
||||
mm.ma_code
|
||||
mm.ma_id
|
||||
</select>
|
||||
|
||||
<select id="getUserRecords" resultType="com.bonus.material.clz.domain.machine.MaterialUseStorageInfo">
|
||||
|
|
|
|||
|
|
@ -276,7 +276,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
lai.task_id AS taskId,
|
||||
lpd.lease_sign_url AS leaseSignUrl,
|
||||
lpd.lease_sign_type AS leaseSignType,
|
||||
tt.task_type AS taskType
|
||||
tt.task_type AS taskType,
|
||||
lai.material_man AS materialMan,
|
||||
lai.confirm_time AS confirmTime,
|
||||
lai.is_confirm AS isConfirm,
|
||||
lai.confirm_remark AS confirmRemark
|
||||
FROM
|
||||
lease_publish_details lpd
|
||||
LEFT JOIN lease_apply_info lai ON lai.id = lpd.parent_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue