Browse Source

app端 工作台大修、保养进行中的任务统计 保养任务列表接口修改

别傲 5 years ago
parent
commit
53d2b6f4ad
18 changed files with 218 additions and 27 deletions
  1. 4 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/capital/dao/mapper/CapitalRepairLiftRelevanceMapper.java
  2. 11 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/capital/service/CapitalRepairLiftRelevanceService.java
  3. 8 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/common/CommonController.java
  4. 5 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/contract/dao/entity/model/response/ContractResponse.java
  5. 1 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/MaintenanceRecord.java
  6. 5 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/request/MaintenanceAppRequest.java
  7. 2 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/mapper/MaintenancePlanMapper.java
  8. 13 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/mapper/MaintenanceRecordMapper.java
  9. 2 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenancePlanService.java
  10. 14 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenanceRecordService.java
  11. 19 4
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/controller/ProjectAppController.java
  12. 16 2
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/service/ProjectAppService.java
  13. 14 0
      lift-business-service/src/main/resources/mapper/capital/CapitalRepairLiftRelevanceMapper.xml
  14. 2 1
      lift-business-service/src/main/resources/mapper/contract/ContractsMapper.xml
  15. 5 7
      lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml
  16. 46 0
      lift-business-service/src/main/resources/mapper/maintenance/MaintenanceRecordMapper.xml
  17. 2 3
      lift-business-service/src/main/resources/mapper/project/ProjectMapper.xml
  18. 49 4
      lift-common/src/main/java/cn.com.ty.lift.common/constants/CommonEnum.java

+ 4 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/capital/dao/mapper/CapitalRepairLiftRelevanceMapper.java

@@ -2,6 +2,7 @@ package cn.com.ty.lift.business.capital.dao.mapper;
 
 import cn.com.ty.lift.business.capital.dao.entity.CapitalRepairLiftRelevance;
 import cn.com.ty.lift.business.capital.dao.entity.model.request.CapitalLiftRequest;
+import cn.com.ty.lift.business.common.CommonRequest;
 import cn.com.ty.lift.business.project.dao.entity.model.request.CompanyRequest;
 import cn.com.ty.lift.business.project.dao.entity.model.request.ProjectDetailRequest;
 import cn.com.ty.lift.business.project.dao.entity.model.response.ProjectCompanyResponse;
@@ -43,4 +44,7 @@ public interface CapitalRepairLiftRelevanceMapper extends BaseMapper<CapitalRepa
     ProjectDetailResponse findProjectById(@Param("request") ProjectDetailRequest request);
 
     int count(@Param("mtCompanyId") Long mtCompanyId, @Param("projectStatus") String projectStatus);
+
+    long countDoingByUser(@Param("request") CommonRequest request);
+
 }

+ 11 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/capital/service/CapitalRepairLiftRelevanceService.java

@@ -2,6 +2,7 @@ package cn.com.ty.lift.business.capital.service;
 
 import cn.com.ty.lift.business.capital.dao.entity.CapitalRepairLiftRelevance;
 import cn.com.ty.lift.business.capital.dao.mapper.CapitalRepairLiftRelevanceMapper;
+import cn.com.ty.lift.business.common.CommonRequest;
 import cn.com.ty.lift.business.library.dao.entity.model.request.LiftExtensionRequest;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
@@ -41,4 +42,14 @@ public class CapitalRepairLiftRelevanceService extends ServiceImpl<CapitalRepair
     public int count(Long mtCompanyId, String projectStatus) {
         return baseMapper.count(mtCompanyId, projectStatus);
     }
+
+    /**
+     * @param request 公司id,用户id
+     * @return 条数
+     * @description 根据公司id和用户id查询大修项目数量
+     * @date 2020/4/24 2:49 下午
+     */
+    public long countDoingByUser(CommonRequest request) {
+        return baseMapper.countDoingByUser(request);
+    }
 }

+ 8 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/common/CommonController.java

@@ -1,10 +1,12 @@
 package cn.com.ty.lift.business.common;
 
 import cn.com.ty.lift.business.annualinspection.service.AnnualInspectionService;
+import cn.com.ty.lift.business.capital.service.CapitalRepairLiftRelevanceService;
 import cn.com.ty.lift.business.emergency.service.EmergencyRepairService;
 import cn.com.ty.lift.business.framework.conf.SystemConfiguration;
 import cn.com.ty.lift.business.framework.util.MessageUtils;
 import cn.com.ty.lift.business.library.dao.entity.LiftBrand;
+import cn.com.ty.lift.business.maintenance.service.MaintenanceRecordService;
 import cn.com.ty.lift.common.constants.RedisConstants;
 import cn.com.ty.lift.common.model.AreaCode;
 import cn.com.ty.lift.common.utils.ValuePool;
@@ -41,6 +43,8 @@ public class CommonController {
     private SystemConfiguration           systemConfiguration;
     private AnnualInspectionService       annualInspectionService;
     private EmergencyRepairService        emergencyRepairService;
+    private CapitalRepairLiftRelevanceService capitalRepairLiftRelevanceService;
+    private MaintenanceRecordService maintenanceRecordService;
 
     /**
      * @return RestResponse 省、市、区树形结构列表
@@ -165,9 +169,13 @@ public class CommonController {
     public RestResponse countDoing(@Ver @RequestBody CommonRequest request){
         long inspection = annualInspectionService.countDoingByUser(request);
         long repair = emergencyRepairService.countDoingByUser(request);
+        long capital = capitalRepairLiftRelevanceService.countDoingByUser(request);
+        long maintain = maintenanceRecordService.countDoingByUser(request);
         CommonResponse common = new CommonResponse();
         common.setInspection(inspection);
         common.setRepair(repair);
+        common.setCapital(capital);
+        common.setMaintain(maintain);
         return RestResponse.success(common);
     }
 }

+ 5 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/contract/dao/entity/model/response/ContractResponse.java

@@ -70,4 +70,9 @@ public class ContractResponse {
      * 项目名称
      */
     private String projectName;
+
+    /**
+     * 是否复核
+     */
+    private Integer isCheck;
 }

+ 1 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/MaintenanceRecord.java

@@ -134,6 +134,7 @@ public class MaintenanceRecord extends BaseEntity {
 	/**
 	 * 维保人员1
 	 */
+	@NotNull(message = "维保工不能为空")
 	@Range(min = 1,message = "维保人员有误")
 	private Long workerId1;
 

+ 5 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/request/MaintenanceAppRequest.java

@@ -27,4 +27,9 @@ public class MaintenanceAppRequest extends PageRequest {
      */
     @NotNull(message = "notEmpty")
     private String status;
+
+    /**
+     * 公司id
+     */
+    private Long mtCompanyId;
 }

+ 2 - 2
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/mapper/MaintenancePlanMapper.java

@@ -26,9 +26,9 @@ public interface MaintenancePlanMapper extends BaseMapper<MaintenancePlan> {
      * @param request 用户id和维保状态
      * @return RestResponse 保养任务列表
      * @description 根据用户id和维保状态查询保养任务列表
-     * @date 2020/1/6 11:29 上
+     * @date 2020/4/24 5:03 下
      */
-    IPage<MaintenancePlanResponse> findListByWorkerId(IPage<MaintenancePlanResponse> page, @Param("request") MaintenanceAppRequest request);
+    IPage<MaintenancePlanResponse> findPlanByWorkerId(IPage<MaintenancePlanResponse> page, @Param("request") MaintenanceAppRequest request);
 
     IPage<MtPlanResponse> pagePlanByCondition(IPage<MtPlanResponse> page, @Param("cond") MtPlanRequest request);
 

+ 13 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/mapper/MaintenanceRecordMapper.java

@@ -1,9 +1,12 @@
 package cn.com.ty.lift.business.maintenance.dao.mapper;
 
 
+import cn.com.ty.lift.business.common.CommonRequest;
 import cn.com.ty.lift.business.maintenance.dao.entity.MaintenanceRecord;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.request.MaintenanceAppRequest;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.request.MaintenanceRecordRequest;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.request.MtRecordRequest;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanResponse;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenanceRecordResponse;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MtRecordResponse;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -25,6 +28,14 @@ public interface MaintenanceRecordMapper extends BaseMapper<MaintenanceRecord> {
      */
     MaintenanceRecordResponse findRecordByCompanyId(@Param("request") MaintenanceRecordRequest request);
 
+    /**
+     * @param request 用户id和维保状态
+     * @return RestResponse 保养任务列表
+     * @description 根据用户id和维保状态查询保养任务列表
+     * @date 2020/4/24 5:03 下午
+     */
+    IPage<MaintenancePlanResponse> findRecordByWorkerId(IPage<MaintenancePlanResponse> page, @Param("request") MaintenanceAppRequest request);
+
     /**
      * @param request 公司id和电梯id
      * @return MaintenanceRecordResponse 项目信息
@@ -40,4 +51,6 @@ public interface MaintenanceRecordMapper extends BaseMapper<MaintenanceRecord> {
     MtRecordResponse infoById(@Param("cond") MtRecordRequest request);
 
     IPage<MtRecordResponse> pageByLift(IPage<MtRecordResponse> page, @Param("cond") MtRecordRequest request);
+
+    long countDoingByUser(@Param("request") CommonRequest request);
 }

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

@@ -477,9 +477,9 @@ public class MaintenancePlanService extends ServiceImpl<MaintenancePlanMapper, M
         LambdaUpdateWrapper<MaintenancePlan> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
         lambdaUpdateWrapper.lt(MaintenancePlan::getPlanDate, LocalDate.now());
         lambdaUpdateWrapper.isNull(MaintenancePlan::getWorkDate);
-        lambdaUpdateWrapper.ne(MaintenancePlan::getStatus, 2);
+        lambdaUpdateWrapper.ne(MaintenancePlan::getStatus, -1);
         lambdaUpdateWrapper.last("LIMIT " + limit);
-        lambdaUpdateWrapper.set(MaintenancePlan::getStatus, 2);
+        lambdaUpdateWrapper.set(MaintenancePlan::getStatus, -1);
         return update(lambdaUpdateWrapper);
     }
 }

+ 14 - 2
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenanceRecordService.java

@@ -1,5 +1,6 @@
 package cn.com.ty.lift.business.maintenance.service;
 
+import cn.com.ty.lift.business.common.CommonRequest;
 import cn.com.ty.lift.business.evaluation.dao.entity.Evaluation;
 import cn.com.ty.lift.business.evaluation.service.EvaluationService;
 import cn.com.ty.lift.business.framework.util.MessageUtils;
@@ -132,7 +133,8 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
             Lift l = lift.get();
             record.setCode(l.getLiftCode());
             record.setLiftType(l.getLiftType());
-            record.setStatus(CommonEnum.MaintenanceRecordStatus.SIGN.getCode());
+            record.setStatus(CommonEnum.MaintenanceRecordStatus.MAINTENANCE_DOING.getCode());
+            record.setWorkerId1(record.getWorkerId1());
             record.setWorkDate(LocalDate.now());
             record.setStopDate(LocalDateTime.now());
             MaintenancePlan plan = maintenancePlanService.getOne(record.getMtPlanId());
@@ -154,7 +156,7 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
      */
     public boolean modify(MaintenanceRecord record){
         record.setRecoveryDate(LocalDateTime.now());
-        record.setStatus(CommonEnum.MaintenanceRecordStatus.EVALUATE.getCode());
+        record.setStatus(CommonEnum.MaintenanceRecordStatus.COMPLETE.getCode());
         return updateById(record);
     }
 
@@ -369,4 +371,14 @@ public class MaintenanceRecordService extends ServiceImpl<MaintenanceRecordMappe
     public IPage<MtRecordResponse> pageByLift(MtRecordRequest request){
         return baseMapper.pageByLift(request.getPage(), request);
     }
+
+    /**
+     * @param request 公司id,用户id
+     * @return 条数
+     * @description 根据公司id和用户id查询保养中的任务数量
+     * @date 2020/4/25 9:31 上午
+     */
+    public long countDoingByUser(CommonRequest request) {
+        return baseMapper.countDoingByUser(request);
+    }
 }

+ 19 - 4
lift-business-service/src/main/java/cn/com/ty/lift/business/project/controller/ProjectAppController.java

@@ -176,12 +176,27 @@ public class ProjectAppController {
     /**
      * @param request 用户id和维保状态
      * @return RestResponse 保养任务列表
-     * @description 根据用户id和维保状态查询保养任务列表
+     * @description 根据用户id和维保状态查询维保计划任务列表
      * @date 2020/1/6 11:29 上午
      */
-    @PostMapping("maintenance/task")
-    public RestResponse taskList(@Valid @RequestBody MaintenanceAppRequest request) {
-        IPage<MaintenancePlanResponse> response = projectAppService.taskList(request);
+    @PostMapping("maintenance/planTask")
+    public RestResponse planTask(@Valid @RequestBody MaintenanceAppRequest request) {
+        IPage<MaintenancePlanResponse> response = projectAppService.planTask(request);
+        if (CollUtil.isEmpty(response.getRecords())) {
+            return RestResponse.success();
+        }
+        return RestResponse.success(response, MessageUtils.get("msg.query.success"));
+    }
+
+    /**
+     * @param request 用户id和维保状态
+     * @return RestResponse 保养任务列表
+     * @description 根据用户id和维保状态查询保养任务列表
+     * @date 2020/4/24 5:03 下午
+     */
+    @PostMapping("maintenance/recordTask")
+    public RestResponse recordTask(@Valid @RequestBody MaintenanceAppRequest request) {
+        IPage<MaintenancePlanResponse> response = projectAppService.recordTask(request);
         if (CollUtil.isEmpty(response.getRecords())) {
             return RestResponse.success();
         }

+ 16 - 2
lift-business-service/src/main/java/cn/com/ty/lift/business/project/service/ProjectAppService.java

@@ -9,6 +9,7 @@ import cn.com.ty.lift.business.library.service.LiftService;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.request.MaintenanceAppRequest;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanResponse;
 import cn.com.ty.lift.business.maintenance.dao.mapper.MaintenancePlanMapper;
+import cn.com.ty.lift.business.maintenance.dao.mapper.MaintenanceRecordMapper;
 import cn.com.ty.lift.business.project.dao.entity.Project;
 import cn.com.ty.lift.business.project.dao.entity.model.ProjectAppUser;
 import cn.com.ty.lift.business.project.dao.entity.model.request.CompanyRequest;
@@ -49,6 +50,9 @@ public class ProjectAppService extends ServiceImpl<ProjectMapper, Project> {
     @Resource
     private MaintenancePlanMapper maintenancePlanMapper;
 
+    @Resource
+    private MaintenanceRecordMapper maintenanceRecordMapper;
+
     @Resource
     private CapitalRepairLiftRelevanceMapper capitalRepairLiftRelevanceMapper;
 
@@ -117,8 +121,18 @@ public class ProjectAppService extends ServiceImpl<ProjectMapper, Project> {
      * @description 根据用户id和维保状态查询保养任务列表
      * @date 2020/1/6 11:29 上午
      */
-    public IPage<MaintenancePlanResponse> taskList(MaintenanceAppRequest request) {
-        return maintenancePlanMapper.findListByWorkerId(request.getPage(), request);
+    public IPage<MaintenancePlanResponse> planTask(MaintenanceAppRequest request) {
+        return maintenancePlanMapper.findPlanByWorkerId(request.getPage(), request);
+    }
+
+    /**
+     * @param request 用户id和维保状态
+     * @return RestResponse 保养任务列表
+     * @description 根据用户id和z维保状态查询保养任务列表
+     * @date 2020/4/24 5:03 下午
+     */
+    public IPage<MaintenancePlanResponse> recordTask(MaintenanceAppRequest request) {
+        return maintenanceRecordMapper.findRecordByWorkerId(request.getPage(), request);
     }
 
     /**

+ 14 - 0
lift-business-service/src/main/resources/mapper/capital/CapitalRepairLiftRelevanceMapper.xml

@@ -99,4 +99,18 @@
         WHERE crlr.mt_company_id = #{mtCompanyId}
           AND cr.project_status = #{projectStatus}
     </select>
+
+    <select id="countDoingByUser" resultType="java.lang.Long" parameterType="cn.com.ty.lift.business.common.CommonRequest">
+        SELECT
+        count(1)
+        FROM capital_repair cr
+        LEFT JOIN project_user pu ON cr.id = pu.project_id AND cr.mt_company_id = pu.mt_company_id
+        WHERE cr.project_status = '2'
+        <if test="request.userId != null and request.userId > 0">
+            AND pu.user_id = #{request.userId}
+        </if>
+        <if test="request.mtCompanyId != null and request.mtCompanyId > 0">
+            AND cr.mt_company_id = #{request.mtCompanyId}
+        </if>
+    </select>
 </mapper>

+ 2 - 1
lift-business-service/src/main/resources/mapper/contract/ContractsMapper.xml

@@ -50,7 +50,8 @@
             c.accessory_url AS accessoryUrl,
             c.remarks       AS remarks,
             c.status        AS contractStatus,
-            p.project_name  AS projectName
+            p.project_name  AS projectName,
+            c.is_check      AS isCheck
             FROM contracts c
         LEFT JOIN project p ON c.project_id = p.id
         WHERE c.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}

+ 5 - 7
lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml

@@ -102,13 +102,12 @@
 		</foreach>
 	</select>
 
-	<!--app端 保养任务列表 -->
-	<select id="findListByWorkerId" resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenanceAppResponse"
+	<!--app端 保养任务列表 (0:待保养、-1:超期) -->
+	<select id="findPlanByWorkerId" resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenanceAppResponse"
 			parameterType="cn.com.ty.lift.business.maintenance.dao.entity.model.request.MaintenanceAppRequest">
 		SELECT p.project_name      AS projectName,
 		       p.id                AS projectId,
 			   mp.id               AS mtPlanId,
-			   mr.id               AS recordId,
 			   l.id                AS liftId,
 			   l.coordinate        AS coordinate,
 			   l.registration_code AS registrationCode,
@@ -121,15 +120,14 @@
 		       mp.worker_id        AS workerId,
 			   mp.plan_date        AS planDate,
 			   mp.type             AS maintenanceType,
-		       mr.status           AS status
 		FROM maintenance_plan mp
-		         LEFT JOIN maintenance_record mr ON mp.id = mr.mt_plan_id
 				 LEFT JOIN project p ON mp.project_id = p.id
+		         LEFT JOIN project_user pu ON p.id = pu.project_id
 				 LEFT JOIN lift l ON mp.lift_id = l.id
 				 LEFT JOIN user_info ui ON mp.worker_id = ui.user_id
-		WHERE 1=1
+		WHERE mp.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
 		<if test="request.workerId!=null and request.workerId!=''">
-			AND mp.worker_id = #{request.workerId,jdbcType=BIGINT}
+			AND pu.user_id = #{request.workerId,jdbcType=BIGINT}
 		</if>
 		<if test="request.status!=null and request.status!=''">
 			AND mp.status = #{request.status,jdbcType=VARCHAR}

+ 46 - 0
lift-business-service/src/main/resources/mapper/maintenance/MaintenanceRecordMapper.xml

@@ -94,6 +94,52 @@
 		</if>)
 	</select>
 
+	<!--app端 保养任务列表 (1:保养中、2:已完成) -->
+	<select id="findRecordByWorkerId" resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenanceAppResponse"
+			parameterType="cn.com.ty.lift.business.maintenance.dao.entity.model.request.MaintenanceAppRequest">
+		SELECT p.project_name AS projectName,
+			p.id                AS projectId,
+			mr.id               AS mtPlanId,
+			mr.id               AS recordId,
+			l.id                AS liftId,
+			l.coordinate        AS coordinate,
+			l.registration_code AS registrationCode,
+			l.use_company_code  AS useCompanyCode,
+			l.lift_type         AS liftType,
+			l.category          AS category,
+			l.lift_code         AS liftCode,
+			l.device_position   AS devicePosition,
+			ui.name             AS workerName,
+			mr.worker_id        AS workerId,
+			mr.plan_date        AS planDate,
+			mr.type             AS maintenanceType,
+			mr.status           AS status
+		FROM maintenance_record mr
+		LEFT JOIN project p ON mr.project_id = p.id
+		LEFT JOIN lift l ON mr.lift_id = l.id
+		LEFT JOIN user_info ui ON mr.worker_id = ui.user_id
+		WHERE mr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
+		<if test="request.workerId!=null and request.workerId!=''">
+			AND mr.worker_id = #{request.workerId,jdbcType=BIGINT}
+		</if>
+		<if test="request.status!=null and request.status!=''">
+			AND mr.status = #{request.status,jdbcType=VARCHAR}
+		</if>
+	</select>
+
+	<select id="countDoingByUser" resultType="java.lang.Long" parameterType="cn.com.ty.lift.business.common.CommonRequest">
+		SELECT
+		count(1)
+		FROM maintenance_record mr
+		WHERE mr.status = '1'
+		<if test="request.userId != null and request.userId > 0">
+			AND mr.worker_id1 = #{request.userId}
+		</if>
+		<if test="request.mtCompanyId != null and request.mtCompanyId > 0">
+			AND mr.mt_company_id = #{request.mtCompanyId}
+		</if>
+	</select>
+
 	<!--日常保养-保养单:根据条件分页查询-->
     <select id="pageRecordByCondition" resultMap="BaseResultMap" parameterType="cn.com.ty.lift.business.maintenance.dao.entity.model.request.MtRecordRequest">
         SELECT

+ 2 - 3
lift-business-service/src/main/resources/mapper/project/ProjectMapper.xml

@@ -157,11 +157,10 @@
 		p.project_usage AS projectUsage,
 		p.actual_num    AS actualNum,
 		p.project_status AS projectStatus
-		FROM project_lift_relevance plr
-		LEFT JOIN project p ON plr.project_id = p.id
+		FROM project p
 		WHERE 1=1
 		<if test="request.mtCompanyId!=null and request.mtCompanyId!=''">
-			AND plr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
+			AND p.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
 		</if>
 		<if test="request.projectName!=null and request.projectName!=''">
 			AND p.project_name LIKE CONCAT('%',#{request.projectName,jdbcType=VARCHAR},'%')

+ 49 - 4
lift-common/src/main/java/cn.com.ty.lift.common/constants/CommonEnum.java

@@ -311,15 +311,60 @@ public class CommonEnum {
         }
     }
 
+    /**
+     * 维保计划状态
+     */
+    public enum MaintenancePlanStatus implements IEnum {
+
+        WAITING_MAINTENANCE("待完成","0"),
+        COMPLETE("已完成", "1"),
+        OVERDUE("超期", "2");
+
+
+        /**
+         * 值
+         */
+        private String label;
+
+        /**
+         * 键
+         */
+        private String code;
+
+        /**
+         * 构造函数
+         *
+         * @param label String
+         * @param code  String
+         */
+        MaintenancePlanStatus(String label, String code) {
+            this.label = label;
+            this.code = code;
+        }
+
+        @Override
+        public String getEnumName() {
+            return "MaintenancePlanStatus";
+        }
+
+        @Override
+        public String getCode() {
+            return code;
+        }
+
+        @Override
+        public String getLabel() {
+            return label;
+        }
+    }
+
     /**
      * 保养记录状态
      */
     public enum MaintenanceRecordStatus implements IEnum {
 
-        WAITING_MAINTENANCE("待保养", "0"),
-        SIGN("已签到", "1"),
-        EVALUATE("待评价", "2"),
-        COMPLETE("已完成", "3");
+        COMPLETE("已完成", "2"),
+        MAINTENANCE_DOING("保养中", "1");
 
         /**
          * 值