|
|
@@ -28,21 +28,38 @@
|
|
28
|
28
|
<result column="supervise_status_name" property="superviseStatusName" jdbcType="VARCHAR" />
|
|
29
|
29
|
<result column="alarm_type" property="alarmType" jdbcType="INTEGER" />
|
|
30
|
30
|
<result column="pzbm" property="pzbm" jdbcType="VARCHAR" />
|
|
|
31
|
+ <result column="hfzcsj" property="hfzcsj" jdbcType="VARCHAR" />
|
|
31
|
32
|
<!-- 业务字段 -->
|
|
32
|
33
|
<result column="storehouse_code" property="houseCode" jdbcType="VARCHAR" />
|
|
|
34
|
+ <result column="clordbzt" property="clordbzt" jdbcType="VARCHAR" />
|
|
|
35
|
+ <result column="yjzt" property="yjzt" jdbcType="VARCHAR" />
|
|
33
|
36
|
</resultMap>
|
|
34
|
37
|
<sql id="Base_Column_List" >
|
|
35
|
|
- a.id, a.kqbm, a.cfbm, a.ch, a.gzcwdsl, a.bjsj, a.create_time, a.update_time, a.kqdm, a.cwdsl, a.gzbl, a.approval_status,
|
|
36
|
|
- a.approval_status_name, a.data_flag, a.kqmc, a.hwxz, a.hwxzmc, a.org_id, a.org_code, a.duration_days,
|
|
37
|
|
- a.process_status, a.process_status_name, a.supervise_status, a.supervise_status_name, a.alarm_type,
|
|
38
|
|
- a.pzbm
|
|
|
38
|
+ id, kqbm, cfbm, ch, gzcwdsl, bjsj, create_time, update_time, kqdm, cwdsl, gzbl, approval_status,
|
|
|
39
|
+ approval_status_name, data_flag, kqmc, hwxz, hwxzmc, org_id, org_code, duration_days,
|
|
|
40
|
+ process_status, process_status_name, supervise_status, supervise_status_name, alarm_type,
|
|
|
41
|
+ pzbm, hfzcsj
|
|
39
|
42
|
</sql>
|
|
40
|
43
|
<select id="selectByExample" resultMap="BaseResultMap" parameterType="map">
|
|
41
|
|
- select
|
|
42
|
|
- <include refid="Base_Column_List" />
|
|
43
|
|
- ,b.storehouse_code
|
|
44
|
|
- from storage_temperaturepoint_warning a
|
|
45
|
|
- left join basic_storehouse b on b.cfbm=a.cfbm
|
|
|
44
|
+ select
|
|
|
45
|
+ *
|
|
|
46
|
+ from (
|
|
|
47
|
+ select
|
|
|
48
|
+ <include refid="Base_Column_List" />,
|
|
|
49
|
+ case approval_status
|
|
|
50
|
+ when '900000' then '待处理'
|
|
|
51
|
+ when '900001' then '处理中'
|
|
|
52
|
+ when '900002' then '待处理 督办中'
|
|
|
53
|
+ when '900003' then '处理中 督办中'
|
|
|
54
|
+ when '900004' then '督办中'
|
|
|
55
|
+ when '900005' then '二次督办中'
|
|
|
56
|
+ when '900006' then '二次督办完成'
|
|
|
57
|
+ when '999999' then '处理完成'
|
|
|
58
|
+ else ''
|
|
|
59
|
+ end clordbzt,
|
|
|
60
|
+ case when hfzcsj is not null and approval_status = '999999' then '已解决' else'未解决' end yjzt
|
|
|
61
|
+ from storage_temperaturepoint_warning
|
|
|
62
|
+ ) a
|
|
46
|
63
|
<where>
|
|
47
|
64
|
<if test="obj.dataFlag != null">
|
|
48
|
65
|
and a.data_flag = #{obj.dataFlag,jdbcType=VARCHAR}
|
|
|
@@ -56,6 +73,12 @@
|
|
56
|
73
|
<if test="obj.orgId != null">
|
|
57
|
74
|
and a.org_id = #{obj.orgId,jdbcType=INTEGER}
|
|
58
|
75
|
</if>
|
|
|
76
|
+ <if test="obj.approvalStatus != null">
|
|
|
77
|
+ and a.approval_status = #{obj.approvalStatus,jdbcType=VARCHAR}
|
|
|
78
|
+ </if>
|
|
|
79
|
+ <if test="obj.yjzt != null">
|
|
|
80
|
+ and a.yjzt = #{obj.yjzt,jdbcType=VARCHAR}
|
|
|
81
|
+ </if>
|
|
59
|
82
|
</where>
|
|
60
|
83
|
order by a.bjsj desc
|
|
61
|
84
|
</select>
|