From aa1727f02591843cbb2f465595dedbe544e7f839 Mon Sep 17 00:00:00 2001 From: syruan <321359594@qq.com> Date: Thu, 21 Nov 2024 17:20:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E7=AE=A1=E7=90=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20=E5=AE=8C=E5=96=84=E8=AE=B0=E5=BD=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repair/service/impl/RepairServiceImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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())) {