退料问题修复

This commit is contained in:
hongchao 2025-08-14 14:59:09 +08:00
parent 78def4bee3
commit 964a5a8c90
2 changed files with 23 additions and 27 deletions

View File

@ -1348,12 +1348,12 @@ public class BackApplyServiceImpl implements BackApplyService {
if (dto == null) {
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "参数不能为空");
}
if (dto.getUnitId() == null) {
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "单位ID为空");
}
if (dto.getProjectId() == null) {
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "工程ID为空");
if (dto.getAgreementId() == null) {
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "协议ID为空");
}
// if (dto.getProjectId() == null) {
// return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "工程ID为空");
// }
if (StringUtils.isBlank(dto.getTypeId())) {
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "机具类型ID为空");
}

View File

@ -1196,25 +1196,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt.type_name AS materialName,
mt2.type_name AS materialType
FROM
lease_out_details lod
LEFT JOIN ma_machine mm ON lod.ma_id = mm.ma_id
slt_agreement_info sai
LEFT JOIN ma_machine mm ON sai.ma_id = mm.ma_id
LEFT JOIN ma_type mt ON mm.type_id = mt.type_id
AND mt.del_flag = '0'
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
AND mt1.del_flag = '0'
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
AND mt2.del_flag = '0'
LEFT JOIN slt_agreement_info sai on lod.type_id = sai.type_id
and sai.ma_id = lod.ma_id
LEFT JOIN bm_agreement_info ba ON sai.agreement_id = ba.agreement_id
WHERE
mm.ma_status = '16' and mm.type_id = #{typeId}
AND ba.unit_id = #{unitId}
AND ba.project_id = #{projectId}
sai.status = '0' and mm.type_id = #{typeId}
and sai.agreement_id = #{agreementId}
<if test="maCode != null and maCode != ''">
and mm.ma_code like concat('%',#{maCode},'%')
</if>
GROUP BY mm.ma_code
</select>
<select id="queryBackCode" resultType="java.lang.Integer">