材料站多协议类型树修改

This commit is contained in:
bonus 2025-09-22 19:01:55 +08:00
parent a73ca331cb
commit 664d09dbeb
4 changed files with 40 additions and 28 deletions

View File

@ -211,4 +211,9 @@ public class MaterialBackApplyInfo implements Serializable {
@Excel(name = "项目部",sort = 4)
private String departName;
/**
* 协议id集合
*/
private List<String> agreementIds;
}

View File

@ -414,19 +414,17 @@ public class SelectServiceImpl implements SelectService {
*/
@Override
public AjaxResult getAgreementInfoByIdBack(SelectDto dto) {
AgreementVo vo = new AgreementVo();
List<AgreementVo> list = new ArrayList<>();
try {
if (dto != null && dto.getTeamId() != null) {
dto.setUnitId(Integer.parseInt(dto.getTeamId()));
}
List<AgreementVo> list = mapper.getAgreementInfoByIdBack(dto);
if (CollectionUtils.isNotEmpty(list)) {
vo = list.get(0);
}
list = mapper.getAgreementInfoByIdBack(dto);
} catch (Exception e) {
log.error("往来单位id和标段工程id获取协议信息", e);
}
return AjaxResult.success(vo);
return AjaxResult.success(list);
}
/**

View File

@ -195,6 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
unit_id = #{unitId}
and project_id = #{projectId}
limit 1
</select>
<select id="selectNumByMonthClz" resultType="java.lang.Integer">

View File

@ -729,7 +729,15 @@ 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'
LEFT JOIN clz_lease_apply_info clai ON sai.lease_id = clai.id
WHERE
sai.STATUS = '0' and sai.agreement_id = #{agreementId}
sai.STATUS = '0'
<if test="agreementIds != null ">
and sai.agreement_id in
<foreach item="item" collection="agreementIds" open="(" separator="," close=")">
#{item}
</foreach>
</if>
GROUP BY
mt.type_id
</select>