3919af5e
王富生
app巡查汇总查询提交
|
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
|
<select id="getInspectionPlanDetailForApp" resultType="com.zteits.urbanops.module.garden.controller.app.inspectionplan.vo.AppInspectionPlanDetailRespVO">
SELECT
a.batch_no,
b.plan_no,
a.road_id,
a.road_name,
a.plan_type_id,
a.level_id,
a.plan_type_id,
a.rate,
a.cycle_id,
b.sort_num,
b.plan_num,
b.plan_finish_num,
b.finish_state,
b.begin_time,
b.end_time
FROM
garden_inspection_plan a,
garden_inspection_plan_detail b,
garden_inspection_plan_role c
WHERE
a.batch_no = b.batch_no
AND b.batch_no=c.batch_no
AND a.road_id=b.road_id
AND a.dept_id =b.dept_id
AND a.deleted = b.deleted
AND a.deleted = 0
AND a.batch_no = #{req.batchNo}
|
3919af5e
王富生
app巡查汇总查询提交
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
AND a.company_id = #{req.companyId}
<if test="req.roleIds != null and req.roleIds.size() > 0">
AND c.role_id IN
<foreach collection="req.roleIds" item="roleId" open="(" separator="," close=")">
#{roleId}
</foreach>
</if>
<if test="req.busiLineList != null and req.busiLineList.size() > 0">
AND a.busi_line IN
<foreach collection="req.busiLineList" item="busiLine" open="(" separator="," close=")">
#{busiLine}
</foreach>
</if>
<!--状态 1:未完成;2:已完成;3:已失效-->
<if test="req.finishState == 3">
<![CDATA[and b.end_time < #{req.localDateTime}]]>
</if>
<if test="req.finishState == 2">
and b.finish_state = #{req.finishState}
</if>
<if test="req.finishState == 1">
and b.finish_state = #{req.finishState}
<![CDATA[ and b.begin_time <= #{req.localDateTime}
and b.end_time >= #{req.localDateTime}]]>
</if>
</select>
|