瀏覽代碼

Merge branch 'develop' of http://132.232.206.88:3000/lift-manager/lift-server into feature-bieao

别傲 5 年之前
父節點
當前提交
41282306d3

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

@@ -1,4 +1,4 @@
-package cn.com.ty.lift.business;
+package cn.com.ty.lift.business.framework.util;
 
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.fileupload.FileItemFactory;

+ 4 - 3
lift-business-service/src/main/java/cn/com/ty/lift/business/library/controller/LiftController.java

@@ -175,9 +175,9 @@ public class LiftController {
      * @date 2019/11/27 10:03 AM
      */
     @PostMapping("add")
-    @Validation(fields = {"mtCompanyId", "source", "mark"})
     public RestResponse add(@Val @RequestBody LiftExtensionRequest request) {
-        Validator.valid(request.getLift(), "registrationCode");
+        Validator.valid(request,"mtCompanyId", "source", "mark","workerId","lift");
+        liftService.validLiftRequest(request.getLift());
         return liftService.add(request);
     }
 
@@ -188,9 +188,10 @@ public class LiftController {
      * @date 2019/11/27 10:03 AM
      */
     @PostMapping("modify")
-    @Validation(fields = {"mtCompanyId"})
     public RestResponse modify(@Val @RequestBody LiftRequest request) {
+        Validator.valid(request,"mtCompanyId" ,"workerId","lift");
         Validator.valid(request.getLift(), "id");
+        liftService.validLiftRequest(request.getLift());
        return liftService.modify(request);
     }
 

+ 32 - 3
lift-business-service/src/main/java/cn/com/ty/lift/business/library/dao/entity/Lift.java

@@ -7,13 +7,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
+import javax.validation.constraints.*;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 
 /**
  * 实体类 - 表:lift 电梯
+ *
  * @author bieao
  * @since 2019-11-25 17:37:16
  */
@@ -24,7 +24,7 @@ public class Lift extends BaseEntity {
     /**
      * 电梯id
      */
-    @TableId(value = "id",type = IdType.ID_WORKER)
+    @TableId(value = "id", type = IdType.ID_WORKER)
     @NotNull(message = "电梯id不能为空")
     private Long id;
 
@@ -39,12 +39,18 @@ public class Lift extends BaseEntity {
      * 电梯类别(1:曳引梯;2:液压梯;3:杂物梯;4:自动扶梯;5:自动人行道)
      */
     @FieldName(name = "电梯类别")
+    @Min(value = 1, message = "电梯类别错误")
+    @Max(value = 5, message = "电梯类别错误")
+    @NotNull(message = "电梯类别不能为空")
     private Integer category;
 
     /**
      * 电梯类型(1:直梯;2:扶梯)
      */
     @FieldName(name = "电梯类型")
+    @Min(value = 1, message = "电梯类型错误")
+    @Max(value = 2, message = "电梯类型错误")
+    @NotNull(message = "电梯类型不能为空")
     private Integer liftType;
 
     /**
@@ -69,18 +75,23 @@ public class Lift extends BaseEntity {
      * 设备用途(11:货梯;12:客梯;13:医梯;14:观光梯;15:杂物梯;16:别墅梯;21:扶梯;22:人行道)
      */
     @FieldName(name = "设备用途")
+    @Min(value = 11, message = "设备用途错误")
+    @Max(value = 22, message = "设备用途错误")
+    @NotNull(message = "设备用途不能为空")
     private Integer deviceUsage;
 
     /**
      * 电梯品牌
      */
     @FieldName(name = "电梯品牌")
+    @NotBlank(message = "电梯品牌不能为空")
     private String liftBrand;
 
     /**
      * 安装单位
      */
     @FieldName(name = "安装单位")
+    @NotBlank(message = "安装单位不能为空")
     private String installCompany;
 
     /**
@@ -111,54 +122,65 @@ public class Lift extends BaseEntity {
      * 电梯载重
      */
     @FieldName(name = "电梯载重")
+    @NotNull(message = "电梯载重不能为空")
     private Integer ratedLoad;
 
     /**
      * 提升高度m
      */
     @FieldName(name = "提升高度")
+    @NotNull(message = "提升高度不能为空")
     private BigDecimal promoteHeight;
 
     /**
      * 梯级宽度
      */
     @FieldName(name = "梯级宽度")
+    @NotNull(message = "梯级宽度不能为空")
     private BigDecimal stepWidth;
 
     /**
      * 人行道长度m
      */
     @FieldName(name = "人行道长度")
+    @NotNull(message = "人行道长度不能为空")
     private BigDecimal sidewalkLength;
 
     /**
      * 倾斜角度°
      */
     @FieldName(name = "倾斜角度")
+    @NotNull(message = "倾斜角度不能为空")
     private BigDecimal tiltAngle;
 
     /**
      * 电动机功率kw
      */
     @FieldName(name = "电动机功率")
+    @NotNull(message = "电动机功率不能为空")
     private BigDecimal motorPower;
 
     /**
      * 额定速度m/s
      */
     @FieldName(name = "额定速度")
+    @NotNull(message = "额定速度不能为空")
     private BigDecimal ratedSpeed;
 
     /**
      * 层站门
      */
     @FieldName(name = "层站门")
+    @NotBlank(message = "层站门不能为空")
     private String layerStationDoor;
 
     /**
      * 安全钳类型(1:瞬时式安全钳;2:渐进式安全钳)
      */
     @FieldName(name = "安全钳类型")
+    @Min(value = 1, message = "安全钳类型错误")
+    @Max(value = 2, message = "安全钳类型错误")
+    @NotNull(message = "安全钳类型不能为空")
     private Integer clampType;
 
     /**
@@ -171,6 +193,7 @@ public class Lift extends BaseEntity {
      * 设备使用地点
      */
     @FieldName(name = "设备使用地点")
+    @NotBlank(message = "设备安装地址不能为空")
     private String devicePosition;
 
     /**
@@ -195,6 +218,7 @@ public class Lift extends BaseEntity {
      * 油缸型式
      */
     @FieldName(name = "油缸型式")
+    @NotBlank(message = "油缸型式不能为空")
     private String cylinderType;
 
     /**
@@ -207,12 +231,14 @@ public class Lift extends BaseEntity {
      * 顶升型式
      */
     @FieldName(name = "顶升型式")
+    @NotNull(message = "顶升型式不能为空")
     private Integer topType;
 
     /**
      * 控制方式
      */
     @FieldName(name = "控制方式")
+    @NotNull(message = "控制方式不能为空")
     private String controlType;
 
     /**
@@ -237,6 +263,7 @@ public class Lift extends BaseEntity {
      * 单位设备编号
      */
     @FieldName(name = "单位设备编号")
+    @NotBlank(message = "设备内部编号不能为空")
     private String useCompanyCode;
 
     /**
@@ -261,6 +288,7 @@ public class Lift extends BaseEntity {
      * 设备安装日期
      */
     @FieldName(name = "设备安装日期")
+    @NotNull(message = "设备安装日期不能为空")
     private LocalDate installDate;
 
     /**
@@ -273,6 +301,7 @@ public class Lift extends BaseEntity {
      * 年检日期
      */
     @FieldName(name = "年检日期")
+    @NotNull(message = "年检日期不能为空")
     private LocalDate annualInspectionDate;
 
     /**

+ 5 - 4
lift-business-service/src/main/java/cn/com/ty/lift/business/library/dao/entity/model/request/LiftExtensionRequest.java

@@ -16,6 +16,7 @@ public class LiftExtensionRequest {
     /**
      * 维保工
      */
+    @NotNull(message = "维保工不能为空")
     private Long workerId;
 
     /**
@@ -26,19 +27,19 @@ public class LiftExtensionRequest {
     /**
      * 新增电梯来源入口 (0:从电梯管理新增,1:从项目管理中新增)
      */
-    @NotNull(message = "notEmpty")
+    @NotNull(message = "电梯来源入口不能为空")
     private String source;
 
     /**
      * 新增标记 (0:新增,1:查询后带入)
      */
-    @NotNull(message = "notEmpty")
+    @NotNull(message = "新增标记不能为空")
     private String mark;
 
     /**
      * 维保公司ID
      */
-    @NotNull(message = "notEmpty")
+    @NotNull(message = "维保公司ID不能为空")
     private Long mtCompanyId;
 
     /**
@@ -49,6 +50,6 @@ public class LiftExtensionRequest {
     /**
      * 电梯
      */
-    @NotNull(message = "notEmpty")
+    @NotNull(message = "电梯信息不能为空")
     private Lift lift;
 }

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

@@ -33,6 +33,8 @@ import cn.com.ty.lift.common.model.PushUserInfo;
 import cn.com.ty.lift.common.utils.DateUtils;
 import cn.com.ty.lift.common.utils.SendMessageUtil;
 import cn.com.ty.lift.common.verify.Validate;
+import cn.com.ty.lift.common.verify.ValidateException;
+import cn.com.ty.lift.common.verify.Validator;
 import cn.com.xwy.boot.web.dto.RestResponse;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
@@ -101,7 +103,7 @@ public class LiftService extends ServiceImpl<LiftMapper, Lift> {
     @Resource
     private MaintenancePlanService maintenancePlanService;
 
-    private Map<String, String> headsMap = new LinkedHashMap<String,String>() {{
+    private Map<String, String> headsMap = new LinkedHashMap<String, String>() {{
         put("liftCode", "电梯号");
         put("registrationCode", "注册代码");
         put("liftBrand", "电梯品牌");
@@ -480,7 +482,7 @@ public class LiftService extends ServiceImpl<LiftMapper, Lift> {
         return RestResponse.success(null, MessageUtils.get("msg.modify.success"));
     }
 
-    public List<Map<String,String>> exportList(List<String> ids){
+    public List<Map<String, String>> exportList(List<String> ids) {
         return baseMapper.exportList(ids);
     }
 
@@ -736,4 +738,35 @@ public class LiftService extends ServiceImpl<LiftMapper, Lift> {
         return true;
     }
 
+    /**
+     * 检查新增和编辑电梯时必传的属性
+     *
+     * @param lift 电梯信息
+     */
+    public void validLiftRequest(Lift lift) {
+        Validator.valid(lift, "registrationCode", "category", "liftType", "deviceUsage", "liftBrand",
+                "devicePosition", "useCompanyCode", "installDate", "annualInspectionDate");
+
+        if (lift.getInstallDate().compareTo(lift.getAnnualInspectionDate()) > 0) {
+            throw new ValidateException("设备年检日期不能在安装日期之前");
+        }
+
+        switch (lift.getCategory()) {
+            case 1:
+                Validator.valid(lift, "layerStationDoor", "clampType", "ratedLoad", "promoteHeight", "ratedSpeed");
+                break;
+            case 2:
+                Validator.valid(lift, "ratedLoad", "promoteHeight", "motorPower", "ratedSpeed", "layerStationDoor",
+                        "clampType", "controlType", "cylinderNum", "cylinderType", "topType");
+                break;
+            case 3:
+                Validator.valid(lift, "ratedLoad", "promoteHeight", "motorPower", "ratedSpeed", "layerStationDoor", "clampType");
+                break;
+            case 4:
+                Validator.valid(lift, "ratedLoad", "promoteHeight", "stepWidth", "tiltAngle");
+                break;
+            case 5:
+                Validator.valid(lift, "ratedLoad", "promoteHeight", "stepWidth", "tiltAngle", "sidewalkLength");
+        }
+    }
 }

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

@@ -415,7 +415,7 @@ public class MaintenanceRecordController {
 
     @PostMapping("export")
     @Validation(fields = {"recordIds"})
-    public void export(@Val @RequestBody MtRecordRequest mtRecordRequest, HttpServletResponse response) {
-        maintenanceRecordService.export(mtRecordRequest, response);
+    public RestResponse<?> export(@Val @RequestBody MtRecordRequest mtRecordRequest) {
+       return RestResponse.success(maintenanceRecordService.export(mtRecordRequest));
     }
 }

+ 36 - 47
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenanceRecordService.java

@@ -21,12 +21,14 @@ import cn.com.ty.lift.business.project.dao.entity.Project;
 import cn.com.ty.lift.business.project.dao.entity.ProjectLiftRelevance;
 import cn.com.ty.lift.business.project.service.ProjectLiftRelevanceService;
 import cn.com.ty.lift.business.project.service.ProjectService;
+import cn.com.ty.lift.common.aliservice.aliyunoss.AliyunOSS;
 import cn.com.ty.lift.common.constants.CommonEnum;
 import cn.com.ty.lift.common.utils.DateUtils;
 import cn.com.ty.lift.common.utils.MapHelper;
 import cn.com.ty.lift.common.utils.ValuePool;
 import cn.com.ty.lift.common.verify.Val;
 import cn.com.ty.lift.common.verify.Validate;
+import cn.com.ty.lift.common.verify.ValidateException;
 import cn.com.xwy.boot.web.dto.RestResponse;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.collection.IterUtil;
@@ -843,7 +845,7 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
         return baseMapper.pageByLift(request.getPage(), request);
     }
 
-    public void export(MtRecordRequest mtRecordRequest, HttpServletResponse response) {
+    public String export(MtRecordRequest mtRecordRequest) {
         Map<String, String> headerAlias = new LinkedHashMap<>();
         headerAlias.put("projectName", "项目名称");
         headerAlias.put("useCompanyCode", "梯号");
@@ -878,12 +880,12 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
             String zip = dir + ".zip";
             baseDir = new File(dir);
             zipFile = new File(zip);
-            log.info("dir: {}", dir);
-            log.info("zip: {}", zip);
+            log.info("dir路径: {}", dir);
+            log.info("zip路径: {}", zip);
 
             //生成excel文件
-            String excel = File.separator + dir + File.separator + generateCode + ".xlsx";
-            log.info("生成excel: {}", excel);
+            String excel = File.separator + dir + File.separator + "维保记录列表.xlsx";
+            log.info("维保记录列表生成excel: {}", excel);
             File excelFile = new File(excel);
             ExcelWriter writer = ExcelUtil.getBigWriter(excelFile, "维保记录表");
             //设置列别名
@@ -900,16 +902,16 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
             String illegalChars = "\\/:*?\"<>|";
             for (int i = 0; i < mtRecordResponses.size(); i++) {
                 MtRecordResponse mtRecordResponse = mtRecordResponses.get(i);
-                List<MtRecordImg> mtRecordImgs = mtRecordResponse.getMtRecordImgs();
-                log.info("repair: {}", mtRecordResponse);
+                log.info("maintenance: {}", mtRecordResponse);
                 //处理文件夹路径
                 String projectName = mtRecordResponse.getProjectName();
                 String registrationCode = mtRecordResponse.getRegistrationCode();
                 projectName = StrUtil.isNotEmpty(projectName) ? projectName.replace(illegalChars, "-") : "[项目]";
                 registrationCode = StrUtil.isNotEmpty(registrationCode) ? registrationCode.replace(illegalChars, "-") : "[电梯注册代码]";
-                //图片文件夹 dir/i.AreaName-ProjectName-RegistrationCode/
+                //保养单及图片文件夹 dir/i.ProjectName-RegistrationCode/
                 String imgDir = StrUtil.format("{}{}{}.{}-{}{}", dir, File.separator, (i + 1), projectName, registrationCode, File.separator);
-
+                //生成维保图片
+                List<MtRecordImg> mtRecordImgs = mtRecordResponse.getMtRecordImgs();
                 List<MtRecordImg> imgs = mtRecordImgs.stream().filter(img -> mtRecordResponse.getId().equals(img.getMtRecordId())).collect(Collectors.toList());
                 if (IterUtil.isNotEmpty(imgs)) {
                     for (int n = 0; n < imgs.size(); n++) {
@@ -922,47 +924,30 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
                         }
                     }
                 }
-                String maintenanceExcelDir = imgDir + "1.保养单.xlsx";
+                //生成保养单
+                String maintenanceExcelDir = imgDir + "保养单.xlsx";
                 log.info("生成保养单: {}", maintenanceExcelDir);
                 excelWriter(mtRecordResponse, maintenanceExcelDir);
             }
-
             //压缩文件夹
-            log.info("生成zipfile: {}", zip);
+            log.info("生成zipFile路径: {}", zip);
             ZipUtil.zip(dir, zip);
+            //上传文件到阿里云,并返回路径给前端
+            return AliyunOSS.me().putObject("maintenance/export/zip/" + generateCode + ".zip", readInputStream(new FileInputStream(new File(zip))));
         } catch (Exception e) {
-            FileUtil.del(zipFile);
-            FileUtil.del(baseDir);
             log.error("生成保养文件失败", e);
             throw Validate.validateException("生成保养文件失败");
-        }
-        //下载压缩文件
-        if (FileUtil.exist(zipFile)) {
-            // 设置强制下载不打开, ZIP的application/x-zip-compressed
-            response.setContentType("application/force-download");
-            // 设置文件名
-            response.addHeader("Content-Disposition", "attachment;fileName=" + zipFile.getName());
-            byte[] buffer = new byte[1024];
-            try (FileInputStream fis = new FileInputStream(zipFile);
-                 BufferedInputStream bis = new BufferedInputStream(fis)) {
-                OutputStream os = response.getOutputStream();
-                int i;
-                while ((i = bis.read(buffer)) != -1) {
-                    os.write(buffer, 0, i);
-                }
-            } catch (Exception e) {
-                log.error("下载保养文件失败", e);
-                throw Validate.validateException("下载保养文件失败");
-            } finally {
-                //删除临时根目录和zip文件
-                FileUtil.del(zipFile);
-                FileUtil.del(baseDir);
-            }
+        } finally {
+            FileUtil.del(zipFile);
+            FileUtil.del(baseDir);
         }
     }
 
     private MtRecordResponse getMtRecordResponse(@RequestBody @Val MtRecordRequest request) {
         MtRecordResponse entity = this.infoById(request);
+        if (entity == null) {
+            throw new ValidateException("维保记录不存在");
+        }
         String repairDuration = this.getRepairDuration(entity.getRepairDiff());
         entity.setRepairDuration(repairDuration);
         Validate.notNull(entity, ValuePool.MAINTENANCE_RECORD_NOT_EXIST);
@@ -1003,16 +988,16 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
         writer.merge(0, 0, 0, 5, mtRecordResponse.getProjectName(), false);
         writer.merge(1, 1, 0, 1, mtRecordResponse.getCategoryStr() + "保养单", false);
         writer.merge(1, 1, 2, 3, "单号:" + mtRecordResponse.getId(), false);
-        writer.merge(1, 1, 4, 5, "设备编号:" + mtRecordResponse.getUseCompanyCode(), false);
+        writer.merge(1, 1, 4, 5, "设备内部编号:" + (mtRecordResponse.getUseCompanyCode() != null ? mtRecordResponse.getUseCompanyCode() : "未设置"), false);
         writer.merge(2, 2, 0, 1, "注册代码:" + mtRecordResponse.getRegistrationCode(), false);
         writer.merge(2, 2, 2, 3, "电梯位置:" + mtRecordResponse.getDevicePosition(), false);
         writer.merge(2, 2, 4, 5, "保养类型:" + mtRecordResponse.getType(), false);
-        writer.merge(3, 3, 0, 1, "保养时间:" + mtRecordResponse.getWorkDate().toString().replace("T"," "), false);
+        writer.merge(3, 3, 0, 1, "保养时间:" + mtRecordResponse.getWorkDate().toString().replace("T", " "), false);
         writer.merge(3, 3, 2, 3, "项目编号:" + mtRecordResponse.getProjectCode(), false);
         writer.merge(3, 3, 4, 5, "项目名称:" + mtRecordResponse.getProjectName(), false);
         writer.merge(4, 4, 0, 1, "计划保养时间:" + mtRecordResponse.getPlanDate(), false);
-        writer.merge(4, 4, 2, 3, "停梯时间:" + mtRecordResponse.getStopDate().toString().replace("T"," "), false);
-        writer.merge(4, 4, 4, 5, "恢梯时间:" + mtRecordResponse.getRecoveryDate().toString().replace("T"," "), false);
+        writer.merge(4, 4, 2, 3, "停梯时间:" + mtRecordResponse.getStopDate().toString().replace("T", " "), false);
+        writer.merge(4, 4, 4, 5, "恢梯时间:" + mtRecordResponse.getRecoveryDate().toString().replace("T", " "), false);
         writer.writeCellValue(0, 5, "保养时长");
         writer.merge(5, 5, 1, 5, mtRecordResponse.getRepairDuration(), false);
         writer.writeCellValue(0, 6, "序号");
@@ -1060,17 +1045,21 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
         writer.writeCellValue(0, 11 + i, "服务态度");
         StringBuilder level = new StringBuilder();
         if (mtRecordResponse.getEvaluation() != null) {
-            int levelInt = mtRecordResponse.getEvaluation().getServiceLevel();
-            for (int i1 = 0; i1 < levelInt; i1++) {
-                level.append("★");
+            Integer levelInt = mtRecordResponse.getEvaluation().getServiceLevel();
+            if (levelInt != null) {
+                for (int i1 = 0; i1 < levelInt; i1++) {
+                    level.append("★");
+                }
             }
         }
         writer.merge(11 + i, 11 + i, 1, 2, level.toString(), false);
         level = new StringBuilder();
         writer.writeCellValue(3, 11 + i, "维保质量");
-        int levelInt = mtRecordResponse.getStarLevel();
-        for (int i1 = 0; i1 < levelInt; i1++) {
-            level.append("★");
+        Integer levelInt = mtRecordResponse.getStarLevel();
+        if (levelInt != null) {
+            for (int i1 = 0; i1 < levelInt; i1++) {
+                level.append("★");
+            }
         }
         writer.merge(11 + i, 11 + i, 4, 5, level.toString(), false);
         writer.merge(12 + i, 18 + i, 0, 0, "维保签名", false);

+ 9 - 3
lift-system-service/src/main/java/cn/com/ty/lift/system/homepage/service/LiftDataService.java

@@ -95,7 +95,7 @@ public class LiftDataService {
         if (liftMapDataModelList != null && liftMapDataModelList.size() > 0) {
             //通过电梯状态进行分组,默认通过状态来获取
             Map<Integer, List<LiftMapDataModel>> statusToLiftData = liftMapDataModelList.stream()
-                    .collect(Collectors.groupingBy(LiftMapDataModel::getLiftLocateStatus));
+                    .collect(Collectors.groupingBy(LiftMapDataModel::getLiftMapStatus));
             if (statusToLiftData != null) {
                 returnLiftMapDataModelList = statusToLiftData.get(liftDataRequest.getLiftDataStatus());
             }
@@ -111,6 +111,12 @@ public class LiftDataService {
                     break;
             }
         }
+        //如果数据超过500返回前500
+        if (returnLiftMapDataModelList != null && returnLiftMapDataModelList.size() > 0) {
+            if (returnLiftMapDataModelList.size() > 500) {
+                returnLiftMapDataModelList = returnLiftMapDataModelList.stream().limit(500L).collect(Collectors.toList());
+            }
+        }
         return RestResponse.success(returnLiftMapDataModelList, ApiConstants.RESULT_SUCCESS, "获取电梯数据成功");
     }
 
@@ -172,11 +178,11 @@ public class LiftDataService {
             if (liftIdToMaintenancePlanStatus.size() > 0) {
                 Integer maintenanceStatus = liftIdToMaintenancePlanStatus.get(liftMapDataModel.getLiftId());
                 if (maintenanceStatus != null) {
-                    if(maintenanceStatus == 0) {
+                    if (maintenanceStatus == 0) {
                         //维保状态 - 待维保
                         liftMapDataModel.setLiftMapStatus(CommonConstants.LiftDataConstants.STATUS_WAIT_MAINTENANCE);
                     }
-                    if(maintenanceStatus == 2) {
+                    if (maintenanceStatus == 2) {
                         //维保状态 - 维保中
                         liftMapDataModel.setLiftMapStatus(CommonConstants.LiftDataConstants.STATUS_GO_MAINTENANCE);
                     }