退料编码重复创建接口修改

This commit is contained in:
bonus 2025-09-27 21:40:44 +08:00
parent d19d313683
commit bc7317d324
3 changed files with 55 additions and 36 deletions

View File

@ -513,4 +513,6 @@ public interface BackApplyInfoMapper {
int syncProject(BackApplyInfo backApplyInfo);
int syncProjectDetails(BackApplyInfo backApplyInfo2);
BackApplyDetails selectCheckREDetails(BackApplyDetails details);
}

View File

@ -1489,7 +1489,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
details.setPreNum(BigDecimal.ONE);
details.setMaId(maCodeDto.getMaId());
BackApplyDetails checkDetails = backApplyInfoMapper.selectCheckDetails(details);
BackApplyDetails checkDetails = backApplyInfoMapper.selectCheckREDetails(details);
if (checkDetails != null) {
}else{
@ -2456,7 +2456,9 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
// 退料单位的协议ID如果查不到就通过别的协议查例如班组的协议查不到可能是项目部去领用的
if (!Objects.equals(record.getAgreementId(), bean.getAgreementId())) {
infoList = backApplyInfoMapper.getStlInfo(bean.setAgreementId(record.getAgreementId()));
if (CollectionUtils.isEmpty(infoList)) return 0;
if (CollectionUtils.isEmpty(infoList)) {
return 0;
}
} else {
return 0;
}

View File

@ -1590,4 +1590,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and archives_value is not null
)
</select>
<select id="selectCheckREDetails" resultType="com.bonus.material.back.domain.BackApplyDetails">
SELECT
id AS id,
parent_id AS parentId,
type_id AS typeId
FROM
back_check_details
where is_finished =0 and type_id = #{typeId}
<if test="maId != null">
and ma_id = #{maId}
</if>
</select>
</mapper>