Browse Source

[chg] MaintenanceOption中liftCategory

wcz 5 years ago
parent
commit
b10033fd9d

+ 6 - 6
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/controller/MaintenanceRecordController.java

@@ -180,12 +180,12 @@ public class MaintenanceRecordController {
      * @return RestResponse
      * @return RestResponse
      */
      */
     @PostMapping("treeOptions")
     @PostMapping("treeOptions")
-    @Validation(fields = {"mtCompanyId", "type", "liftType"})
+    @Validation(fields = {"mtCompanyId", "type", "liftCategory"})
     public RestResponse treeOptions(@Val @RequestBody MtRecordRequest request) {
     public RestResponse treeOptions(@Val @RequestBody MtRecordRequest request) {
         Integer type = request.getType();
         Integer type = request.getType();
-        Integer liftType = request.getLiftType();
+        Integer liftCategory = request.getLiftCategory();
         Long mtCompanyId = request.getMtCompanyId();
         Long mtCompanyId = request.getMtCompanyId();
-        List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftType(type, liftType, mtCompanyId);
+        List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftCategory(type, liftCategory, mtCompanyId);
         Validate.notTrue(IterUtil.isEmpty(optionList), "维保操作项不存在,请核查");
         Validate.notTrue(IterUtil.isEmpty(optionList), "维保操作项不存在,请核查");
         //按照sort groupby
         //按照sort groupby
         Map<Integer, List<MaintenanceOption>> mtOptionMap = optionList.stream().collect(Collectors.groupingBy(MaintenanceOption::getSort));
         Map<Integer, List<MaintenanceOption>> mtOptionMap = optionList.stream().collect(Collectors.groupingBy(MaintenanceOption::getSort));
@@ -203,12 +203,12 @@ public class MaintenanceRecordController {
      * @return RestResponse
      * @return RestResponse
      */
      */
     @PostMapping("listOptions")
     @PostMapping("listOptions")
-    @Validation(fields = {"mtCompanyId", "type", "liftType"})
+    @Validation(fields = {"mtCompanyId", "type", "liftCategory"})
     public RestResponse listOptions(@Val @RequestBody MtRecordRequest request) {
     public RestResponse listOptions(@Val @RequestBody MtRecordRequest request) {
         Integer type = request.getType();
         Integer type = request.getType();
-        Integer liftType = request.getLiftType();
+        Integer liftCategory = request.getLiftCategory();
         Long mtCompanyId = request.getMtCompanyId();
         Long mtCompanyId = request.getMtCompanyId();
-        List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftType(type, liftType, mtCompanyId);
+        List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftCategory(type, liftCategory, mtCompanyId);
         return RestResponse.success(optionList);
         return RestResponse.success(optionList);
     }
     }
 
 

+ 3 - 3
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/request/MtRecordRequest.java

@@ -63,10 +63,10 @@ public class MtRecordRequest extends PageRequest {
     private Long mtCompanyId;
     private Long mtCompanyId;
 
 
     /**
     /**
-     * 电梯类型(1:直梯;2:扶梯)
+     * 电梯类别(1:曳引梯;2:液压梯;3:杂物梯;4:自动扶梯;5:自动人行道)
      */
      */
-    @Min(value = 1,message = "电梯类有误")
-    private Integer liftType;
+    @Min(value = 1,message = "电梯类有误")
+    private Integer liftCategory;
 
 
     /**
     /**
      * 保养类型 1.半月,2.季度,3.半年,4.全年
      * 保养类型 1.半月,2.季度,3.半年,4.全年

+ 3 - 3
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenanceOptionService.java

@@ -24,15 +24,15 @@ public class MaintenanceOptionService extends ServiceImpl<MaintenanceOptionMappe
     /**
     /**
      * 根据维保项类型,电梯类型,维保公司id查询维保项
      * 根据维保项类型,电梯类型,维保公司id查询维保项
      * @param type 维保类型
      * @param type 维保类型
-     * @param liftType 电梯类型
+     * @param liftCategory 电梯类别
      * @param mtCompanyId 维保公司id
      * @param mtCompanyId 维保公司id
      * @return List<MaintenanceOption>
      * @return List<MaintenanceOption>
      */
      */
-    public List<MaintenanceOption> listByTypeAndLiftType(Integer type,Integer liftType,Long mtCompanyId){
+    public List<MaintenanceOption> listByTypeAndLiftCategory(Integer type,Integer liftCategory,Long mtCompanyId){
         LambdaQueryWrapper<MaintenanceOption> lambdaQueryWrapper = Wrappers.lambdaQuery();
         LambdaQueryWrapper<MaintenanceOption> lambdaQueryWrapper = Wrappers.lambdaQuery();
         lambdaQueryWrapper.in(MaintenanceOption::getMtCompanyId,Arrays.asList(0, mtCompanyId));
         lambdaQueryWrapper.in(MaintenanceOption::getMtCompanyId,Arrays.asList(0, mtCompanyId));
         lambdaQueryWrapper.eq(MaintenanceOption::getType,type);
         lambdaQueryWrapper.eq(MaintenanceOption::getType,type);
-        lambdaQueryWrapper.eq(MaintenanceOption::getLiftType,liftType);
+        lambdaQueryWrapper.eq(MaintenanceOption::getLiftType,liftCategory);
         return list(lambdaQueryWrapper);
         return list(lambdaQueryWrapper);
     }
     }
 }
 }