退料问题修复
This commit is contained in:
parent
78def4bee3
commit
964a5a8c90
|
|
@ -1348,12 +1348,12 @@ public class BackApplyServiceImpl implements BackApplyService {
|
||||||
if (dto == null) {
|
if (dto == null) {
|
||||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "参数不能为空");
|
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "参数不能为空");
|
||||||
}
|
}
|
||||||
if (dto.getUnitId() == null) {
|
if (dto.getAgreementId() == null) {
|
||||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "单位ID为空");
|
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "协议ID为空");
|
||||||
}
|
|
||||||
if (dto.getProjectId() == null) {
|
|
||||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "工程ID为空");
|
|
||||||
}
|
}
|
||||||
|
// if (dto.getProjectId() == null) {
|
||||||
|
// return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "工程ID为空");
|
||||||
|
// }
|
||||||
if (StringUtils.isBlank(dto.getTypeId())) {
|
if (StringUtils.isBlank(dto.getTypeId())) {
|
||||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "机具类型ID为空");
|
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "机具类型ID为空");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1188,33 +1188,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getMachineById" resultType="com.bonus.sgzb.base.api.domain.MaCodeDto">
|
<select id="getMachineById" resultType="com.bonus.sgzb.base.api.domain.MaCodeDto">
|
||||||
SELECT
|
SELECT
|
||||||
mm.ma_id AS maId,
|
mm.ma_id AS maId,
|
||||||
mm.ma_code AS maCode,
|
mm.ma_code AS maCode,
|
||||||
mm.ma_status AS maStatus,
|
mm.ma_status AS maStatus,
|
||||||
mt1.type_name AS typeName,
|
mt1.type_name AS typeName,
|
||||||
mm.type_id AS typeId,
|
mm.type_id AS typeId,
|
||||||
mt.type_name AS materialName,
|
mt.type_name AS materialName,
|
||||||
mt2.type_name AS materialType
|
mt2.type_name AS materialType
|
||||||
FROM
|
FROM
|
||||||
lease_out_details lod
|
slt_agreement_info sai
|
||||||
LEFT JOIN ma_machine mm ON lod.ma_id = mm.ma_id
|
LEFT JOIN ma_machine mm ON sai.ma_id = mm.ma_id
|
||||||
LEFT JOIN ma_type mt ON mm.type_id = mt.type_id
|
LEFT JOIN ma_type mt ON mm.type_id = mt.type_id
|
||||||
AND mt.del_flag = '0'
|
AND mt.del_flag = '0'
|
||||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
AND mt1.del_flag = '0'
|
AND mt1.del_flag = '0'
|
||||||
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id
|
||||||
AND mt2.del_flag = '0'
|
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
|
WHERE
|
||||||
mm.ma_status = '16' and mm.type_id = #{typeId}
|
sai.status = '0' and mm.type_id = #{typeId}
|
||||||
AND ba.unit_id = #{unitId}
|
and sai.agreement_id = #{agreementId}
|
||||||
AND ba.project_id = #{projectId}
|
|
||||||
<if test="maCode != null and maCode != ''">
|
<if test="maCode != null and maCode != ''">
|
||||||
and mm.ma_code like concat('%',#{maCode},'%')
|
and mm.ma_code like concat('%',#{maCode},'%')
|
||||||
</if>
|
</if>
|
||||||
GROUP BY mm.ma_code
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryBackCode" resultType="java.lang.Integer">
|
<select id="queryBackCode" resultType="java.lang.Integer">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue