Jelajahi Sumber

维保计划打印列表

别傲 5 tahun lalu
induk
melakukan
ecb4fabb29
14 mengubah file dengan 298 tambahan dan 10 penghapusan
  1. 10 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/library/dao/mapper/LiftMapper.java
  2. 11 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/library/service/LiftService.java
  3. 16 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/controller/MaintenanceController.java
  4. 29 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/request/MaintenancePlanPrintRequest.java
  5. 39 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/response/LiftPrintResponse.java
  6. 51 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/response/MaintenancePlanPrintResponse.java
  7. 5 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/mapper/MaintenancePlanMapper.java
  8. 61 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenancePlanService.java
  9. 5 6
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/controller/ProjectRelevanceController.java
  10. 11 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/mapper/ProjectMapper.java
  11. 11 0
      lift-business-service/src/main/java/cn/com/ty/lift/business/project/service/ProjectService.java
  12. 14 0
      lift-business-service/src/main/resources/mapper/lift/LiftMapper.xml
  13. 18 4
      lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml
  14. 17 0
      lift-business-service/src/main/resources/mapper/project/ProjectMapper.xml

+ 10 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/library/dao/mapper/LiftMapper.java

@@ -7,6 +7,8 @@ import cn.com.ty.lift.business.library.dao.entity.model.request.LiftRequest;
 import cn.com.ty.lift.business.library.dao.entity.model.request.ProjectLiftRequest;
 import cn.com.ty.lift.business.library.dao.entity.model.response.LiftExtendResponse;
 import cn.com.ty.lift.business.library.dao.entity.model.response.LiftResponse;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.LiftPrintResponse;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanPrintResponse;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
@@ -30,4 +32,12 @@ public interface LiftMapper extends BaseMapper<Lift> {
     IPage<LiftResponse> chooseLiftList(IPage<LiftResponse> page, @Param("request") LiftChooseRequest request);
 
     LiftExtendResponse queryById(@Param("id") Long id);
+
+    /**
+     * @param liftIdList 电梯id列表
+     * @return 电梯列表
+     * @description 根据电梯id列表查询电梯列表
+     * @date 2020/2/13 4:28 下午
+     */
+    List<LiftPrintResponse> queryLiftListByIdList(@Param("list") List<Long> liftIdList);
 }

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

@@ -12,6 +12,7 @@ import cn.com.ty.lift.business.library.dao.entity.model.request.ProjectLiftReque
 import cn.com.ty.lift.business.library.dao.entity.model.response.LiftExtendResponse;
 import cn.com.ty.lift.business.library.dao.entity.model.response.LiftResponse;
 import cn.com.ty.lift.business.library.dao.mapper.LiftMapper;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.LiftPrintResponse;
 import cn.com.ty.lift.business.project.dao.entity.ProjectLiftRelevance;
 import cn.com.ty.lift.business.project.service.ProjectLiftRelevanceService;
 import cn.com.ty.lift.common.base.ExportRequest;
@@ -273,6 +274,16 @@ public class LiftService extends ServiceImpl<LiftMapper, Lift> {
         utils.export(liftList, paramMap, request.getExportPath());
     }
 
+    /**
+     * @param liftIdList 电梯id列表
+     * @return 电梯列表数据
+     * @description 根据电梯id列表查询项目列表数据
+     * @date 2020/2/17 4:47 下午
+     */
+    public List<LiftPrintResponse> queryLiftListByIdList(List<Long> liftIdList) {
+       return baseMapper.queryLiftListByIdList(liftIdList);
+    }
+
     private void rollback(){
         //强制手动事务回滚
         TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();

+ 16 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/controller/MaintenanceController.java

@@ -3,6 +3,7 @@ package cn.com.ty.lift.business.maintenance.controller;
 import cn.com.ty.lift.business.framework.util.MessageUtils;
 import cn.com.ty.lift.business.maintenance.dao.entity.MaintenancePlan;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.request.*;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanPrintResponse;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanResponse;
 import cn.com.ty.lift.business.maintenance.service.MaintenancePlanService;
 import cn.com.ty.lift.common.base.ExportRequest;
@@ -114,4 +115,19 @@ public class MaintenanceController {
     public void export(@RequestBody ExportRequest request) {
         maintenancePlanService.export(request);
     }
+
+    /**
+     * @param request 电梯列表
+     * @return 1.成功, 0.失败, 消息描述
+     * @description 维保计划打印列表
+     * @date 2020/2/13 3:39 下午
+     */
+    @PostMapping("plan/print")
+    public RestResponse printPlan(@RequestBody MaintenancePlanPrintRequest request){
+        List<MaintenancePlanPrintResponse> detailList = maintenancePlanService.planPrint(request);
+        if (CollUtil.isEmpty(detailList)) {
+            return RestResponse.success();
+        }
+        return RestResponse.success(detailList, MessageUtils.get("msg.query.success"));
+    }
 }

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

@@ -0,0 +1,29 @@
+package cn.com.ty.lift.business.maintenance.dao.entity.model.request;
+
+import cn.com.ty.lift.business.maintenance.dao.entity.MaintenancePlan;
+import lombok.Data;
+
+import javax.validation.constraints.NotEmpty;
+import java.util.List;
+
+/**
+ * @author bieao
+ * @date 2020/2/13
+ * @description 维保计划打印
+ */
+@Data
+public class MaintenancePlanPrintRequest {
+
+    /**
+     * 公司id
+     */
+    @NotEmpty(message = "notEmpty")
+    private Long mtCompanyId;
+
+    /**
+     * 电梯列表
+     */
+    @NotEmpty(message = "notEmpty")
+    private List<MaintenancePlan> liftList;
+
+}

+ 39 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/response/LiftPrintResponse.java

@@ -0,0 +1,39 @@
+package cn.com.ty.lift.business.maintenance.dao.entity.model.response;
+
+import cn.com.ty.lift.business.maintenance.dao.entity.MaintenancePlan;
+import lombok.Data;
+
+import java.util.Collection;
+
+/**
+ * @author bieao
+ * @date 2020/2/13
+ * @description
+ */
+@Data
+public class LiftPrintResponse {
+    /**
+     * 电梯id
+     */
+    private Long liftId;
+    /**
+     * 项目id
+     */
+    private Long projectId;
+    /**
+     * 公司id
+     */
+    private Long mtCompanyId;
+    /**
+     * 注册代码
+     */
+    private String registrationCode;
+    /**
+     * 电梯位置
+     */
+    private String devicePosition;
+    /**
+     * 维保计划列表
+     */
+    private Collection<MaintenancePlan> planList;
+}

+ 51 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/response/MaintenancePlanPrintResponse.java

@@ -0,0 +1,51 @@
+package cn.com.ty.lift.business.maintenance.dao.entity.model.response;
+
+import lombok.Data;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * @author bieao
+ * @date 2020/2/13
+ * @description 维保计划打印返回体
+ */
+@Data
+public class MaintenancePlanPrintResponse {
+    /**
+     * 项目id
+     */
+    private Long projectId;
+    /**
+     * 公司id
+     */
+    private Long mtCompanyId;
+    /**
+     * 项目名称
+     */
+    private String projectName;
+    /**
+     * 项目编号
+     */
+    private String projectCode;
+    /**
+     * 维保台量
+     */
+    private Integer num;
+    /**
+     * 甲方公司名称
+     */
+    private String ppCompanyName;
+    /**
+     * 维保公司
+     */
+    private String mtCompanyName;
+    /**
+     * 电梯列表
+     */
+    private List<LiftPrintResponse> liftList;
+    /**
+     * 打印时间
+     */
+    private LocalDateTime printTime = LocalDateTime.now();
+}

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

@@ -10,6 +10,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * MyBatis Mapper 接口 - 表:maintenance_plan
  * @author bieao
@@ -30,4 +33,6 @@ public interface MaintenancePlanMapper extends BaseMapper<MaintenancePlan> {
     IPage<MtPlanResponse> pagePlanByCondition(IPage<MtPlanResponse> page, @Param("cond") MtPlanRequest request);
 
     long countPlanByCondition(@Param("cond") MtPlanRequest request);
+
+    List<MaintenancePlan> queryPlanListByIds(@Param("paramMap") Map<String, Object> paramMap);
 }

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

@@ -1,7 +1,10 @@
 package cn.com.ty.lift.business.maintenance.service;
 
 import cn.com.ty.lift.business.framework.util.MessageUtils;
+import cn.com.ty.lift.business.library.service.LiftService;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.request.*;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.LiftPrintResponse;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanPrintResponse;
 import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MtPlanResponse;
 import cn.com.ty.lift.business.project.dao.entity.ProjectLiftRelevance;
 import cn.com.ty.lift.business.project.service.ProjectLiftRelevanceService;
@@ -42,6 +45,9 @@ public class MaintenancePlanService extends ServiceImpl<MaintenancePlanMapper, M
     @Resource
     private ProjectService projectService;
 
+    @Resource
+    private LiftService liftService;
+
     @Resource
     private ProjectLiftRelevanceService projectLiftRelevanceService;
 
@@ -373,6 +379,61 @@ public class MaintenancePlanService extends ServiceImpl<MaintenancePlanMapper, M
         utils.export(projectList, paramMap, request.getExportPath());
     }
 
+
+    /**
+     * @param request 电梯列表
+     * @return List<MaintenancePlanPrintResponse> 维保计划打印列表
+     * @description 维保计划打印列表
+     * @date 2020/2/13 3:39 下午
+     */
+    public List<MaintenancePlanPrintResponse> planPrint(MaintenancePlanPrintRequest request) {
+        List<Long> liftIdList = request.getLiftList().stream().map(MaintenancePlan::getLiftId).collect(Collectors.toList());
+        //根据电梯id列表查询电梯列表
+        List<LiftPrintResponse> liftList = liftService.queryLiftListByIdList(liftIdList);
+
+        //拼接查询维保计划的条件
+        List<String> projectLiftList = new ArrayList<>();
+        for (MaintenancePlan entry : request.getLiftList()) {
+            String builder = entry.getProjectId() + "-" + entry.getLiftId();
+            projectLiftList.add(builder);
+        }
+
+        Map<String, Object> paramMap = new HashMap<>();
+        paramMap.put("mtCompanyId", request.getMtCompanyId());
+        paramMap.put("projectLiftList", projectLiftList);
+        //根据电梯id、项目id、公司id查询维保计划列表
+        List<MaintenancePlan> planList = baseMapper.queryPlanListByIds(paramMap);
+
+        //组装电梯列表中的维保计划数据
+        for (LiftPrintResponse entry : liftList) {
+            List<MaintenancePlan> plans = new ArrayList<>();
+            for (MaintenancePlan plan : planList) {
+                if (entry.getProjectId().equals(plan.getProjectId())
+                        && entry.getLiftId().equals(plan.getLiftId())
+                        && entry.getMtCompanyId().equals(plan.getMtCompanyId())){
+                    plans.add(plan);
+                }
+            }
+            entry.setPlanList(plans);
+        }
+        List<Long> projectIdList = request.getLiftList().stream().map(MaintenancePlan::getProjectId).collect(Collectors.toList());
+        //根据项目id列表查询项目列表
+        List<MaintenancePlanPrintResponse> projectList = projectService.queryProjectListByIdList(projectIdList);
+
+        //组装项目列表中的电梯数据
+        for (MaintenancePlanPrintResponse project : projectList) {
+            List<LiftPrintResponse> liftPrintResponses = new ArrayList<>();
+            for (LiftPrintResponse lift : liftList) {
+                if (project.getProjectId().equals(lift.getProjectId())
+                        && project.getMtCompanyId().equals(lift.getMtCompanyId())) {
+                    liftPrintResponses.add(lift);
+                }
+            }
+            project.setLiftList(liftPrintResponses);
+        }
+     return projectList;
+    }
+
     /**
      * 根据条件分页查询 维保计划-超期计划
      * @author wcz

+ 5 - 6
lift-business-service/src/main/java/cn/com/ty/lift/business/project/controller/ProjectRelevanceController.java

@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
-import java.util.Calendar;
 import java.util.List;
 
 /**
@@ -30,7 +29,7 @@ import java.util.List;
 public class ProjectRelevanceController {
 
     @Resource
-    private ProjectLiftRelevanceService projectService;
+    private ProjectLiftRelevanceService projectLiftRelevanceService;
 
     /**
      * @param request 用户id
@@ -40,7 +39,7 @@ public class ProjectRelevanceController {
      */
     @PostMapping("list")
     public RestResponse relevanceList(@RequestBody ProjectLiftRelevanceRequest request) {
-        IPage<ProjectRelevanceResponse> page = projectService.relevanceList(request);
+        IPage<ProjectRelevanceResponse> page = projectLiftRelevanceService.relevanceList(request);
         if (CollUtil.isEmpty(page.getRecords())) {
             return RestResponse.success();
         }
@@ -55,7 +54,7 @@ public class ProjectRelevanceController {
      */
     @PostMapping("user/list")
     public RestResponse userList(@Valid @RequestBody ProjectDetailRequest request) {
-        List<ProjectUserResponse> userList = projectService.userList(request.getId());
+        List<ProjectUserResponse> userList = projectLiftRelevanceService.userList(request.getId());
         if (CollUtil.isEmpty(userList)) {
             return RestResponse.success();
         }
@@ -70,7 +69,7 @@ public class ProjectRelevanceController {
      */
     @PostMapping("modify")
     public RestResponse modify(@RequestBody ProjectLiftRelevance entry) {
-        boolean result = projectService.modify(entry);
+        boolean result = projectLiftRelevanceService.modify(entry);
         if (result) {
             return RestResponse.success(null, MessageUtils.get("msg.modify.success"));
         }
@@ -85,7 +84,7 @@ public class ProjectRelevanceController {
      */
     @PostMapping("remove")
     public RestResponse remove(@RequestBody ProjectLiftRelevance entry) {
-        boolean result = projectService.remove(entry.getId());
+        boolean result = projectLiftRelevanceService.remove(entry.getId());
         if (result) {
             return RestResponse.success(null, MessageUtils.get("msg.delete.success"));
         }

+ 11 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/project/dao/mapper/ProjectMapper.java

@@ -1,6 +1,7 @@
 package cn.com.ty.lift.business.project.dao.mapper;
 
 
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanPrintResponse;
 import cn.com.ty.lift.business.project.dao.entity.Project;
 import cn.com.ty.lift.business.project.dao.entity.model.request.*;
 import cn.com.ty.lift.business.project.dao.entity.model.response.*;
@@ -8,6 +9,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * @author bieao
  * @date 2019/12/09
@@ -44,4 +47,12 @@ public interface ProjectMapper extends BaseMapper<Project> {
      */
     ProjectDetailResponse findProjectById(@Param("request") ProjectDetailRequest request);
 
+    /**
+     * @param projectIdList 项目id列表
+     * @return 项目列表
+     * @description 根据项目id列表查询项目列表
+     * @date 2020/2/13 4:28 下午
+     */
+    List<MaintenancePlanPrintResponse> queryProjectListByIdList(@Param("list") List<Long> projectIdList);
+
 }

+ 11 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/project/service/ProjectService.java

@@ -3,6 +3,7 @@ package cn.com.ty.lift.business.project.service;
 import cn.com.ty.lift.business.framework.util.MessageUtils;
 import cn.com.ty.lift.business.library.service.PlatformCompanyLiftRelevanceService;
 import cn.com.ty.lift.business.maintenance.dao.entity.MaintenancePlan;
+import cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanPrintResponse;
 import cn.com.ty.lift.business.project.dao.entity.*;
 import cn.com.ty.lift.business.project.dao.entity.model.ProjectImportModel;
 import cn.com.ty.lift.business.project.dao.entity.model.request.*;
@@ -168,6 +169,16 @@ public class ProjectService extends ServiceImpl<ProjectMapper,Project> {
         return listMaps(queryWrapper);
     }
 
+    /**
+     * @param projectIdList 项目id列表
+     * @return 项目列表数据
+     * @description 根据项目id列表查询项目列表数据
+     * @date 2020/2/17 4:47 下午
+     */
+    public List<MaintenancePlanPrintResponse> queryProjectListByIdList(List<Long> projectIdList){
+       return baseMapper.queryProjectListByIdList(projectIdList);
+    }
+
     /**
      * @param plans 项目id列表
      * @return 项目列表

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

@@ -189,4 +189,18 @@
 				 LEFT JOIN user_info ui ON plr.worker_id = ui.user_id
 		WHERE l.id = #{id,jdbcType=BIGINT}
 	</select>
+
+	<select id="queryLiftListByIdList" parameterType="java.util.List" resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.LiftPrintResponse">
+		SELECT l.id                AS liftId,
+			   plr.project_id      AS projectId,
+		       plr.mt_company_id   AS mtCompanyId,
+			   l.registration_code AS registrationCode,
+			   l.device_position   AS devicePosition
+		FROM lift l
+				 LEFT JOIN project_lift_relevance plr ON l.id = plr.lift_id
+		WHERE l.id IN
+		<foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
+			#{id}
+		</foreach>
+	</select>
 </mapper>

+ 18 - 4
lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="cn.com.ty.lift.business.maintenance.dao.mapper.MaintenancePlanMapper" >
-	<resultMap id="BaseResultMap" type="MtPlanResponse" >
+	<resultMap id="BaseResultMap" type="cn.com.ty.lift.business.maintenance.dao.entity.MaintenancePlan" >
 		<id column="id" property="id" jdbcType="BIGINT" />
 		<result column="lift_id" property="liftId" jdbcType="BIGINT" />
 		<result column="mt_company_id" property="mtCompanyId" jdbcType="BIGINT" />
@@ -17,15 +17,18 @@
 		<result column="update_id" property="updateId" jdbcType="BIGINT" />
 		<result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
         <result column="demand" property="demand" jdbcType="VARCHAR" />
+	</resultMap>
 
+	<resultMap id="maintenanceRecordResultMap" type="cn.com.ty.lift.business.maintenance.dao.entity.model.response.MtPlanResponse"
+			   extends="BaseResultMap">
 		<result column="lift_type" property="liftType" jdbcType="INTEGER" />
 		<result column="project_name" property="projectName" jdbcType="VARCHAR" />
 		<result column="use_company_code" property="useCompanyCode" jdbcType="VARCHAR" />
 		<result column="registration_code" property="registrationCode" jdbcType="VARCHAR" />
 		<result column="device_position" property="devicePosition" jdbcType="VARCHAR" />
 		<result column="worker_name" property="workerName" jdbcType="VARCHAR" />
-        <result column="mt_record_id" property="mtRecordId" jdbcType="BIGINT" />
-        <result column="record_status" property="recordStatus" jdbcType="VARCHAR" />
+		<result column="mt_record_id" property="mtRecordId" jdbcType="BIGINT" />
+		<result column="record_status" property="recordStatus" jdbcType="VARCHAR" />
 	</resultMap>
 
 	<sql id="Base_Column_List" >
@@ -87,6 +90,17 @@
 		</if>
 	</select>
 
+	<select id="queryPlanListByIds" parameterType="java.util.Map" resultMap="BaseResultMap">
+		SELECT t.*
+		FROM (SELECT *, concat(project_id,'-',lift_id) AS projectLift
+			  FROM maintenance_plan) t
+		WHERE t.mt_company_id = #{paramMap.mtCompanyId,jdbcType=VARCHAR}
+		  AND t.projectLift IN
+		<foreach collection="paramMap.projectLiftList" item="id" index="index" open="(" close=")" separator=",">
+			#{id}
+		</foreach>
+	</select>
+
 	<!--app端 保养任务列表 -->
 	<select id="findListByWorkerId" resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenanceAppResponse"
 			parameterType="cn.com.ty.lift.business.maintenance.dao.entity.model.request.MaintenanceAppRequest">
@@ -122,7 +136,7 @@
 	</select>
 
 	<!--日常保养-计划超期:根据条件分页查询-->
-    <select id="pagePlanByCondition" resultMap="BaseResultMap" parameterType="cn.com.ty.lift.business.maintenance.dao.entity.model.request.MtPlanRequest">
+    <select id="pagePlanByCondition" resultMap="maintenanceRecordResultMap" parameterType="cn.com.ty.lift.business.maintenance.dao.entity.model.request.MtPlanRequest">
         SELECT
             mp.*,
             li.use_company_code,

+ 17 - 0
lift-business-service/src/main/resources/mapper/project/ProjectMapper.xml

@@ -128,6 +128,23 @@
 		</if>
 	</select>
 
+	<select id="queryProjectListByIdList" parameterType="java.util.List"
+			resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.MaintenancePlanPrintResponse">
+		SELECT p.id            AS projectId,
+			   p.project_name  AS projectName,
+			   p.project_code  AS projectCode,
+		       p.mt_company_id AS mtCompanyId,
+			   mc.name         AS mtCompanyName,
+			   pc.name         AS ppCompanyName
+		FROM project p
+				 LEFT JOIN maintenance_company mc ON p.mt_company_id = mc.id
+				 LEFT JOIN property_company pc ON p.pp_company_id = pc.id
+		WHERE p.id IN
+		<foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
+			#{id}
+		</foreach>
+	</select>
+
 	<!--app端 根据公司id查询公司下项目列表 -->
 	<select id="findListByCompanyId" parameterType="cn.com.ty.lift.business.project.dao.entity.model.request.CompanyRequest"
 			resultType="cn.com.ty.lift.business.project.dao.entity.model.response.ProjectCompanyResponse">