Browse Source

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

wucizhong 5 years ago
parent
commit
b46359d528

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

@@ -189,7 +189,7 @@ public class AnnualInspectionController {
         AnnualInspection old = annualInspectionService.findByMtCompanyId(entity.getId(), entity.getMtCompanyId());
         Verify.notNull(old, Verify.Inspection.confirm);
         Integer oldStepName = Objects.isNull(old.getStepName()) ? 1 : old.getStepName();
-        Verify.isTrue(oldStepName == 1, "年检第一阶段才能修改");
+        Verify.equals(oldStepName, 1, "年检第一阶段才能修改");
         old.setIsCheckGoverner(entity.getIsCheckGoverner());
         old.setLoadInspectionSetting(entity.getLoadInspectionSetting());
 
@@ -211,9 +211,9 @@ public class AnnualInspectionController {
         Integer oldStepName = old.getStepName();
         Integer oldStepStatus = old.getStepStatus();
         Integer stepStatus = entity.getStepStatus();
-        Verify.isTrue(oldStepName == 1, "请先完成确认操作再进行第一阶段");
-        Verify.isTrue(oldStepStatus == 1 || oldStepStatus == 2, "请进行第一阶段操作");
-        Verify.isTrue(stepStatus == 2, "请进行第一阶段操作");
+        Verify.equals(oldStepName, 1, "请先完成确认操作再进行第一阶段");
+        Verify.between(oldStepStatus, 1, 2, "请进行第一阶段操作");
+        Verify.equals(stepStatus,2, "请进行第一阶段操作");
 
         old.setSelfcheckReportImg(entity.getSelfcheckReportImg());
         old.setSelfcheckDate(entity.getSelfcheckDate());
@@ -236,8 +236,8 @@ public class AnnualInspectionController {
         Verify.notNull(old, Verify.Inspection.confirm);
         Integer oldStepName = old.getStepName();
         Integer oldStepStatus = old.getStepStatus();
-        Verify.isTrue(oldStepName == 1 || oldStepName == 2, "请先完成第一阶段再进行第二阶段");
-        Verify.isTrue(oldStepStatus == 2 || oldStepStatus == 3, "请进行第二阶段操作");
+        Verify.between(oldStepName, 1,2, "请先完成第一阶段再进行第二阶段");
+        Verify.between(oldStepStatus, 2, 3, "请进行第二阶段操作");
 
         old.setCheckDate(entity.getCheckDate());
         old.setInspector(entity.getInspector());
@@ -285,9 +285,9 @@ public class AnnualInspectionController {
         Integer oldStepName = old.getStepName();
         Integer oldStepStatus = old.getStepStatus();
         Integer stepStatus = entity.getStepStatus();
-        Verify.isTrue(oldStepName == 2 || oldStepName == 3, "请先完成第二阶段再进行第三阶段");
-        Verify.isTrue(oldStepStatus >= 3 && oldStepStatus <= 7, "请进行第三阶段操作");
-        Verify.isTrue(stepStatus >= 4 && stepStatus <= 7, "请进行第三阶段操作");
+        Verify.between(oldStepName,2, 3, "请先完成第二阶段再进行第三阶段");
+        Verify.between(oldStepStatus,3,7, "请进行第三阶段操作");
+        Verify.between(stepStatus,4,7, "请进行第三阶段操作");
         if(Objects.nonNull(old.getPlanDate())){
             LocalDate deadline = old.getPlanDate().plusDays(DateUtils.daysOfYear());
             Verify.notTrue(deadline.isBefore(entity.getNextInspectionTime()), "上次年检" + old.getPlanDate() + ",下次年检设置" + deadline + "之前有效");
@@ -322,9 +322,9 @@ public class AnnualInspectionController {
         Integer oldStepName = Objects.isNull(old.getStepName()) ? 3 : old.getStepName();
         Integer oldStepStatus =  Objects.isNull(old.getStepStatus()) ? 5 : old.getStepStatus();
         Integer stepStatus = entity.getStepStatus();
-        Verify.isTrue(oldStepName == 3 || oldStepName == 4, "请先完成第三阶段再进行第四阶段");
-        Verify.isTrue(oldStepStatus >= 5 && oldStepStatus <= 10, "请进行第四阶段操作");
-        Verify.isTrue(stepStatus >= 8 && stepStatus <= 10, "请进行第四阶段操作");
+        Verify.between(oldStepName,3, 4, "请先完成第三阶段再进行第四阶段");
+        Verify.between(oldStepStatus,5,10, "请进行第四阶段操作");
+        Verify.between(stepStatus,8,10, "请进行第四阶段操作");
 
         old.setStepStatus(entity.getStepStatus());
         old.setAnnualInspectionImg(entity.getAnnualInspectionImg());

+ 17 - 4
lift-common/src/main/java/cn.com.ty.lift.common/model/PageRequest.java

@@ -14,7 +14,13 @@ import java.io.Serializable;
  */
 @Setter
 public abstract class PageRequest implements Serializable {
+    /**
+     * 当前页
+     */
     private long pageNum  = 1;
+    /**
+     * 每页显示条数,默认 10
+     */
     private long pageSize = 10;
     /**
      * SQL 排序 ASC 数组
@@ -26,10 +32,17 @@ public abstract class PageRequest implements Serializable {
     private String[] descs;
 
     public <T> IPage<T> getPage() {
-        Page<T> page = new Page<>(getPageNum(), getPageSize());
-        page.setAsc(ascs);
-        page.setDesc(descs);
-        return page;
+        return new Page<T>(getPageNum(), getPageSize()).setAsc(ascs).setDesc(descs);
+    }
+
+    public PageRequest addAsc(String... ascs){
+        this.ascs = ascs;
+        return this;
+    }
+
+    public PageRequest addDesc(String... descs){
+        this.descs = descs;
+        return this;
     }
 
     public long getPageNum() {

+ 18 - 285
lift-common/src/main/java/cn.com.ty.lift.common/verify/Verify.java

@@ -13,83 +13,10 @@ import java.util.Objects;
  */
 public interface Verify {
 
-    String IDENTIFIER_INVALID      = "标识ID无效";
-    String MUST_GT0                = "数值必须大于0";
-    String MUST_LT0                = "数值必须小于0";
-    String MUST_EQ0                = "数值必须等于0";
-    String MUST_NGT0               = "数值必须大于或等于0";
-    String MUST_NLT0               = "数值必须小于或等于0";
-    String MUST_NEQ0               = "数值必须不等于0";
-    String DATA_MUST_EMPTY         = "数据必须为空";
-    String DATA_MISSING_INCORRECT  = "缺少相关数据";
-    String DATA_INVALID_CONDITIONS = "数据无效或条件不成立";
-
     static VerifyException verifyException(String message){
         return new VerifyException(message);
     }
 
-    static int compare0(Number value){
-        if(isLong(value)){
-            return Long.compare(value.longValue(), 0);
-        }else if (isInteger(value)){
-            return Integer.compare(value.intValue(), 0);
-        }else if(isDouble(value)){
-            return Double.compare(value.doubleValue(), 0);
-        }else if(isFloat(value)){
-            return Float.compare(value.floatValue(), 0);
-        }else if(isByte(value)){
-            return Byte.compare(value.byteValue(), (byte) 0);
-        }else if(isShort(value)){
-            return Short.compare(value.shortValue(), (short) 0);
-        }else {
-            return -2;
-        }
-    }
-
-    //compare0 > 0
-    static boolean gt0(Number value) {
-        return compare0(value) > 0;
-    }
-
-    //compare0 < 0
-    static boolean lt0(Number value) {
-        return compare0(value) < 0;
-    }
-
-    static boolean gte0(Number value) {
-        return compare0(value) >= 0;
-    }
-
-    static boolean lte0(Number value) {
-        return compare0(value) <= 0;
-    }
-
-    static boolean eq0(Number value){
-        return compare0(value) == 0;
-    }
-    static boolean neq0(Number value){
-        return compare0(value) != 0;
-    }
-
-    static boolean isLong(Object value){
-        return (value instanceof Long);
-    }
-    static boolean isInteger(Object value){
-        return (value instanceof Integer);
-    }
-    static boolean isDouble(Object value){
-        return (value instanceof Double);
-    }
-    static boolean isFloat(Object value){
-        return (value instanceof Float);
-    }
-    static boolean isByte(Object value){
-        return (value instanceof Byte);
-    }
-    static boolean isShort(Object value){
-        return (value instanceof Short);
-    }
-
     /**
      * 判断对象object是否为空,如果不为空,直接抛出异常,返回message
      *
@@ -97,18 +24,7 @@ public interface Verify {
      * @param message 抛出异常的消息
      */
     static void isNull(Object object, String message) {
-        if(Objects.nonNull(object)){
-            throw verifyException(message);
-        }
-    }
-
-    /**
-     * 判断对象object是否为空,如果不为空,直接抛出异常,返回默认消息
-     *
-     * @param object 参数值
-     */
-    static void isNull(Object object) {
-        isNull(object, DATA_MISSING_INCORRECT);
+        isTrue(Objects.isNull(object), message);
     }
 
     /**
@@ -118,20 +34,18 @@ public interface Verify {
      * @param message 抛出异常的消息
      */
     static void notNull(Object object, String message) {
-        if(Objects.isNull(object)){
-            throw verifyException(message);
-        }
+        isTrue(Objects.nonNull(object), message);
     }
 
-    /**
-     * 判断对象object是否为空,如果为真,直接抛出异常,返回默认消息
-     *
-     * @param object 参数值
-     */
-    static void notNull(Object object) {
-        notNull(object, DATA_MISSING_INCORRECT);
+    static void between(int value, int min, int max, String message){
+        isTrue(value >= min && value <= max, message);
+    }
+    static void notBetween(int value, int min, int max, String message){
+        isTrue(value < min || value > max, message);
+    }
+    static void equals(int one, int other, String message){
+        isTrue(one == other, message);
     }
-
     /**
      * 判断表达式是否为真,如果为假,直接抛出异常,返回message
      *
@@ -144,15 +58,6 @@ public interface Verify {
         }
     }
 
-    /**
-     * 判断表达式是否为真,如果为假,直接抛出异常,返回
-     *
-     * @param expression 需要判断的布尔表达式
-     */
-    static void isTrue(boolean expression) {
-        isTrue(expression, DATA_INVALID_CONDITIONS);
-    }
-
     /**
      * 判断表达式是否为真,如果为真,直接抛出异常,返回message
      *
@@ -164,200 +69,28 @@ public interface Verify {
             throw verifyException(message);
         }
     }
-
-    /**
-     * 判断表达式是否为真,如果为真,直接抛出异常,返回
-     *
-     * @param expression 需要判断的布尔表达式
-     */
-    static void notTrue(boolean expression) {
-        notTrue(expression, DATA_INVALID_CONDITIONS);
-    }
-
-    /**
-     * id == null || id <= 0 throw new VerifyException(message)
-     * @param id id值
-     * @param message 抛出异常消息
-     */
-    static void id(Long id, String message) {
-        notNull(id, message);
-        notTrue(lte0(id), message);
-    }
-
-    /**
-     * id == null || id <= 0 throw new VerifyException(IDENTIFIER_INVALID)
-     *
-     * @param ids 不定个id值
-     */
-    static void id(Long... ids) {
-        notNull(ids, IDENTIFIER_INVALID);
-        for (Long id : ids) {
-            notTrue(Objects.isNull(id) || lte0(id), IDENTIFIER_INVALID);
-        }
-    }
-
-    /**
-     * value == null || value <= 0 throw new VerifyException(message);
-     *
-     * @param value 数值型的参数值
-     * @param message 抛出异常中的消息
-     */
-    static void gt0(Number value, String message) {
-        notNull(value, message);
-        isTrue(gt0(value) ,message);
-    }
-
-    /**
-     * value == null || value <= 0 throw new VerifyException(message);
-     *
-     * @param values 不定个数的数值型的值
-     */
-    static void gt0(Number... values) {
-        notNull(values, MUST_GT0);
-        for (Number value : values) {
-            gt0(value, MUST_GT0);
-        }
-    }
-
-    /**
-     * value == null || value >= 0 throw new VerifyException(message);
-     *
-     * @param value 数值型的值
-     * @param message 抛出异常的消息值
-     */
-    static void lt0(Number value, String message) {
-        notNull(value, message);
-        isTrue(lt0(value), message);
+    static void greater(int value, int bounds, String message){
+        isTrue(value > bounds, message);
     }
 
-    /**
-     * value == null || value >= 0 throw new VerifyException(message);
-     *
-     * @param values 一个或多个的数值
-     */
-    static void lt0(Number... values) {
-        notNull(values, MUST_LT0);
-        for (Number value : values) {
-            lt0(value, MUST_LT0);
-        }
+    static void less(int value, int bounds, String message){
+        isTrue(value < bounds, message);
     }
 
-    /**
-     * value == null || value != 0 throw new VerifyException(message);
-     *
-     * @param value 数值型的值
-     * @param message 抛出异常的消息
-     */
-    static void eq0(Number value, String message) {
-        notNull(value, message);
-        isTrue(eq0(value), message);
-    }
-
-    /**
-     * value == null || value != 0 throw new VerifyException(message);
-     * @param values 一个或多个数的数值
-     */
-    static void eq0(Number... values) {
-        notNull(values, MUST_EQ0);
-        for (Number value : values) {
-            eq0(value, MUST_EQ0);
-        }
-    }
-
-    /**
-     * value == null || value < 0 throw new VerifyException(message)
-     *
-     * @param value 数值型的值
-     * @param message 抛出异常的消息
-     */
-    static void nogt0(Number value, String message) {
-        notNull(value, message);
-        isTrue(lte0(value), message);
-    }
-
-    /**
-     * value == null || value < 0 throw new VerifyException(message);
-     *
-     * @param values 一个或多个数的数值型的值
-     */
-    static void nogt0(Number... values) {
-        notNull(values, MUST_NGT0);
-        for (Number value : values) {
-            nogt0(value, MUST_NGT0);
-        }
-    }
-
-    /**
-     * value == null || value > 0 throw new VerifyException(message);
-     *
-     * @param value 数值型的值
-     * @param message 抛出异常的消息
-     */
-    static void nolt0(Number value, String message) {
-        notNull(value, message);
-        isTrue(gte0(value), message);
-    }
-
-    /**
-     * value == null || value > 0 throw new VerifyException(message);
-     *
-     * @param values 一个或多个数的数值
-     */
-    static void nolt0(Number... values) {
-        notNull(values, MUST_NLT0);
-        for (Number value : values) {
-            nolt0(value, MUST_NLT0);
-        }
-    }
-
-    /**
-     * value == null || value == 0 throw new VerifyException(message);
-     *
-     * @param value 数值型的值
-     * @param message 抛出异常的消息
-     */
-    static void noeq0(Number value, String message) {
-        notNull(value, message);
-        isTrue(neq0(value), message);
-    }
-
-    /**
-     * value == null || value != 0 throw new VerifyException(message);
-     *
-     * @param values 一个或多个数的数值
-     */
-    static void noeq0(Number... values) {
-        notNull(values, MUST_NEQ0);
-        for (Number value : values) {
-            noeq0(value, MUST_NEQ0);
-        }
-    }
-
-
     static void notEmpty(Object object, String message) {
-        notTrue(ObjectUtil.isEmpty(object), message);
-    }
-
-    static void notEmpty(Object object) {
-        notEmpty(object, DATA_MISSING_INCORRECT);
+        isTrue(ObjectUtil.isNotEmpty(object), message);
     }
 
     static void isEmpty(Object object, String message) {
-        notTrue(ObjectUtil.isNotEmpty(object), message);
-    }
-
-    static void isEmpty(Object object) {
-        isEmpty(object, DATA_MUST_EMPTY);
+        isTrue(ObjectUtil.isEmpty(object), message);
     }
 
     static void isBlank(CharSequence cs, String message) {
-        isNull(cs, message);
-        isTrue(cs.toString().trim().isEmpty(), message);
+        isTrue(Objects.isNull(cs) || cs.toString().trim().isEmpty(), message);
     }
 
     static void notBlank(CharSequence cs, String message) {
-        notNull(cs, message);
-        notTrue(cs.toString().trim().isEmpty(), message);
+        isTrue(Objects.nonNull(cs) && cs.toString().trim().length() > 0, message);
     }
 
     //======================年检相关状态值和判断方法======================================

+ 10 - 12
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/custom/controller/PropertyCompanyController.java

@@ -1,6 +1,7 @@
 package cn.com.ty.lift.enterprise.custom.controller;
 
-import cn.com.ty.lift.common.verify.Verify;
+import cn.com.ty.lift.common.verify.Ver;
+import cn.com.ty.lift.common.verify.Verifier;
 import cn.com.ty.lift.enterprise.custom.dao.entity.PropertyCompany;
 import cn.com.ty.lift.enterprise.custom.dao.entity.model.PropertyCompanyAndPropertyContactReq;
 import cn.com.ty.lift.enterprise.custom.dao.entity.model.PropertyCompanyReq;
@@ -33,24 +34,21 @@ public class PropertyCompanyController {
      * @since 2019/12/3 8:51
      */
     @PostMapping("/list")
-    public RestResponse propertyCompanies(@RequestBody PropertyCompanyReq request) {
-        Verify.id(request.getMtCompanyId());
-        Verify.notNull(request.getPageNum());
-        Verify.notNull(request.getPageSize());
+    @Verifier(fields = {"mtCompanyId"})
+    public RestResponse propertyCompanies(@Ver @RequestBody PropertyCompanyReq request) {
         return propertyCompanyService.propertyCompanies(request);
     }
 
     /**
      * 根据id获取客户详细信息
      *
-     * @param id [客户id]
      * @return RestResponse
      * @since 2019/11/27 11:36
      */
-    @GetMapping("/{id}")
-    public RestResponse propertyCompany(@PathVariable Long id) {
-        Verify.id(id);
-        PropertyCompany byId = propertyCompanyService.getById(id);
+    @PostMapping("/detail")
+    @Verifier(fields = {"id"})
+    public RestResponse propertyCompany(@Ver @RequestBody PropertyCompanyReq request) {
+        PropertyCompany byId = propertyCompanyService.getById(request.getId());
         if (byId == null) {
             return RestResponse.success();
         }
@@ -77,8 +75,8 @@ public class PropertyCompanyController {
      * @since 2019/11/27 11:45
      */
     @PostMapping("/update")
-    public RestResponse update(@RequestBody PropertyCompany propertyCompany) {
-        Verify.id(propertyCompany.getId());
+    @Verifier(fields = {"id"})
+    public RestResponse update(@Ver @RequestBody PropertyCompany propertyCompany) {
         if (propertyCompanyService.updateById(propertyCompany)) {
             return RestResponse.success(null, "成功");
         }

+ 2 - 0
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/custom/dao/entity/PropertyCompany.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import javax.validation.constraints.Min;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
@@ -30,6 +31,7 @@ public class PropertyCompany implements Serializable {
      * 甲方公司id
      */
     @TableId(value = "id",type = IdType.ID_WORKER)
+    @Min(value = 1, message = "甲方公司ID不能为空")
     private Long id;
 
     /**

+ 8 - 5
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/custom/dao/entity/model/PropertyCompanyReq.java

@@ -1,10 +1,11 @@
 package cn.com.ty.lift.enterprise.custom.dao.entity.model;
 
-import cn.com.ty.lift.enterprise.custom.dao.entity.PropertyCompany;
+import cn.com.ty.lift.common.model.PageRequest;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import javax.validation.constraints.Min;
 import java.io.Serializable;
 
 /**
@@ -18,12 +19,14 @@ import java.io.Serializable;
 @Data
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
-public class PropertyCompanyReq extends PropertyCompany implements Serializable {
+public class PropertyCompanyReq extends PageRequest implements Serializable {
 
-    private String info;
+    @Min(value = 1, message = "甲方公司ID不能为空")
+    private Long id;
 
-    private Long pageNum;
-    private Long pageSize;
+    @Min(value = 1, message = "维保公司ID不能为空")
+    private Long mtCompanyId;
+    private String info;
 
     private Long propertyCompanyId;
     private Long propertyContactId;

+ 1 - 4
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/custom/service/impl/PropertyCompanyServiceImpl.java

@@ -12,7 +12,6 @@ import cn.hutool.poi.excel.ExcelWriter;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
@@ -25,7 +24,6 @@ import java.time.LocalDate;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Stream;
 
 /**
  * <p>
@@ -41,10 +39,9 @@ public class PropertyCompanyServiceImpl extends ServiceImpl<PropertyCompanyMappe
     private final PropertyContactServiceImpl propertyContactService;
 
     public RestResponse propertyCompanies(PropertyCompanyReq request) {
-        Page<PropertyCompany> page = new Page<>(request.getPageNum(), request.getPageSize());
         //根据请求参数查询客户列表
         IPage<PropertyCompany> records = this
-                .page(page, new QueryWrapper<PropertyCompany>()
+                .page(request.getPage(), new QueryWrapper<PropertyCompany>()
                         .select("id", "mt_company_id", "name", "mailing_address", "status")
                         .eq(request.getMtCompanyId() != null, "mt_company_id", request.getMtCompanyId())
                         .ne("status", 0)

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

@@ -151,7 +151,7 @@ public class AttendanceController {
         Verify.isTrue(am || pm || ot, Verify.Attend.missingTime);
 
         MaintenanceCompany entity = maintenanceCompanyService.getById(request.getMtCompanyId());
-        Verify.notNull(entity);
+        Verify.notNull(entity, "维保公司不存在,请核查");
 
         entity.setTopTime(topTime);
         entity.setDownTime(downTime);
@@ -267,7 +267,7 @@ public class AttendanceController {
     public void export(@Ver @RequestBody AttendanceRequest request, HttpServletResponse response) {
         log.info("headerAlias: {}", headerAlias);
         List<AttendanceResponse> attendances = attendanceService.listByIdList(request);
-        Verify.notNull(attendances);
+        Verify.notNull(attendances, "打卡记录不存在,请核查");
         try {
             ExcelWriter writer = ExcelUtil.getWriter();
             //设置列别名

+ 2 - 3
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/LiftCertificateController.java

@@ -88,7 +88,7 @@ public class LiftCertificateController {
     public RestResponse audit(@Ver @RequestBody LiftCertificateRequest request) {
         //0:无证,1:待审核,2:审核未通过,3:审核通过,4:超期
         LiftCertificate liftCertificate = liftCertificateService.getById(request.getId());
-        Verify.notNull(liftCertificate);
+        Verify.notNull(liftCertificate, "操作证不存在,请核查");
         Verify.isTrue(Verify.LiftCert.toAudit(liftCertificate.getStatus()), Verify.LiftCert.MustToAudit);
         int status = request.isPass() ? Verify.LiftCert.Status_AuditPass : Verify.LiftCert.Status_AuditFail;
         liftCertificate.setStatus(status);
@@ -107,8 +107,7 @@ public class LiftCertificateController {
         Long mtCompanyId = entity.getMtCompanyId();
 
         int count = liftCertificateService.countByUserAndMtCompany(ownerId, mtCompanyId);
-        Verify.nogt0(count, Verify.LiftCert.CertHadExist);
-
+        Verify.notTrue(count > 0, Verify.LiftCert.CertHadExist);
         entity.setStatus(Verify.LiftCert.Status_ToAudit);
 
         boolean result = liftCertificateService.saveOrUpdate(entity);