|
|
@@ -2,25 +2,56 @@
|
|
2
|
2
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
3
|
3
|
<mapper namespace="com.chinaitop.depot.risk.mapper.ViolationWarningAlarmMapper">
|
|
4
|
4
|
<resultMap id="BaseResultMap" type="com.chinaitop.depot.risk.model.ViolationWarningAlarm">
|
|
5
|
|
- <id column="id" property="id" jdbcType="VARCHAR"/>
|
|
6
|
|
- <result column="alarm_publish_time" property="alarmPublishTime" jdbcType="VARCHAR"/>
|
|
7
|
|
- <result column="violation_subject_type" property="violationSubjectType" jdbcType="VARCHAR"/>
|
|
|
5
|
+ <id column="id" property="id" jdbcType="INTEGER"/>
|
|
|
6
|
+ <result column="publish_time" property="alarmPublishTime" jdbcType="VARCHAR"/>
|
|
8
|
7
|
<result column="offender" property="offender" jdbcType="VARCHAR"/>
|
|
9
|
|
- <result column="involving_library_points" property="involvingLibraryPoints" jdbcType="VARCHAR"/>
|
|
|
8
|
+ <result column="library_point_name" property="involvingLibraryPoints" jdbcType="VARCHAR"/>
|
|
10
|
9
|
<result column="violation_type" property="violationType" jdbcType="VARCHAR"/>
|
|
11
|
|
- <result column="violation_detail" property="violationDetail" jdbcType="VARCHAR"/>
|
|
12
|
|
- <result column="current_status" property="currentStatus" jdbcType="INTEGER"/>
|
|
|
10
|
+ <result column="detail" property="violationDetail" jdbcType="VARCHAR"/>
|
|
|
11
|
+ <result column="disposer" property="disposer" jdbcType="VARCHAR"/>
|
|
|
12
|
+ <result column="dispose_content" property="disposeContent" jdbcType="VARCHAR"/>
|
|
|
13
|
+ <result column="subject_type" property="violationSubjectType" jdbcType="VARCHAR"/>
|
|
|
14
|
+ <result column="status" property="currentStatus" jdbcType="INTEGER"/>
|
|
13
|
15
|
<result column="org_id" property="orgId" jdbcType="INTEGER"/>
|
|
|
16
|
+ <result column="create_time" property="createTime" jdbcType="VARCHAR"/>
|
|
14
|
17
|
</resultMap>
|
|
15
|
18
|
|
|
|
19
|
+
|
|
|
20
|
+ <select id="selectListPage" resultType="com.chinaitop.depot.risk.model.ViolationWarningAlarm">
|
|
|
21
|
+ select
|
|
|
22
|
+ id,
|
|
|
23
|
+ publish_time as alarmPublishTime,
|
|
|
24
|
+ offender as offender,
|
|
|
25
|
+ library_point_name as involvingLibraryPoints,
|
|
|
26
|
+ violation_type as violationType,
|
|
|
27
|
+ detail as violationDetail,
|
|
|
28
|
+ disposer as disposer,
|
|
|
29
|
+ dispose_content as disposeContent,
|
|
|
30
|
+ subject_type as violationSubjectType,
|
|
|
31
|
+ status as currentStatus,
|
|
|
32
|
+ org_id as orgId,
|
|
|
33
|
+ create_time as createTime
|
|
|
34
|
+ from
|
|
|
35
|
+ storage_pre_violation
|
|
|
36
|
+ where
|
|
|
37
|
+ org_id = #{orgId}
|
|
|
38
|
+ <if test="startDate != null and endDate != null" >
|
|
|
39
|
+ and publish_time BETWEEN #{startDate} AND #{endDate}
|
|
|
40
|
+ </if>
|
|
|
41
|
+ <if test="violationType != null" >
|
|
|
42
|
+ and violation_type = #{violationType}
|
|
|
43
|
+ </if>
|
|
|
44
|
+ </select>
|
|
|
45
|
+
|
|
16
|
46
|
<insert id="insert">
|
|
17
|
47
|
<selectKey keyProperty="id" resultType="java.lang.Integer" order="BEFORE">
|
|
18
|
48
|
select seq_business_agent_tank.nextVal from dual
|
|
19
|
49
|
</selectKey>
|
|
20
|
50
|
INSERT INTO storage_pre_violation
|
|
21
|
|
- (id, publish_time, offender, library_point_name, "type", detail, disposer, dispose_content, subject_type,
|
|
|
51
|
+ (id, publish_time, offender, library_point_name, violation_type, detail, disposer,
|
|
|
52
|
+ dispose_content, subject_type,
|
|
22
|
53
|
dispose_time, status, org_id, create_time)
|
|
23
|
|
- VALUES (#{id,jdbcType=VARCHAR},
|
|
|
54
|
+ VALUES (#{id,jdbcType=INTEGER},
|
|
24
|
55
|
#{alarmPublishTime,jdbcType=VARCHAR},
|
|
25
|
56
|
#{offender,jdbcType=VARCHAR},
|
|
26
|
57
|
#{involvingLibraryPoints,jdbcType=VARCHAR},
|
|
|
@@ -34,4 +65,60 @@
|
|
34
|
65
|
#{orgId,jdbcType=INTEGER},
|
|
35
|
66
|
#{createTime,jdbcType=VARCHAR})
|
|
36
|
67
|
</insert>
|
|
|
68
|
+
|
|
|
69
|
+
|
|
|
70
|
+ <select id="selectById" resultMap="BaseResultMap">
|
|
|
71
|
+ select
|
|
|
72
|
+ id,
|
|
|
73
|
+ publish_time,
|
|
|
74
|
+ offender ,
|
|
|
75
|
+ library_point_name ,
|
|
|
76
|
+ violation_type ,
|
|
|
77
|
+ detail ,
|
|
|
78
|
+ disposer ,
|
|
|
79
|
+ dispose_content,
|
|
|
80
|
+ subject_type ,
|
|
|
81
|
+ status ,
|
|
|
82
|
+ org_id ,
|
|
|
83
|
+ create_time
|
|
|
84
|
+ from
|
|
|
85
|
+ storage_pre_violation
|
|
|
86
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
87
|
+ </select>
|
|
|
88
|
+
|
|
|
89
|
+
|
|
|
90
|
+ <update id="updateById">
|
|
|
91
|
+ UPDATE storage_pre_violation
|
|
|
92
|
+ <set>
|
|
|
93
|
+ <if test="alarmPublishTime != null">
|
|
|
94
|
+ publish_time = #{alarmPublishTime,jdbcType=VARCHAR},
|
|
|
95
|
+ </if>
|
|
|
96
|
+ <if test="offender != null">
|
|
|
97
|
+ offender = #{offender,jdbcType=VARCHAR},
|
|
|
98
|
+ </if>
|
|
|
99
|
+ <if test="involvingLibraryPoints != null">
|
|
|
100
|
+ library_point_name = #{involvingLibraryPoints,jdbcType=VARCHAR},
|
|
|
101
|
+ </if>
|
|
|
102
|
+ <if test="violationType != null">
|
|
|
103
|
+ "type" = #{violationType,jdbcType=VARCHAR},
|
|
|
104
|
+ </if>
|
|
|
105
|
+ <if test="violationDetail != null">
|
|
|
106
|
+ detail = #{violationDetail,jdbcType=INTEGER},
|
|
|
107
|
+ </if>
|
|
|
108
|
+ <if test="disposer != null">
|
|
|
109
|
+ disposer = #{disposer,jdbcType=VARCHAR},
|
|
|
110
|
+ </if>
|
|
|
111
|
+ <if test="disposeContent != null">
|
|
|
112
|
+ dispose_content = #{disposeContent,jdbcType=VARCHAR},
|
|
|
113
|
+ </if>
|
|
|
114
|
+ <if test="violationSubjectType != null">
|
|
|
115
|
+ subject_type = #{violationSubjectType,jdbcType=VARCHAR},
|
|
|
116
|
+ </if>
|
|
|
117
|
+ <if test="currentStatus != null">
|
|
|
118
|
+ status = #{currentStatus,jdbcType=VARCHAR},
|
|
|
119
|
+ </if>
|
|
|
120
|
+ </set>
|
|
|
121
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
122
|
+ </update>
|
|
|
123
|
+
|
|
37
|
124
|
</mapper>
|