Jelajahi Sumber

[chg] 年检阶段操作数据检查

wcz 5 tahun lalu
induk
melakukan
225586eb97
17 mengubah file dengan 292 tambahan dan 197 penghapusan
  1. 7 9
      lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/controller/AnnualInspectionController.java
  2. 2 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/dto/InspectionRequest.java
  3. 0 7
      lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/entity/AnnualInspection.java
  4. 21 21
      lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/service/AnnualInspectionService.java
  5. 16 16
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/controller/EmergencyRepairController.java
  6. 46 48
      lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/EmergencyRepairService.java
  7. 1 1
      lift-business-service/src/main/java/cn/com/ty/lift/business/framework/aspect/VerifyMethodInterceptor.java
  8. 2 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/framework/conf/SystemConfiguration.java
  9. 181 80
      lift-common/src/main/java/cn.com.ty.lift.common/verify/Verification.java
  10. 9 5
      lift-common/src/main/java/cn.com.ty.lift.common/verify/Verify.java
  11. 1 1
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/common/VerifyMethodInterceptor.java
  12. 1 1
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/config/SystemConfiguration.java
  13. 1 1
      lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/AttendanceController.java
  14. 1 1
      lift-quan-service/src/main/java/cn/com/ty/lift/quan/config/SystemConfiguration.java
  15. 1 1
      lift-quan-service/src/main/java/cn/com/ty/lift/quan/config/VerifyMethodInterceptor.java
  16. 1 1
      lift-system-service/src/main/java/cn/com/ty/lift/system/config/SystemConfiguration.java
  17. 1 1
      lift-system-service/src/main/java/cn/com/ty/lift/system/config/VerifyMethodInterceptor.java

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

@@ -116,8 +116,6 @@ public class AnnualInspectionController {
 
     /**
      * 待确认年检计划, 根据电梯中的年检时间,提前45天通知
-     * @param request
-     * @return
      */
     @PostMapping("toConfirm")
     @Verifier(fields = {"mtCompanyId"})
@@ -274,8 +272,8 @@ public class AnnualInspectionController {
             old.setStepStatus(3);
             old.setStepName(2);//转回阶段2
         }
-        boolean ai = annualInspectionService.stepThree(old, entity.getProjectId(), entity.getIsCheckGoverner(), entity.getLoadInspectionSetting());
-        return RestResponse.success(ai);
+        RestResponse result = annualInspectionService.stepThree(old, entity.getProjectId(), entity.getIsCheckGoverner(), entity.getLoadInspectionSetting());
+        return result;
     }
 
     /**
@@ -312,8 +310,8 @@ public class AnnualInspectionController {
         }
         old.setStepName(4);
 
-        boolean ai = annualInspectionService.stepFour(old);
-        return RestResponse.success(ai);
+        RestResponse result = annualInspectionService.stepFour(old);
+        return result;
     }
     /**
      * 修改年检信息
@@ -473,7 +471,7 @@ public class AnnualInspectionController {
      */
 //    @PostMapping("confirm")
 //    @Verifier(fields = {"id"})
-    public RestResponse confirm(@Ver @RequestBody InspectionRequest request) {
+    public RestResponse confirm(@RequestBody InspectionRequest request) {
         AnnualInspection entity = annualInspectionService.getById(request.getId());
         Verify.notNull(entity);
         entity.setStepStatus(Verify.Inspection.STATUS_CONFIRM);
@@ -608,7 +606,7 @@ public class AnnualInspectionController {
             FileUtil.del(zipFile);
             FileUtil.del(baseDir);
             log.error("生成文件失败", e);
-            throw Verify.judgeException("生成文件失败");
+            throw Verify.verifyException("生成文件失败");
         }
         //下载压缩文件
         if (FileUtil.exist(zipFile)) {
@@ -626,7 +624,7 @@ public class AnnualInspectionController {
                 }
             } catch (Exception e) {
                 log.error("下载文件失败", e);
-                throw Verify.judgeException("下载文件失败");
+                throw Verify.verifyException("下载文件失败");
             }finally {
                 //删除临时根目录和zip文件
 //                FileUtil.del(zipFile);

+ 2 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/dto/InspectionRequest.java

@@ -144,6 +144,7 @@ public class InspectionRequest extends PageRequest {
     /**
      * 下次年检日期
      */
-    @NotEmpty(message = "请设置下次年检时间")
+    @NotNull(message = "请设置下次年检时间")
+    @FutureOrPresent(message = "下次年检时间不得晚于标准北京时间")
     private LocalDate nextInspectionTime;
 }

+ 0 - 7
lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/entity/AnnualInspection.java

@@ -5,12 +5,10 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import org.hibernate.validator.constraints.Range;
 
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 
@@ -30,7 +28,6 @@ public class AnnualInspection extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
     @TableId("id")
-    @Min(value = 1, message = "年检记录ID有误")
     private Long id;
 
     /**
@@ -85,7 +82,6 @@ public class AnnualInspection extends BaseEntity {
     /**
      * 联系电话
      */
-    @Size(min = 7,max = 11,message = "联系电话格式有误")
     private String telephone;
 
     /**
@@ -96,7 +92,6 @@ public class AnnualInspection extends BaseEntity {
     /**
      * 状态(0 待完成;1 已完成;2 超期)
      */
-    @Max(value = 2,message = "年检状态有误")
     private Integer status;
 
     /**
@@ -147,13 +142,11 @@ public class AnnualInspection extends BaseEntity {
      9	企业文员确认年检报告和合格证-合格
      10	企业文员确认年检报告和合格证-不合格
      */
-    @Max(value = 10,message = "年检阶段状态有误")
     private Integer stepStatus;
 
     /**
      * 年检阶段名称
      * 0 未开始; 1 第一阶段 1-2;2 第二阶段 3;3 第三阶段 4-7;4 第四阶段 8-10
      */
-    @Range(max = 4,message = "年检阶段名有误")
     private Integer stepName;
 }

+ 21 - 21
lift-business-service/src/main/java/cn/com/ty/lift/business/annualinspection/service/AnnualInspectionService.java

@@ -15,6 +15,7 @@ import cn.com.ty.lift.business.library.service.PlatformCompanyLiftRelevanceServi
 import cn.com.ty.lift.business.maintenance.service.MaintenancePlanService;
 import cn.com.ty.lift.common.constants.CommonEnum;
 import cn.com.ty.lift.common.verify.Verify;
+import cn.com.xwy.boot.web.dto.RestResponse;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -114,18 +115,18 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
      * 7	企业文员确认检验结果-不合格 --> 可以算年检超期
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean stepThree(AnnualInspection entity, Long projectId, Integer isCheckGoverner, Integer loadInspectionSetting) {
+    public RestResponse stepThree(AnnualInspection entity, Long projectId, Integer isCheckGoverner, Integer loadInspectionSetting) {
         //更新年检
         boolean up = updateById(entity);
         //更新失败,直接返回false
         if (!up) {
-            return false;
+            return RestResponse.fail("更新年检失败");
         }
         Long mtCompanyId = entity.getMtCompanyId();
         Long liftId = entity.getLiftId();
         PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(mtCompanyId, liftId);
         if (null == relevance) {
-            return true;
+            return RestResponse.fail("平台公司电梯关联信息不存在");
         }
         //如果电梯在急修中,关掉急修,开始年检
         if (relevance.getLiftCompanyStatus().equals(CommonEnum.LiftStatus.EMERGENCY_REPAIR.getCode())) {
@@ -137,7 +138,7 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
                 boolean cl = emergencyRepairService.updateById(repair);
                 if (!cl) {
                     rollback();
-                    return false;
+                    return RestResponse.fail("关闭急修失败");
                 }
             }
         }
@@ -146,14 +147,14 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
         if(!re){
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("修改电梯业务状态失败");
         }
-        //更新电梯中下一次年检信息
+        //todo: 更新电梯中下一次年检信息
         //电梯不存在,说明数据有误,直接返回false
         Lift lift = liftService.getById(liftId);
         if (null == lift) {
             rollback();
-            return false;
+            return RestResponse.fail("关联电梯不存在");
         }
         //更新电梯之前获取旧的年检时间
         LocalDate oldInspectionDate = lift.getAnnualInspectionDate();
@@ -167,7 +168,7 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
         //更新电梯失败,返回false
         if (!li) {
             rollback();
-            return false;
+            return RestResponse.fail("更新电梯下一次年检信息失败");
         }
         //更新电梯成功,插入电梯操作记录
         LiftHistory liftHistory = new LiftHistory();
@@ -183,10 +184,10 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
         boolean lh = liftHistoryService.save(liftHistory);
         //插入电梯记录成功,直接返回true,否则手动事务回滚,返回false
         if (lh) {
-            return true;
+            return RestResponse.success(true);
         } else {
             rollback();
-            return false;
+            return RestResponse.fail("添加电梯操作日志失败");
         }
     }
     /**
@@ -195,12 +196,12 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
      * 10	企业文员确认年检报告和合格证-不合格 -->停用电梯
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean stepFour(AnnualInspection entity){
+    public RestResponse stepFour(AnnualInspection entity){
         //更新年检
         boolean up = updateById(entity);
         //更新失败,直接返回false
         if (!up) {
-            return false;
+            return RestResponse.fail("更新年检失败");
         }
         Integer stepStatus = entity.getStepStatus();
         Long mtCompanyId = entity.getMtCompanyId();
@@ -208,7 +209,7 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
 
         PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(mtCompanyId, liftId);
         if (null == relevance) {
-            return true;
+            return RestResponse.fail("平台公司电梯关联信息不存在");
         }
         //todo 不合格:流程结束,电梯扭转到不合格状态列表,电梯停保,清理维保计划记录
         if (Verify.Inspection.statusCertificateReportUnqualified(stepStatus)) {
@@ -217,32 +218,31 @@ public class AnnualInspectionService extends ServiceImpl<AnnualInspectionMapper,
             boolean re = platformCompanyLiftRelevanceService.updateById(relevance);
             if(!re){
                 rollback();
-                return false;
+                return RestResponse.fail("修改电梯业务状态失败");
             }
 
             boolean mp = maintenancePlanService.cleanPlan(mtCompanyId, liftId);
             if (mp) {
-                return true;
+                return RestResponse.success(true);
             } else {
                 //强制手动事务回滚
                 rollback();
-                return false;
+                return RestResponse.fail("清除电梯维保计划失败");
             }
         }
-        //todo:合格:修改电梯的年检时间lift-annual_inspection_date,增加lift_history记录
+        //todo:合格:修改电梯的业务状态为正常
         if (Verify.Inspection.statusCertificateReportQualified(stepStatus)) {
             //如果合格,修改电梯的业务状态为正常
             relevance.setLiftCompanyStatus(CommonEnum.LiftStatus.NORMAL.getCode());
             boolean re = platformCompanyLiftRelevanceService.updateById(relevance);
             if(re){
-                return true;
+                return RestResponse.success(true);
             }else{
                 rollback();
-                return false;
-
+                return RestResponse.fail("修改电梯业务状态失败");
             }
         }
-        return true;
+        return RestResponse.success(true);
     }
 
     /**

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

@@ -279,8 +279,8 @@ public class EmergencyRepairController {
         //新状态(-1 暂停中,0 待修理;1 修理中;2 已完成 3 已关闭)
         entity.setStatus(Verify.Repair.STATUS_CLOSE);
 
-        boolean result = emergencyRepairService.close(entity);
-        return RestResponse.success(result);
+        RestResponse result = emergencyRepairService.close(entity);
+        return result;
     }
 
     /**
@@ -314,8 +314,8 @@ public class EmergencyRepairController {
         //todo:修改电梯的业务状态为急修中,如果存在维保中,要修改
         entity.setStatus(Verify.Repair.STATUS_REPAIRING);
 
-        boolean result = emergencyRepairService.taking(entity);
-        return RestResponse.success(result);
+        RestResponse result = emergencyRepairService.taking(entity);
+        return result;
     }
 
     /**
@@ -374,8 +374,8 @@ public class EmergencyRepairController {
         BigDecimal costTotal = erRecordCosts.stream().map(ErRecordCost::getCostMoney).reduce(BigDecimal.ZERO, (m1, m2) -> m1.add(m2));
         repair.setCostTotal(costTotal);
 
-        boolean result = emergencyRepairService.addCost(repair, erRecordCosts);
-        return RestResponse.success(result);
+        RestResponse result = emergencyRepairService.addCost(repair, erRecordCosts);
+        return result;
     }
 
     /**
@@ -405,8 +405,8 @@ public class EmergencyRepairController {
 
         repair.setCostTotal(costTotal.subtract(costMoney));
 
-        boolean result = emergencyRepairService.deleteCost(repair, erRecordCost);
-        return RestResponse.success(result);
+        RestResponse result = emergencyRepairService.deleteCost(repair, erRecordCost);
+        return result;
     }
 
     /**
@@ -425,8 +425,8 @@ public class EmergencyRepairController {
         BigDecimal costTotal = erRecordCosts.stream().map(ErRecordCost::getCostMoney).reduce(BigDecimal.ZERO, (m1, m2) -> m1.add(m2));
         repair.setCostTotal(costTotal);
 
-        boolean result = emergencyRepairService.modifyCost(repair, erRecordCosts);
-        return RestResponse.success(result);
+        RestResponse result = emergencyRepairService.modifyCost(repair, erRecordCosts);
+        return result;
     }
 
     /**
@@ -492,8 +492,8 @@ public class EmergencyRepairController {
         //设置评价状态
         repair.setHasEvaluate(1);
 
-        boolean result = emergencyRepairService.evaluate(repair, entity);
-        return RestResponse.success(result);
+        RestResponse result = emergencyRepairService.evaluate(repair, entity);
+        return result;
     }
 
     /**
@@ -532,8 +532,8 @@ public class EmergencyRepairController {
         //修改状态已完成
         entity.setStatus(Verify.Repair.STATUS_FINISH);
 
-        boolean result = emergencyRepairService.repairOrder(entity, erRecordImgs);
-        return RestResponse.success(result);
+        RestResponse result = emergencyRepairService.repairOrder(entity, erRecordImgs);
+        return result;
     }
 
     /**
@@ -723,7 +723,7 @@ public class EmergencyRepairController {
             FileUtil.del(zipFile);
             FileUtil.del(baseDir);
             log.error("生成文件失败", e);
-            throw Verify.judgeException("生成文件失败");
+            throw Verify.verifyException("生成文件失败");
         }
         //下载压缩文件
         if (FileUtil.exist(zipFile)) {
@@ -743,7 +743,7 @@ public class EmergencyRepairController {
                 FileUtil.del(zipFile);
                 FileUtil.del(baseDir);
                 log.error("下载文件失败", e);
-                throw Verify.judgeException("下载文件失败");
+                throw Verify.verifyException("下载文件失败");
             }
         }
         //删除临时根目录和zip文件

+ 46 - 48
lift-business-service/src/main/java/cn/com/ty/lift/business/emergency/service/EmergencyRepairService.java

@@ -12,6 +12,7 @@ import cn.com.ty.lift.business.library.dao.entity.PlatformCompanyLiftRelevance;
 import cn.com.ty.lift.business.library.service.PlatformCompanyLiftRelevanceService;
 import cn.com.ty.lift.common.constants.CommonEnum;
 import cn.com.ty.lift.common.verify.Verify;
+import cn.com.xwy.boot.web.dto.RestResponse;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -98,24 +99,24 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @return boolean
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean taking(EmergencyRepair entity) {
+    public RestResponse taking(EmergencyRepair entity) {
         boolean er = updateById(entity);
         if (!er) {
-            return false;
+            return RestResponse.fail("修改急修失败");
         }
         PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(entity.getMtCompanyId(), entity.getLiftId());
         if (null == relevance) {
-            return false;
+            return RestResponse.fail("平台公司电梯关联信息不存在");
         }
         //电梯业务状态改成急修中
         relevance.setLiftCompanyStatus(CommonEnum.LiftStatus.EMERGENCY_REPAIR.getCode());
         boolean re = platformCompanyLiftRelevanceService.updateById(relevance);
         if (re) {
-            return true;
+            return RestResponse.success(true);
         } else {
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("修改电梯业务状态失败");
         }
     }
 
@@ -189,35 +190,35 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @return boolean
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean startMaintenance(Long mtCompanyId, Long liftId) {
+    public RestResponse startMaintenance(Long mtCompanyId, Long liftId) {
         // 如果急修单不存在,直接返回,
         EmergencyRepair emergencyRepair = findByMtCompanyAndLift(mtCompanyId, liftId);
         if (null == emergencyRepair) {
-            return true;
+            return RestResponse.success(true);
         }
         //如果存在,不在急修中
         if (!Verify.Repair.statusRepairing(emergencyRepair.getStatus())) {
-            return true;
+            return RestResponse.success(true);
         }
         // 如果存在,并且急修中,急修改成暂停中
         emergencyRepair.setStatus(Verify.Repair.STATUS_STOPING);
         boolean er = updateById(emergencyRepair);
         if (!er) {
-            return false;
+            return RestResponse.fail("修改急修失败");
         }
         PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(mtCompanyId, liftId);
         if (null == relevance) {
-            return false;
+            return RestResponse.fail("平台公司电梯关联信息不存在");
         }
         //电梯业务状态改成维保中
         relevance.setLiftCompanyStatus(CommonEnum.LiftStatus.MAINTENANCE.getCode());
         boolean re = platformCompanyLiftRelevanceService.updateById(relevance);
         if (re) {
-            return true;
+            return RestResponse.success(true);
         } else {
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("修改电梯业务状态失败");
         }
     }
 
@@ -228,35 +229,35 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @param liftId 电梯id
      * @return boolean
      */
-    public boolean stopMaintenance(Long mtCompanyId, Long liftId) {
+    public RestResponse stopMaintenance(Long mtCompanyId, Long liftId) {
         //如果急修单不存在,直接返回,
         EmergencyRepair emergencyRepair = findByMtCompanyAndLift(mtCompanyId, liftId);
         if (null == emergencyRepair) {
-            return true;
+            return RestResponse.success(true);
         }
         //如果急修单不在暂停中,直接返回true
         if (!Verify.Repair.statusStoping(emergencyRepair.getStatus())) {
-            return true;
+            return RestResponse.success(true);
         }
         //恢复暂停中的急修为急修中
         emergencyRepair.setStatus(Verify.Repair.STATUS_REPAIRING);
         boolean er = updateById(emergencyRepair);
         if (!er) {
-            return false;
+            return RestResponse.fail("修改急修失败");
         }
         PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(mtCompanyId, liftId);
         if (null == relevance) {
-            return false;
+            return RestResponse.fail("平台公司电梯关联信息不存在");
         }
         //电梯业务状态改成急修中
         relevance.setLiftCompanyStatus(CommonEnum.LiftStatus.EMERGENCY_REPAIR.getCode());
         boolean re = platformCompanyLiftRelevanceService.updateById(relevance);
         if (re) {
-            return true;
+            return RestResponse.success(true);
         } else {
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("修改电梯业务状态失败");
         }
     }
 
@@ -268,20 +269,20 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @return boolean
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean repairOrder(EmergencyRepair repair, List<ErRecordImg> erRecordImgs) {
+    public RestResponse repairOrder(EmergencyRepair repair, List<ErRecordImg> erRecordImgs) {
         Verify.notNull(repair);
         Verify.notNull(erRecordImgs);
         boolean re = saveOrUpdate(repair);
         if (!re) {
-            return false;
+            return RestResponse.fail("修改急修失败");
         }
         boolean im = erRecordImgService.saveBatch(erRecordImgs);
         if (im) {
-            return true;
+            return RestResponse.success(true);
         } else {
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("插入急修图片失败");
         }
     }
 
@@ -293,18 +294,18 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @return boolean
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean addCost(EmergencyRepair repair, List<ErRecordCost> erRecordCosts) {
+    public RestResponse addCost(EmergencyRepair repair, List<ErRecordCost> erRecordCosts) {
         boolean re = saveOrUpdate(repair);
         if (!re) {
-            return false;
+            return RestResponse.fail("修改急修失败");
         }
         boolean er = erRecordCostService.saveBatch(erRecordCosts);
         if (er) {
-            return true;
+            return RestResponse.success(true);
         } else {
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("插入急修收费项失败");
         }
     }
 
@@ -316,10 +317,10 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @return boolean
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean modifyCost(EmergencyRepair repair, List<ErRecordCost> erRecordCosts) {
+    public RestResponse modifyCost(EmergencyRepair repair, List<ErRecordCost> erRecordCosts) {
         boolean re = saveOrUpdate(repair);
         if (!re) {
-            return false;
+            return RestResponse.fail("修改急修失败");
         }
         //先删除原有的收费项,再添加新的
 //        List<ErRecordCost> costs = erRecordCostService.listByErRecordId(repair.getId());
@@ -329,11 +330,11 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
         //原有的更新,新加的新增
         boolean er = erRecordCostService.saveOrUpdateBatch(erRecordCosts,erRecordCosts.size());
         if (er) {
-            return true;
+            return RestResponse.success(true);
         } else {
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("修改急修收费项失败");
         }
     }
 
@@ -345,18 +346,18 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @return boolean
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean deleteCost(EmergencyRepair repair, ErRecordCost erRecordCost) {
+    public RestResponse deleteCost(EmergencyRepair repair, ErRecordCost erRecordCost) {
         boolean er = erRecordCostService.removeById(erRecordCost.getId());
         if (!er) {
-            return false;
+            return RestResponse.fail("修改急修失败");
         }
         boolean re = updateById(repair);
         if (re) {
-            return true;
+            return RestResponse.success(true);
         } else {
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("删除急修收费项失败");
         }
     }
 
@@ -368,44 +369,41 @@ public class EmergencyRepairService extends ServiceImpl<EmergencyRepairMapper, E
      * @return boolean
      */
     @Transactional(rollbackFor = Exception.class)
-    public boolean evaluate(EmergencyRepair repair, Evaluation entity) {
+    public RestResponse evaluate(EmergencyRepair repair, Evaluation entity) {
         boolean ev = evaluationService.save(entity);
         if (!ev) {
-            return false;
+            return RestResponse.fail("插入评价失败");
         }
         boolean re = updateById(repair);
         if (re) {
-            return true;
+            return RestResponse.success(true);
         } else {
             //强制手动事务回滚
             rollback();
-            return false;
+            return RestResponse.fail("更新急修评价状态失败");
         }
     }
 
     @Transactional(rollbackFor = Exception.class)
-    public boolean close(EmergencyRepair repair){
+    public RestResponse close(EmergencyRepair repair){
         boolean er = updateById(repair);
         if(!er){
-            return false;
+            return RestResponse.fail("修改急修失败");
         }
         PlatformCompanyLiftRelevance relevance = platformCompanyLiftRelevanceService.findByMtCompanyAndLift(repair.getMtCompanyId(), repair.getLiftId());
         if (null == relevance) {
-            return false;
+            return RestResponse.fail("平台公司电梯关联信息不存在");
         }
         //电梯业务状态如果在急修中 改成正常
         if(relevance.getLiftCompanyStatus().equals(CommonEnum.LiftStatus.EMERGENCY_REPAIR.getCode())){
             relevance.setLiftCompanyStatus(CommonEnum.LiftStatus.NORMAL.getCode());
             boolean re = platformCompanyLiftRelevanceService.updateById(relevance);
-            if (re) {
-                return true;
-            } else {
+            if (!re) {
                 //强制手动事务回滚
                 rollback();
-                return false;
+                return RestResponse.fail("修改电梯业务状态是不");
             }
-        }else {
-            return true;
         }
+        return RestResponse.success(true);
     }
 }

+ 1 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/framework/aspect/VerifyMethodInterceptor.java

@@ -44,7 +44,7 @@ public class VerifyMethodInterceptor implements MethodInterceptor {
         }
         //get the verifier
         Verifier verifier = method.getDeclaredAnnotation(Verifier.class);
-        Verification.INSTANCE.action(object, verifier.fields());
+        Verification.getInstance().action(object, verifier.fields());
         return invocation.proceed();
     }
 }

+ 2 - 2
lift-business-service/src/main/java/cn/com/ty/lift/business/framework/conf/SystemConfiguration.java

@@ -116,7 +116,7 @@ public class SystemConfiguration {
     /**
      * SQL是影响系统性能最重要的因素,所以拦截提示不合理的SQL语句
      */
-    @Bean
+//    @Bean
     @ConditionalOnMissingBean
     public SqlIllegalInterceptor sqlIllegalInterceptor(){
         SqlIllegalInterceptor sqlIllegalInterceptor = new SqlIllegalInterceptor();
@@ -184,7 +184,7 @@ public class SystemConfiguration {
         return new ExportUtils();
     }
     /**
-     * 方法参数校验拦截器,标注了@Judger的方法,会检查参数,如果参数不满足条件,直接抛出异常
+     * 方法参数校验拦截器,标注了@Verifier的方法,会检查参数,如果参数不满足条件,直接抛出异常
      */
     @Bean
     public DefaultPointcutAdvisor defaultPointcutAdvisor(){

+ 181 - 80
lift-common/src/main/java/cn.com.ty.lift.common/verify/Verification.java

@@ -5,14 +5,13 @@ import cn.hutool.core.util.ArrayUtil;
 import lombok.extern.slf4j.Slf4j;
 
 import javax.validation.constraints.*;
+import java.io.ObjectStreamException;
 import java.lang.annotation.Annotation;
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
 import java.lang.reflect.Array;
 import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.net.IDN;
@@ -38,11 +37,6 @@ import static java.util.regex.Pattern.CASE_INSENSITIVE;
  */
 @Slf4j
 public class Verification {
-
-    /**
-     * get a singleton instance of the judgement.
-     */
-    public static final Verification INSTANCE       = new Verification();
     /**
      * the name of the verify method.
      */
@@ -51,14 +45,6 @@ public class Verification {
      * the class of the first agrument for the verify method.
      */
     private final       Class        firstArgument  = Object.class;
-    /**
-     * the code of verify message.
-     */
-    private final       int          verifyCode      = 1;
-    /**
-     * the code of illegal argument.
-     */
-    private final       int          illegalArgCode = 2;
     /**
      * whether write log to file. it's {@code true} by default.
      */
@@ -153,6 +139,30 @@ public class Verification {
      */
     private Verification() {
     }
+
+    /**
+     * the static inner class to builder a singleton instance.
+     */
+    private static class Builder {
+        private static Verification INSTANCE = new Verification();
+    }
+
+    /**
+     * get the singleton instance of this
+     */
+    public static Verification getInstance() {
+        return Builder.INSTANCE;
+    }
+
+    /**
+     * 因为单例模式虽然能保证线程安全,但在序列化和反序列化的情况下会出现生成多个对象的情况.
+     * readResolve()方法,其实当JVM从内存中反序列化地"组装"一个新对象时,
+     * 就会自动调用这个readResolve方法来返回指定好的对象, 单例规则也就得到了保证。
+     * readResolve()的出现允许程序员自行控制通过反序列化得到的对象。
+     */
+    protected Object readResolve() throws ObjectStreamException {
+        return Builder.INSTANCE;
+    }
     /**
      * setting whether write log to file.
      *
@@ -193,14 +203,14 @@ public class Verification {
      * set the verify message in the ThreadLocal.(code : 1)
      */
     private void setVerify(String message) {
-        this.code.set(verifyCode);
+        this.code.set(1);
         this.message.set(message);
     }
     /**
      * set the illegal argument message in the ThreadLocal.(code : 2)
      */
     private void setIllegalArg(String message) {
-        this.code.set(illegalArgCode);
+        this.code.set(2);
         this.message.set(message);
     }
 
@@ -855,6 +865,10 @@ public class Verification {
             return false;
         }
         int length = length(value);
+        if(-1 == length){
+            setIllegalArg("The NotEmpty is only for CharSequence & Collection & Map & Array & Iterator & Enumeration.");
+            return false;
+        }
         // length > 0
         return gt0(length);
     }
@@ -914,12 +928,21 @@ public class Verification {
         if (isNull(annotation)) {
             return true;
         }
-        setVerify(annotation.message());
+        int min = annotation.min();
+        int max = annotation.max();
+        String message = annotation.message();
+        if(null != message && !message.trim().isEmpty()){
+            if(message.contains("{min}")){
+                message = message.replace("{min}", String.valueOf(min));
+            }
+            if(message.contains("{max}")){
+                message = message.replace("{max}", String.valueOf(max));
+            }
+        }
+        setVerify(message);
         if (isNull(value)) {
             return false;
         }
-        int min = annotation.min();
-        int max = annotation.max();
         if (lt0(min)) {
             setIllegalArg("The min parameter of Size cannot be negative.");
             return false;
@@ -933,6 +956,10 @@ public class Verification {
             return false;
         }
         int length = length(value);
+        if(-1 == length){
+            setIllegalArg("The Size is only for CharSequence & Collection & Map & Array & Iterator & Enumeration.");
+            return false;
+        }
         //size >= min && size <= max
         return length >= min && length <= max;
     }
@@ -948,7 +975,18 @@ public class Verification {
         if (isNull(annotation)) {
             return true;
         }
-        setVerify(annotation.message());
+        int maxInteger = annotation.integer();
+        int maxFraction = annotation.fraction();
+        String message = annotation.message();
+        if(null != message && !message.trim().isEmpty()){
+            if(message.contains("{integer}")){
+                message = message.replace("integer", String.valueOf(maxInteger));
+            }
+            if(message.contains("{fraction}")){
+                message = message.replace("fraction", String.valueOf(maxFraction));
+            }
+        }
+        setVerify(message);
         if (isNull(value)) {
             return false;
         }
@@ -958,8 +996,6 @@ public class Verification {
             setIllegalArg("The Digits is only for Number & CharSequence.");
             return false;
         }
-        int maxInteger = annotation.integer();
-        int maxFraction = annotation.fraction();
         if (lt0(maxInteger)) {
             setIllegalArg("The length of the integer part cannot be negative.");
             return false;
@@ -1115,7 +1151,7 @@ public class Verification {
         try {
             pattern = java.util.regex.Pattern.compile(regexp, intFlag);
         } catch (PatternSyntaxException e) {
-            setIllegalArg("The regexp for Pattern is Invalid regular expression.");
+            setIllegalArg("Compile the regexp and flag for Pattern fail.");
             return false;
         }
         if (isNull(pattern)) {
@@ -1550,84 +1586,151 @@ public class Verification {
     }
 
     /**
-     * verify the fields of the object base on the annotation present on it.
-     * if it is not valid that will throw a {@link VerifyException}.
-     * or a {@link IllegalArgumentException} when argument is illegal.
+     * get field by the names
      *
-     * @param object any object value. with some validation annotation in {@code javax.validation.constraints.*}
-     * @param fields the list of fields to verify. if no, that will verify all fields in the object.
+     * @param object the target object
+     * @param fields the names of field
+     * @return list of field
      */
-    public void action(final Object object, final String... fields) {
-        isTrueIllegal(isNull(object), "The object to verify must not be null.");
-
+    private List<Field> fieldFilter(final Object object, final String... fields) {
         Class<?> objectClass = object.getClass();
-
-        List<Field> verifyFields = new ArrayList<>();
-        boolean specifyField = gt0(length(fields));
-
         // get fields, if has specify fields, otherwise get all fields on the object.
-        if (specifyField) {
+        if (ArrayUtil.isNotEmpty(fields)) {
+            List<Field> verifyFields = new ArrayList<>();
             for (String field : fields) {
+                Field verifyField = null;
                 try {
-                    Field declaredField = objectClass.getDeclaredField(field);
-                    verifyFields.add(declaredField);
+                    //1 get the declared field on this class.
+                    verifyField = objectClass.getDeclaredField(field);
                 } catch (NoSuchFieldException e) {
-                    throw illegalArgException("No such field [%s] in : %s.", field, objectClass.getCanonicalName());
                 }
+                if (isNull(verifyField)) {
+                    try {
+                        // 2 get from the private field on the superclass.
+                        verifyField = objectClass.getSuperclass().getDeclaredField(field);
+                    } catch (NoSuchFieldException e) {
+                        throw illegalArgException("No such field [%s] in : %s.", field, objectClass.getCanonicalName());
+                    }
+                }
+                verifyFields.add(verifyField);
+            }
+            //if vaild fields is empty
+            if (verifyFields.isEmpty()) {
+                throw illegalArgException("No field specify to verify.");
             }
+            return Collections.unmodifiableList(verifyFields);
         } else {
-            verifyFields = Arrays.asList(objectClass.getDeclaredFields());
+            return Collections.unmodifiableList(Arrays.asList(objectClass.getDeclaredFields()));
         }
+    }
+
+    /**
+     * get all validation annotation on the field
+     *
+     * @param field the target field
+     * @return list of validation annotation
+     */
+    private List<Annotation> annotationFilter(final Field field) {
+        if (!field.isAccessible()) {
+            field.setAccessible(true);
+        }
+        //get all annotation of the field
+        Annotation[] annotations = field.getDeclaredAnnotations();
+        if (ArrayUtil.isNotEmpty(annotations)) {
+            //filter the validation annotation
+            List<Annotation> verifyAnnos = Arrays.stream(annotations).filter(anno -> validations.contains(anno.annotationType())).collect(Collectors.toList());
+            if (IterUtil.isNotEmpty(verifyAnnos)) {
+                return Collections.unmodifiableList(verifyAnnos);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * get value of the field on the object
+     *
+     * @param object the target object
+     * @param field  the field
+     * @return the value
+     */
+    private Object getFieldValue(final Object object, final Field field) {
+        Object value;
+        try {
+            value = field.get(object);
+        } catch (IllegalAccessException e) {
+            throw illegalArgException("Illegal Access [%s] in : %s.", field.getName(), object.getClass().getCanonicalName());
+        }
+        return value;
+    }
 
-        //if vaild fields is empty
-        if(specifyField && verifyFields.isEmpty()){
-            throw illegalArgException("No field specify to verify.");
+    /**
+     * find the method for the verify
+     *
+     * @param lookup     method handle of lookup {@link java.lang.invoke.MethodHandles.Lookup}
+     * @param methodName the name of the method
+     * @param methodType the return and the args class for the method
+     * @return method handle
+     */
+    private MethodHandle methodFilter(final MethodHandles.Lookup lookup, final String methodName, final MethodType methodType) {
+        MethodHandle methodHandle;
+        try {
+            methodHandle = lookup.findVirtual(lookup.lookupClass(), methodName, methodType);
+        } catch (NoSuchMethodException | IllegalAccessException e) {
+            throw illegalArgException("No such method [%s(%s)] in Verification.", methodName, methodType);
         }
+        return methodHandle;
+    }
 
-        verifyFields = Collections.unmodifiableList(verifyFields);
+    /**
+     * invoke the method bind with the target object
+     *
+     * @param methodHandle method handle{@link MethodHandle}
+     * @param target       the target object
+     * @param args         the list of args
+     * @return result
+     */
+    private boolean methodInvoke(final MethodHandle methodHandle, final Object target, final Object... args) {
+        boolean invoke;
+        try {
+            invoke = (boolean) methodHandle.bindTo(target).invokeWithArguments(args);
+        } catch (Throwable throwable) {
+            throw illegalArgException("Invoke the target method [%s] fail.", methodHandle);
+        }
+        return invoke;
+    }
 
+    /**
+     * verify the fields of the object base on the annotation present on it.
+     * if it is not valid that will throw a {@link VerifyException}.
+     * or a {@link IllegalArgumentException} when argument is illegal.
+     *
+     * @param object any object value. with some validation annotation in {@code javax.validation.constraints.*}
+     * @param fields the list of fields to verify. if no, that will verify all fields in the object.
+     */
+    public void action(final Object object, final String... fields) {
+        isTrueIllegal(isNull(object), "The object to verify must not be null.");
+        Class<?> objectClass = object.getClass();
+        MethodHandles.Lookup lookup = MethodHandles.lookup();
+        List<Field> verifyFields = fieldFilter(object, fields);
         for (Field verifyField : verifyFields) {
-            if(!verifyField.isAccessible()){
-                verifyField.setAccessible(true);
-            }
-            //get all annotation of the field
-            Annotation[] annotations = verifyField.getDeclaredAnnotations();
-            if (ArrayUtil.isEmpty(annotations)) {
-                continue;
-            }
             //filter the validation annotation
-            List<Annotation> verifyAnnos = Arrays.stream(annotations).filter(anno -> validations.contains(anno.annotationType())).collect(Collectors.toList());
+            List<Annotation> verifyAnnos = annotationFilter(verifyField);
             if (IterUtil.isEmpty(verifyAnnos)) {
                 continue;
             }
-            verifyAnnos = Collections.unmodifiableList(verifyAnnos);
             //get value.
-            Object value;
-            try {
-                value = verifyField.get(object);
-            } catch (IllegalAccessException e) {
-                throw illegalArgException("Illegal Access [%s] in : %s.", verifyField.getName(), objectClass.getCanonicalName());
-            }
+            Object value = getFieldValue(object, verifyField);
 
             for (Annotation verifyAnno : verifyAnnos) {
                 //get method
-                Class<? extends Annotation> annotationType = verifyAnno.annotationType();
-                boolean invoke;
-                try {
-                    MethodHandles.Lookup lookup = MethodHandles.lookup();
-                    MethodHandle methodHandle = lookup.findVirtual(lookup.lookupClass(), verifyMethod, MethodType.methodType(boolean.class, firstArgument, annotationType));
-                    invoke = (boolean) methodHandle.bindTo(this).invokeWithArguments(value, verifyAnno);
-                    if (logWrite) {
-                        info(verifyField, value, verifyAnno, methodHandle, invoke);
-                    }
-                } catch (NoSuchMethodException | IllegalAccessException e) {
-                    throw illegalArgException("No such method [%s(%s,%s)] in Verification.", verifyMethod, firstArgument.getCanonicalName(), annotationType.getCanonicalName());
-                } catch (Throwable throwable) {
-                    throw illegalArgException("Invoke the target method [%s(%s,%s)] fail.", verifyMethod, firstArgument.getCanonicalName(), annotationType.getCanonicalName());
-                }
+                MethodHandle methodHandle = methodFilter(lookup, verifyMethod, MethodType.methodType(boolean.class, firstArgument, verifyAnno.annotationType()));
+                boolean invoke = methodInvoke(methodHandle, this, value, verifyAnno);
                 // result.
                 if (!invoke) {
-                    if (illegalArgCode == code()) {
+                    if (logWrite) {
+                        info(verifyField, value, methodHandle);
+                    }
+                    if (2 == code()) {
                         throw illegalArgException(message());
                     } else {
                         throw verifyException(message());
@@ -1655,13 +1758,11 @@ public class Verification {
      * @param method     the method to action
      * @param result     the result of invoke the method.
      */
-    private void info(Field verifyField, Object value, Annotation verifyAnno, MethodHandle methodHandle, boolean invoke) {
+    private void info(Field verifyField, Object value, MethodHandle methodHandle) {
         log.info(logLine);
         log.info("{}FIELD       : {}", logPrefix, verifyField);
         log.info("{}FIELD_VALUE : {}", logPrefix, value);
-        log.info("{}@INTERFACE  : {}", logPrefix, verifyAnno);
-        log.info("{}METHOD      : {}", logPrefix, methodHandle);
-        log.info("{}RESULT      : (completed) {}", logPrefix, invoke);
+        log.info("{}METHOD      : (false) {}", logPrefix, methodHandle);
         log.info(logLine);
     }
 

+ 9 - 5
lift-common/src/main/java/cn.com.ty.lift.common/verify/Verify.java

@@ -22,7 +22,7 @@ public interface Verify {
     String DATA_MISSING_INCORRECT  = "缺少相关数据";
     String DATA_INVALID_CONDITIONS = "数据无效或条件不成立";
 
-    static VerifyException judgeException(String message){
+    static VerifyException verifyException(String message){
         return new VerifyException(message);
     }
 
@@ -103,7 +103,9 @@ public interface Verify {
      * @param message 抛出异常的消息
      */
     static void isNull(Object object, String message) {
-        notTrue(noNull(object), message);
+        if(noNull(object)){
+            throw verifyException(message);
+        }
     }
 
     /**
@@ -122,7 +124,9 @@ public interface Verify {
      * @param message 抛出异常的消息
      */
     static void notNull(Object object, String message) {
-        notTrue(yesNull(object), message);
+        if(yesNull(object)){
+            throw verifyException(message);
+        }
     }
 
     /**
@@ -142,7 +146,7 @@ public interface Verify {
      */
     static void isTrue(boolean expression, String message) {
         if (!expression) {
-            throw judgeException(message);
+            throw verifyException(message);
         }
     }
 
@@ -163,7 +167,7 @@ public interface Verify {
      */
     static void notTrue(boolean expression, String message) {
         if (expression) {
-            throw judgeException(message);
+            throw verifyException(message);
         }
     }
 

+ 1 - 1
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/common/VerifyMethodInterceptor.java

@@ -44,7 +44,7 @@ public class VerifyMethodInterceptor implements MethodInterceptor {
         }
         //get the verifier
         Verifier verifier = method.getDeclaredAnnotation(Verifier.class);
-        Verification.INSTANCE.action(object, verifier.fields());
+        Verification.getInstance().action(object, verifier.fields());
         return invocation.proceed();
     }
 }

+ 1 - 1
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/config/SystemConfiguration.java

@@ -114,7 +114,7 @@ public class SystemConfiguration {
         return new ExportUtils();
     }
     /**
-     * 方法参数校验拦截器,标注了@Judger的方法,会检查参数,如果参数不满足条件,直接抛出异常
+     * 方法参数校验拦截器,标注了@Verifier的方法,会检查参数,如果参数不满足条件,直接抛出异常
      */
     @Bean
     public DefaultPointcutAdvisor defaultPointcutAdvisor(){

+ 1 - 1
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/AttendanceController.java

@@ -283,7 +283,7 @@ public class AttendanceController {
             IoUtil.close(out);
         }catch (Exception e){
             log.error("导出打卡记录异常", e);
-            throw Verify.judgeException("导出打卡记录异常");
+            throw Verify.verifyException("导出打卡记录异常");
         }
     }
 }

+ 1 - 1
lift-quan-service/src/main/java/cn/com/ty/lift/quan/config/SystemConfiguration.java

@@ -93,7 +93,7 @@ public class SystemConfiguration {
         return sqlAnalysisInterceptor;
     }
     /**
-     * 方法参数校验拦截器,标注了@Judger的方法,会检查参数,如果参数不满足条件,直接抛出异常
+     * 方法参数校验拦截器,标注了@Verifier的方法,会检查参数,如果参数不满足条件,直接抛出异常
      */
     @Bean
     public DefaultPointcutAdvisor defaultPointcutAdvisor(){

+ 1 - 1
lift-quan-service/src/main/java/cn/com/ty/lift/quan/config/VerifyMethodInterceptor.java

@@ -44,7 +44,7 @@ public class VerifyMethodInterceptor implements MethodInterceptor {
         }
         //get the verifier
         Verifier verifier = method.getDeclaredAnnotation(Verifier.class);
-        Verification.INSTANCE.action(object, verifier.fields());
+        Verification.getInstance().action(object, verifier.fields());
         return invocation.proceed();
     }
 }

+ 1 - 1
lift-system-service/src/main/java/cn/com/ty/lift/system/config/SystemConfiguration.java

@@ -94,7 +94,7 @@ public class SystemConfiguration {
     }
 
     /**
-     * 方法参数校验拦截器,标注了@Judger的方法,会检查参数,如果参数不满足条件,直接抛出异常
+     * 方法参数校验拦截器,标注了@Verifier的方法,会检查参数,如果参数不满足条件,直接抛出异常
      */
     @Bean
     public DefaultPointcutAdvisor defaultPointcutAdvisor(){

+ 1 - 1
lift-system-service/src/main/java/cn/com/ty/lift/system/config/VerifyMethodInterceptor.java

@@ -44,7 +44,7 @@ public class VerifyMethodInterceptor implements MethodInterceptor {
         }
         //get the verifier
         Verifier verifier = method.getDeclaredAnnotation(Verifier.class);
-        Verification.INSTANCE.action(object, verifier.fields());
+        Verification.getInstance().action(object, verifier.fields());
         return invocation.proceed();
     }
 }