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.MaintainPlanDetailMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
|
04ee424b
王富生
养护计划提交
|
12
13
14
|
<delete id="deleteByBatchNo">
delete from garden_maintain_plan_detail where batch_no =#{batchNo}
</delete>
|
786ff9db
王富生
app养护计划明细提交
|
15
|
|
758c32c2
王富生
app养护计划明细提交
|
16
|
<select id="appMaintainPlanDetailListByRoadPage" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainPlanDetailRespVO">
|
786ff9db
王富生
app养护计划明细提交
|
17
18
19
20
21
22
23
24
|
SELECT
c.batch_no,
c.plan_no,
a.plan_name,
a.plan_type_id,
a.rate,
a.cycle_id,
c.plan_num,
|
612fc4ea
王富生
养护计划优化提交
|
25
|
c.plan_finish_num,
|
786ff9db
王富生
app养护计划明细提交
|
26
27
28
29
30
31
|
c.finish_state,
c.begin_time,
c.end_time,
c.sort_num
FROM
garden_maintain_plan a,
|
786ff9db
王富生
app养护计划明细提交
|
32
|
garden_maintain_plan_detail c
|
758c32c2
王富生
app养护计划明细提交
|
33
|
WHERE a.batch_no=c.batch_no
|
786ff9db
王富生
app养护计划明细提交
|
34
|
AND a.deleted=0
|
758c32c2
王富生
app养护计划明细提交
|
35
|
AND a.road_id = #{req.roadId}
|
758c32c2
王富生
app养护计划明细提交
|
36
37
|
<if test="req.planName != null and req.planName !=''">
AND a.plan_name LIKE CONCAT('%',#{req.planName},'%')
|
cfa1dff1
王富生
app养护计划明细提交
|
38
|
</if>
|
758c32c2
王富生
app养护计划明细提交
|
39
|
<if test="req.busiLineList != null and req.busiLineList.size() > 0">
|
786ff9db
王富生
app养护计划明细提交
|
40
|
AND a.busi_line IN
|
758c32c2
王富生
app养护计划明细提交
|
41
|
<foreach collection="req.busiLineList" item="busiLine" open="(" separator="," close=")">
|
786ff9db
王富生
app养护计划明细提交
|
42
43
44
|
#{busiLine}
</foreach>
</if>
|
e884db38
王富生
养护计划优化提交
|
45
46
|
<if test="req.batchNo!= null and req.batchNo !=''">
AND a.batch_no= #{req.batchNo}
|
758c32c2
王富生
app养护计划明细提交
|
47
|
</if>
|
a5cfb23d
王彪总
临时提交
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<!--状态 1:未完成;2:已完成;3:已失效-->
<if test="req.finishState == 3">
and a.finish_state = #{req.finishState}
<![CDATA[and c.end_time < #{req.localDateTime}]]>
</if>
<if test="req.finishState == 2">
and c.finish_state = #{req.finishState}
</if>
<if test="req.finishState == 1">
and c.finish_state = #{req.finishState}
<![CDATA[and c.end_time >= #{req.localDateTime}]]>
<![CDATA[and c.begin_time <= #{req.localDateTime}]]>
</if>
|
786ff9db
王富生
app养护计划明细提交
|
62
|
</select>
|
758c32c2
王富生
app养护计划明细提交
|
63
64
65
66
67
68
69
70
71
72
|
<select id="getMaintainNotFinishPlanCommitDetail" resultType="com.zteits.urbanops.module.garden.controller.app.maintainplan.vo.AppMaintainNotFinishPlanDetailRespVO">
SELECT
c.batch_no,
c.plan_no,
a.plan_name,
a.plan_type_id,
a.rate,
a.cycle_id,
c.plan_num,
|
612fc4ea
王富生
养护计划优化提交
|
73
|
c.plan_finish_num,
|
758c32c2
王富生
app养护计划明细提交
|
74
75
76
77
78
79
80
81
82
83
84
85
86
|
c.finish_state,
c.begin_time,
c.end_time,
c.sort_num
FROM
garden_maintain_plan a,
garden_maintain_plan_detail c
WHERE a.batch_no=c.batch_no
AND a.deleted=0
AND c.plan_no = #{req.planNo}
AND a.plan_type_id = #{req.planTypeId}
<!--状态 1:未完成;2:已完成;3:已失效-->
and c.finish_state = #{req.finishState}
|
9e5481a8
王富生
修复sq当前时间格式
|
87
|
<![CDATA[and c.end_time >= #{req.localDateTime}]]>
|
758c32c2
王富生
app养护计划明细提交
|
88
|
</select>
|
3fdad562
王彪总
feat(garden): 添加计...
|
89
|
</mapper>
|