Browse Source

维修 委外优化

chenyuehu 4 years ago
parent
commit
ca2cb5c70a

+ 2 - 0
platform-dao/src/main/java/com/platform/dao/dto/repair/RepairApplicationFormDTO.java

@@ -239,6 +239,8 @@ public class RepairApplicationFormDTO extends BaseDTO implements Serializable {
      * 委外类别
      */
     private Integer outType;
+
+    private String outNo;
     /**
      * 类型
      */

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/entity/repair/RepairApplicationForm.java

@@ -181,6 +181,7 @@ public class RepairApplicationForm implements Serializable {
      * 委外类别
      */
     private Integer outType;
+    private String outNo;
     /**
      * 类型
      */

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/vo/repair/RepairApplicationFormVO.java

@@ -242,6 +242,7 @@ public class RepairApplicationFormVO extends BaseVO implements Serializable {
      * 委外类别
      */
     private Integer outType;
+    private String outNo;
     /**
      * 类型
      */

+ 3 - 0
platform-dao/src/main/resources/mapper/repair/RepairApplicationFormMapper.xml

@@ -36,6 +36,9 @@
             <if test="outType != null and outType != ''">
                 and application.out_type = #{outType}
             </if>
+            <if test="type != null and type != ''">
+                and application.type = #{type}
+            </if>
             <if test="userId != null and userId != ''">
                 and application.user_id = #{userId}
             </if>

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

@@ -202,19 +202,14 @@ public class RepairApplicationFormServiceImpl extends BaseServiceImpl<RepairAppl
                 throw new BusinessException("找不到设备对应的使用工作组,无法指派维修单,请先设置设备的归属组,sbId" + model.getSbId());
             }
         }
-        model.setNo(type == 1 ? IdGeneratorUtils.getRepairApplicaitonFormNo(++count) : model.getNo());
+        model.setOutNo(model.getOutNo());
+        model.setNo(IdGeneratorUtils.getRepairApplicaitonFormNo(++count));
         String repairUserId = model.getRepairUserId();
         model.setStatus(StringUtils.isNotEmpty(repairUserId) ? RepairApplicationFormStatusEnum.ALLOCATED.getValue() : RepairApplicationFormStatusEnum.NOT_ALLOCATED.getValue());
         model.setApplyTime(LocalDateTime.now());
         model.setCreatedTime(model.getApplyTime());
         model.setUpdateTime(model.getApplyTime());
 
-        // 关联维修单
-        String mainRepairId = model.getMainRepairId();
-        if (StringUtils.isNotEmpty(mainRepairId)) {
-            //TODO
-        }
-
 
 //        List<SysUserVO> userList = sysUserService.selectDeptManager(sb.getUseGroup(), SysDeptManagerType.REPAIR.getValue());
 //        if (userList == null || userList.size() == 0) {