报废流程问题修复

This commit is contained in:
hongchao 2025-06-12 19:12:21 +08:00
parent 582dccbe0b
commit b1906e1263
4 changed files with 11 additions and 1 deletions

View File

@ -274,4 +274,6 @@ public interface ScrapApplyDetailsMapper
List<RepairAuditDetailsNew> selectAuditRepairListNew(int parentId); List<RepairAuditDetailsNew> selectAuditRepairListNew(int parentId);
int updateAuditNum(RepairAuditDetailsNew bean); int updateAuditNum(RepairAuditDetailsNew bean);
int updateScrapStatus(int parentId);
} }

View File

@ -1085,6 +1085,8 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
} else { } else {
int parentId = scrapApplyDetailsMapper.getParentId(vo); int parentId = scrapApplyDetailsMapper.getParentId(vo);
//修改repair_audit_details表状态为报废驳回
scrapApplyDetailsMapper.updateScrapStatus(parentId);
List<RepairAuditDetailsNew> auditList = scrapApplyDetailsMapper.selectAuditRepairListNew(parentId); List<RepairAuditDetailsNew> auditList = scrapApplyDetailsMapper.selectAuditRepairListNew(parentId);
//驳回时返回库存 //驳回时返回库存
for (RepairAuditDetailsNew bean : auditList) { for (RepairAuditDetailsNew bean : auditList) {

View File

@ -413,7 +413,7 @@
left join sys_user su on rar.create_by = su.user_id left join sys_user su on rar.create_by = su.user_id
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
LEFT JOIN ma_type_repair mtr on mtr.type_id = rar.type_id LEFT JOIN ma_type_repair mtr on mtr.type_id = rar.type_id
where rar.type_id = #{typeId} and rad.status != 2 where rar.type_id = #{typeId} and rad.status != 2 and rad.status != 3
<if test="userId != null and userId != ''"> <if test="userId != null and userId != ''">
and mtr.user_id = #{userId} and mtr.user_id = #{userId}

View File

@ -854,4 +854,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time = now() update_time = now()
where id = #{repairId} where id = #{repairId}
</update> </update>
<update id="updateScrapStatus">
update repair_audit_details
set status = 3
where parent_id = #{parentId}
</update>
</mapper> </mapper>