فهرست منبع

Merge branch 'feature-wcz' of lift-manager/lift-server into develop

wucizhong 5 سال پیش
والد
کامیت
79a74f5084

+ 4 - 4
lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/controller/AnnualInspectionController.java

@@ -381,7 +381,7 @@ public class AnnualInspectionController {
     @Verifier(fields = {"id", "selfcheckDate", "selfcheckReportImg"})
     public RestResponse selfcheck(@Ver @RequestBody InspectionRequest request) {
         AnnualInspection entity = annualInspectionService.getById(request.getId());
-        Verify.notNull(entity);
+        Verify.notNull(entity, "年检记录不存在,请核查");
 
         entity.setSelfcheckDate(request.getSelfcheckDate());
         entity.setSelfcheckReportImg(request.getSelfcheckReportImg());
@@ -402,7 +402,7 @@ public class AnnualInspectionController {
     @Verifier(fields = {"id", "checkDate", "checkResultImg"})
     public RestResponse check(@Ver @RequestBody InspectionRequest request) {
         AnnualInspection entity = annualInspectionService.getById(request.getId());
-        Verify.notNull(entity);
+        Verify.notNull(entity, "年检记录不存在,请核查");
 
         entity.setCheckDate(request.getCheckDate());
         entity.setCheckResultImg(request.getCheckResultImg());
@@ -423,7 +423,7 @@ public class AnnualInspectionController {
     @Verifier(fields = {"id", "certificateImgUrl", "annualInspectionImg"})
     public RestResponse finish(@Ver @RequestBody InspectionRequest request) {
         AnnualInspection entity = annualInspectionService.getById(request.getId());
-        Verify.notNull(entity);
+        Verify.notNull(entity, "年检记录不存在,请核查");
 
         entity.setCertificateImgUrl(request.getCertificateImgUrl());
         entity.setAnnualInspectionImg(request.getAnnualInspectionImg());
@@ -440,7 +440,7 @@ public class AnnualInspectionController {
         log.info("headerAlias: {}", headerAlias);
         //查询数据
         List<InspectionResponse> inspections = annualInspectionService.listByIdList(request);
-        Verify.notNull(inspections);
+        Verify.notNull(inspections, "年检记录不存在,请核查");
 
         //压缩文件夹
         File baseDir = null;

+ 3 - 3
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/controller/EmergencyRepairController.java

@@ -173,7 +173,7 @@ public class EmergencyRepairController {
         Long mtCompanyId = entity.getMtCompanyId();
         Long liftId = entity.getLiftId();
         int repairing = emergencyRepairService.countRepairing(mtCompanyId, liftId);
-        Verify.nolt0(repairing, Verify.Repair.haveUnfinisedRepair);
+        Verify.notTrue(repairing > 0, Verify.Repair.haveUnfinisedRepair);
         PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(entity.getMtCompanyId(), entity.getLiftId());
         if (Objects.nonNull(relevance)) {
             Verify.notTrue(relevance.getLiftCompanyStatus().equals(CommonEnum.LiftStatus.ANNUAL_INSPECTION.getCode()), Verify.Repair.inspection);
@@ -490,7 +490,7 @@ public class EmergencyRepairController {
         Verify.notNull(repair, Verify.Repair.notExist);
 
         ErRecordCost erRecordCost = erRecordCostService.findByRecordAndId(id, erCostItemId);
-        Verify.notNull(erRecordCost);
+        Verify.notNull(erRecordCost, "急修收费项不存在,请核查");
 
         BigDecimal costTotal = repair.getCostTotal();
         BigDecimal costMoney = erRecordCost.getCostMoney();
@@ -765,7 +765,7 @@ public class EmergencyRepairController {
     public void export(@Ver @RequestBody RepairRequest request, HttpServletResponse response) {
         log.info("headerAlias: {}", headerAlias);
         List<RepairResponse> repairs = emergencyRepairService.listByIdList(request);
-        Verify.notNull(repairs);
+        Verify.notNull(repairs, "急修记录不存在,请核查");
 
         fillLiftFaults(repairs);
 

+ 0 - 2
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/EmergencyRepairService.java

@@ -277,8 +277,6 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      */
     @Transactional(rollbackFor = Exception.class)
     public RestResponse repairOrder(EmergencyRepair repair, List<ErRecordImg> erRecordImgs) {
-        Verify.notNull(repair);
-        Verify.notNull(erRecordImgs);
         boolean re = saveOrUpdate(repair);
         if (!re) {
             return RestResponse.fail("修改急修失败,请稍后重试");

+ 1 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/library/service/LiftService.java

@@ -462,7 +462,7 @@ public class LiftService extends ServiceImpl<LiftMapper, Lift> {
         //1 获取同一registration_code对应多个电梯的记录
         //SELECT DISTINCT registration_code FROM lift GROUP BY registration_code HAVING count(*) > 1
         List<Lift> liftCodes = groupByRegistrationCode();
-        Verify.notNull(liftCodes);
+        Verify.notNull(liftCodes, "电梯注册信息为空");
         //按照registration_code 分组
         Map<String, List<Lift>> codesMap = liftCodes.stream().collect(Collectors.groupingBy(Lift::getRegistrationCode));
         //根据存在重复lift的code去查询registration_code <--> id的对应关系

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

@@ -186,10 +186,10 @@ public class MaintenanceRecordController {
         Integer liftType = request.getLiftType();
         Long mtCompanyId = request.getMtCompanyId();
         List<MaintenanceOption> optionList = maintenanceOptionService.listByTypeAndLiftType(type, liftType, mtCompanyId);
-        Verify.notNull(optionList);
+        Verify.notNull(optionList, "维保操作项不存在,请核查");
         //按照sort groupby
         Map<Integer, List<MaintenanceOption>> mtOptionMap = optionList.stream().collect(Collectors.groupingBy(MaintenanceOption::getSort));
-        Verify.notNull(mtOptionMap);
+        Verify.notNull(mtOptionMap, "维保操作项不存在,请核查");
         List<MtOptionTree> mtOptionTrees = new ArrayList<>();
         mtOptionMap.forEach((sort, options) -> {
             mtOptionTrees.add(new MtOptionTree(sort, options));