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
|
c.finish_state,
c.begin_time,
c.end_time,
c.sort_num
FROM
|
73dd9606
王富生
优化
|
31
32
33
|
garden_maintain_plan a
INNER JOIN garden_maintain_plan_detail c on a.batch_no=c.batch_no
WHERE a.deleted=0
|
758c32c2
王富生
app养护计划明细提交
|
34
|
AND a.road_id = #{req.roadId}
|
758c32c2
王富生
app养护计划明细提交
|
35
36
|
<if test="req.planName != null and req.planName !=''">
AND a.plan_name LIKE CONCAT('%',#{req.planName},'%')
|
cfa1dff1
王富生
app养护计划明细提交
|
37
|
</if>
|
758c32c2
王富生
app养护计划明细提交
|
38
|
<if test="req.busiLineList != null and req.busiLineList.size() > 0">
|
786ff9db
王富生
app养护计划明细提交
|
39
|
AND a.busi_line IN
|
758c32c2
王富生
app养护计划明细提交
|
40
|
<foreach collection="req.busiLineList" item="busiLine" open="(" separator="," close=")">
|
786ff9db
王富生
app养护计划明细提交
|
41
42
43
|
#{busiLine}
</foreach>
</if>
|
e884db38
王富生
养护计划优化提交
|
44
45
|
<if test="req.batchNo!= null and req.batchNo !=''">
AND a.batch_no= #{req.batchNo}
|
758c32c2
王富生
app养护计划明细提交
|
46
|
</if>
|
a5cfb23d
王彪总
临时提交
|
47
|
<!--状态 1:未完成;2:已完成;3:已失效-->
|
73dd9606
王富生
优化
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<choose>
<when test="req.finishState == 1">
AND c.finish_state = 1
<![CDATA[AND c.begin_time <= #{req.localDateTime}
AND c.end_time >= #{req.localDateTime}]]>
</when>
<when test="req.finishState == 2">
AND c.finish_state = 2
</when>
<when test="req.finishState == 3">
AND c.finish_state = 3
</when>
<when test="req.finishState == 4">
AND c.finish_state = 4
</when>
</choose>
|
786ff9db
王富生
app养护计划明细提交
|
64
|
</select>
|
758c32c2
王富生
app养护计划明细提交
|
65
66
67
68
69
70
71
72
73
74
|
<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
王富生
养护计划优化提交
|
75
|
c.plan_finish_num,
|
758c32c2
王富生
app养护计划明细提交
|
76
77
78
79
80
81
82
83
84
85
86
87
88
|
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}
|
758c32c2
王富生
app养护计划明细提交
|
89
|
</select>
|
3fdad562
王彪总
feat(garden): 添加计...
|
90
|
</mapper>
|