diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/service/impl/RepairServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/service/impl/RepairServiceImpl.java index ba6fe689..5ec52acd 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/service/impl/RepairServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/service/impl/RepairServiceImpl.java @@ -174,6 +174,10 @@ public class RepairServiceImpl implements RepairService { @Override @Transactional(rollbackFor = Exception.class) public AjaxResult submitRepairApply(@NotNull(message = "参数不能为空") RepairApplyRecord bean) { + if (bean == null || bean.getRepairType() == null) { + return AjaxResult.error("维修方式参数不能为空"); + } + // 获取维修详情记录:待维修、已维修、报废的数量 RepairTaskDetails details = repairMapper.getById(bean.getId()); LoginUser loginUser = SecurityUtils.getLoginUser(); @@ -356,6 +360,9 @@ public class RepairServiceImpl implements RepairService { } if (Objects.equals(manageTypeByCode, bean.getManageType())) { // 物资管理方式--编码管理 + if (bean.getRepairType() == null) { + continue; + } // 根据维修方式,更新维修数量、报废数量 switch (bean.getRepairType()) { case inRepairType: { @@ -389,6 +396,9 @@ public class RepairServiceImpl implements RepairService { if (bean.getId() == null) { throw new ServiceException("请完善参数,维修详情ID为空!"); } + if (bean.getRepairType() == null) { + continue; + } // 处理配件--数量管理--内部维修 if (CollectionUtil.isNotEmpty(bean.getNumberInRepairPartList())) {