Commit 9c1c6b8fdf4c6544692ecb44e76d48da9fa27f01

Authored by 王富生
1 parent 4c567386

优化

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/admin/maintainplan/vo/MaintainPlanCommitRespVO.java
1 package com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo; 1 package com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo;
2 2
  3 +import com.baomidou.mybatisplus.annotation.TableField;
  4 +import com.zteits.urbanops.framework.mybatis.core.type.StringListTypeHandler;
3 import io.swagger.v3.oas.annotations.media.Schema; 5 import io.swagger.v3.oas.annotations.media.Schema;
4 import lombok.*; 6 import lombok.*;
5 7
6 import java.time.LocalDateTime; 8 import java.time.LocalDateTime;
  9 +import java.util.List;
7 10
8 import cn.idev.excel.annotation.*; 11 import cn.idev.excel.annotation.*;
9 12
@@ -71,6 +74,11 @@ public class MaintainPlanCommitRespVO { @@ -71,6 +74,11 @@ public class MaintainPlanCommitRespVO {
71 @ExcelProperty("完成次数") 74 @ExcelProperty("完成次数")
72 private Integer planFinishNum; 75 private Integer planFinishNum;
73 76
  77 + @Schema(description = "照片")
  78 + @ExcelProperty("照片")
  79 + @TableField(typeHandler = StringListTypeHandler.class)
  80 + private List<String> beginImgList;
  81 +
74 @Schema(description = "完成时间") 82 @Schema(description = "完成时间")
75 @ExcelProperty("完成时间") 83 @ExcelProperty("完成时间")
76 private LocalDateTime finishTime; 84 private LocalDateTime finishTime;
urbanops-module-garden/src/main/resources/mapper/inspectionplan/InspectionPlanCommitMapper.xml
@@ -125,7 +125,7 @@ @@ -125,7 +125,7 @@
125 c.remark 125 c.remark
126 FROM garden_inspection_plan_detail b 126 FROM garden_inspection_plan_detail b
127 INNER JOIN garden_inspection_plan a ON a.batch_no = b.batch_no 127 INNER JOIN garden_inspection_plan a ON a.batch_no = b.batch_no
128 - INNER JOIN garden_inspection_plan_commit c ON c.plan_no = a.plan_no AND b.batch_no = c.batch_no 128 + INNER JOIN garden_inspection_plan_commit c ON c.plan_no = b.plan_no AND b.batch_no = c.batch_no
129 WHERE a.deleted = 0 129 WHERE a.deleted = 0
130 AND b.plan_no = #{planNo} 130 AND b.plan_no = #{planNo}
131 <if test="busiLineList != null and busiLineList.size() > 0"> 131 <if test="busiLineList != null and busiLineList.size() > 0">
@@ -134,6 +134,6 @@ @@ -134,6 +134,6 @@
134 #{id} 134 #{id}
135 </foreach> 135 </foreach>
136 </if> 136 </if>
137 - ODER BY c.id DESC 137 + ORDER BY c.id DESC
138 </select> 138 </select>
139 </mapper> 139 </mapper>
urbanops-module-garden/src/main/resources/mapper/maintainplan/MaintainPlanCommitMapper.xml
@@ -13,9 +13,13 @@ @@ -13,9 +13,13 @@
13 <result property="beginImgList" column="begin_img" typeHandler="com.zteits.urbanops.framework.mybatis.core.type.StringArrayToListTypeHandler"/> 13 <result property="beginImgList" column="begin_img" typeHandler="com.zteits.urbanops.framework.mybatis.core.type.StringArrayToListTypeHandler"/>
14 </resultMap> 14 </resultMap>
15 15
  16 + <resultMap id="BaseResultMapTwo" type="com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanCommitRespVO">
  17 + <result property="beginImgList" column="begin_img" typeHandler="com.zteits.urbanops.framework.mybatis.core.type.StringArrayToListTypeHandler"/>
  18 + </resultMap>
  19 +
16 20
17 21
18 - <select id="selectForPage" resultType="com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanCommitRespVO"> 22 + <select id="selectForPage" resultMap="BaseResultMapTwo">
19 SELECT 23 SELECT
20 a.batch_no, 24 a.batch_no,
21 a.plan_no, 25 a.plan_no,
@@ -34,9 +38,10 @@ @@ -34,9 +38,10 @@
34 a.company_id, 38 a.company_id,
35 a.dept_id, 39 a.dept_id,
36 c.finish_time, 40 c.finish_time,
  41 + c.begin_img,
37 c.user_name 42 c.user_name
38 FROM 43 FROM
39 - garden_maintain_plan_detail a, 44 + garden_maintain_plan_detail a
40 INNER JOIN garden_maintain_plan b ON a.batch_no = b.batch_no 45 INNER JOIN garden_maintain_plan b ON a.batch_no = b.batch_no
41 INNER JOIN garden_maintain_plan_commit c ON a.batch_no = c.batch_no AND a.plan_no = c.plan_no 46 INNER JOIN garden_maintain_plan_commit c ON a.batch_no = c.batch_no AND a.plan_no = c.plan_no
42 WHERE a.deleted = 0 47 WHERE a.deleted = 0