3254194295 4 місяців тому
батько
коміт
6de0dc0da7

+ 3 - 3
platform-service/src/main/java/com/platform/service/repair/impl/RepairApplicationFormServiceImpl.java

@@ -262,6 +262,9 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
     @Override
     @Transactional(rollbackFor = Exception.class)
     public RepairApplicationForm saveModelByDTO(RepairApplicationFormDTO model) {
+        if (model.getCategory()==null){
+            throw new BusinessException("未获取到工单类别!");
+        }
         if (StringUtils.isBlank(model.getSbId())) {
             throw new BusinessException("请填写报修设备");
         }
@@ -370,9 +373,6 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
         this.saveFile(model);
 
         RepairApplicationForm form = BeanConverterUtil.copyObjectProperties(model, RepairApplicationForm.class);
-        if (form.getCategory()==null){
-            form.setCategory(2);//默认为非计划性维修
-        }
 
         int result = mapper.insert(form);