b3c0caf4
王富生
巡查计划明细及巡查计划创建优化
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<!-- 复杂联表分页查询 -->
<select id="selectForPage" resultType="com.zteits.urbanops.module.garden.controller.admin.inspectionplan.vo.InspectionPlanCommitRespVO">
SELECT
a.plan_no,
b.plan_name,
a.busi_line,
b.road_id,
b.road_name,
b.level_id,
b.plan_attr as planAttr,
b.plan_type_id as planTypeId,
b.company_id,
b.dept_id,
a.img_host as imgHost,
a.img,
a.inspection_state as inspectionState,
a.trans_state as transState,
a.trans_work_no as transWorkNo,
a.finish_time as finishTime,
a.user_id,
a.user_name,
a.role_id,
a.role_name,
a.remark,
a.creator,
a.creator_name,
a.create_time
FROM
garden_inspection_plan_commit a, garden_inspection_plan b
where a.batch_no=b.batch_no
<if test="req.planNo != null and req.planNo !=''">
and a.plan_no = #{req.planNo}
</if>
<if test="req.planName != null and req.planName !=''">
AND b.plan_name LIKE CONCAT(#{req.planName},'%')
</if>
<if test="busiLineList != null and busiLineList.size() > 0">
AND a.busi_line IN
<foreach collection="busiLineList" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
|
b3c0caf4
王富生
巡查计划明细及巡查计划创建优化
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
<if test="req.planAttr != null">
and b.plan_attr = #{req.planAttr}
</if>
<if test="req.planTypeId != null">
and b.plan_type_id = #{req.planTypeId}
</if>
<if test="req.deptId != null">
and b.dept_id = #{req.deptId}
</if>
<if test="req.roadName != null and req.roadName !=''">
AND b.road_name LIKE CONCAT(#{req.roadName},'%')
</if>
<if test="req.companyId != null">
and b.company_id = #{req.companyId}
</if>
<if test="req.levelId != null">
and b.level_id = #{req.levelId}
</if>
<if test="req.userName != null and req.userName !=''">
AND a.user_name LIKE CONCAT('%', #{req.userName},'%')
</if>
<if test="req.transState != null">
and a.inspection_state = #{req.transState}
</if>
<if test="req.finishTime != null">
AND DATE_FORMAT(a.finish_time, '%Y-%m-%d') = #{req.finishTime}
</if>
<if test="req.remark != null and req.remark !=''">
AND a.remark LIKE CONCAT('%', #{req.remark} ,'%')
</if>
order by a.id desc
</select>
|