维修模块优化

This commit is contained in:
sxu 2024-11-23 12:38:42 +08:00
parent fffd11e6d2
commit ddc75e45f2
3 changed files with 12 additions and 1 deletions

View File

@ -77,6 +77,8 @@ public interface RepairMapper {
*/ */
int updateScrapNum(@Param("id") Long id, @Param("scrapNum") int scrapNum, @Param("userId") Long userId); int updateScrapNum(@Param("id") Long id, @Param("scrapNum") int scrapNum, @Param("userId") Long userId);
int updateScrapNumAndStatus(@Param("id") Long id, @Param("scrapNum") int scrapNum, @Param("status") int status, @Param("userId") Long userId);
/** /**
* 新增配件维修记录 * 新增配件维修记录
* @param partDetails 配件详情 * @param partDetails 配件详情

View File

@ -395,7 +395,7 @@ public class RepairServiceImpl implements RepairService {
// 报废无需上传配件直接初始化空集合 // 报废无需上传配件直接初始化空集合
partList = bean.getCodeScrapRepairPartList(); partList = bean.getCodeScrapRepairPartList();
// 更新报废数量 // 更新报废数量
repairMapper.updateScrapNum(bean.getId(), 1, loginUser.getUserid()); repairMapper.updateScrapNumAndStatus(bean.getId(), 1, 1, loginUser.getUserid());
break; break;
} }
default: default:

View File

@ -77,6 +77,15 @@
where id = #{id} where id = #{id}
</update> </update>
<update id="updateScrapNumAndStatus">
update repair_apply_details
set scrap_num = #{scrapNum},
status = #{status},
update_by = #{userId},
update_time = now()
where id = #{id}
</update>
<update id="completeRepair"> <update id="completeRepair">
update repair_apply_details update repair_apply_details
set status = '1', set status = '1',