669cf0a6
王富生
养护假话提交
|
1
2
3
4
5
6
7
8
9
10
11
|
<?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="com.zteits.urbanops.module.garden.dal.mysql.maintainplan.MaintainPlanCommitMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
|
cfeb92d3
王富生
新增两个api工程+优化养护计划+...
|
12
13
14
15
|
<resultMap id="BaseResultMap" type="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanCommitDetailPageRespVO">
<result property="beginImgList" column="begin_img" typeHandler="com.zteits.urbanops.framework.mybatis.core.type.StringArrayToListTypeHandler"/>
</resultMap>
|
9c1c6b8f
王富生
优化
|
16
17
18
19
|
<resultMap id="BaseResultMapTwo" type="com.zteits.urbanops.module.garden.controller.admin.maintainplan.vo.MaintainPlanCommitRespVO">
<result property="beginImgList" column="begin_img" typeHandler="com.zteits.urbanops.framework.mybatis.core.type.StringArrayToListTypeHandler"/>
</resultMap>
|
7590852d
王富生
优化
|
20
21
|
|
9c1c6b8f
王富生
优化
|
22
|
<select id="selectForPage" resultMap="BaseResultMapTwo">
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
SELECT
a.batch_no,
a.plan_no,
b.plan_name,
b.road_id,
b.road_name,
b.level_id,
b.plan_attr,
b.plan_type_id,
b.cycle_id,
b.plan_num,
b.busi_line,
b.plan_finish_num,
a.begin_time,
a.end_time,
a.company_id,
a.dept_id,
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
40
|
c.finish_time,
|
9c1c6b8f
王富生
优化
|
41
|
c.begin_img,
|
b759a67e
王富生
材料等级增加来源
|
42
43
|
c.user_name,
c.sort_num
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
44
|
FROM
|
9c1c6b8f
王富生
优化
|
45
|
garden_maintain_plan_detail a
|
7590852d
王富生
优化
|
46
47
48
|
INNER JOIN garden_maintain_plan b ON a.batch_no = b.batch_no
INNER JOIN garden_maintain_plan_commit c ON a.batch_no = c.batch_no AND a.plan_no = c.plan_no
WHERE a.deleted = 0
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
49
|
<if test="req.planNo != null and req.planNo !=''">
|
b5fbe977
王富生
养护记录明细支持迷糊查询
|
50
|
and a.plan_no LIKE CONCAT('%', #{req.planNo},'%')
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
51
52
|
</if>
<if test="req.planName != null and req.planName !=''">
|
b5fbe977
王富生
养护记录明细支持迷糊查询
|
53
|
and b.plan_name LIKE CONCAT('%', #{req.planName},'%')
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
54
55
|
</if>
<if test="req.roadName != null and req.roadName !=''">
|
bd9c90a0
王富生
养护记录明细支持倒序
|
56
|
AND b.road_name LIKE CONCAT('%', #{req.roadName},'%')
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
57
58
59
60
|
</if>
<if test="req.levelId != null">
and b.level_id = #{req.levelId}
</if>
|
70b72d6e
王富生
养护计划明细提交
|
61
|
<if test="busiLineList != null and busiLineList.size() > 0">
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
62
|
AND b.busi_line IN
|
70b72d6e
王富生
养护计划明细提交
|
63
|
<foreach collection="busiLineList" item="id" open="(" separator="," close=")">
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
#{id}
</foreach>
</if>
<if test="req.planTypeId != null">
and b.plan_type_id = #{req.planTypeId}
</if>
<if test="req.planAttr != null">
and b.plan_attr = #{req.planAttr}
</if>
<if test="req.companyId != null">
and a.company_id = #{req.companyId}
</if>
<if test="req.deptId != null">
and a.dept_id = #{req.deptId}
</if>
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
79
|
<if test="req.userName != null and req.userName !=''">
|
b5fbe977
王富生
养护记录明细支持迷糊查询
|
80
|
AND c.user_name LIKE CONCAT('%', #{req.userName},'%')
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
81
82
83
84
|
</if>
<if test="req.finishTime != null">
AND DATE_FORMAT(c.finish_time, '%Y-%m-%d') = #{req.finishTime}
</if>
|
11c338b2
王彪总
feat(garden): 增加计...
|
85
86
87
88
89
90
|
<if test="req.createTimeStart != null">
<![CDATA[AND DATE_FORMAT(a.create_time, '%Y-%m-%d') >= #{req.createTimeStart}]]>
</if>
<if test="req.createTimeEnd != null">
<![CDATA[AND DATE_FORMAT(a.create_time, '%Y-%m-%d') <= #{req.createTimeEnd}]]>
</if>
|
ab9a74b7
wangqian
巡检养护集合增加数据隔离
|
91
92
93
94
95
96
|
<if test="req.deptIds != null and !req.deptIds.isEmpty()">
and b.dept_id in
<foreach collection="req.deptIds" item="deptId" open="(" separator="," close=")">
#{deptId}
</foreach>
</if>
|
441f44f7
王彪总
config(servers): ...
|
97
|
order by c.create_time desc
|
ebc559ff
王富生
测试bug修复+养护计划明细提交
|
98
99
|
</select>
|
7590852d
王富生
优化
|
100
|
<select id="appMaintainPlanCommitDetailPage" resultMap="BaseResultMap">
|
758c32c2
王富生
app养护计划明细提交
|
101
102
103
104
105
106
107
108
109
110
|
SELECT
a.batch_no,
a.plan_no,
b.plan_name,
b.road_id,
b.road_name,
b.level_id,
b.plan_attr,
b.plan_type_id,
b.cycle_id,
|
612fc4ea
王富生
养护计划优化提交
|
111
|
a.plan_num,
|
758c32c2
王富生
app养护计划明细提交
|
112
|
b.busi_line,
|
612fc4ea
王富生
养护计划优化提交
|
113
|
a.plan_finish_num,
|
49af8eaf
王彪总
refactor(garden):...
|
114
|
b.rate,
|
758c32c2
王富生
app养护计划明细提交
|
115
116
117
|
a.begin_time,
a.end_time,
a.company_id,
|
9e5481a8
王富生
修复sq当前时间格式
|
118
|
a.finish_state,
|
758c32c2
王富生
app养护计划明细提交
|
119
|
a.dept_id,
|
c12cb982
王富生
修复sql错误
|
120
|
c.begin_img,
|
9e5481a8
王富生
修复sq当前时间格式
|
121
|
c.img_host,
|
758c32c2
王富生
app养护计划明细提交
|
122
|
c.finish_time,
|
49af8eaf
王彪总
refactor(garden):...
|
123
124
|
c.user_name,
c.remark
|
758c32c2
王富生
app养护计划明细提交
|
125
|
FROM
|
7590852d
王富生
优化
|
126
127
128
129
|
garden_maintain_plan_detail a
INNER JOIN garden_maintain_plan b ON a.batch_no = b.batch_no
INNER JOIN garden_maintain_plan_commit c ON a.batch_no = c.batch_no AND a.plan_no = c.plan_no
WHERE a.plan_no = #{req.planNo}
|
4c567386
王富生
优化
|
130
|
ORDER BY c.id DESC
|
758c32c2
王富生
app养护计划明细提交
|
131
|
</select>
|
6b7cc52a
王彪总
refactor(garden):...
|
132
|
</mapper>
|