gaodd il y a 5 ans
Parent
commit
e0453bcec4
17 fichiers modifiés avec 8327 ajouts et 0 suppressions
  1. 11 0
      bin/src/main/java/com/chinaitop/depot/act/mapper/ActMapper.xml
  2. 146 0
      bin/src/main/java/com/chinaitop/depot/agile/mapper/BusinessSceduleMapper.xml
  3. 747 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessApprovalMapper.xml
  4. 1264 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessContractMapper.xml
  5. 258 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessContractPayReceviceMapper.xml
  6. 983 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessDeliveryStorageNoticeMapper.xml
  7. 338 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessFileMapper.xml
  8. 519 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessLadingMapper.xml
  9. 969 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessPlanMapper.xml
  10. 47 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessSceduleMapper.xml
  11. 575 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessStoreWareDetailMapper.xml
  12. 263 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessWarningMapper.xml
  13. 845 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/OrgInfoMapper.xml
  14. 228 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/RoleInfoMapper.xml
  15. 465 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/SystemLogMapper.xml
  16. 485 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/UserInfoMapper.xml
  17. 184 0
      bin/src/main/java/com/chinaitop/depot/business/mapper/UserRoleMapper.xml

+ 11 - 0
bin/src/main/java/com/chinaitop/depot/act/mapper/ActMapper.xml

@@ -0,0 +1,11 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.act.mapper.ActMapper">
4
+    
5
+	<update id="updateProcInsIdByBusinessId">
6
+		UPDATE ${businessTable} SET 
7
+			proc_ins_id = #{procInsId}
8
+		WHERE id = #{businessId}
9
+	</update>
10
+	
11
+</mapper>

+ 146 - 0
bin/src/main/java/com/chinaitop/depot/agile/mapper/BusinessSceduleMapper.xml

@@ -0,0 +1,146 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.agile.mapper.BusinessSceduleMapper" >
4
+  <select id="getPlanSceduleInPlanId" parameterType="java.lang.String" resultType="com.chinaitop.depot.agile.model.BusinessScedule">
5
+	<!-- SELECT
6
+		a.jhdID jhId, x.cazylx crkLx, sum(f.srsl) sumRksl, sum(f.zcsl) sumCksl
7
+	FROM
8
+		lsreport_ts.data_kcgl_xckc_default x,
9
+        lsreport_ts.data_crkyw_tzdxx_default a,
10
+		lsreport_ts.data_kcgl_fcbgz_default f
11
+	WHERE
12
+		x.DataID = f.stockdataid  
13
+		and x.tzdh = a.tzdbh  
14
+		and a.jhdID IN ${planIds} GROUP BY a.jhdID, x.cazylx; -->
15
+		SELECT
16
+	        sum(wcsl) sumWcsl,
17
+			(
18
+				CASE cczyfl
19
+				WHEN '2816' THEN '1'
20
+				WHEN '4028818465320af10165322861c80c4e' THEN '1'
21
+				WHEN '4028818465320af101653229a21e0c50' THEN '1'
22
+		        WHEN '4028818465320af10165328975f00c55' THEN '1'
23
+		        WHEN '2818' THEN '3'
24
+				WHEN '4028818465320af101653228b13e0c4f' THEN '3'
25
+				WHEN '4028818465320af10165322e04ec0c51' THEN '3'
26
+		        WHEN '4028818465320af10165328a47670c56' THEN '3'
27
+		        else  cczyfl
28
+				end
29
+			) as crkLx,
30
+	        jhdID jhId
31
+       FROM data_crkyw_tzdxx_default
32
+	   WHERE jhdID IN ${planIds} GROUP BY jhdID,cczyfl
33
+  </select>
34
+  
35
+  <select id="getContractSceduleInContractId" parameterType="java.lang.String" resultType="com.chinaitop.depot.agile.model.BusinessScedule">
36
+  	<!-- SELECT
37
+		b.htID htId, x.cazylx crkLx, sum(f.srsl) sumRksl, sum(f.zcsl) sumCksl
38
+	FROM
39
+		lsreport_ts.data_kcgl_xckc_default x,
40
+        lsreport_ts.data_crkyw_tzdxx_default b,
41
+		lsreport_ts.data_kcgl_fcbgz_default f
42
+	WHERE
43
+		x.DataID = f.stockdataid
44
+        and x.tzdh = b.tzdbh
45
+		and b.htID IN ${contractIds} GROUP BY b.htID, x.cazylx; -->
46
+		SELECT
47
+	        sum(wcsl) sumWcsl,
48
+			(
49
+				CASE cczyfl
50
+				WHEN '2816' THEN '1'
51
+				WHEN '4028818465320af10165322861c80c4e' THEN '1'
52
+				WHEN '4028818465320af101653229a21e0c50' THEN '1'
53
+		        WHEN '4028818465320af10165328975f00c55' THEN '1'
54
+		        WHEN '2818' THEN '3'
55
+				WHEN '4028818465320af101653228b13e0c4f' THEN '3'
56
+				WHEN '4028818465320af10165322e04ec0c51' THEN '3'
57
+		        WHEN '4028818465320af10165328a47670c56' THEN '3'
58
+		        else  cczyfl
59
+				end
60
+			) as crkLx,
61
+	        htID htId
62
+       FROM data_crkyw_tzdxx_default
63
+	   WHERE htID IN ${contractIds} GROUP BY htID,cczyfl
64
+  </select>
65
+  
66
+  <select id="getNoticeSceduleInNoticeId" parameterType="java.lang.String" resultType="com.chinaitop.depot.agile.model.BusinessScedule">
67
+  	<!-- SELECT
68
+		b.tzdID tzdId, x.cazylx crkLx, sum(f.srsl) sumRksl, sum(f.zcsl) sumCksl
69
+	FROM
70
+		lsreport_ts.data_kcgl_xckc_default x,
71
+        lsreport_ts.data_crkyw_tzdxx_default b,
72
+		lsreport_ts.data_kcgl_fcbgz_default f
73
+	WHERE
74
+		x.DataID = f.stockdataid
75
+		and x.tzdh = b.tzdbh
76
+		and b.tzdID IN ${noticeIds} GROUP BY b.tzdID, x.cazylx; -->
77
+		SELECT
78
+	        sum(wcsl) sumWcsl,
79
+			(
80
+				CASE cczyfl
81
+				WHEN '2816' THEN '1'
82
+				WHEN '4028818465320af10165322861c80c4e' THEN '1'
83
+				WHEN '4028818465320af101653229a21e0c50' THEN '1'
84
+		        WHEN '4028818465320af10165328975f00c55' THEN '1'
85
+		        WHEN '2818' THEN '3'
86
+				WHEN '4028818465320af101653228b13e0c4f' THEN '3'
87
+				WHEN '4028818465320af10165322e04ec0c51' THEN '3'
88
+		        WHEN '4028818465320af10165328a47670c56' THEN '3'
89
+		        else  cczyfl
90
+				end
91
+			) as crkLx,
92
+	        tzdID tzdId
93
+       FROM data_crkyw_tzdxx_default
94
+	   WHERE tzdID IN ${noticeIds} GROUP BY tzdID,cczyfl
95
+  </select>
96
+  
97
+  <update id="updateNoticeStatus" parameterType="java.util.Map">
98
+  	UPDATE 
99
+  		lsreport_ts.fl_bill_relation 
100
+  	SET 
101
+  		FLOWSTATUS = ${FLOWSTATUS}
102
+	WHERE 
103
+		DATAID IN (SELECT DataID FROM lsreport_ts.data_crkyw_tzdxx_default WHERE tzdID = ${tzdh})
104
+		<!-- 不能修改已经执行完毕的通知单的状态  -->
105
+		and FLOWSTATUS != 2
106
+  </update>
107
+  
108
+  <select id="getDzContractSceduleInContractId" parameterType="java.lang.String" resultType="com.chinaitop.depot.agile.model.BusinessScedule">
109
+  	SELECT
110
+	     SUM(b.klhjz) sumCksl,d.htbh,bc.id htId
111
+    FROM
112
+	     lsreport_ts.data_crkyw_ckrmdj_default a
113
+		inner JOIN lsreport_ts.data_crkyw_ckcmz_default b ON a.BizNo = b.BizNo
114
+		inner JOIN lsreport_ts.data_crkyw_dzzzthd_default c ON a.thdh = c.thdh
115
+		left JOIN lsreport_ts.data_crkyw_hcrzdj_default d ON c.rzdh = d.rzdh
116
+		left join depot.business_contract bc on d.htbh = bc.contract_number
117
+	WHERE
118
+	    a.thdh IS NOT NULL 
119
+	    and bc.id in ${contractIds} GROUP BY d.htbh
120
+	
121
+  </select>
122
+  
123
+  <select id="getFyContractSceduleInContractId" parameterType="java.lang.String" resultType="com.chinaitop.depot.agile.model.BusinessScedule">
124
+  	SELECT
125
+	    SUM(b.xzklhjz) sumCksl,d.htID htId
126
+    FROM
127
+	      lsreport_ts.DATA_CRKYW_FYZZQCDZRMDJ_DEFAULT a
128
+		LEFT JOIN lsreport_ts.DATA_CRKYW_CPZ_DEFAULT b ON a.BizNo = b.BizNo
129
+		LEFT JOIN lsreport_ts.data_crkyw_tzdxx_default d ON a.tzdbh = d.tzdbh
130
+		LEFT JOIN lsreport_ts.data_crkyw_hcckrzdj_default c ON d.htbh = c.htbh
131
+    WHERE
132
+	c.cczyfl = '4028818465320af10165322e04ec0c51'
133
+    AND d.htID IN ${contractIds} GROUP BY c.htbh
134
+  </select>
135
+  
136
+  <!-- 提货单完成数量 -->
137
+  <select id="getThdInNumber" parameterType="java.lang.String" resultType="com.chinaitop.depot.agile.model.BusinessScedule">
138
+  	 SELECT DISTINCT
139
+	    SUM(mz-pz) sumWcsl,
140
+        a.thdh thdh
141
+     FROM DATA_CRKYW_CKCMZ_DEFAULT a
142
+     LEFT JOIN DATA_CRKYW_CKRMDJ_DEFAULT b ON a.BizNo = b.BizNo
143
+     LEFT JOIN DATA_CRKYW_CKcpz_DEFAULT c ON a.BizNo = c.BIZNO
144
+    WHERE a.thdh IN ${thdNumbers}
145
+  </select>
146
+</mapper>

+ 747 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessApprovalMapper.xml

@@ -0,0 +1,747 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessApprovalMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessApproval" >
5
+    <!--
6
+      WARNING - @mbggenerated
7
+      This element is automatically generated by MyBatis Generator, do not modify.
8
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
9
+    -->
10
+    <id column="id" property="id" jdbcType="INTEGER" />
11
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
12
+    <result column="is_deleted" property="isDeleted" jdbcType="INTEGER" />
13
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
14
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
15
+    <result column="content" property="content" jdbcType="VARCHAR" />
16
+    <result column="from_department" property="fromDepartment" jdbcType="VARCHAR" />
17
+    <result column="from_people" property="fromPeople" jdbcType="VARCHAR" />
18
+    <result column="from_user_name" property="fromUserName" jdbcType="VARCHAR" />
19
+    <result column="last_people" property="lastPeople" jdbcType="VARCHAR" />
20
+    <result column="operate_time" property="operateTime" jdbcType="VARCHAR" />
21
+    <result column="operator" property="operator" jdbcType="VARCHAR" />
22
+    <result column="operator_name" property="operatorName" jdbcType="VARCHAR" />
23
+    <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
24
+    <result column="project_id" property="projectId" jdbcType="INTEGER" />
25
+    <result column="project_name" property="projectName" jdbcType="VARCHAR" />
26
+    <result column="result" property="result" jdbcType="VARCHAR" />
27
+    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
28
+    <result column="task_info" property="taskInfo" jdbcType="VARCHAR" />
29
+    <result column="task_name" property="taskName" jdbcType="VARCHAR" />
30
+    <result column="task_type" property="taskType" jdbcType="VARCHAR" />
31
+    <result column="title" property="title" jdbcType="VARCHAR" />
32
+    <result column="version" property="version" jdbcType="INTEGER" />
33
+    <result column="task_type_name" property="taskTypeName" jdbcType="VARCHAR" />
34
+    <result column="is_hide" property="isHide" jdbcType="INTEGER" />
35
+    <result column="is_countersign" property="isCountersign" jdbcType="INTEGER" />
36
+    <result column="apply_name" property="applyName" jdbcType="VARCHAR" />
37
+    <result column="apply_name_id" property="applyNameId" jdbcType="VARCHAR" />
38
+    <result column="apply_time" property="applyTime" jdbcType="TIMESTAMP" />
39
+  </resultMap>
40
+  <sql id="Example_Where_Clause" >
41
+    <!--
42
+      WARNING - @mbggenerated
43
+      This element is automatically generated by MyBatis Generator, do not modify.
44
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
45
+    -->
46
+    <where >
47
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
48
+        <if test="criteria.valid" >
49
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
50
+            <foreach collection="criteria.criteria" item="criterion" >
51
+              <choose >
52
+                <when test="criterion.noValue" >
53
+                  and ${criterion.condition}
54
+                </when>
55
+                <when test="criterion.singleValue" >
56
+                  and ${criterion.condition} #{criterion.value}
57
+                </when>
58
+                <when test="criterion.betweenValue" >
59
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
60
+                </when>
61
+                <when test="criterion.listValue" >
62
+                  and ${criterion.condition}
63
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
64
+                    #{listItem}
65
+                  </foreach>
66
+                </when>
67
+              </choose>
68
+            </foreach>
69
+          </trim>
70
+        </if>
71
+      </foreach>
72
+    </where>
73
+  </sql>
74
+  <sql id="Update_By_Example_Where_Clause" >
75
+    <!--
76
+      WARNING - @mbggenerated
77
+      This element is automatically generated by MyBatis Generator, do not modify.
78
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
79
+    -->
80
+    <where >
81
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
82
+        <if test="criteria.valid" >
83
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
84
+            <foreach collection="criteria.criteria" item="criterion" >
85
+              <choose >
86
+                <when test="criterion.noValue" >
87
+                  and ${criterion.condition}
88
+                </when>
89
+                <when test="criterion.singleValue" >
90
+                  and ${criterion.condition} #{criterion.value}
91
+                </when>
92
+                <when test="criterion.betweenValue" >
93
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
94
+                </when>
95
+                <when test="criterion.listValue" >
96
+                  and ${criterion.condition}
97
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
98
+                    #{listItem}
99
+                  </foreach>
100
+                </when>
101
+              </choose>
102
+            </foreach>
103
+          </trim>
104
+        </if>
105
+      </foreach>
106
+    </where>
107
+  </sql>
108
+  <sql id="Base_Column_List" >
109
+    <!--
110
+      WARNING - @mbggenerated
111
+      This element is automatically generated by MyBatis Generator, do not modify.
112
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
113
+    -->
114
+    id, create_time, is_deleted, remark, update_time, content, from_department, from_people, 
115
+    from_user_name, last_people, operate_time, operator, operator_name, process_instance_id, 
116
+    project_id, project_name, result, task_id, task_info, task_name, task_type, title, 
117
+    version, task_type_name, is_hide, is_countersign, apply_name, apply_name_id, apply_time
118
+  </sql>
119
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessApprovalExample" >
120
+    <!--
121
+      WARNING - @mbggenerated
122
+      This element is automatically generated by MyBatis Generator, do not modify.
123
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
124
+    -->
125
+    select
126
+    <if test="distinct" >
127
+      distinct
128
+    </if>
129
+    <include refid="Base_Column_List" />
130
+    from business_approval
131
+    <if test="_parameter != null" >
132
+      <include refid="Example_Where_Clause" />
133
+    </if>
134
+    <if test="orderByClause != null" >
135
+      order by ${orderByClause}
136
+    </if>
137
+  </select>
138
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
139
+    <!--
140
+      WARNING - @mbggenerated
141
+      This element is automatically generated by MyBatis Generator, do not modify.
142
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
143
+    -->
144
+    select 
145
+    <include refid="Base_Column_List" />
146
+    from business_approval
147
+    where id = #{id,jdbcType=INTEGER}
148
+  </select>
149
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
150
+    <!--
151
+      WARNING - @mbggenerated
152
+      This element is automatically generated by MyBatis Generator, do not modify.
153
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
154
+    -->
155
+    delete from business_approval
156
+    where id = #{id,jdbcType=INTEGER}
157
+  </delete>
158
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessApprovalExample" >
159
+    <!--
160
+      WARNING - @mbggenerated
161
+      This element is automatically generated by MyBatis Generator, do not modify.
162
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
163
+    -->
164
+    delete from business_approval
165
+    <if test="_parameter != null" >
166
+      <include refid="Example_Where_Clause" />
167
+    </if>
168
+  </delete>
169
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.BusinessApproval" >
170
+    <!--
171
+      WARNING - @mbggenerated
172
+      This element is automatically generated by MyBatis Generator, do not modify.
173
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
174
+    -->
175
+    insert into business_approval (id, create_time, is_deleted, 
176
+      remark, update_time, content, 
177
+      from_department, from_people, from_user_name, 
178
+      last_people, operate_time, operator, 
179
+      operator_name, process_instance_id, project_id, 
180
+      project_name, result, task_id, 
181
+      task_info, task_name, task_type, 
182
+      title, version, task_type_name, 
183
+      is_hide, is_countersign, apply_name, 
184
+      apply_name_id, apply_time)
185
+    values (#{id,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=INTEGER}, 
186
+      #{remark,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR}, 
187
+      #{fromDepartment,jdbcType=VARCHAR}, #{fromPeople,jdbcType=VARCHAR}, #{fromUserName,jdbcType=VARCHAR}, 
188
+      #{lastPeople,jdbcType=VARCHAR}, #{operateTime,jdbcType=VARCHAR}, #{operator,jdbcType=VARCHAR}, 
189
+      #{operatorName,jdbcType=VARCHAR}, #{processInstanceId,jdbcType=VARCHAR}, #{projectId,jdbcType=INTEGER}, 
190
+      #{projectName,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, 
191
+      #{taskInfo,jdbcType=VARCHAR}, #{taskName,jdbcType=VARCHAR}, #{taskType,jdbcType=VARCHAR}, 
192
+      #{title,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER}, #{taskTypeName,jdbcType=VARCHAR}, 
193
+      #{isHide,jdbcType=INTEGER}, #{isCountersign,jdbcType=INTEGER}, #{applyName,jdbcType=VARCHAR}, 
194
+      #{applyNameId,jdbcType=VARCHAR}, #{applyTime,jdbcType=TIMESTAMP})
195
+  </insert>
196
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessApproval" >
197
+    <!--
198
+      WARNING - @mbggenerated
199
+      This element is automatically generated by MyBatis Generator, do not modify.
200
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
201
+    -->
202
+    insert into business_approval
203
+    <trim prefix="(" suffix=")" suffixOverrides="," >
204
+      <if test="id != null" >
205
+        id,
206
+      </if>
207
+      <if test="createTime != null" >
208
+        create_time,
209
+      </if>
210
+      <if test="isDeleted != null" >
211
+        is_deleted,
212
+      </if>
213
+      <if test="remark != null" >
214
+        remark,
215
+      </if>
216
+      <if test="updateTime != null" >
217
+        update_time,
218
+      </if>
219
+      <if test="content != null" >
220
+        content,
221
+      </if>
222
+      <if test="fromDepartment != null" >
223
+        from_department,
224
+      </if>
225
+      <if test="fromPeople != null" >
226
+        from_people,
227
+      </if>
228
+      <if test="fromUserName != null" >
229
+        from_user_name,
230
+      </if>
231
+      <if test="lastPeople != null" >
232
+        last_people,
233
+      </if>
234
+      <if test="operateTime != null" >
235
+        operate_time,
236
+      </if>
237
+      <if test="operator != null" >
238
+        operator,
239
+      </if>
240
+      <if test="operatorName != null" >
241
+        operator_name,
242
+      </if>
243
+      <if test="processInstanceId != null" >
244
+        process_instance_id,
245
+      </if>
246
+      <if test="projectId != null" >
247
+        project_id,
248
+      </if>
249
+      <if test="projectName != null" >
250
+        project_name,
251
+      </if>
252
+      <if test="result != null" >
253
+        result,
254
+      </if>
255
+      <if test="taskId != null" >
256
+        task_id,
257
+      </if>
258
+      <if test="taskInfo != null" >
259
+        task_info,
260
+      </if>
261
+      <if test="taskName != null" >
262
+        task_name,
263
+      </if>
264
+      <if test="taskType != null" >
265
+        task_type,
266
+      </if>
267
+      <if test="title != null" >
268
+        title,
269
+      </if>
270
+      <if test="version != null" >
271
+        version,
272
+      </if>
273
+      <if test="taskTypeName != null" >
274
+        task_type_name,
275
+      </if>
276
+      <if test="isHide != null" >
277
+        is_hide,
278
+      </if>
279
+      <if test="isCountersign != null" >
280
+        is_countersign,
281
+      </if>
282
+      <if test="applyName != null" >
283
+        apply_name,
284
+      </if>
285
+      <if test="applyNameId != null" >
286
+        apply_name_id,
287
+      </if>
288
+      <if test="applyTime != null" >
289
+        apply_time,
290
+      </if>
291
+    </trim>
292
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
293
+      <if test="id != null" >
294
+        #{id,jdbcType=INTEGER},
295
+      </if>
296
+      <if test="createTime != null" >
297
+        #{createTime,jdbcType=TIMESTAMP},
298
+      </if>
299
+      <if test="isDeleted != null" >
300
+        #{isDeleted,jdbcType=INTEGER},
301
+      </if>
302
+      <if test="remark != null" >
303
+        #{remark,jdbcType=VARCHAR},
304
+      </if>
305
+      <if test="updateTime != null" >
306
+        #{updateTime,jdbcType=TIMESTAMP},
307
+      </if>
308
+      <if test="content != null" >
309
+        #{content,jdbcType=VARCHAR},
310
+      </if>
311
+      <if test="fromDepartment != null" >
312
+        #{fromDepartment,jdbcType=VARCHAR},
313
+      </if>
314
+      <if test="fromPeople != null" >
315
+        #{fromPeople,jdbcType=VARCHAR},
316
+      </if>
317
+      <if test="fromUserName != null" >
318
+        #{fromUserName,jdbcType=VARCHAR},
319
+      </if>
320
+      <if test="lastPeople != null" >
321
+        #{lastPeople,jdbcType=VARCHAR},
322
+      </if>
323
+      <if test="operateTime != null" >
324
+        #{operateTime,jdbcType=VARCHAR},
325
+      </if>
326
+      <if test="operator != null" >
327
+        #{operator,jdbcType=VARCHAR},
328
+      </if>
329
+      <if test="operatorName != null" >
330
+        #{operatorName,jdbcType=VARCHAR},
331
+      </if>
332
+      <if test="processInstanceId != null" >
333
+        #{processInstanceId,jdbcType=VARCHAR},
334
+      </if>
335
+      <if test="projectId != null" >
336
+        #{projectId,jdbcType=INTEGER},
337
+      </if>
338
+      <if test="projectName != null" >
339
+        #{projectName,jdbcType=VARCHAR},
340
+      </if>
341
+      <if test="result != null" >
342
+        #{result,jdbcType=VARCHAR},
343
+      </if>
344
+      <if test="taskId != null" >
345
+        #{taskId,jdbcType=VARCHAR},
346
+      </if>
347
+      <if test="taskInfo != null" >
348
+        #{taskInfo,jdbcType=VARCHAR},
349
+      </if>
350
+      <if test="taskName != null" >
351
+        #{taskName,jdbcType=VARCHAR},
352
+      </if>
353
+      <if test="taskType != null" >
354
+        #{taskType,jdbcType=VARCHAR},
355
+      </if>
356
+      <if test="title != null" >
357
+        #{title,jdbcType=VARCHAR},
358
+      </if>
359
+      <if test="version != null" >
360
+        #{version,jdbcType=INTEGER},
361
+      </if>
362
+      <if test="taskTypeName != null" >
363
+        #{taskTypeName,jdbcType=VARCHAR},
364
+      </if>
365
+      <if test="isHide != null" >
366
+        #{isHide,jdbcType=INTEGER},
367
+      </if>
368
+      <if test="isCountersign != null" >
369
+        #{isCountersign,jdbcType=INTEGER},
370
+      </if>
371
+      <if test="applyName != null" >
372
+        #{applyName,jdbcType=VARCHAR},
373
+      </if>
374
+      <if test="applyNameId != null" >
375
+        #{applyNameId,jdbcType=VARCHAR},
376
+      </if>
377
+      <if test="applyTime != null" >
378
+        #{applyTime,jdbcType=TIMESTAMP},
379
+      </if>
380
+    </trim>
381
+  </insert>
382
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessApprovalExample" resultType="java.lang.Integer" >
383
+    <!--
384
+      WARNING - @mbggenerated
385
+      This element is automatically generated by MyBatis Generator, do not modify.
386
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
387
+    -->
388
+    select count(*) from business_approval
389
+    <if test="_parameter != null" >
390
+      <include refid="Example_Where_Clause" />
391
+    </if>
392
+  </select>
393
+  <update id="updateByExampleSelective" parameterType="map" >
394
+    <!--
395
+      WARNING - @mbggenerated
396
+      This element is automatically generated by MyBatis Generator, do not modify.
397
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
398
+    -->
399
+    update business_approval
400
+    <set >
401
+      <if test="record.id != null" >
402
+        id = #{record.id,jdbcType=INTEGER},
403
+      </if>
404
+      <if test="record.createTime != null" >
405
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
406
+      </if>
407
+      <if test="record.isDeleted != null" >
408
+        is_deleted = #{record.isDeleted,jdbcType=INTEGER},
409
+      </if>
410
+      <if test="record.remark != null" >
411
+        remark = #{record.remark,jdbcType=VARCHAR},
412
+      </if>
413
+      <if test="record.updateTime != null" >
414
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
415
+      </if>
416
+      <if test="record.content != null" >
417
+        content = #{record.content,jdbcType=VARCHAR},
418
+      </if>
419
+      <if test="record.fromDepartment != null" >
420
+        from_department = #{record.fromDepartment,jdbcType=VARCHAR},
421
+      </if>
422
+      <if test="record.fromPeople != null" >
423
+        from_people = #{record.fromPeople,jdbcType=VARCHAR},
424
+      </if>
425
+      <if test="record.fromUserName != null" >
426
+        from_user_name = #{record.fromUserName,jdbcType=VARCHAR},
427
+      </if>
428
+      <if test="record.lastPeople != null" >
429
+        last_people = #{record.lastPeople,jdbcType=VARCHAR},
430
+      </if>
431
+      <if test="record.operateTime != null" >
432
+        operate_time = #{record.operateTime,jdbcType=VARCHAR},
433
+      </if>
434
+      <if test="record.operator != null" >
435
+        operator = #{record.operator,jdbcType=VARCHAR},
436
+      </if>
437
+      <if test="record.operatorName != null" >
438
+        operator_name = #{record.operatorName,jdbcType=VARCHAR},
439
+      </if>
440
+      <if test="record.processInstanceId != null" >
441
+        process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
442
+      </if>
443
+      <if test="record.projectId != null" >
444
+        project_id = #{record.projectId,jdbcType=INTEGER},
445
+      </if>
446
+      <if test="record.projectName != null" >
447
+        project_name = #{record.projectName,jdbcType=VARCHAR},
448
+      </if>
449
+      <if test="record.result != null" >
450
+        result = #{record.result,jdbcType=VARCHAR},
451
+      </if>
452
+      <if test="record.taskId != null" >
453
+        task_id = #{record.taskId,jdbcType=VARCHAR},
454
+      </if>
455
+      <if test="record.taskInfo != null" >
456
+        task_info = #{record.taskInfo,jdbcType=VARCHAR},
457
+      </if>
458
+      <if test="record.taskName != null" >
459
+        task_name = #{record.taskName,jdbcType=VARCHAR},
460
+      </if>
461
+      <if test="record.taskType != null" >
462
+        task_type = #{record.taskType,jdbcType=VARCHAR},
463
+      </if>
464
+      <if test="record.title != null" >
465
+        title = #{record.title,jdbcType=VARCHAR},
466
+      </if>
467
+      <if test="record.version != null" >
468
+        version = #{record.version,jdbcType=INTEGER},
469
+      </if>
470
+      <if test="record.taskTypeName != null" >
471
+        task_type_name = #{record.taskTypeName,jdbcType=VARCHAR},
472
+      </if>
473
+      <if test="record.isHide != null" >
474
+        is_hide = #{record.isHide,jdbcType=INTEGER},
475
+      </if>
476
+      <if test="record.isCountersign != null" >
477
+        is_countersign = #{record.isCountersign,jdbcType=INTEGER},
478
+      </if>
479
+      <if test="record.applyName != null" >
480
+        apply_name = #{record.applyName,jdbcType=VARCHAR},
481
+      </if>
482
+      <if test="record.applyNameId != null" >
483
+        apply_name_id = #{record.applyNameId,jdbcType=VARCHAR},
484
+      </if>
485
+      <if test="record.applyTime != null" >
486
+        apply_time = #{record.applyTime,jdbcType=TIMESTAMP},
487
+      </if>
488
+    </set>
489
+    <if test="_parameter != null" >
490
+      <include refid="Update_By_Example_Where_Clause" />
491
+    </if>
492
+  </update>
493
+  <update id="updateByExample" parameterType="map" >
494
+    <!--
495
+      WARNING - @mbggenerated
496
+      This element is automatically generated by MyBatis Generator, do not modify.
497
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
498
+    -->
499
+    update business_approval
500
+    set id = #{record.id,jdbcType=INTEGER},
501
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
502
+      is_deleted = #{record.isDeleted,jdbcType=INTEGER},
503
+      remark = #{record.remark,jdbcType=VARCHAR},
504
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
505
+      content = #{record.content,jdbcType=VARCHAR},
506
+      from_department = #{record.fromDepartment,jdbcType=VARCHAR},
507
+      from_people = #{record.fromPeople,jdbcType=VARCHAR},
508
+      from_user_name = #{record.fromUserName,jdbcType=VARCHAR},
509
+      last_people = #{record.lastPeople,jdbcType=VARCHAR},
510
+      operate_time = #{record.operateTime,jdbcType=VARCHAR},
511
+      operator = #{record.operator,jdbcType=VARCHAR},
512
+      operator_name = #{record.operatorName,jdbcType=VARCHAR},
513
+      process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
514
+      project_id = #{record.projectId,jdbcType=INTEGER},
515
+      project_name = #{record.projectName,jdbcType=VARCHAR},
516
+      result = #{record.result,jdbcType=VARCHAR},
517
+      task_id = #{record.taskId,jdbcType=VARCHAR},
518
+      task_info = #{record.taskInfo,jdbcType=VARCHAR},
519
+      task_name = #{record.taskName,jdbcType=VARCHAR},
520
+      task_type = #{record.taskType,jdbcType=VARCHAR},
521
+      title = #{record.title,jdbcType=VARCHAR},
522
+      version = #{record.version,jdbcType=INTEGER},
523
+      task_type_name = #{record.taskTypeName,jdbcType=VARCHAR},
524
+      is_hide = #{record.isHide,jdbcType=INTEGER},
525
+      is_countersign = #{record.isCountersign,jdbcType=INTEGER},
526
+      apply_name = #{record.applyName,jdbcType=VARCHAR},
527
+      apply_name_id = #{record.applyNameId,jdbcType=VARCHAR},
528
+      apply_time = #{record.applyTime,jdbcType=TIMESTAMP}
529
+    <if test="_parameter != null" >
530
+      <include refid="Update_By_Example_Where_Clause" />
531
+    </if>
532
+  </update>
533
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessApproval" >
534
+    <!--
535
+      WARNING - @mbggenerated
536
+      This element is automatically generated by MyBatis Generator, do not modify.
537
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
538
+    -->
539
+    update business_approval
540
+    <set >
541
+      <if test="createTime != null" >
542
+        create_time = #{createTime,jdbcType=TIMESTAMP},
543
+      </if>
544
+      <if test="isDeleted != null" >
545
+        is_deleted = #{isDeleted,jdbcType=INTEGER},
546
+      </if>
547
+      <if test="remark != null" >
548
+        remark = #{remark,jdbcType=VARCHAR},
549
+      </if>
550
+      <if test="updateTime != null" >
551
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
552
+      </if>
553
+      <if test="content != null" >
554
+        content = #{content,jdbcType=VARCHAR},
555
+      </if>
556
+      <if test="fromDepartment != null" >
557
+        from_department = #{fromDepartment,jdbcType=VARCHAR},
558
+      </if>
559
+      <if test="fromPeople != null" >
560
+        from_people = #{fromPeople,jdbcType=VARCHAR},
561
+      </if>
562
+      <if test="fromUserName != null" >
563
+        from_user_name = #{fromUserName,jdbcType=VARCHAR},
564
+      </if>
565
+      <if test="lastPeople != null" >
566
+        last_people = #{lastPeople,jdbcType=VARCHAR},
567
+      </if>
568
+      <if test="operateTime != null" >
569
+        operate_time = #{operateTime,jdbcType=VARCHAR},
570
+      </if>
571
+      <if test="operator != null" >
572
+        operator = #{operator,jdbcType=VARCHAR},
573
+      </if>
574
+      <if test="operatorName != null" >
575
+        operator_name = #{operatorName,jdbcType=VARCHAR},
576
+      </if>
577
+      <if test="processInstanceId != null" >
578
+        process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
579
+      </if>
580
+      <if test="projectId != null" >
581
+        project_id = #{projectId,jdbcType=INTEGER},
582
+      </if>
583
+      <if test="projectName != null" >
584
+        project_name = #{projectName,jdbcType=VARCHAR},
585
+      </if>
586
+      <if test="result != null" >
587
+        result = #{result,jdbcType=VARCHAR},
588
+      </if>
589
+      <if test="taskId != null" >
590
+        task_id = #{taskId,jdbcType=VARCHAR},
591
+      </if>
592
+      <if test="taskInfo != null" >
593
+        task_info = #{taskInfo,jdbcType=VARCHAR},
594
+      </if>
595
+      <if test="taskName != null" >
596
+        task_name = #{taskName,jdbcType=VARCHAR},
597
+      </if>
598
+      <if test="taskType != null" >
599
+        task_type = #{taskType,jdbcType=VARCHAR},
600
+      </if>
601
+      <if test="title != null" >
602
+        title = #{title,jdbcType=VARCHAR},
603
+      </if>
604
+      <if test="version != null" >
605
+        version = #{version,jdbcType=INTEGER},
606
+      </if>
607
+      <if test="taskTypeName != null" >
608
+        task_type_name = #{taskTypeName,jdbcType=VARCHAR},
609
+      </if>
610
+      <if test="isHide != null" >
611
+        is_hide = #{isHide,jdbcType=INTEGER},
612
+      </if>
613
+      <if test="isCountersign != null" >
614
+        is_countersign = #{isCountersign,jdbcType=INTEGER},
615
+      </if>
616
+      <if test="applyName != null" >
617
+        apply_name = #{applyName,jdbcType=VARCHAR},
618
+      </if>
619
+      <if test="applyNameId != null" >
620
+        apply_name_id = #{applyNameId,jdbcType=VARCHAR},
621
+      </if>
622
+      <if test="applyTime != null" >
623
+        apply_time = #{applyTime,jdbcType=TIMESTAMP},
624
+      </if>
625
+    </set>
626
+    where id = #{id,jdbcType=INTEGER}
627
+  </update>
628
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessApproval" >
629
+    <!--
630
+      WARNING - @mbggenerated
631
+      This element is automatically generated by MyBatis Generator, do not modify.
632
+      This element was generated on Thu Oct 26 14:47:31 CST 2017.
633
+    -->
634
+    update business_approval
635
+    set create_time = #{createTime,jdbcType=TIMESTAMP},
636
+      is_deleted = #{isDeleted,jdbcType=INTEGER},
637
+      remark = #{remark,jdbcType=VARCHAR},
638
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
639
+      content = #{content,jdbcType=VARCHAR},
640
+      from_department = #{fromDepartment,jdbcType=VARCHAR},
641
+      from_people = #{fromPeople,jdbcType=VARCHAR},
642
+      from_user_name = #{fromUserName,jdbcType=VARCHAR},
643
+      last_people = #{lastPeople,jdbcType=VARCHAR},
644
+      operate_time = #{operateTime,jdbcType=VARCHAR},
645
+      operator = #{operator,jdbcType=VARCHAR},
646
+      operator_name = #{operatorName,jdbcType=VARCHAR},
647
+      process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
648
+      project_id = #{projectId,jdbcType=INTEGER},
649
+      project_name = #{projectName,jdbcType=VARCHAR},
650
+      result = #{result,jdbcType=VARCHAR},
651
+      task_id = #{taskId,jdbcType=VARCHAR},
652
+      task_info = #{taskInfo,jdbcType=VARCHAR},
653
+      task_name = #{taskName,jdbcType=VARCHAR},
654
+      task_type = #{taskType,jdbcType=VARCHAR},
655
+      title = #{title,jdbcType=VARCHAR},
656
+      version = #{version,jdbcType=INTEGER},
657
+      task_type_name = #{taskTypeName,jdbcType=VARCHAR},
658
+      is_hide = #{isHide,jdbcType=INTEGER},
659
+      is_countersign = #{isCountersign,jdbcType=INTEGER},
660
+      apply_name = #{applyName,jdbcType=VARCHAR},
661
+      apply_name_id = #{applyNameId,jdbcType=VARCHAR},
662
+      apply_time = #{applyTime,jdbcType=TIMESTAMP}
663
+    where id = #{id,jdbcType=INTEGER}
664
+  </update>
665
+
666
+   <select id="queryByMap" parameterType="java.util.Map" resultMap="BaseResultMap">
667
+	select 
668
+		MAX(ba.create_time),
669
+	    ba.*,
670
+        dp.id dpId,
671
+        dp.audit_state auditState,
672
+        du.id duId,
673
+        du.state state
674
+     from business_approval ba
675
+      LEFT JOIN business_plan p on ba.project_id = p.id
676
+      LEFT JOIN business_contract c on ba.project_id = c.id
677
+      LEFT JOIN business_delivery_storage_notice n on ba.project_id = n.id
678
+      LEFT JOIN business_drug_purchase dp ON ba.task_type_name = dp.apply_number
679
+      LEFT JOIN business_drug_useapply du ON ba.task_type_name = du.apply_number
680
+      LEFT JOIN t_fumigation_plan plan ON plan.id = ba.process_instance_id
681
+
682
+     <where>
683
+     (ba.task_type='plan' 
684
+     or ba.task_type='contract'
685
+      or ba.task_type='storageNotice'
686
+        or ba.task_type='deliveryNotice'
687
+         or ba.task_type='contractChange'
688
+         or ba.task_type='drugUseApply'
689
+         or ba.task_type='drugPurchase'
690
+         or ba.task_type='fumigationApply')
691
+     and 1=1
692
+     	 <if test="taskType!= null" >
693
+      		AND ba.task_type = #{taskType}
694
+         </if>
695
+     	 <if test="projectName!= null" >
696
+      		AND ba.project_name like CONCAT('%',#{projectName,jdbcType=VARCHAR},'%')
697
+         </if>
698
+     	 <if test="applyName!= null" >
699
+      		AND ba.apply_name like CONCAT('%',#{applyName,jdbcType=VARCHAR},'%')
700
+         </if>
701
+     	 <if test="taskId!= null" >
702
+      		AND ba.task_id = #{taskId}
703
+         </if>
704
+     	 <if test="projectId!= null" >
705
+      		AND ba.project_id = #{projectId}
706
+         </if>
707
+         <if test="'todo'==type"> <!-- 待办 -->
708
+	         <if test="userId!= null" >
709
+	           AND (
710
+	           		  (result = '待审批' and operator = #{userId} and 
711
+		              ((c.audit_state=0 or c.audit_state=3 or c.audit_state=1)
712
+	                  or (p.audit_state=0 or p.audit_state=3 or p.audit_state=1)
713
+	                  or (n.audit_state=0 or n.audit_state=3 or n.audit_state=1)
714
+	                  OR (dp.audit_state = 0 OR dp.audit_state = 3 )
715
+					  OR (du.state = 0 OR du.state = 3 )
716
+					  OR (plan.state = 2 OR plan.state = 3 ))) <!-- 待审批 是审批人是当前登录人 -->
717
+					  
718
+	           Or  (result = '驳回' and apply_name_id = #{userId} and 
719
+	           		((c.audit_state=0 or c.audit_state=3)
720
+                  or (p.audit_state=0 or p.audit_state=3)
721
+                  or (n.audit_state=0 or n.audit_state=3)
722
+                  OR (dp.audit_state = 0 OR dp.audit_state = 3 )
723
+				  OR (du.state = 0 OR du.state = 3 )))) <!-- 驳回 是申请人是当前登录人 -->
724
+			   GROUP BY ba.task_type_name
725
+	         </if>
726
+         </if>
727
+         <if test="'complete'==type"> <!-- 已办 -->
728
+          <if test="userId!= null" >
729
+          	AND ((result = '同意' and operator =#{userId}) 
730
+          	or (result = '拒绝' and operator =#{userId}) 
731
+          	or (result = '已审批' and operator =#{userId}) 
732
+          	or (result = '审批结束' and operator =#{userId}) 
733
+          	or (result = '驳回' and operator =#{userId})) 
734
+          	 <!-- 1、当前登录人是创建者的时候,驳回时申请人是当前登录人2、当前 审批人驳回时,已办是审批人是当前登录人-->
735
+          	and ((c.audit_state=2 or c.audit_state=4 or c.audit_state=3 or c.audit_state=1)
736
+                  or (p.audit_state=2 or p.audit_state=4 or p.audit_state=3 or p.audit_state=1)
737
+                  or (n.audit_state=2 or n.audit_state=4 or n.audit_state=3 or n.audit_state=1)
738
+                  OR (dp.audit_state = 2 OR dp.audit_state = 4 OR dp.audit_state = 3 OR dp.audit_state = 1)
739
+				  OR (du.state = 2 OR du.state = 4 OR du.state = 3 OR du.state = 1))
740
+			GROUP BY ba.task_type_name
741
+          </if>
742
+         </if>
743
+     </where>
744
+     ORDER BY apply_time desc		
745
+
746
+	</select>
747
+</mapper>

Fichier diff supprimé car celui-ci est trop grand
+ 1264 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessContractMapper.xml


+ 258 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessContractPayReceviceMapper.xml

@@ -0,0 +1,258 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessContractPayReceviceMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessContractPayRecevice" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="zid" property="zid" jdbcType="INTEGER" />
7
+    <result column="contract_num" property="contractNum" jdbcType="VARCHAR" />
8
+    <result column="contract_title" property="contractTitle" jdbcType="VARCHAR" />
9
+    <result column="contract_type" property="contractType" jdbcType="INTEGER" />
10
+    <result column="pay_status" property="payStatus" jdbcType="INTEGER" />
11
+    <result column="money" property="money" jdbcType="VARCHAR" />
12
+    <result column="time" property="time" jdbcType="TIMESTAMP" />
13
+  </resultMap>
14
+  <sql id="Example_Where_Clause" >
15
+    <where >
16
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
17
+        <if test="criteria.valid" >
18
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
19
+            <foreach collection="criteria.criteria" item="criterion" >
20
+              <choose >
21
+                <when test="criterion.noValue" >
22
+                  and ${criterion.condition}
23
+                </when>
24
+                <when test="criterion.singleValue" >
25
+                  and ${criterion.condition} #{criterion.value}
26
+                </when>
27
+                <when test="criterion.betweenValue" >
28
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29
+                </when>
30
+                <when test="criterion.listValue" >
31
+                  and ${criterion.condition}
32
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
33
+                    #{listItem}
34
+                  </foreach>
35
+                </when>
36
+              </choose>
37
+            </foreach>
38
+          </trim>
39
+        </if>
40
+      </foreach>
41
+    </where>
42
+  </sql>
43
+  <sql id="Update_By_Example_Where_Clause" >
44
+    <where >
45
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
46
+        <if test="criteria.valid" >
47
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
48
+            <foreach collection="criteria.criteria" item="criterion" >
49
+              <choose >
50
+                <when test="criterion.noValue" >
51
+                  and ${criterion.condition}
52
+                </when>
53
+                <when test="criterion.singleValue" >
54
+                  and ${criterion.condition} #{criterion.value}
55
+                </when>
56
+                <when test="criterion.betweenValue" >
57
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
58
+                </when>
59
+                <when test="criterion.listValue" >
60
+                  and ${criterion.condition}
61
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
62
+                    #{listItem}
63
+                  </foreach>
64
+                </when>
65
+              </choose>
66
+            </foreach>
67
+          </trim>
68
+        </if>
69
+      </foreach>
70
+    </where>
71
+  </sql>
72
+  <sql id="Base_Column_List" >
73
+    id, zid, contract_num, contract_title, contract_type, pay_status, money, time
74
+  </sql>
75
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessContractPayReceviceExample" >
76
+    select
77
+    <if test="distinct" >
78
+      distinct
79
+    </if>
80
+    <include refid="Base_Column_List" />
81
+    from business_contract_pay_recevice
82
+    <if test="_parameter != null" >
83
+      <include refid="Example_Where_Clause" />
84
+    </if>
85
+    <if test="orderByClause != null" >
86
+      order by ${orderByClause}
87
+    </if>
88
+  </select>
89
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
90
+    select 
91
+    <include refid="Base_Column_List" />
92
+    from business_contract_pay_recevice
93
+    where id = #{id,jdbcType=INTEGER}
94
+  </select>
95
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
96
+    delete from business_contract_pay_recevice
97
+    where id = #{id,jdbcType=INTEGER}
98
+  </delete>
99
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessContractPayReceviceExample" >
100
+    delete from business_contract_pay_recevice
101
+    <if test="_parameter != null" >
102
+      <include refid="Example_Where_Clause" />
103
+    </if>
104
+  </delete>
105
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.BusinessContractPayRecevice" >
106
+    insert into business_contract_pay_recevice (id, zid, contract_num, 
107
+      contract_title, contract_type, pay_status, 
108
+      money, time)
109
+    values (#{id,jdbcType=INTEGER}, #{zid,jdbcType=INTEGER}, #{contractNum,jdbcType=VARCHAR}, 
110
+      #{contractTitle,jdbcType=VARCHAR}, #{contractType,jdbcType=INTEGER}, #{payStatus,jdbcType=INTEGER}, 
111
+      #{money,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP})
112
+  </insert>
113
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessContractPayRecevice" >
114
+    insert into business_contract_pay_recevice
115
+    <trim prefix="(" suffix=")" suffixOverrides="," >
116
+      <if test="id != null" >
117
+        id,
118
+      </if>
119
+      <if test="zid != null" >
120
+        zid,
121
+      </if>
122
+      <if test="contractNum != null" >
123
+        contract_num,
124
+      </if>
125
+      <if test="contractTitle != null" >
126
+        contract_title,
127
+      </if>
128
+      <if test="contractType != null" >
129
+        contract_type,
130
+      </if>
131
+      <if test="payStatus != null" >
132
+        pay_status,
133
+      </if>
134
+      <if test="money != null" >
135
+        money,
136
+      </if>
137
+      <if test="time != null" >
138
+        time,
139
+      </if>
140
+    </trim>
141
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
142
+      <if test="id != null" >
143
+        #{id,jdbcType=INTEGER},
144
+      </if>
145
+      <if test="zid != null" >
146
+        #{zid,jdbcType=INTEGER},
147
+      </if>
148
+      <if test="contractNum != null" >
149
+        #{contractNum,jdbcType=VARCHAR},
150
+      </if>
151
+      <if test="contractTitle != null" >
152
+        #{contractTitle,jdbcType=VARCHAR},
153
+      </if>
154
+      <if test="contractType != null" >
155
+        #{contractType,jdbcType=INTEGER},
156
+      </if>
157
+      <if test="payStatus != null" >
158
+        #{payStatus,jdbcType=INTEGER},
159
+      </if>
160
+      <if test="money != null" >
161
+        #{money,jdbcType=VARCHAR},
162
+      </if>
163
+      <if test="time != null" >
164
+        #{time,jdbcType=TIMESTAMP},
165
+      </if>
166
+    </trim>
167
+  </insert>
168
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessContractPayReceviceExample" resultType="java.lang.Integer" >
169
+    select count(*) from business_contract_pay_recevice
170
+    <if test="_parameter != null" >
171
+      <include refid="Example_Where_Clause" />
172
+    </if>
173
+  </select>
174
+  <update id="updateByExampleSelective" parameterType="map" >
175
+    update business_contract_pay_recevice
176
+    <set >
177
+      <if test="record.id != null" >
178
+        id = #{record.id,jdbcType=INTEGER},
179
+      </if>
180
+      <if test="record.zid != null" >
181
+        zid = #{record.zid,jdbcType=INTEGER},
182
+      </if>
183
+      <if test="record.contractNum != null" >
184
+        contract_num = #{record.contractNum,jdbcType=VARCHAR},
185
+      </if>
186
+      <if test="record.contractTitle != null" >
187
+        contract_title = #{record.contractTitle,jdbcType=VARCHAR},
188
+      </if>
189
+      <if test="record.contractType != null" >
190
+        contract_type = #{record.contractType,jdbcType=INTEGER},
191
+      </if>
192
+      <if test="record.payStatus != null" >
193
+        pay_status = #{record.payStatus,jdbcType=INTEGER},
194
+      </if>
195
+      <if test="record.money != null" >
196
+        money = #{record.money,jdbcType=VARCHAR},
197
+      </if>
198
+      <if test="record.time != null" >
199
+        time = #{record.time,jdbcType=TIMESTAMP},
200
+      </if>
201
+    </set>
202
+    <if test="_parameter != null" >
203
+      <include refid="Update_By_Example_Where_Clause" />
204
+    </if>
205
+  </update>
206
+  <update id="updateByExample" parameterType="map" >
207
+    update business_contract_pay_recevice
208
+    set id = #{record.id,jdbcType=INTEGER},
209
+      zid = #{record.zid,jdbcType=INTEGER},
210
+      contract_num = #{record.contractNum,jdbcType=VARCHAR},
211
+      contract_title = #{record.contractTitle,jdbcType=VARCHAR},
212
+      contract_type = #{record.contractType,jdbcType=INTEGER},
213
+      pay_status = #{record.payStatus,jdbcType=INTEGER},
214
+      money = #{record.money,jdbcType=VARCHAR},
215
+      time = #{record.time,jdbcType=TIMESTAMP}
216
+    <if test="_parameter != null" >
217
+      <include refid="Update_By_Example_Where_Clause" />
218
+    </if>
219
+  </update>
220
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessContractPayRecevice" >
221
+    update business_contract_pay_recevice
222
+    <set >
223
+      <if test="zid != null" >
224
+        zid = #{zid,jdbcType=INTEGER},
225
+      </if>
226
+      <if test="contractNum != null" >
227
+        contract_num = #{contractNum,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="contractTitle != null" >
230
+        contract_title = #{contractTitle,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="contractType != null" >
233
+        contract_type = #{contractType,jdbcType=INTEGER},
234
+      </if>
235
+      <if test="payStatus != null" >
236
+        pay_status = #{payStatus,jdbcType=INTEGER},
237
+      </if>
238
+      <if test="money != null" >
239
+        money = #{money,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="time != null" >
242
+        time = #{time,jdbcType=TIMESTAMP},
243
+      </if>
244
+    </set>
245
+    where id = #{id,jdbcType=INTEGER}
246
+  </update>
247
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessContractPayRecevice" >
248
+    update business_contract_pay_recevice
249
+    set zid = #{zid,jdbcType=INTEGER},
250
+      contract_num = #{contractNum,jdbcType=VARCHAR},
251
+      contract_title = #{contractTitle,jdbcType=VARCHAR},
252
+      contract_type = #{contractType,jdbcType=INTEGER},
253
+      pay_status = #{payStatus,jdbcType=INTEGER},
254
+      money = #{money,jdbcType=VARCHAR},
255
+      time = #{time,jdbcType=TIMESTAMP}
256
+    where id = #{id,jdbcType=INTEGER}
257
+  </update>
258
+</mapper>

+ 983 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessDeliveryStorageNoticeMapper.xml

@@ -0,0 +1,983 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessDeliveryStorageNoticeMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="bill_type" property="billType" jdbcType="VARCHAR" />
7
+    <result column="bill_type_id" property="billTypeId" jdbcType="INTEGER" />
8
+    <result column="bill_number" property="billNumber" jdbcType="VARCHAR" />
9
+    <result column="shiping_count" property="shipingCount" jdbcType="VARCHAR" />
10
+    <result column="finished_count" property="finishedCount" jdbcType="VARCHAR" />
11
+    <result column="received_money" property="receivedMoney" jdbcType="VARCHAR" />
12
+    <result column="customer_bid" property="customerBid" jdbcType="INTEGER" />
13
+    <result column="customer_number" property="customerNumber" jdbcType="VARCHAR" />
14
+    <result column="mobile" property="mobile" jdbcType="VARCHAR" />
15
+    <result column="delivery_customer" property="deliveryCustomer" jdbcType="VARCHAR" />
16
+    <result column="contract" property="contract" jdbcType="VARCHAR" />
17
+    <result column="contract_bid" property="contractBid" jdbcType="INTEGER" />
18
+    <result column="plan_number" property="planNumber" jdbcType="VARCHAR" />
19
+    <result column="plan_bid" property="planBid" jdbcType="INTEGER" />
20
+    <result column="bill_memo" property="billMemo" jdbcType="VARCHAR" />
21
+    <result column="grain_price" property="grainPrice" jdbcType="VARCHAR" />
22
+    <result column="money_quantity" property="moneyQuantity" jdbcType="VARCHAR" />
23
+    <result column="grain_annual" property="grainAnnual" jdbcType="INTEGER" />
24
+    <result column="warehouse" property="warehouse" jdbcType="INTEGER" />
25
+    <result column="goods_location" property="goodsLocation" jdbcType="INTEGER" />
26
+    <result column="audit_state" property="auditState" jdbcType="VARCHAR" />
27
+    <result column="storage_time" property="storageTime" jdbcType="TIMESTAMP" />
28
+    <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
29
+    <result column="process_definition_id" property="processDefinitionId" jdbcType="VARCHAR" />
30
+    <result column="quality_standard" property="qualityStandard" jdbcType="VARCHAR" />
31
+    <result column="agree_time" property="agreeTime" jdbcType="TIMESTAMP" />
32
+    <result column="bill_man" property="billMan" jdbcType="VARCHAR" />
33
+    <result column="bill_date" property="billDate" jdbcType="TIMESTAMP" />
34
+    <result column="bill_unit" property="billUnit" jdbcType="VARCHAR" />
35
+    <result column="house_id" property="houseId" jdbcType="INTEGER" />
36
+    <result column="house_name" property="houseName" jdbcType="VARCHAR" />
37
+    <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
38
+    <result column="warehouse_name" property="warehouseName" jdbcType="VARCHAR" />
39
+    <result column="creater" property="creater" jdbcType="VARCHAR" />
40
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
41
+    <result column="create_unit" property="createUnit" jdbcType="VARCHAR" />
42
+    <result column="create_depot" property="createDepot" jdbcType="VARCHAR" />
43
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
44
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
45
+    <result column="in_application" property="inApplication" jdbcType="INTEGER" />
46
+    <result column="creater_id" property="createrId" jdbcType="INTEGER" />
47
+    <result column="root_contract_bid" property="rootContractBid" jdbcType="INTEGER" />
48
+    <result column="identification" property="identification" jdbcType="VARCHAR" />
49
+    <result column="carNumber" property="carnumber" jdbcType="VARCHAR" />
50
+  </resultMap>
51
+  <sql id="Example_Where_Clause" >
52
+    <where >
53
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
54
+        <if test="criteria.valid" >
55
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
56
+            <foreach collection="criteria.criteria" item="criterion" >
57
+              <choose >
58
+                <when test="criterion.noValue" >
59
+                  and ${criterion.condition}
60
+                </when>
61
+                <when test="criterion.singleValue" >
62
+                  and ${criterion.condition} #{criterion.value}
63
+                </when>
64
+                <when test="criterion.betweenValue" >
65
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
66
+                </when>
67
+                <when test="criterion.listValue" >
68
+                  and ${criterion.condition}
69
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
70
+                    #{listItem}
71
+                  </foreach>
72
+                </when>
73
+              </choose>
74
+            </foreach>
75
+          </trim>
76
+        </if>
77
+      </foreach>
78
+    </where>
79
+  </sql>
80
+  <sql id="Update_By_Example_Where_Clause" >
81
+    <where >
82
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
83
+        <if test="criteria.valid" >
84
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
85
+            <foreach collection="criteria.criteria" item="criterion" >
86
+              <choose >
87
+                <when test="criterion.noValue" >
88
+                  and ${criterion.condition}
89
+                </when>
90
+                <when test="criterion.singleValue" >
91
+                  and ${criterion.condition} #{criterion.value}
92
+                </when>
93
+                <when test="criterion.betweenValue" >
94
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
95
+                </when>
96
+                <when test="criterion.listValue" >
97
+                  and ${criterion.condition}
98
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
99
+                    #{listItem}
100
+                  </foreach>
101
+                </when>
102
+              </choose>
103
+            </foreach>
104
+          </trim>
105
+        </if>
106
+      </foreach>
107
+    </where>
108
+  </sql>
109
+  <sql id="Base_Column_List" >
110
+    id, bill_type, bill_type_id, bill_number, shiping_count, finished_count, received_money, 
111
+    customer_bid, customer_number, mobile, delivery_customer, contract, contract_bid, 
112
+    plan_number, plan_bid, bill_memo, grain_price, money_quantity, grain_annual, warehouse, 
113
+    goods_location, audit_state, storage_time, process_instance_id, process_definition_id, 
114
+    quality_standard, agree_time, bill_man, bill_date, bill_unit, house_id, house_name, 
115
+    warehouse_id, warehouse_name, creater, create_time, create_unit, create_depot, update_time, 
116
+    org_id, in_application, creater_id, root_contract_bid, identification, carNumber
117
+  </sql>
118
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample" >
119
+    select
120
+    <if test="distinct" >
121
+      distinct
122
+    </if>
123
+    <include refid="Base_Column_List" />
124
+    from business_delivery_storage_notice
125
+    <if test="_parameter != null" >
126
+      <include refid="Example_Where_Clause" />
127
+    </if>
128
+    <if test="orderByClause != null" >
129
+      order by ${orderByClause}
130
+    </if>
131
+  </select>
132
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
133
+    select 
134
+    <include refid="Base_Column_List" />
135
+    from business_delivery_storage_notice
136
+    where id = #{id,jdbcType=INTEGER}
137
+  </select>
138
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
139
+    delete from business_delivery_storage_notice
140
+    where id = #{id,jdbcType=INTEGER}
141
+  </delete>
142
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample" >
143
+    delete from business_delivery_storage_notice
144
+    <if test="_parameter != null" >
145
+      <include refid="Example_Where_Clause" />
146
+    </if>
147
+  </delete>
148
+  <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice" >
149
+   <!--<selectKey resultType="java.lang.Integer" keyProperty="id" order="AFTER" >
150
+      SELECT LAST_INSERT_ID()
151
+    </selectKey>-->
152
+    insert into business_delivery_storage_notice (id, bill_type, bill_type_id, 
153
+      bill_number, shiping_count, finished_count, 
154
+      received_money, customer_bid, customer_number, 
155
+      mobile, delivery_customer, contract, 
156
+      contract_bid, plan_number, plan_bid, 
157
+      bill_memo, grain_price, money_quantity, 
158
+      grain_annual, warehouse, goods_location, 
159
+      audit_state, storage_time, process_instance_id, 
160
+      process_definition_id, quality_standard, agree_time, 
161
+      bill_man, bill_date, bill_unit, 
162
+      house_id, house_name, warehouse_id, 
163
+      warehouse_name, creater, create_time, 
164
+      create_unit, create_depot, update_time, 
165
+      org_id, in_application, creater_id, 
166
+      root_contract_bid, identification, carNumber
167
+      )
168
+    values (#{id,jdbcType=INTEGER}, #{billType,jdbcType=VARCHAR}, #{billTypeId,jdbcType=INTEGER}, 
169
+      #{billNumber,jdbcType=VARCHAR}, #{shipingCount,jdbcType=VARCHAR}, #{finishedCount,jdbcType=VARCHAR}, 
170
+      #{receivedMoney,jdbcType=VARCHAR}, #{customerBid,jdbcType=INTEGER}, #{customerNumber,jdbcType=VARCHAR}, 
171
+      #{mobile,jdbcType=VARCHAR}, #{deliveryCustomer,jdbcType=VARCHAR}, #{contract,jdbcType=VARCHAR}, 
172
+      #{contractBid,jdbcType=INTEGER}, #{planNumber,jdbcType=VARCHAR}, #{planBid,jdbcType=INTEGER}, 
173
+      #{billMemo,jdbcType=VARCHAR}, #{grainPrice,jdbcType=VARCHAR}, #{moneyQuantity,jdbcType=VARCHAR}, 
174
+      #{grainAnnual,jdbcType=INTEGER}, #{warehouse,jdbcType=INTEGER}, #{goodsLocation,jdbcType=INTEGER}, 
175
+      #{auditState,jdbcType=VARCHAR}, #{storageTime,jdbcType=TIMESTAMP}, #{processInstanceId,jdbcType=VARCHAR}, 
176
+      #{processDefinitionId,jdbcType=VARCHAR}, #{qualityStandard,jdbcType=VARCHAR}, #{agreeTime,jdbcType=TIMESTAMP}, 
177
+      #{billMan,jdbcType=VARCHAR}, #{billDate,jdbcType=TIMESTAMP}, #{billUnit,jdbcType=VARCHAR}, 
178
+      #{houseId,jdbcType=INTEGER}, #{houseName,jdbcType=VARCHAR}, #{warehouseId,jdbcType=INTEGER}, 
179
+      #{warehouseName,jdbcType=VARCHAR}, #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
180
+      #{createUnit,jdbcType=VARCHAR}, #{createDepot,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
181
+      #{orgId,jdbcType=INTEGER}, #{inApplication,jdbcType=INTEGER}, #{createrId,jdbcType=INTEGER}, 
182
+      #{rootContractBid,jdbcType=INTEGER}, #{identification,jdbcType=VARCHAR}, #{carnumber,jdbcType=VARCHAR}
183
+      )
184
+  </insert>
185
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice" >
186
+    insert into business_delivery_storage_notice
187
+    <trim prefix="(" suffix=")" suffixOverrides="," >
188
+      <if test="id != null" >
189
+        id,
190
+      </if>
191
+      <if test="billType != null" >
192
+        bill_type,
193
+      </if>
194
+      <if test="billTypeId != null" >
195
+        bill_type_id,
196
+      </if>
197
+      <if test="billNumber != null" >
198
+        bill_number,
199
+      </if>
200
+      <if test="shipingCount != null" >
201
+        shiping_count,
202
+      </if>
203
+      <if test="finishedCount != null" >
204
+        finished_count,
205
+      </if>
206
+      <if test="receivedMoney != null" >
207
+        received_money,
208
+      </if>
209
+      <if test="customerBid != null" >
210
+        customer_bid,
211
+      </if>
212
+      <if test="customerNumber != null" >
213
+        customer_number,
214
+      </if>
215
+      <if test="mobile != null" >
216
+        mobile,
217
+      </if>
218
+      <if test="deliveryCustomer != null" >
219
+        delivery_customer,
220
+      </if>
221
+      <if test="contract != null" >
222
+        contract,
223
+      </if>
224
+      <if test="contractBid != null" >
225
+        contract_bid,
226
+      </if>
227
+      <if test="planNumber != null" >
228
+        plan_number,
229
+      </if>
230
+      <if test="planBid != null" >
231
+        plan_bid,
232
+      </if>
233
+      <if test="billMemo != null" >
234
+        bill_memo,
235
+      </if>
236
+      <if test="grainPrice != null" >
237
+        grain_price,
238
+      </if>
239
+      <if test="moneyQuantity != null" >
240
+        money_quantity,
241
+      </if>
242
+      <if test="grainAnnual != null" >
243
+        grain_annual,
244
+      </if>
245
+      <if test="warehouse != null" >
246
+        warehouse,
247
+      </if>
248
+      <if test="goodsLocation != null" >
249
+        goods_location,
250
+      </if>
251
+      <if test="auditState != null" >
252
+        audit_state,
253
+      </if>
254
+      <if test="storageTime != null" >
255
+        storage_time,
256
+      </if>
257
+      <if test="processInstanceId != null" >
258
+        process_instance_id,
259
+      </if>
260
+      <if test="processDefinitionId != null" >
261
+        process_definition_id,
262
+      </if>
263
+      <if test="qualityStandard != null" >
264
+        quality_standard,
265
+      </if>
266
+      <if test="agreeTime != null" >
267
+        agree_time,
268
+      </if>
269
+      <if test="billMan != null" >
270
+        bill_man,
271
+      </if>
272
+      <if test="billDate != null" >
273
+        bill_date,
274
+      </if>
275
+      <if test="billUnit != null" >
276
+        bill_unit,
277
+      </if>
278
+      <if test="houseId != null" >
279
+        house_id,
280
+      </if>
281
+      <if test="houseName != null" >
282
+        house_name,
283
+      </if>
284
+      <if test="warehouseId != null" >
285
+        warehouse_id,
286
+      </if>
287
+      <if test="warehouseName != null" >
288
+        warehouse_name,
289
+      </if>
290
+      <if test="creater != null" >
291
+        creater,
292
+      </if>
293
+      <if test="createTime != null" >
294
+        create_time,
295
+      </if>
296
+      <if test="createUnit != null" >
297
+        create_unit,
298
+      </if>
299
+      <if test="createDepot != null" >
300
+        create_depot,
301
+      </if>
302
+      <if test="updateTime != null" >
303
+        update_time,
304
+      </if>
305
+      <if test="orgId != null" >
306
+        org_id,
307
+      </if>
308
+      <if test="inApplication != null" >
309
+        in_application,
310
+      </if>
311
+      <if test="createrId != null" >
312
+        creater_id,
313
+      </if>
314
+      <if test="rootContractBid != null" >
315
+        root_contract_bid,
316
+      </if>
317
+      <if test="identification != null" >
318
+        identification,
319
+      </if>
320
+      <if test="carnumber != null" >
321
+        carNumber,
322
+      </if>
323
+    </trim>
324
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
325
+      <if test="id != null" >
326
+        #{id,jdbcType=INTEGER},
327
+      </if>
328
+      <if test="billType != null" >
329
+        #{billType,jdbcType=VARCHAR},
330
+      </if>
331
+      <if test="billTypeId != null" >
332
+        #{billTypeId,jdbcType=INTEGER},
333
+      </if>
334
+      <if test="billNumber != null" >
335
+        #{billNumber,jdbcType=VARCHAR},
336
+      </if>
337
+      <if test="shipingCount != null" >
338
+        #{shipingCount,jdbcType=VARCHAR},
339
+      </if>
340
+      <if test="finishedCount != null" >
341
+        #{finishedCount,jdbcType=VARCHAR},
342
+      </if>
343
+      <if test="receivedMoney != null" >
344
+        #{receivedMoney,jdbcType=VARCHAR},
345
+      </if>
346
+      <if test="customerBid != null" >
347
+        #{customerBid,jdbcType=INTEGER},
348
+      </if>
349
+      <if test="customerNumber != null" >
350
+        #{customerNumber,jdbcType=VARCHAR},
351
+      </if>
352
+      <if test="mobile != null" >
353
+        #{mobile,jdbcType=VARCHAR},
354
+      </if>
355
+      <if test="deliveryCustomer != null" >
356
+        #{deliveryCustomer,jdbcType=VARCHAR},
357
+      </if>
358
+      <if test="contract != null" >
359
+        #{contract,jdbcType=VARCHAR},
360
+      </if>
361
+      <if test="contractBid != null" >
362
+        #{contractBid,jdbcType=INTEGER},
363
+      </if>
364
+      <if test="planNumber != null" >
365
+        #{planNumber,jdbcType=VARCHAR},
366
+      </if>
367
+      <if test="planBid != null" >
368
+        #{planBid,jdbcType=INTEGER},
369
+      </if>
370
+      <if test="billMemo != null" >
371
+        #{billMemo,jdbcType=VARCHAR},
372
+      </if>
373
+      <if test="grainPrice != null" >
374
+        #{grainPrice,jdbcType=VARCHAR},
375
+      </if>
376
+      <if test="moneyQuantity != null" >
377
+        #{moneyQuantity,jdbcType=VARCHAR},
378
+      </if>
379
+      <if test="grainAnnual != null" >
380
+        #{grainAnnual,jdbcType=INTEGER},
381
+      </if>
382
+      <if test="warehouse != null" >
383
+        #{warehouse,jdbcType=INTEGER},
384
+      </if>
385
+      <if test="goodsLocation != null" >
386
+        #{goodsLocation,jdbcType=INTEGER},
387
+      </if>
388
+      <if test="auditState != null" >
389
+        #{auditState,jdbcType=VARCHAR},
390
+      </if>
391
+      <if test="storageTime != null" >
392
+        #{storageTime,jdbcType=TIMESTAMP},
393
+      </if>
394
+      <if test="processInstanceId != null" >
395
+        #{processInstanceId,jdbcType=VARCHAR},
396
+      </if>
397
+      <if test="processDefinitionId != null" >
398
+        #{processDefinitionId,jdbcType=VARCHAR},
399
+      </if>
400
+      <if test="qualityStandard != null" >
401
+        #{qualityStandard,jdbcType=VARCHAR},
402
+      </if>
403
+      <if test="agreeTime != null" >
404
+        #{agreeTime,jdbcType=TIMESTAMP},
405
+      </if>
406
+      <if test="billMan != null" >
407
+        #{billMan,jdbcType=VARCHAR},
408
+      </if>
409
+      <if test="billDate != null" >
410
+        #{billDate,jdbcType=TIMESTAMP},
411
+      </if>
412
+      <if test="billUnit != null" >
413
+        #{billUnit,jdbcType=VARCHAR},
414
+      </if>
415
+      <if test="houseId != null" >
416
+        #{houseId,jdbcType=INTEGER},
417
+      </if>
418
+      <if test="houseName != null" >
419
+        #{houseName,jdbcType=VARCHAR},
420
+      </if>
421
+      <if test="warehouseId != null" >
422
+        #{warehouseId,jdbcType=INTEGER},
423
+      </if>
424
+      <if test="warehouseName != null" >
425
+        #{warehouseName,jdbcType=VARCHAR},
426
+      </if>
427
+      <if test="creater != null" >
428
+        #{creater,jdbcType=VARCHAR},
429
+      </if>
430
+      <if test="createTime != null" >
431
+        #{createTime,jdbcType=TIMESTAMP},
432
+      </if>
433
+      <if test="createUnit != null" >
434
+        #{createUnit,jdbcType=VARCHAR},
435
+      </if>
436
+      <if test="createDepot != null" >
437
+        #{createDepot,jdbcType=VARCHAR},
438
+      </if>
439
+      <if test="updateTime != null" >
440
+        #{updateTime,jdbcType=TIMESTAMP},
441
+      </if>
442
+      <if test="orgId != null" >
443
+        #{orgId,jdbcType=INTEGER},
444
+      </if>
445
+      <if test="inApplication != null" >
446
+        #{inApplication,jdbcType=INTEGER},
447
+      </if>
448
+      <if test="createrId != null" >
449
+        #{createrId,jdbcType=INTEGER},
450
+      </if>
451
+      <if test="rootContractBid != null" >
452
+        #{rootContractBid,jdbcType=INTEGER},
453
+      </if>
454
+      <if test="identification != null" >
455
+        #{identification,jdbcType=VARCHAR},
456
+      </if>
457
+      <if test="carnumber != null" >
458
+        #{carnumber,jdbcType=VARCHAR},
459
+      </if>
460
+    </trim>
461
+  </insert>
462
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample" resultType="java.lang.Integer" >
463
+    select count(*) from business_delivery_storage_notice
464
+    <if test="_parameter != null" >
465
+      <include refid="Example_Where_Clause" />
466
+    </if>
467
+  </select>
468
+  <update id="updateByExampleSelective" parameterType="map" >
469
+    update business_delivery_storage_notice
470
+    <set >
471
+      <if test="record.id != null" >
472
+        id = #{record.id,jdbcType=INTEGER},
473
+      </if>
474
+      <if test="record.billType != null" >
475
+        bill_type = #{record.billType,jdbcType=VARCHAR},
476
+      </if>
477
+      <if test="record.billTypeId != null" >
478
+        bill_type_id = #{record.billTypeId,jdbcType=INTEGER},
479
+      </if>
480
+      <if test="record.billNumber != null" >
481
+        bill_number = #{record.billNumber,jdbcType=VARCHAR},
482
+      </if>
483
+      <if test="record.shipingCount != null" >
484
+        shiping_count = #{record.shipingCount,jdbcType=VARCHAR},
485
+      </if>
486
+      <if test="record.finishedCount != null" >
487
+        finished_count = #{record.finishedCount,jdbcType=VARCHAR},
488
+      </if>
489
+      <if test="record.receivedMoney != null" >
490
+        received_money = #{record.receivedMoney,jdbcType=VARCHAR},
491
+      </if>
492
+      <if test="record.customerBid != null" >
493
+        customer_bid = #{record.customerBid,jdbcType=INTEGER},
494
+      </if>
495
+      <if test="record.customerNumber != null" >
496
+        customer_number = #{record.customerNumber,jdbcType=VARCHAR},
497
+      </if>
498
+      <if test="record.mobile != null" >
499
+        mobile = #{record.mobile,jdbcType=VARCHAR},
500
+      </if>
501
+      <if test="record.deliveryCustomer != null" >
502
+        delivery_customer = #{record.deliveryCustomer,jdbcType=VARCHAR},
503
+      </if>
504
+      <if test="record.contract != null" >
505
+        contract = #{record.contract,jdbcType=VARCHAR},
506
+      </if>
507
+      <if test="record.contractBid != null" >
508
+        contract_bid = #{record.contractBid,jdbcType=INTEGER},
509
+      </if>
510
+      <if test="record.planNumber != null" >
511
+        plan_number = #{record.planNumber,jdbcType=VARCHAR},
512
+      </if>
513
+      <if test="record.planBid != null" >
514
+        plan_bid = #{record.planBid,jdbcType=INTEGER},
515
+      </if>
516
+      <if test="record.billMemo != null" >
517
+        bill_memo = #{record.billMemo,jdbcType=VARCHAR},
518
+      </if>
519
+      <if test="record.grainPrice != null" >
520
+        grain_price = #{record.grainPrice,jdbcType=VARCHAR},
521
+      </if>
522
+      <if test="record.moneyQuantity != null" >
523
+        money_quantity = #{record.moneyQuantity,jdbcType=VARCHAR},
524
+      </if>
525
+      <if test="record.grainAnnual != null" >
526
+        grain_annual = #{record.grainAnnual,jdbcType=INTEGER},
527
+      </if>
528
+      <if test="record.warehouse != null" >
529
+        warehouse = #{record.warehouse,jdbcType=INTEGER},
530
+      </if>
531
+      <if test="record.goodsLocation != null" >
532
+        goods_location = #{record.goodsLocation,jdbcType=INTEGER},
533
+      </if>
534
+      <if test="record.auditState != null" >
535
+        audit_state = #{record.auditState,jdbcType=VARCHAR},
536
+      </if>
537
+      <if test="record.storageTime != null" >
538
+        storage_time = #{record.storageTime,jdbcType=TIMESTAMP},
539
+      </if>
540
+      <if test="record.processInstanceId != null" >
541
+        process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
542
+      </if>
543
+      <if test="record.processDefinitionId != null" >
544
+        process_definition_id = #{record.processDefinitionId,jdbcType=VARCHAR},
545
+      </if>
546
+      <if test="record.qualityStandard != null" >
547
+        quality_standard = #{record.qualityStandard,jdbcType=VARCHAR},
548
+      </if>
549
+      <if test="record.agreeTime != null" >
550
+        agree_time = #{record.agreeTime,jdbcType=TIMESTAMP},
551
+      </if>
552
+      <if test="record.billMan != null" >
553
+        bill_man = #{record.billMan,jdbcType=VARCHAR},
554
+      </if>
555
+      <if test="record.billDate != null" >
556
+        bill_date = #{record.billDate,jdbcType=TIMESTAMP},
557
+      </if>
558
+      <if test="record.billUnit != null" >
559
+        bill_unit = #{record.billUnit,jdbcType=VARCHAR},
560
+      </if>
561
+      <if test="record.houseId != null" >
562
+        house_id = #{record.houseId,jdbcType=INTEGER},
563
+      </if>
564
+      <if test="record.houseName != null" >
565
+        house_name = #{record.houseName,jdbcType=VARCHAR},
566
+      </if>
567
+      <if test="record.warehouseId != null" >
568
+        warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
569
+      </if>
570
+      <if test="record.warehouseName != null" >
571
+        warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
572
+      </if>
573
+      <if test="record.creater != null" >
574
+        creater = #{record.creater,jdbcType=VARCHAR},
575
+      </if>
576
+      <if test="record.createTime != null" >
577
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
578
+      </if>
579
+      <if test="record.createUnit != null" >
580
+        create_unit = #{record.createUnit,jdbcType=VARCHAR},
581
+      </if>
582
+      <if test="record.createDepot != null" >
583
+        create_depot = #{record.createDepot,jdbcType=VARCHAR},
584
+      </if>
585
+      <if test="record.updateTime != null" >
586
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
587
+      </if>
588
+      <if test="record.orgId != null" >
589
+        org_id = #{record.orgId,jdbcType=INTEGER},
590
+      </if>
591
+      <if test="record.inApplication != null" >
592
+        in_application = #{record.inApplication,jdbcType=INTEGER},
593
+      </if>
594
+      <if test="record.createrId != null" >
595
+        creater_id = #{record.createrId,jdbcType=INTEGER},
596
+      </if>
597
+      <if test="record.rootContractBid != null" >
598
+        root_contract_bid = #{record.rootContractBid,jdbcType=INTEGER},
599
+      </if>
600
+      <if test="record.identification != null" >
601
+        identification = #{record.identification,jdbcType=VARCHAR},
602
+      </if>
603
+      <if test="record.carnumber != null" >
604
+        carNumber = #{record.carnumber,jdbcType=VARCHAR},
605
+      </if>
606
+    </set>
607
+    <if test="_parameter != null" >
608
+      <include refid="Update_By_Example_Where_Clause" />
609
+    </if>
610
+  </update>
611
+  <update id="updateByExample" parameterType="map" >
612
+    update business_delivery_storage_notice
613
+    set id = #{record.id,jdbcType=INTEGER},
614
+      bill_type = #{record.billType,jdbcType=VARCHAR},
615
+      bill_type_id = #{record.billTypeId,jdbcType=INTEGER},
616
+      bill_number = #{record.billNumber,jdbcType=VARCHAR},
617
+      shiping_count = #{record.shipingCount,jdbcType=VARCHAR},
618
+      finished_count = #{record.finishedCount,jdbcType=VARCHAR},
619
+      received_money = #{record.receivedMoney,jdbcType=VARCHAR},
620
+      customer_bid = #{record.customerBid,jdbcType=INTEGER},
621
+      customer_number = #{record.customerNumber,jdbcType=VARCHAR},
622
+      mobile = #{record.mobile,jdbcType=VARCHAR},
623
+      delivery_customer = #{record.deliveryCustomer,jdbcType=VARCHAR},
624
+      contract = #{record.contract,jdbcType=VARCHAR},
625
+      contract_bid = #{record.contractBid,jdbcType=INTEGER},
626
+      plan_number = #{record.planNumber,jdbcType=VARCHAR},
627
+      plan_bid = #{record.planBid,jdbcType=INTEGER},
628
+      bill_memo = #{record.billMemo,jdbcType=VARCHAR},
629
+      grain_price = #{record.grainPrice,jdbcType=VARCHAR},
630
+      money_quantity = #{record.moneyQuantity,jdbcType=VARCHAR},
631
+      grain_annual = #{record.grainAnnual,jdbcType=INTEGER},
632
+      warehouse = #{record.warehouse,jdbcType=INTEGER},
633
+      goods_location = #{record.goodsLocation,jdbcType=INTEGER},
634
+      audit_state = #{record.auditState,jdbcType=VARCHAR},
635
+      storage_time = #{record.storageTime,jdbcType=TIMESTAMP},
636
+      process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
637
+      process_definition_id = #{record.processDefinitionId,jdbcType=VARCHAR},
638
+      quality_standard = #{record.qualityStandard,jdbcType=VARCHAR},
639
+      agree_time = #{record.agreeTime,jdbcType=TIMESTAMP},
640
+      bill_man = #{record.billMan,jdbcType=VARCHAR},
641
+      bill_date = #{record.billDate,jdbcType=TIMESTAMP},
642
+      bill_unit = #{record.billUnit,jdbcType=VARCHAR},
643
+      house_id = #{record.houseId,jdbcType=INTEGER},
644
+      house_name = #{record.houseName,jdbcType=VARCHAR},
645
+      warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
646
+      warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
647
+      creater = #{record.creater,jdbcType=VARCHAR},
648
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
649
+      create_unit = #{record.createUnit,jdbcType=VARCHAR},
650
+      create_depot = #{record.createDepot,jdbcType=VARCHAR},
651
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
652
+      org_id = #{record.orgId,jdbcType=INTEGER},
653
+      in_application = #{record.inApplication,jdbcType=INTEGER},
654
+      creater_id = #{record.createrId,jdbcType=INTEGER},
655
+      root_contract_bid = #{record.rootContractBid,jdbcType=INTEGER},
656
+      identification = #{record.identification,jdbcType=VARCHAR},
657
+      carNumber = #{record.carnumber,jdbcType=VARCHAR}
658
+    <if test="_parameter != null" >
659
+      <include refid="Update_By_Example_Where_Clause" />
660
+    </if>
661
+  </update>
662
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice" >
663
+    update business_delivery_storage_notice
664
+    <set >
665
+      <if test="billType != null" >
666
+        bill_type = #{billType,jdbcType=VARCHAR},
667
+      </if>
668
+      <if test="billTypeId != null" >
669
+        bill_type_id = #{billTypeId,jdbcType=INTEGER},
670
+      </if>
671
+      <if test="billNumber != null" >
672
+        bill_number = #{billNumber,jdbcType=VARCHAR},
673
+      </if>
674
+      <if test="shipingCount != null" >
675
+        shiping_count = #{shipingCount,jdbcType=VARCHAR},
676
+      </if>
677
+      <if test="finishedCount != null" >
678
+        finished_count = #{finishedCount,jdbcType=VARCHAR},
679
+      </if>
680
+      <if test="receivedMoney != null" >
681
+        received_money = #{receivedMoney,jdbcType=VARCHAR},
682
+      </if>
683
+      <if test="customerBid != null" >
684
+        customer_bid = #{customerBid,jdbcType=INTEGER},
685
+      </if>
686
+      <if test="customerNumber != null" >
687
+        customer_number = #{customerNumber,jdbcType=VARCHAR},
688
+      </if>
689
+      <if test="mobile != null" >
690
+        mobile = #{mobile,jdbcType=VARCHAR},
691
+      </if>
692
+      <if test="deliveryCustomer != null" >
693
+        delivery_customer = #{deliveryCustomer,jdbcType=VARCHAR},
694
+      </if>
695
+      <if test="contract != null" >
696
+        contract = #{contract,jdbcType=VARCHAR},
697
+      </if>
698
+      <if test="contractBid != null" >
699
+        contract_bid = #{contractBid,jdbcType=INTEGER},
700
+      </if>
701
+      <if test="planNumber != null" >
702
+        plan_number = #{planNumber,jdbcType=VARCHAR},
703
+      </if>
704
+      <if test="planBid != null" >
705
+        plan_bid = #{planBid,jdbcType=INTEGER},
706
+      </if>
707
+      <if test="billMemo != null" >
708
+        bill_memo = #{billMemo,jdbcType=VARCHAR},
709
+      </if>
710
+      <if test="grainPrice != null" >
711
+        grain_price = #{grainPrice,jdbcType=VARCHAR},
712
+      </if>
713
+      <if test="moneyQuantity != null" >
714
+        money_quantity = #{moneyQuantity,jdbcType=VARCHAR},
715
+      </if>
716
+      <if test="grainAnnual != null" >
717
+        grain_annual = #{grainAnnual,jdbcType=INTEGER},
718
+      </if>
719
+      <if test="warehouse != null" >
720
+        warehouse = #{warehouse,jdbcType=INTEGER},
721
+      </if>
722
+      <if test="goodsLocation != null" >
723
+        goods_location = #{goodsLocation,jdbcType=INTEGER},
724
+      </if>
725
+      <if test="auditState != null" >
726
+        audit_state = #{auditState,jdbcType=VARCHAR},
727
+      </if>
728
+      <if test="storageTime != null" >
729
+        storage_time = #{storageTime,jdbcType=TIMESTAMP},
730
+      </if>
731
+      <if test="processInstanceId != null" >
732
+        process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
733
+      </if>
734
+      <if test="processDefinitionId != null" >
735
+        process_definition_id = #{processDefinitionId,jdbcType=VARCHAR},
736
+      </if>
737
+      <if test="qualityStandard != null" >
738
+        quality_standard = #{qualityStandard,jdbcType=VARCHAR},
739
+      </if>
740
+      <if test="agreeTime != null" >
741
+        agree_time = #{agreeTime,jdbcType=TIMESTAMP},
742
+      </if>
743
+      <if test="billMan != null" >
744
+        bill_man = #{billMan,jdbcType=VARCHAR},
745
+      </if>
746
+      <if test="billDate != null" >
747
+        bill_date = #{billDate,jdbcType=TIMESTAMP},
748
+      </if>
749
+      <if test="billUnit != null" >
750
+        bill_unit = #{billUnit,jdbcType=VARCHAR},
751
+      </if>
752
+      <if test="houseId != null" >
753
+        house_id = #{houseId,jdbcType=INTEGER},
754
+      </if>
755
+      <if test="houseName != null" >
756
+        house_name = #{houseName,jdbcType=VARCHAR},
757
+      </if>
758
+      <if test="warehouseId != null" >
759
+        warehouse_id = #{warehouseId,jdbcType=INTEGER},
760
+      </if>
761
+      <if test="warehouseName != null" >
762
+        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
763
+      </if>
764
+      <if test="creater != null" >
765
+        creater = #{creater,jdbcType=VARCHAR},
766
+      </if>
767
+      <if test="createTime != null" >
768
+        create_time = #{createTime,jdbcType=TIMESTAMP},
769
+      </if>
770
+      <if test="createUnit != null" >
771
+        create_unit = #{createUnit,jdbcType=VARCHAR},
772
+      </if>
773
+      <if test="createDepot != null" >
774
+        create_depot = #{createDepot,jdbcType=VARCHAR},
775
+      </if>
776
+      <if test="updateTime != null" >
777
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
778
+      </if>
779
+      <if test="orgId != null" >
780
+        org_id = #{orgId,jdbcType=INTEGER},
781
+      </if>
782
+      <if test="inApplication != null" >
783
+        in_application = #{inApplication,jdbcType=INTEGER},
784
+      </if>
785
+      <if test="createrId != null" >
786
+        creater_id = #{createrId,jdbcType=INTEGER},
787
+      </if>
788
+      <if test="rootContractBid != null" >
789
+        root_contract_bid = #{rootContractBid,jdbcType=INTEGER},
790
+      </if>
791
+      <if test="identification != null" >
792
+        identification = #{identification,jdbcType=VARCHAR},
793
+      </if>
794
+      <if test="carnumber != null" >
795
+        carNumber = #{carnumber,jdbcType=VARCHAR},
796
+      </if>
797
+    </set>
798
+    where id = #{id,jdbcType=INTEGER}
799
+  </update>
800
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice" >
801
+    update business_delivery_storage_notice
802
+    set bill_type = #{billType,jdbcType=VARCHAR},
803
+      bill_type_id = #{billTypeId,jdbcType=INTEGER},
804
+      bill_number = #{billNumber,jdbcType=VARCHAR},
805
+      shiping_count = #{shipingCount,jdbcType=VARCHAR},
806
+      finished_count = #{finishedCount,jdbcType=VARCHAR},
807
+      received_money = #{receivedMoney,jdbcType=VARCHAR},
808
+      customer_bid = #{customerBid,jdbcType=INTEGER},
809
+      customer_number = #{customerNumber,jdbcType=VARCHAR},
810
+      mobile = #{mobile,jdbcType=VARCHAR},
811
+      delivery_customer = #{deliveryCustomer,jdbcType=VARCHAR},
812
+      contract = #{contract,jdbcType=VARCHAR},
813
+      contract_bid = #{contractBid,jdbcType=INTEGER},
814
+      plan_number = #{planNumber,jdbcType=VARCHAR},
815
+      plan_bid = #{planBid,jdbcType=INTEGER},
816
+      bill_memo = #{billMemo,jdbcType=VARCHAR},
817
+      grain_price = #{grainPrice,jdbcType=VARCHAR},
818
+      money_quantity = #{moneyQuantity,jdbcType=VARCHAR},
819
+      grain_annual = #{grainAnnual,jdbcType=INTEGER},
820
+      warehouse = #{warehouse,jdbcType=INTEGER},
821
+      goods_location = #{goodsLocation,jdbcType=INTEGER},
822
+      audit_state = #{auditState,jdbcType=VARCHAR},
823
+      storage_time = #{storageTime,jdbcType=TIMESTAMP},
824
+      process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
825
+      process_definition_id = #{processDefinitionId,jdbcType=VARCHAR},
826
+      quality_standard = #{qualityStandard,jdbcType=VARCHAR},
827
+      agree_time = #{agreeTime,jdbcType=TIMESTAMP},
828
+      bill_man = #{billMan,jdbcType=VARCHAR},
829
+      bill_date = #{billDate,jdbcType=TIMESTAMP},
830
+      bill_unit = #{billUnit,jdbcType=VARCHAR},
831
+      house_id = #{houseId,jdbcType=INTEGER},
832
+      house_name = #{houseName,jdbcType=VARCHAR},
833
+      warehouse_id = #{warehouseId,jdbcType=INTEGER},
834
+      warehouse_name = #{warehouseName,jdbcType=VARCHAR},
835
+      creater = #{creater,jdbcType=VARCHAR},
836
+      create_time = #{createTime,jdbcType=TIMESTAMP},
837
+      create_unit = #{createUnit,jdbcType=VARCHAR},
838
+      create_depot = #{createDepot,jdbcType=VARCHAR},
839
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
840
+      org_id = #{orgId,jdbcType=INTEGER},
841
+      in_application = #{inApplication,jdbcType=INTEGER},
842
+      creater_id = #{createrId,jdbcType=INTEGER},
843
+      root_contract_bid = #{rootContractBid,jdbcType=INTEGER},
844
+      identification = #{identification,jdbcType=VARCHAR},
845
+      carNumber = #{carnumber,jdbcType=VARCHAR}
846
+    where id = #{id,jdbcType=INTEGER}
847
+  </update>
848
+  
849
+   <resultMap id="approvalResultMap" type="com.chinaitop.depot.business.model.vo.BusinessDeliveryStorageNoticeAuditVO" extends="BaseResultMap">
850
+    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
851
+    <result column="task_name" property="taskName" jdbcType="VARCHAR" />
852
+    <result column="result" property="result" jdbcType="VARCHAR" />
853
+    <result column="auditId" property="auditId" jdbcType="INTEGER" />
854
+  </resultMap>
855
+ 
856
+ 
857
+  <select id="getApprovalList" resultMap="approvalResultMap" parameterType="java.util.Map" >
858
+    select
859
+        a.id id, a.bill_type bill_type, a.bill_number bill_number,
860
+        a.contract contract,
861
+        a.plan_number plan_number,
862
+        a.delivery_customer delivery_customer,
863
+        a.money_quantity money_quantity,
864
+        a.bill_date bill_date,
865
+        a.process_instance_id process_instance_id,
866
+        a.process_definition_id process_definition_id,
867
+        b.id auditId,
868
+        b.result result,
869
+        b.task_id task_id,
870
+        b.task_name task_name
871
+    from business_delivery_storage_notice a, business_approval b
872
+    <where>
873
+        a.process_instance_id = b.process_instance_id
874
+        and
875
+        a.audit_state != 0
876
+        <if test="operator != null">
877
+            and b.operator = #{operator}
878
+        </if>
879
+        <if test="billType != null">
880
+            and a.bill_type = #{billType}
881
+        </if>
882
+        <if test="result != null">
883
+            and b.result = #{result}
884
+        </if>
885
+        order by FIELD(b.result, '待审批', '同意', '驳回', '拒绝'), b.create_time desc
886
+    </where>
887
+  </select>
888
+ 
889
+  <update id="updateApplication" parameterType="java.util.Map">
890
+     update business_delivery_storage_notice
891
+     set in_application = #{inApplication}
892
+     where
893
+     1=1
894
+     <!-- 不能修改已经执行完毕的启动状态  -->
895
+     and in_application != 2
896
+     <if test="planBid != null" >
897
+        and plan_bid =  #{planBid}
898
+    </if>
899
+    <if test="contractBid != null" >
900
+        and contract_bid = #{contractBid}
901
+    </if>
902
+    <if test="rootContractBid != null" >
903
+        and root_contract_bid = #{rootContractBid}
904
+    </if>
905
+  </update>
906
+ 
907
+  <select id="selectByExampleToVO" resultMap="approvalResultMap" parameterType="com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample" >
908
+    select
909
+    <if test="distinct" >
910
+      distinct
911
+    </if>
912
+    <include refid="Base_Column_List" />
913
+    from business_delivery_storage_notice
914
+    <if test="_parameter != null" >
915
+      <include refid="Example_Where_Clause" />
916
+    </if>
917
+    <if test="orderByClause != null" >
918
+      order by ${orderByClause}
919
+    </if>
920
+  </select>
921
+
922
+  <select id="uploadNoticeData" parameterType="java.util.Map" resultType="java.util.HashMap">
923
+    SELECT
924
+        notice.*,
925
+        customer.address, <!-- 地址 -->
926
+        customer.identification,<!-- 身份证号 -->
927
+        customer.mobile,<!-- 手机号 -->
928
+        customer.social_credit_code identification,<!-- 社会信用代码 -->
929
+        customer.enterprise_phone mobile<!-- 企业电话 -->
930
+    FROM
931
+        business_delivery_storage_notice notice
932
+    left join business_customer customer on customer.id=notice.customer_bid
933
+    WHERE ((notice.audit_state=2) or (notice.bill_type=2)) and 1 = 1 <!-- 审批通过的,中转通知单没有审批 -->
934
+    <if test="orgId != null" ><!--用house_id 区分是哪个库的 house_id是代储库 orgId 是主库 -->
935
+      AND notice.house_id = #{orgId,jdbcType=INTEGER}
936
+    </if>
937
+    <if test="inApplication != null" >
938
+      AND notice.in_Application = #{inApplication,jdbcType=INTEGER}
939
+    </if>
940
+    <if test="ids != null" >
941
+      AND notice.id not in
942
+      <foreach collection="ids" item="listItem" open="(" close=")" separator="," >
943
+        #{listItem}
944
+      </foreach>
945
+    </if>
946
+  </select>
947
+  
948
+  <select id="getNoticeData" parameterType="java.util.Map" resultType="java.util.HashMap">
949
+    SELECT
950
+        notice.*,
951
+        customer.address, <!-- 地址 -->
952
+        customer.identification,<!-- 身份证号 -->
953
+        customer.mobile,<!-- 手机号 -->
954
+        customer.social_credit_code identification,<!-- 社会信用代码 -->
955
+        customer.enterprise_phone mobile,<!-- 企业电话 -->
956
+        customer.account_number yhkh,
957
+		customer.bank_name khyhmc,
958
+		customer.account_name khyhhb,
959
+		customer.administrative_division skr,<!-- 收款人 -->
960
+		customer.business_regist_num jhkh, <!-- 计划客户 -->
961
+		enum.enumName planTypeName,
962
+        plan.execute_type planTypeId
963
+    FROM
964
+        business_delivery_storage_notice notice
965
+    left join business_customer customer on customer.id=notice.customer_bid
966
+    left join business_plan plan on notice.plan_bid = plan.id
967
+    left join basic_enum enum on  plan.execute_type = enum.enumId
968
+    WHERE ((notice.audit_state=2) or (notice.bill_type=2)) and 1 = 1 <!-- 审批通过的,中转通知单没有审批 -->
969
+    AND notice.in_Application in (1,3,4)
970
+    <if test="orgId != null" ><!--用house_id 区分是哪个库的 house_id是代储库 orgId 是主库 -->
971
+      AND notice.house_id = #{orgId,jdbcType=INTEGER}
972
+    </if>
973
+    <if test="ids != null" >
974
+      AND notice.id in
975
+      <foreach collection="ids" item="listItem" open="(" close=")" separator="," >
976
+        #{listItem}
977
+      </foreach>
978
+    </if>
979
+    <if test="ids == null" >
980
+      AND notice.id is null
981
+    </if>
982
+  </select>
983
+</mapper>

+ 338 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessFileMapper.xml

@@ -0,0 +1,338 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessFileMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessFile" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="bid" property="bid" jdbcType="INTEGER" />
7
+    <result column="type" property="type" jdbcType="VARCHAR" />
8
+    <result column="file_name" property="fileName" jdbcType="VARCHAR" />
9
+    <result column="original_file_name" property="originalFileName" jdbcType="VARCHAR" />
10
+    <result column="file_type" property="fileType" jdbcType="VARCHAR" />
11
+    <result column="source" property="source" jdbcType="VARCHAR" />
12
+    <result column="remarks" property="remarks" jdbcType="VARCHAR" />
13
+    <result column="file_path" property="filePath" jdbcType="VARCHAR" />
14
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
15
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
16
+    <result column="creater" property="creater" jdbcType="INTEGER" />
17
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
18
+  </resultMap>
19
+  <sql id="Example_Where_Clause" >
20
+    <where >
21
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
22
+        <if test="criteria.valid" >
23
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
24
+            <foreach collection="criteria.criteria" item="criterion" >
25
+              <choose >
26
+                <when test="criterion.noValue" >
27
+                  and ${criterion.condition}
28
+                </when>
29
+                <when test="criterion.singleValue" >
30
+                  and ${criterion.condition} #{criterion.value}
31
+                </when>
32
+                <when test="criterion.betweenValue" >
33
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
34
+                </when>
35
+                <when test="criterion.listValue" >
36
+                  and ${criterion.condition}
37
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
38
+                    #{listItem}
39
+                  </foreach>
40
+                </when>
41
+              </choose>
42
+            </foreach>
43
+          </trim>
44
+        </if>
45
+      </foreach>
46
+    </where>
47
+  </sql>
48
+  <sql id="Update_By_Example_Where_Clause" >
49
+    <where >
50
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
51
+        <if test="criteria.valid" >
52
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
53
+            <foreach collection="criteria.criteria" item="criterion" >
54
+              <choose >
55
+                <when test="criterion.noValue" >
56
+                  and ${criterion.condition}
57
+                </when>
58
+                <when test="criterion.singleValue" >
59
+                  and ${criterion.condition} #{criterion.value}
60
+                </when>
61
+                <when test="criterion.betweenValue" >
62
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
63
+                </when>
64
+                <when test="criterion.listValue" >
65
+                  and ${criterion.condition}
66
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
67
+                    #{listItem}
68
+                  </foreach>
69
+                </when>
70
+              </choose>
71
+            </foreach>
72
+          </trim>
73
+        </if>
74
+      </foreach>
75
+    </where>
76
+  </sql>
77
+  <sql id="Base_Column_List" >
78
+    id, bid, type, file_name, original_file_name, file_type, source, remarks, file_path, 
79
+    create_time, update_time, creater, org_id
80
+  </sql>
81
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessFileExample" >
82
+    select
83
+    <if test="distinct" >
84
+      distinct
85
+    </if>
86
+    <include refid="Base_Column_List" />
87
+    from business_file
88
+    <if test="_parameter != null" >
89
+      <include refid="Example_Where_Clause" />
90
+    </if>
91
+    <if test="orderByClause != null" >
92
+      order by ${orderByClause}
93
+    </if>
94
+  </select>
95
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
96
+    select 
97
+    <include refid="Base_Column_List" />
98
+    from business_file
99
+    where id = #{id,jdbcType=INTEGER}
100
+  </select>
101
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
102
+    delete from business_file
103
+    where id = #{id,jdbcType=INTEGER}
104
+  </delete>
105
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessFileExample" >
106
+    delete from business_file
107
+    <if test="_parameter != null" >
108
+      <include refid="Example_Where_Clause" />
109
+    </if>
110
+  </delete>
111
+  <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.business.model.BusinessFile" >
112
+    insert into business_file (id, bid, type, 
113
+      file_name, original_file_name, file_type, 
114
+      source, remarks, file_path, 
115
+      create_time, update_time, creater, 
116
+      org_id)
117
+    values (#{id,jdbcType=INTEGER}, #{bid,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, 
118
+      #{fileName,jdbcType=VARCHAR}, #{originalFileName,jdbcType=VARCHAR}, #{fileType,jdbcType=VARCHAR}, 
119
+      #{source,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR}, 
120
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{creater,jdbcType=INTEGER}, 
121
+      #{orgId,jdbcType=INTEGER})
122
+  </insert>
123
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessFile" >
124
+    insert into business_file
125
+    <trim prefix="(" suffix=")" suffixOverrides="," >
126
+      <if test="id != null" >
127
+        id,
128
+      </if>
129
+      <if test="bid != null" >
130
+        bid,
131
+      </if>
132
+      <if test="type != null" >
133
+        type,
134
+      </if>
135
+      <if test="fileName != null" >
136
+        file_name,
137
+      </if>
138
+      <if test="originalFileName != null" >
139
+        original_file_name,
140
+      </if>
141
+      <if test="fileType != null" >
142
+        file_type,
143
+      </if>
144
+      <if test="source != null" >
145
+        source,
146
+      </if>
147
+      <if test="remarks != null" >
148
+        remarks,
149
+      </if>
150
+      <if test="filePath != null" >
151
+        file_path,
152
+      </if>
153
+      <if test="createTime != null" >
154
+        create_time,
155
+      </if>
156
+      <if test="updateTime != null" >
157
+        update_time,
158
+      </if>
159
+      <if test="creater != null" >
160
+        creater,
161
+      </if>
162
+      <if test="orgId != null" >
163
+        org_id,
164
+      </if>
165
+    </trim>
166
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
167
+      <if test="id != null" >
168
+        #{id,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="bid != null" >
171
+        #{bid,jdbcType=INTEGER},
172
+      </if>
173
+      <if test="type != null" >
174
+        #{type,jdbcType=VARCHAR},
175
+      </if>
176
+      <if test="fileName != null" >
177
+        #{fileName,jdbcType=VARCHAR},
178
+      </if>
179
+      <if test="originalFileName != null" >
180
+        #{originalFileName,jdbcType=VARCHAR},
181
+      </if>
182
+      <if test="fileType != null" >
183
+        #{fileType,jdbcType=VARCHAR},
184
+      </if>
185
+      <if test="source != null" >
186
+        #{source,jdbcType=VARCHAR},
187
+      </if>
188
+      <if test="remarks != null" >
189
+        #{remarks,jdbcType=VARCHAR},
190
+      </if>
191
+      <if test="filePath != null" >
192
+        #{filePath,jdbcType=VARCHAR},
193
+      </if>
194
+      <if test="createTime != null" >
195
+        #{createTime,jdbcType=TIMESTAMP},
196
+      </if>
197
+      <if test="updateTime != null" >
198
+        #{updateTime,jdbcType=TIMESTAMP},
199
+      </if>
200
+      <if test="creater != null" >
201
+        #{creater,jdbcType=INTEGER},
202
+      </if>
203
+      <if test="orgId != null" >
204
+        #{orgId,jdbcType=INTEGER},
205
+      </if>
206
+    </trim>
207
+  </insert>
208
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessFileExample" resultType="java.lang.Integer" >
209
+    select count(*) from business_file
210
+    <if test="_parameter != null" >
211
+      <include refid="Example_Where_Clause" />
212
+    </if>
213
+  </select>
214
+  <update id="updateByExampleSelective" parameterType="map" >
215
+    update business_file
216
+    <set >
217
+      <if test="record.id != null" >
218
+        id = #{record.id,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="record.bid != null" >
221
+        bid = #{record.bid,jdbcType=INTEGER},
222
+      </if>
223
+      <if test="record.type != null" >
224
+        type = #{record.type,jdbcType=VARCHAR},
225
+      </if>
226
+      <if test="record.fileName != null" >
227
+        file_name = #{record.fileName,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="record.originalFileName != null" >
230
+        original_file_name = #{record.originalFileName,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="record.fileType != null" >
233
+        file_type = #{record.fileType,jdbcType=VARCHAR},
234
+      </if>
235
+      <if test="record.source != null" >
236
+        source = #{record.source,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="record.remarks != null" >
239
+        remarks = #{record.remarks,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="record.filePath != null" >
242
+        file_path = #{record.filePath,jdbcType=VARCHAR},
243
+      </if>
244
+      <if test="record.createTime != null" >
245
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
246
+      </if>
247
+      <if test="record.updateTime != null" >
248
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
249
+      </if>
250
+      <if test="record.creater != null" >
251
+        creater = #{record.creater,jdbcType=INTEGER},
252
+      </if>
253
+      <if test="record.orgId != null" >
254
+        org_id = #{record.orgId,jdbcType=INTEGER},
255
+      </if>
256
+    </set>
257
+    <if test="_parameter != null" >
258
+      <include refid="Update_By_Example_Where_Clause" />
259
+    </if>
260
+  </update>
261
+  <update id="updateByExample" parameterType="map" >
262
+    update business_file
263
+    set id = #{record.id,jdbcType=INTEGER},
264
+      bid = #{record.bid,jdbcType=INTEGER},
265
+      type = #{record.type,jdbcType=VARCHAR},
266
+      file_name = #{record.fileName,jdbcType=VARCHAR},
267
+      original_file_name = #{record.originalFileName,jdbcType=VARCHAR},
268
+      file_type = #{record.fileType,jdbcType=VARCHAR},
269
+      source = #{record.source,jdbcType=VARCHAR},
270
+      remarks = #{record.remarks,jdbcType=VARCHAR},
271
+      file_path = #{record.filePath,jdbcType=VARCHAR},
272
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
273
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
274
+      creater = #{record.creater,jdbcType=INTEGER},
275
+      org_id = #{record.orgId,jdbcType=INTEGER}
276
+    <if test="_parameter != null" >
277
+      <include refid="Update_By_Example_Where_Clause" />
278
+    </if>
279
+  </update>
280
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessFile" >
281
+    update business_file
282
+    <set >
283
+      <if test="bid != null" >
284
+        bid = #{bid,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="type != null" >
287
+        type = #{type,jdbcType=VARCHAR},
288
+      </if>
289
+      <if test="fileName != null" >
290
+        file_name = #{fileName,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="originalFileName != null" >
293
+        original_file_name = #{originalFileName,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="fileType != null" >
296
+        file_type = #{fileType,jdbcType=VARCHAR},
297
+      </if>
298
+      <if test="source != null" >
299
+        source = #{source,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="remarks != null" >
302
+        remarks = #{remarks,jdbcType=VARCHAR},
303
+      </if>
304
+      <if test="filePath != null" >
305
+        file_path = #{filePath,jdbcType=VARCHAR},
306
+      </if>
307
+      <if test="createTime != null" >
308
+        create_time = #{createTime,jdbcType=TIMESTAMP},
309
+      </if>
310
+      <if test="updateTime != null" >
311
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
312
+      </if>
313
+      <if test="creater != null" >
314
+        creater = #{creater,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="orgId != null" >
317
+        org_id = #{orgId,jdbcType=INTEGER},
318
+      </if>
319
+    </set>
320
+    where id = #{id,jdbcType=INTEGER}
321
+  </update>
322
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessFile" >
323
+    update business_file
324
+    set bid = #{bid,jdbcType=INTEGER},
325
+      type = #{type,jdbcType=VARCHAR},
326
+      file_name = #{fileName,jdbcType=VARCHAR},
327
+      original_file_name = #{originalFileName,jdbcType=VARCHAR},
328
+      file_type = #{fileType,jdbcType=VARCHAR},
329
+      source = #{source,jdbcType=VARCHAR},
330
+      remarks = #{remarks,jdbcType=VARCHAR},
331
+      file_path = #{filePath,jdbcType=VARCHAR},
332
+      create_time = #{createTime,jdbcType=TIMESTAMP},
333
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
334
+      creater = #{creater,jdbcType=INTEGER},
335
+      org_id = #{orgId,jdbcType=INTEGER}
336
+    where id = #{id,jdbcType=INTEGER}
337
+  </update>
338
+</mapper>

+ 519 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessLadingMapper.xml

@@ -0,0 +1,519 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessLadingMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessLading" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="lading_number" property="ladingNumber" jdbcType="VARCHAR" />
7
+    <result column="inbound_number" property="inboundNumber" jdbcType="VARCHAR" />
8
+    <result column="customer_name" property="customerName" jdbcType="VARCHAR" />
9
+    <result column="train_number" property="trainNumber" jdbcType="VARCHAR" />
10
+    <result column="grain_kind" property="grainKind" jdbcType="INTEGER" />
11
+    <result column="model" property="model" jdbcType="VARCHAR" />
12
+    <result column="unload_number" property="unloadNumber" jdbcType="DOUBLE" />
13
+    <result column="platform" property="platform" jdbcType="VARCHAR" />
14
+    <result column="warehouse_name" property="warehouseName" jdbcType="VARCHAR" />
15
+    <result column="goods_number" property="goodsNumber" jdbcType="DOUBLE" />
16
+    <result column="measurement_method" property="measurementMethod" jdbcType="INTEGER" />
17
+    <result column="business_type" property="businessType" jdbcType="VARCHAR" />
18
+    <result column="sales_type" property="salesType" jdbcType="VARCHAR" />
19
+    <result column="sales_department" property="salesDepartment" jdbcType="VARCHAR" />
20
+    <result column="transport_station" property="transportStation" jdbcType="VARCHAR" />
21
+    <result column="delivery_date" property="deliveryDate" jdbcType="TIMESTAMP" />
22
+    <result column="creater" property="creater" jdbcType="VARCHAR" />
23
+    <result column="bill_date" property="billDate" jdbcType="TIMESTAMP" />
24
+    <result column="carNumber" property="carnumber" jdbcType="VARCHAR" />
25
+    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
26
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
27
+  </resultMap>
28
+  <sql id="Example_Where_Clause" >
29
+    <where >
30
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
31
+        <if test="criteria.valid" >
32
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
33
+            <foreach collection="criteria.criteria" item="criterion" >
34
+              <choose >
35
+                <when test="criterion.noValue" >
36
+                  and ${criterion.condition}
37
+                </when>
38
+                <when test="criterion.singleValue" >
39
+                  and ${criterion.condition} #{criterion.value}
40
+                </when>
41
+                <when test="criterion.betweenValue" >
42
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
43
+                </when>
44
+                <when test="criterion.listValue" >
45
+                  and ${criterion.condition}
46
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
47
+                    #{listItem}
48
+                  </foreach>
49
+                </when>
50
+              </choose>
51
+            </foreach>
52
+          </trim>
53
+        </if>
54
+      </foreach>
55
+    </where>
56
+  </sql>
57
+  <sql id="Update_By_Example_Where_Clause" >
58
+    <where >
59
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
60
+        <if test="criteria.valid" >
61
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
62
+            <foreach collection="criteria.criteria" item="criterion" >
63
+              <choose >
64
+                <when test="criterion.noValue" >
65
+                  and ${criterion.condition}
66
+                </when>
67
+                <when test="criterion.singleValue" >
68
+                  and ${criterion.condition} #{criterion.value}
69
+                </when>
70
+                <when test="criterion.betweenValue" >
71
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
72
+                </when>
73
+                <when test="criterion.listValue" >
74
+                  and ${criterion.condition}
75
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
76
+                    #{listItem}
77
+                  </foreach>
78
+                </when>
79
+              </choose>
80
+            </foreach>
81
+          </trim>
82
+        </if>
83
+      </foreach>
84
+    </where>
85
+  </sql>
86
+  <sql id="Base_Column_List" >
87
+    id, lading_number, inbound_number, customer_name, train_number, grain_kind, model, 
88
+    unload_number, platform, warehouse_name, goods_number, measurement_method, business_type, 
89
+    sales_type, sales_department, transport_station, delivery_date, creater, bill_date, 
90
+    carNumber, updatetime, org_id
91
+  </sql>
92
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessLadingExample" >
93
+    select
94
+    <if test="distinct" >
95
+      distinct
96
+    </if>
97
+    <include refid="Base_Column_List" />
98
+    from business_lading
99
+    <if test="_parameter != null" >
100
+      <include refid="Example_Where_Clause" />
101
+    </if>
102
+    <if test="orderByClause != null" >
103
+      order by ${orderByClause}
104
+    </if>
105
+  </select>
106
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
107
+    select 
108
+    <include refid="Base_Column_List" />
109
+    from business_lading
110
+    where id = #{id,jdbcType=INTEGER}
111
+  </select>
112
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
113
+    delete from business_lading
114
+    where id = #{id,jdbcType=INTEGER}
115
+  </delete>
116
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessLadingExample" >
117
+    delete from business_lading
118
+    <if test="_parameter != null" >
119
+      <include refid="Example_Where_Clause" />
120
+    </if>
121
+  </delete>
122
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.BusinessLading" >
123
+    insert into business_lading (id, lading_number, inbound_number, 
124
+      customer_name, train_number, grain_kind, 
125
+      model, unload_number, platform, 
126
+      warehouse_name, goods_number, measurement_method, 
127
+      business_type, sales_type, sales_department, 
128
+      transport_station, delivery_date, creater, 
129
+      bill_date, carNumber, updatetime, 
130
+      org_id)
131
+    values (#{id,jdbcType=INTEGER}, #{ladingNumber,jdbcType=VARCHAR}, #{inboundNumber,jdbcType=VARCHAR}, 
132
+      #{customerName,jdbcType=VARCHAR}, #{trainNumber,jdbcType=VARCHAR}, #{grainKind,jdbcType=INTEGER}, 
133
+      #{model,jdbcType=VARCHAR}, #{unloadNumber,jdbcType=DOUBLE}, #{platform,jdbcType=VARCHAR}, 
134
+      #{warehouseName,jdbcType=VARCHAR}, #{goodsNumber,jdbcType=DOUBLE}, #{measurementMethod,jdbcType=INTEGER}, 
135
+      #{businessType,jdbcType=VARCHAR}, #{salesType,jdbcType=VARCHAR}, #{salesDepartment,jdbcType=VARCHAR}, 
136
+      #{transportStation,jdbcType=VARCHAR}, #{deliveryDate,jdbcType=TIMESTAMP}, #{creater,jdbcType=VARCHAR}, 
137
+      #{billDate,jdbcType=TIMESTAMP}, #{carnumber,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, 
138
+      #{orgId,jdbcType=INTEGER})
139
+  </insert>
140
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessLading" >
141
+    insert into business_lading
142
+    <trim prefix="(" suffix=")" suffixOverrides="," >
143
+      <if test="id != null" >
144
+        id,
145
+      </if>
146
+      <if test="ladingNumber != null" >
147
+        lading_number,
148
+      </if>
149
+      <if test="inboundNumber != null" >
150
+        inbound_number,
151
+      </if>
152
+      <if test="customerName != null" >
153
+        customer_name,
154
+      </if>
155
+      <if test="trainNumber != null" >
156
+        train_number,
157
+      </if>
158
+      <if test="grainKind != null" >
159
+        grain_kind,
160
+      </if>
161
+      <if test="model != null" >
162
+        model,
163
+      </if>
164
+      <if test="unloadNumber != null" >
165
+        unload_number,
166
+      </if>
167
+      <if test="platform != null" >
168
+        platform,
169
+      </if>
170
+      <if test="warehouseName != null" >
171
+        warehouse_name,
172
+      </if>
173
+      <if test="goodsNumber != null" >
174
+        goods_number,
175
+      </if>
176
+      <if test="measurementMethod != null" >
177
+        measurement_method,
178
+      </if>
179
+      <if test="businessType != null" >
180
+        business_type,
181
+      </if>
182
+      <if test="salesType != null" >
183
+        sales_type,
184
+      </if>
185
+      <if test="salesDepartment != null" >
186
+        sales_department,
187
+      </if>
188
+      <if test="transportStation != null" >
189
+        transport_station,
190
+      </if>
191
+      <if test="deliveryDate != null" >
192
+        delivery_date,
193
+      </if>
194
+      <if test="creater != null" >
195
+        creater,
196
+      </if>
197
+      <if test="billDate != null" >
198
+        bill_date,
199
+      </if>
200
+      <if test="carnumber != null" >
201
+        carNumber,
202
+      </if>
203
+      <if test="updatetime != null" >
204
+        updatetime,
205
+      </if>
206
+      <if test="orgId != null" >
207
+        org_id,
208
+      </if>
209
+    </trim>
210
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
211
+      <if test="id != null" >
212
+        #{id,jdbcType=INTEGER},
213
+      </if>
214
+      <if test="ladingNumber != null" >
215
+        #{ladingNumber,jdbcType=VARCHAR},
216
+      </if>
217
+      <if test="inboundNumber != null" >
218
+        #{inboundNumber,jdbcType=VARCHAR},
219
+      </if>
220
+      <if test="customerName != null" >
221
+        #{customerName,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="trainNumber != null" >
224
+        #{trainNumber,jdbcType=VARCHAR},
225
+      </if>
226
+      <if test="grainKind != null" >
227
+        #{grainKind,jdbcType=INTEGER},
228
+      </if>
229
+      <if test="model != null" >
230
+        #{model,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="unloadNumber != null" >
233
+        #{unloadNumber,jdbcType=DOUBLE},
234
+      </if>
235
+      <if test="platform != null" >
236
+        #{platform,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="warehouseName != null" >
239
+        #{warehouseName,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="goodsNumber != null" >
242
+        #{goodsNumber,jdbcType=DOUBLE},
243
+      </if>
244
+      <if test="measurementMethod != null" >
245
+        #{measurementMethod,jdbcType=INTEGER},
246
+      </if>
247
+      <if test="businessType != null" >
248
+        #{businessType,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="salesType != null" >
251
+        #{salesType,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="salesDepartment != null" >
254
+        #{salesDepartment,jdbcType=VARCHAR},
255
+      </if>
256
+      <if test="transportStation != null" >
257
+        #{transportStation,jdbcType=VARCHAR},
258
+      </if>
259
+      <if test="deliveryDate != null" >
260
+        #{deliveryDate,jdbcType=TIMESTAMP},
261
+      </if>
262
+      <if test="creater != null" >
263
+        #{creater,jdbcType=VARCHAR},
264
+      </if>
265
+      <if test="billDate != null" >
266
+        #{billDate,jdbcType=TIMESTAMP},
267
+      </if>
268
+      <if test="carnumber != null" >
269
+        #{carnumber,jdbcType=VARCHAR},
270
+      </if>
271
+      <if test="updatetime != null" >
272
+        #{updatetime,jdbcType=TIMESTAMP},
273
+      </if>
274
+      <if test="orgId != null" >
275
+        #{orgId,jdbcType=INTEGER},
276
+      </if>
277
+    </trim>
278
+  </insert>
279
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessLadingExample" resultType="java.lang.Integer" >
280
+    select count(*) from business_lading
281
+    <if test="_parameter != null" >
282
+      <include refid="Example_Where_Clause" />
283
+    </if>
284
+  </select>
285
+  <update id="updateByExampleSelective" parameterType="map" >
286
+    update business_lading
287
+    <set >
288
+      <if test="record.id != null" >
289
+        id = #{record.id,jdbcType=INTEGER},
290
+      </if>
291
+      <if test="record.ladingNumber != null" >
292
+        lading_number = #{record.ladingNumber,jdbcType=VARCHAR},
293
+      </if>
294
+      <if test="record.inboundNumber != null" >
295
+        inbound_number = #{record.inboundNumber,jdbcType=VARCHAR},
296
+      </if>
297
+      <if test="record.customerName != null" >
298
+        customer_name = #{record.customerName,jdbcType=VARCHAR},
299
+      </if>
300
+      <if test="record.trainNumber != null" >
301
+        train_number = #{record.trainNumber,jdbcType=VARCHAR},
302
+      </if>
303
+      <if test="record.grainKind != null" >
304
+        grain_kind = #{record.grainKind,jdbcType=INTEGER},
305
+      </if>
306
+      <if test="record.model != null" >
307
+        model = #{record.model,jdbcType=VARCHAR},
308
+      </if>
309
+      <if test="record.unloadNumber != null" >
310
+        unload_number = #{record.unloadNumber,jdbcType=DOUBLE},
311
+      </if>
312
+      <if test="record.platform != null" >
313
+        platform = #{record.platform,jdbcType=VARCHAR},
314
+      </if>
315
+      <if test="record.warehouseName != null" >
316
+        warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
317
+      </if>
318
+      <if test="record.goodsNumber != null" >
319
+        goods_number = #{record.goodsNumber,jdbcType=DOUBLE},
320
+      </if>
321
+      <if test="record.measurementMethod != null" >
322
+        measurement_method = #{record.measurementMethod,jdbcType=INTEGER},
323
+      </if>
324
+      <if test="record.businessType != null" >
325
+        business_type = #{record.businessType,jdbcType=VARCHAR},
326
+      </if>
327
+      <if test="record.salesType != null" >
328
+        sales_type = #{record.salesType,jdbcType=VARCHAR},
329
+      </if>
330
+      <if test="record.salesDepartment != null" >
331
+        sales_department = #{record.salesDepartment,jdbcType=VARCHAR},
332
+      </if>
333
+      <if test="record.transportStation != null" >
334
+        transport_station = #{record.transportStation,jdbcType=VARCHAR},
335
+      </if>
336
+      <if test="record.deliveryDate != null" >
337
+        delivery_date = #{record.deliveryDate,jdbcType=TIMESTAMP},
338
+      </if>
339
+      <if test="record.creater != null" >
340
+        creater = #{record.creater,jdbcType=VARCHAR},
341
+      </if>
342
+      <if test="record.billDate != null" >
343
+        bill_date = #{record.billDate,jdbcType=TIMESTAMP},
344
+      </if>
345
+      <if test="record.carnumber != null" >
346
+        carNumber = #{record.carnumber,jdbcType=VARCHAR},
347
+      </if>
348
+      <if test="record.updatetime != null" >
349
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
350
+      </if>
351
+      <if test="record.orgId != null" >
352
+        org_id = #{record.orgId,jdbcType=INTEGER},
353
+      </if>
354
+    </set>
355
+    <if test="_parameter != null" >
356
+      <include refid="Update_By_Example_Where_Clause" />
357
+    </if>
358
+  </update>
359
+  <update id="updateByExample" parameterType="map" >
360
+    update business_lading
361
+    set id = #{record.id,jdbcType=INTEGER},
362
+      lading_number = #{record.ladingNumber,jdbcType=VARCHAR},
363
+      inbound_number = #{record.inboundNumber,jdbcType=VARCHAR},
364
+      customer_name = #{record.customerName,jdbcType=VARCHAR},
365
+      train_number = #{record.trainNumber,jdbcType=VARCHAR},
366
+      grain_kind = #{record.grainKind,jdbcType=INTEGER},
367
+      model = #{record.model,jdbcType=VARCHAR},
368
+      unload_number = #{record.unloadNumber,jdbcType=DOUBLE},
369
+      platform = #{record.platform,jdbcType=VARCHAR},
370
+      warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
371
+      goods_number = #{record.goodsNumber,jdbcType=DOUBLE},
372
+      measurement_method = #{record.measurementMethod,jdbcType=INTEGER},
373
+      business_type = #{record.businessType,jdbcType=VARCHAR},
374
+      sales_type = #{record.salesType,jdbcType=VARCHAR},
375
+      sales_department = #{record.salesDepartment,jdbcType=VARCHAR},
376
+      transport_station = #{record.transportStation,jdbcType=VARCHAR},
377
+      delivery_date = #{record.deliveryDate,jdbcType=TIMESTAMP},
378
+      creater = #{record.creater,jdbcType=VARCHAR},
379
+      bill_date = #{record.billDate,jdbcType=TIMESTAMP},
380
+      carNumber = #{record.carnumber,jdbcType=VARCHAR},
381
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
382
+      org_id = #{record.orgId,jdbcType=INTEGER}
383
+    <if test="_parameter != null" >
384
+      <include refid="Update_By_Example_Where_Clause" />
385
+    </if>
386
+  </update>
387
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessLading" >
388
+    update business_lading
389
+    <set >
390
+      <if test="ladingNumber != null" >
391
+        lading_number = #{ladingNumber,jdbcType=VARCHAR},
392
+      </if>
393
+      <if test="inboundNumber != null" >
394
+        inbound_number = #{inboundNumber,jdbcType=VARCHAR},
395
+      </if>
396
+      <if test="customerName != null" >
397
+        customer_name = #{customerName,jdbcType=VARCHAR},
398
+      </if>
399
+      <if test="trainNumber != null" >
400
+        train_number = #{trainNumber,jdbcType=VARCHAR},
401
+      </if>
402
+      <if test="grainKind != null" >
403
+        grain_kind = #{grainKind,jdbcType=INTEGER},
404
+      </if>
405
+      <if test="model != null" >
406
+        model = #{model,jdbcType=VARCHAR},
407
+      </if>
408
+      <if test="unloadNumber != null" >
409
+        unload_number = #{unloadNumber,jdbcType=DOUBLE},
410
+      </if>
411
+      <if test="platform != null" >
412
+        platform = #{platform,jdbcType=VARCHAR},
413
+      </if>
414
+      <if test="warehouseName != null" >
415
+        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
416
+      </if>
417
+      <if test="goodsNumber != null" >
418
+        goods_number = #{goodsNumber,jdbcType=DOUBLE},
419
+      </if>
420
+      <if test="measurementMethod != null" >
421
+        measurement_method = #{measurementMethod,jdbcType=INTEGER},
422
+      </if>
423
+      <if test="businessType != null" >
424
+        business_type = #{businessType,jdbcType=VARCHAR},
425
+      </if>
426
+      <if test="salesType != null" >
427
+        sales_type = #{salesType,jdbcType=VARCHAR},
428
+      </if>
429
+      <if test="salesDepartment != null" >
430
+        sales_department = #{salesDepartment,jdbcType=VARCHAR},
431
+      </if>
432
+      <if test="transportStation != null" >
433
+        transport_station = #{transportStation,jdbcType=VARCHAR},
434
+      </if>
435
+      <if test="deliveryDate != null" >
436
+        delivery_date = #{deliveryDate,jdbcType=TIMESTAMP},
437
+      </if>
438
+      <if test="creater != null" >
439
+        creater = #{creater,jdbcType=VARCHAR},
440
+      </if>
441
+      <if test="billDate != null" >
442
+        bill_date = #{billDate,jdbcType=TIMESTAMP},
443
+      </if>
444
+      <if test="carnumber != null" >
445
+        carNumber = #{carnumber,jdbcType=VARCHAR},
446
+      </if>
447
+      <if test="updatetime != null" >
448
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
449
+      </if>
450
+      <if test="orgId != null" >
451
+        org_id = #{orgId,jdbcType=INTEGER},
452
+      </if>
453
+    </set>
454
+    where id = #{id,jdbcType=INTEGER}
455
+  </update>
456
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessLading" >
457
+    update business_lading
458
+    set lading_number = #{ladingNumber,jdbcType=VARCHAR},
459
+      inbound_number = #{inboundNumber,jdbcType=VARCHAR},
460
+      customer_name = #{customerName,jdbcType=VARCHAR},
461
+      train_number = #{trainNumber,jdbcType=VARCHAR},
462
+      grain_kind = #{grainKind,jdbcType=INTEGER},
463
+      model = #{model,jdbcType=VARCHAR},
464
+      unload_number = #{unloadNumber,jdbcType=DOUBLE},
465
+      platform = #{platform,jdbcType=VARCHAR},
466
+      warehouse_name = #{warehouseName,jdbcType=VARCHAR},
467
+      goods_number = #{goodsNumber,jdbcType=DOUBLE},
468
+      measurement_method = #{measurementMethod,jdbcType=INTEGER},
469
+      business_type = #{businessType,jdbcType=VARCHAR},
470
+      sales_type = #{salesType,jdbcType=VARCHAR},
471
+      sales_department = #{salesDepartment,jdbcType=VARCHAR},
472
+      transport_station = #{transportStation,jdbcType=VARCHAR},
473
+      delivery_date = #{deliveryDate,jdbcType=TIMESTAMP},
474
+      creater = #{creater,jdbcType=VARCHAR},
475
+      bill_date = #{billDate,jdbcType=TIMESTAMP},
476
+      carNumber = #{carnumber,jdbcType=VARCHAR},
477
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
478
+      org_id = #{orgId,jdbcType=INTEGER}
479
+    where id = #{id,jdbcType=INTEGER}
480
+  </update>
481
+  
482
+  <select id="getLadingDatas" parameterType="java.util.Map" resultType="java.util.HashMap">
483
+    SELECT
484
+		id,
485
+		org_id,
486
+		lading_number thdh,
487
+		carNumber qcph,
488
+		customer_name khmc,
489
+		train_number glhcph,
490
+		model ggxh,
491
+		unload_number js,
492
+		warehouse_name hw,
493
+		goods_number thjs,
494
+		transport_station fyz,
495
+		DATE_FORMAT(
496
+			delivery_date,
497
+			'%Y-%m-%d %T'
498
+		) fhrq,
499
+		DATE_FORMAT(bill_date, '%Y-%m-%d %T') zdrq,
500
+		inbound_number rzdh,
501
+		grain_kind lypz,
502
+		platform zt,
503
+		measurement_method jlfs,
504
+		creater zdr,
505
+		sales_department djzl
506
+   FROM
507
+	   business_lading
508
+    WHERE 1 = 1
509
+    <if test="orgId != null" >
510
+      AND org_id = #{orgId,jdbcType=INTEGER}
511
+    </if>
512
+    <if test="thdhs != null" >
513
+      AND lading_number not in
514
+      <foreach collection="thdhs" item="listItem" open="(" close=")" separator="," >
515
+        #{listItem}
516
+      </foreach>
517
+    </if>
518
+  </select>
519
+</mapper>

+ 969 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessPlanMapper.xml

@@ -0,0 +1,969 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessPlanMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessPlan" >
5
+    <!--
6
+      WARNING - @mbggenerated
7
+      This element is automatically generated by MyBatis Generator, do not modify.
8
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
9
+    -->
10
+    <id column="id" property="id" jdbcType="INTEGER" />
11
+    <result column="plan_number" property="planNumber" jdbcType="VARCHAR" />
12
+    <result column="plan_title" property="planTitle" jdbcType="VARCHAR" />
13
+    <result column="reference_number" property="referenceNumber" jdbcType="VARCHAR" />
14
+    <result column="plan_desc" property="planDesc" jdbcType="VARCHAR" />
15
+    <result column="execute_type" property="executeType" jdbcType="INTEGER" />
16
+    <result column="out_amount" property="outAmount" jdbcType="VARCHAR" />
17
+    <result column="in_amount" property="inAmount" jdbcType="VARCHAR" />
18
+    <result column="out_total_price" property="outTotalPrice" jdbcType="VARCHAR" />
19
+    <result column="in_total_price" property="inTotalPrice" jdbcType="VARCHAR" />
20
+    <result column="customer_plan_state" property="customerPlanState" jdbcType="VARCHAR" />
21
+    <result column="plan_customer" property="planCustomer" jdbcType="VARCHAR" />
22
+    <result column="audit_state" property="auditState" jdbcType="VARCHAR" />
23
+    <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
24
+    <result column="process_definition_id" property="processDefinitionId" jdbcType="VARCHAR" />
25
+    <result column="current_approve_path" property="currentApprovePath" jdbcType="VARCHAR" />
26
+    <result column="agree_time" property="agreeTime" jdbcType="TIMESTAMP" />
27
+    <result column="creater_id" property="createrId" jdbcType="INTEGER" />
28
+    <result column="creater" property="creater" jdbcType="VARCHAR" />
29
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
30
+    <result column="create_unit" property="createUnit" jdbcType="VARCHAR" />
31
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
32
+    <result column="in_application" property="inApplication" jdbcType="INTEGER" />
33
+    <result column="total_quantity" property="totalQuantity" jdbcType="VARCHAR" />
34
+    <result column="report_date" property="reportDate" jdbcType="TIMESTAMP" />
35
+    <result column="send_date" property="sendDate" jdbcType="TIMESTAMP" />
36
+    <result column="province_remark" property="provinceRemark" jdbcType="VARCHAR" />
37
+    <result column="enterprise_remark" property="enterpriseRemark" jdbcType="VARCHAR" />
38
+    <result column="attribute_type" property="attributeType" jdbcType="INTEGER" />
39
+    <result column="refuse_reason" property="refuseReason" jdbcType="VARCHAR" />
40
+    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
41
+    <result column="jhnd" property="jhnd" jdbcType="VARCHAR" />
42
+    <result column="kszxrq" property="kszxrq" jdbcType="TIMESTAMP" />
43
+    <result column="jzzxrq" property="jzzxrq" jdbcType="TIMESTAMP" />
44
+  </resultMap>
45
+  
46
+   <resultMap id="approvalResultMap" type="com.chinaitop.depot.business.model.vo.BusinessPlanAuditVO" extends="BaseResultMap">
47
+
48
+    <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
49
+
50
+    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
51
+
52
+    <result column="result" property="result" jdbcType="VARCHAR" />
53
+
54
+    <result column="task_name" property="taskName" jdbcType="VARCHAR" />
55
+
56
+    <result column="auditId" property="auditId" jdbcType="INTEGER" />
57
+
58
+    <result column="applicationDate" property="applicationDate" jdbcType="VARCHAR" />
59
+
60
+    <result column="acceptanceType" property="acceptanceType" jdbcType="VARCHAR" />
61
+
62
+    <result column="house_id" property="houseId" jdbcType="INTEGER" />
63
+
64
+    <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
65
+
66
+  </resultMap>
67
+  
68
+  <sql id="Example_Where_Clause" >
69
+    <!--
70
+      WARNING - @mbggenerated
71
+      This element is automatically generated by MyBatis Generator, do not modify.
72
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
73
+    -->
74
+    <where >
75
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
76
+        <if test="criteria.valid" >
77
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
78
+            <foreach collection="criteria.criteria" item="criterion" >
79
+              <choose >
80
+                <when test="criterion.noValue" >
81
+                  and ${criterion.condition}
82
+                </when>
83
+                <when test="criterion.singleValue" >
84
+                  and ${criterion.condition} #{criterion.value}
85
+                </when>
86
+                <when test="criterion.betweenValue" >
87
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
88
+                </when>
89
+                <when test="criterion.listValue" >
90
+                  and ${criterion.condition}
91
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
92
+                    #{listItem}
93
+                  </foreach>
94
+                </when>
95
+              </choose>
96
+            </foreach>
97
+          </trim>
98
+        </if>
99
+      </foreach>
100
+    </where>
101
+  </sql>
102
+  <sql id="Update_By_Example_Where_Clause" >
103
+    <!--
104
+      WARNING - @mbggenerated
105
+      This element is automatically generated by MyBatis Generator, do not modify.
106
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
107
+    -->
108
+    <where >
109
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
110
+        <if test="criteria.valid" >
111
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
112
+            <foreach collection="criteria.criteria" item="criterion" >
113
+              <choose >
114
+                <when test="criterion.noValue" >
115
+                  and ${criterion.condition}
116
+                </when>
117
+                <when test="criterion.singleValue" >
118
+                  and ${criterion.condition} #{criterion.value}
119
+                </when>
120
+                <when test="criterion.betweenValue" >
121
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
122
+                </when>
123
+                <when test="criterion.listValue" >
124
+                  and ${criterion.condition}
125
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
126
+                    #{listItem}
127
+                  </foreach>
128
+                </when>
129
+              </choose>
130
+            </foreach>
131
+          </trim>
132
+        </if>
133
+      </foreach>
134
+    </where>
135
+  </sql>
136
+  <sql id="Base_Column_List" >
137
+    <!--
138
+      WARNING - @mbggenerated
139
+      This element is automatically generated by MyBatis Generator, do not modify.
140
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
141
+    -->
142
+    id, plan_number, plan_title, reference_number, plan_desc, execute_type, out_amount, 
143
+    in_amount, out_total_price, in_total_price, customer_plan_state, plan_customer, audit_state, 
144
+    process_instance_id, process_definition_id, current_approve_path, agree_time, creater_id, 
145
+    creater, create_time, create_unit, org_id, in_application, total_quantity, report_date, 
146
+    send_date, province_remark, enterprise_remark, attribute_type, refuse_reason, updatetime, 
147
+    jhnd, kszxrq, jzzxrq
148
+  </sql>
149
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" >
150
+    <!--
151
+      WARNING - @mbggenerated
152
+      This element is automatically generated by MyBatis Generator, do not modify.
153
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
154
+    -->
155
+    select
156
+    <if test="distinct" >
157
+      distinct
158
+    </if>
159
+    <include refid="Base_Column_List" />
160
+    from business_plan
161
+    <if test="_parameter != null" >
162
+      <include refid="Example_Where_Clause" />
163
+    </if>
164
+    <if test="orderByClause != null" >
165
+      order by ${orderByClause}
166
+    </if>
167
+  </select>
168
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
169
+    <!--
170
+      WARNING - @mbggenerated
171
+      This element is automatically generated by MyBatis Generator, do not modify.
172
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
173
+    -->
174
+    select 
175
+    <include refid="Base_Column_List" />
176
+    from business_plan
177
+    where id = #{id,jdbcType=INTEGER}
178
+  </select>
179
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
180
+    <!--
181
+      WARNING - @mbggenerated
182
+      This element is automatically generated by MyBatis Generator, do not modify.
183
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
184
+    -->
185
+    delete from business_plan
186
+    where id = #{id,jdbcType=INTEGER}
187
+  </delete>
188
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" >
189
+    <!--
190
+      WARNING - @mbggenerated
191
+      This element is automatically generated by MyBatis Generator, do not modify.
192
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
193
+    -->
194
+    delete from business_plan
195
+    <if test="_parameter != null" >
196
+      <include refid="Example_Where_Clause" />
197
+    </if>
198
+  </delete>
199
+  <insert id="insert"  useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.business.model.BusinessPlan" >
200
+    <!--
201
+      WARNING - @mbggenerated
202
+      This element is automatically generated by MyBatis Generator, do not modify.
203
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
204
+    -->
205
+    insert into business_plan (id, plan_number, plan_title, 
206
+      reference_number, plan_desc, execute_type, 
207
+      out_amount, in_amount, out_total_price, 
208
+      in_total_price, customer_plan_state, plan_customer, 
209
+      audit_state, process_instance_id, process_definition_id, 
210
+      current_approve_path, agree_time, creater_id, 
211
+      creater, create_time, create_unit, 
212
+      org_id, in_application, total_quantity, 
213
+      report_date, send_date, province_remark, 
214
+      enterprise_remark, attribute_type, refuse_reason, 
215
+      updatetime, jhnd, kszxrq, 
216
+      jzzxrq)
217
+    values (#{id,jdbcType=INTEGER}, #{planNumber,jdbcType=VARCHAR}, #{planTitle,jdbcType=VARCHAR}, 
218
+      #{referenceNumber,jdbcType=VARCHAR}, #{planDesc,jdbcType=VARCHAR}, #{executeType,jdbcType=INTEGER}, 
219
+      #{outAmount,jdbcType=VARCHAR}, #{inAmount,jdbcType=VARCHAR}, #{outTotalPrice,jdbcType=VARCHAR}, 
220
+      #{inTotalPrice,jdbcType=VARCHAR}, #{customerPlanState,jdbcType=VARCHAR}, #{planCustomer,jdbcType=VARCHAR}, 
221
+      #{auditState,jdbcType=VARCHAR}, #{processInstanceId,jdbcType=VARCHAR}, #{processDefinitionId,jdbcType=VARCHAR}, 
222
+      #{currentApprovePath,jdbcType=VARCHAR}, #{agreeTime,jdbcType=TIMESTAMP}, #{createrId,jdbcType=INTEGER}, 
223
+      #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUnit,jdbcType=VARCHAR}, 
224
+      #{orgId,jdbcType=INTEGER}, #{inApplication,jdbcType=INTEGER}, #{totalQuantity,jdbcType=VARCHAR}, 
225
+      #{reportDate,jdbcType=TIMESTAMP}, #{sendDate,jdbcType=TIMESTAMP}, #{provinceRemark,jdbcType=VARCHAR}, 
226
+      #{enterpriseRemark,jdbcType=VARCHAR}, #{attributeType,jdbcType=INTEGER}, #{refuseReason,jdbcType=VARCHAR}, 
227
+      #{updatetime,jdbcType=TIMESTAMP}, #{jhnd,jdbcType=VARCHAR}, #{kszxrq,jdbcType=TIMESTAMP}, 
228
+      #{jzzxrq,jdbcType=TIMESTAMP})
229
+  </insert>
230
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessPlan" >
231
+    <!--
232
+      WARNING - @mbggenerated
233
+      This element is automatically generated by MyBatis Generator, do not modify.
234
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
235
+    -->
236
+    insert into business_plan
237
+    <trim prefix="(" suffix=")" suffixOverrides="," >
238
+      <if test="id != null" >
239
+        id,
240
+      </if>
241
+      <if test="planNumber != null" >
242
+        plan_number,
243
+      </if>
244
+      <if test="planTitle != null" >
245
+        plan_title,
246
+      </if>
247
+      <if test="referenceNumber != null" >
248
+        reference_number,
249
+      </if>
250
+      <if test="planDesc != null" >
251
+        plan_desc,
252
+      </if>
253
+      <if test="executeType != null" >
254
+        execute_type,
255
+      </if>
256
+      <if test="outAmount != null" >
257
+        out_amount,
258
+      </if>
259
+      <if test="inAmount != null" >
260
+        in_amount,
261
+      </if>
262
+      <if test="outTotalPrice != null" >
263
+        out_total_price,
264
+      </if>
265
+      <if test="inTotalPrice != null" >
266
+        in_total_price,
267
+      </if>
268
+      <if test="customerPlanState != null" >
269
+        customer_plan_state,
270
+      </if>
271
+      <if test="planCustomer != null" >
272
+        plan_customer,
273
+      </if>
274
+      <if test="auditState != null" >
275
+        audit_state,
276
+      </if>
277
+      <if test="processInstanceId != null" >
278
+        process_instance_id,
279
+      </if>
280
+      <if test="processDefinitionId != null" >
281
+        process_definition_id,
282
+      </if>
283
+      <if test="currentApprovePath != null" >
284
+        current_approve_path,
285
+      </if>
286
+      <if test="agreeTime != null" >
287
+        agree_time,
288
+      </if>
289
+      <if test="createrId != null" >
290
+        creater_id,
291
+      </if>
292
+      <if test="creater != null" >
293
+        creater,
294
+      </if>
295
+      <if test="createTime != null" >
296
+        create_time,
297
+      </if>
298
+      <if test="createUnit != null" >
299
+        create_unit,
300
+      </if>
301
+      <if test="orgId != null" >
302
+        org_id,
303
+      </if>
304
+      <if test="inApplication != null" >
305
+        in_application,
306
+      </if>
307
+      <if test="totalQuantity != null" >
308
+        total_quantity,
309
+      </if>
310
+      <if test="reportDate != null" >
311
+        report_date,
312
+      </if>
313
+      <if test="sendDate != null" >
314
+        send_date,
315
+      </if>
316
+      <if test="provinceRemark != null" >
317
+        province_remark,
318
+      </if>
319
+      <if test="enterpriseRemark != null" >
320
+        enterprise_remark,
321
+      </if>
322
+      <if test="attributeType != null" >
323
+        attribute_type,
324
+      </if>
325
+      <if test="refuseReason != null" >
326
+        refuse_reason,
327
+      </if>
328
+      <if test="updatetime != null" >
329
+        updatetime,
330
+      </if>
331
+      <if test="jhnd != null" >
332
+        jhnd,
333
+      </if>
334
+      <if test="kszxrq != null" >
335
+        kszxrq,
336
+      </if>
337
+      <if test="jzzxrq != null" >
338
+        jzzxrq,
339
+      </if>
340
+    </trim>
341
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
342
+      <if test="id != null" >
343
+        #{id,jdbcType=INTEGER},
344
+      </if>
345
+      <if test="planNumber != null" >
346
+        #{planNumber,jdbcType=VARCHAR},
347
+      </if>
348
+      <if test="planTitle != null" >
349
+        #{planTitle,jdbcType=VARCHAR},
350
+      </if>
351
+      <if test="referenceNumber != null" >
352
+        #{referenceNumber,jdbcType=VARCHAR},
353
+      </if>
354
+      <if test="planDesc != null" >
355
+        #{planDesc,jdbcType=VARCHAR},
356
+      </if>
357
+      <if test="executeType != null" >
358
+        #{executeType,jdbcType=INTEGER},
359
+      </if>
360
+      <if test="outAmount != null" >
361
+        #{outAmount,jdbcType=VARCHAR},
362
+      </if>
363
+      <if test="inAmount != null" >
364
+        #{inAmount,jdbcType=VARCHAR},
365
+      </if>
366
+      <if test="outTotalPrice != null" >
367
+        #{outTotalPrice,jdbcType=VARCHAR},
368
+      </if>
369
+      <if test="inTotalPrice != null" >
370
+        #{inTotalPrice,jdbcType=VARCHAR},
371
+      </if>
372
+      <if test="customerPlanState != null" >
373
+        #{customerPlanState,jdbcType=VARCHAR},
374
+      </if>
375
+      <if test="planCustomer != null" >
376
+        #{planCustomer,jdbcType=VARCHAR},
377
+      </if>
378
+      <if test="auditState != null" >
379
+        #{auditState,jdbcType=VARCHAR},
380
+      </if>
381
+      <if test="processInstanceId != null" >
382
+        #{processInstanceId,jdbcType=VARCHAR},
383
+      </if>
384
+      <if test="processDefinitionId != null" >
385
+        #{processDefinitionId,jdbcType=VARCHAR},
386
+      </if>
387
+      <if test="currentApprovePath != null" >
388
+        #{currentApprovePath,jdbcType=VARCHAR},
389
+      </if>
390
+      <if test="agreeTime != null" >
391
+        #{agreeTime,jdbcType=TIMESTAMP},
392
+      </if>
393
+      <if test="createrId != null" >
394
+        #{createrId,jdbcType=INTEGER},
395
+      </if>
396
+      <if test="creater != null" >
397
+        #{creater,jdbcType=VARCHAR},
398
+      </if>
399
+      <if test="createTime != null" >
400
+        #{createTime,jdbcType=TIMESTAMP},
401
+      </if>
402
+      <if test="createUnit != null" >
403
+        #{createUnit,jdbcType=VARCHAR},
404
+      </if>
405
+      <if test="orgId != null" >
406
+        #{orgId,jdbcType=INTEGER},
407
+      </if>
408
+      <if test="inApplication != null" >
409
+        #{inApplication,jdbcType=INTEGER},
410
+      </if>
411
+      <if test="totalQuantity != null" >
412
+        #{totalQuantity,jdbcType=VARCHAR},
413
+      </if>
414
+      <if test="reportDate != null" >
415
+        #{reportDate,jdbcType=TIMESTAMP},
416
+      </if>
417
+      <if test="sendDate != null" >
418
+        #{sendDate,jdbcType=TIMESTAMP},
419
+      </if>
420
+      <if test="provinceRemark != null" >
421
+        #{provinceRemark,jdbcType=VARCHAR},
422
+      </if>
423
+      <if test="enterpriseRemark != null" >
424
+        #{enterpriseRemark,jdbcType=VARCHAR},
425
+      </if>
426
+      <if test="attributeType != null" >
427
+        #{attributeType,jdbcType=INTEGER},
428
+      </if>
429
+      <if test="refuseReason != null" >
430
+        #{refuseReason,jdbcType=VARCHAR},
431
+      </if>
432
+      <if test="updatetime != null" >
433
+        #{updatetime,jdbcType=TIMESTAMP},
434
+      </if>
435
+      <if test="jhnd != null" >
436
+        #{jhnd,jdbcType=VARCHAR},
437
+      </if>
438
+      <if test="kszxrq != null" >
439
+        #{kszxrq,jdbcType=TIMESTAMP},
440
+      </if>
441
+      <if test="jzzxrq != null" >
442
+        #{jzzxrq,jdbcType=TIMESTAMP},
443
+      </if>
444
+    </trim>
445
+  </insert>
446
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" resultType="java.lang.Integer" >
447
+    <!--
448
+      WARNING - @mbggenerated
449
+      This element is automatically generated by MyBatis Generator, do not modify.
450
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
451
+    -->
452
+    select count(*) from business_plan
453
+    <if test="_parameter != null" >
454
+      <include refid="Example_Where_Clause" />
455
+    </if>
456
+  </select>
457
+  <update id="updateByExampleSelective" parameterType="map" >
458
+    <!--
459
+      WARNING - @mbggenerated
460
+      This element is automatically generated by MyBatis Generator, do not modify.
461
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
462
+    -->
463
+    update business_plan
464
+    <set >
465
+      <if test="record.id != null" >
466
+        id = #{record.id,jdbcType=INTEGER},
467
+      </if>
468
+      <if test="record.planNumber != null" >
469
+        plan_number = #{record.planNumber,jdbcType=VARCHAR},
470
+      </if>
471
+      <if test="record.planTitle != null" >
472
+        plan_title = #{record.planTitle,jdbcType=VARCHAR},
473
+      </if>
474
+      <if test="record.referenceNumber != null" >
475
+        reference_number = #{record.referenceNumber,jdbcType=VARCHAR},
476
+      </if>
477
+      <if test="record.planDesc != null" >
478
+        plan_desc = #{record.planDesc,jdbcType=VARCHAR},
479
+      </if>
480
+      <if test="record.executeType != null" >
481
+        execute_type = #{record.executeType,jdbcType=INTEGER},
482
+      </if>
483
+      <if test="record.outAmount != null" >
484
+        out_amount = #{record.outAmount,jdbcType=VARCHAR},
485
+      </if>
486
+      <if test="record.inAmount != null" >
487
+        in_amount = #{record.inAmount,jdbcType=VARCHAR},
488
+      </if>
489
+      <if test="record.outTotalPrice != null" >
490
+        out_total_price = #{record.outTotalPrice,jdbcType=VARCHAR},
491
+      </if>
492
+      <if test="record.inTotalPrice != null" >
493
+        in_total_price = #{record.inTotalPrice,jdbcType=VARCHAR},
494
+      </if>
495
+      <if test="record.customerPlanState != null" >
496
+        customer_plan_state = #{record.customerPlanState,jdbcType=VARCHAR},
497
+      </if>
498
+      <if test="record.planCustomer != null" >
499
+        plan_customer = #{record.planCustomer,jdbcType=VARCHAR},
500
+      </if>
501
+      <if test="record.auditState != null" >
502
+        audit_state = #{record.auditState,jdbcType=VARCHAR},
503
+      </if>
504
+      <if test="record.processInstanceId != null" >
505
+        process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
506
+      </if>
507
+      <if test="record.processDefinitionId != null" >
508
+        process_definition_id = #{record.processDefinitionId,jdbcType=VARCHAR},
509
+      </if>
510
+      <if test="record.currentApprovePath != null" >
511
+        current_approve_path = #{record.currentApprovePath,jdbcType=VARCHAR},
512
+      </if>
513
+      <if test="record.agreeTime != null" >
514
+        agree_time = #{record.agreeTime,jdbcType=TIMESTAMP},
515
+      </if>
516
+      <if test="record.createrId != null" >
517
+        creater_id = #{record.createrId,jdbcType=INTEGER},
518
+      </if>
519
+      <if test="record.creater != null" >
520
+        creater = #{record.creater,jdbcType=VARCHAR},
521
+      </if>
522
+      <if test="record.createTime != null" >
523
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
524
+      </if>
525
+      <if test="record.createUnit != null" >
526
+        create_unit = #{record.createUnit,jdbcType=VARCHAR},
527
+      </if>
528
+      <if test="record.orgId != null" >
529
+        org_id = #{record.orgId,jdbcType=INTEGER},
530
+      </if>
531
+      <if test="record.inApplication != null" >
532
+        in_application = #{record.inApplication,jdbcType=INTEGER},
533
+      </if>
534
+      <if test="record.totalQuantity != null" >
535
+        total_quantity = #{record.totalQuantity,jdbcType=VARCHAR},
536
+      </if>
537
+      <if test="record.reportDate != null" >
538
+        report_date = #{record.reportDate,jdbcType=TIMESTAMP},
539
+      </if>
540
+      <if test="record.sendDate != null" >
541
+        send_date = #{record.sendDate,jdbcType=TIMESTAMP},
542
+      </if>
543
+      <if test="record.provinceRemark != null" >
544
+        province_remark = #{record.provinceRemark,jdbcType=VARCHAR},
545
+      </if>
546
+      <if test="record.enterpriseRemark != null" >
547
+        enterprise_remark = #{record.enterpriseRemark,jdbcType=VARCHAR},
548
+      </if>
549
+      <if test="record.attributeType != null" >
550
+        attribute_type = #{record.attributeType,jdbcType=INTEGER},
551
+      </if>
552
+      <if test="record.refuseReason != null" >
553
+        refuse_reason = #{record.refuseReason,jdbcType=VARCHAR},
554
+      </if>
555
+      <if test="record.updatetime != null" >
556
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
557
+      </if>
558
+      <if test="record.jhnd != null" >
559
+        jhnd = #{record.jhnd,jdbcType=VARCHAR},
560
+      </if>
561
+      <if test="record.kszxrq != null" >
562
+        kszxrq = #{record.kszxrq,jdbcType=TIMESTAMP},
563
+      </if>
564
+      <if test="record.jzzxrq != null" >
565
+        jzzxrq = #{record.jzzxrq,jdbcType=TIMESTAMP},
566
+      </if>
567
+    </set>
568
+    <if test="_parameter != null" >
569
+      <include refid="Update_By_Example_Where_Clause" />
570
+    </if>
571
+  </update>
572
+  <update id="updateByExample" parameterType="map" >
573
+    <!--
574
+      WARNING - @mbggenerated
575
+      This element is automatically generated by MyBatis Generator, do not modify.
576
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
577
+    -->
578
+    update business_plan
579
+    set id = #{record.id,jdbcType=INTEGER},
580
+      plan_number = #{record.planNumber,jdbcType=VARCHAR},
581
+      plan_title = #{record.planTitle,jdbcType=VARCHAR},
582
+      reference_number = #{record.referenceNumber,jdbcType=VARCHAR},
583
+      plan_desc = #{record.planDesc,jdbcType=VARCHAR},
584
+      execute_type = #{record.executeType,jdbcType=INTEGER},
585
+      out_amount = #{record.outAmount,jdbcType=VARCHAR},
586
+      in_amount = #{record.inAmount,jdbcType=VARCHAR},
587
+      out_total_price = #{record.outTotalPrice,jdbcType=VARCHAR},
588
+      in_total_price = #{record.inTotalPrice,jdbcType=VARCHAR},
589
+      customer_plan_state = #{record.customerPlanState,jdbcType=VARCHAR},
590
+      plan_customer = #{record.planCustomer,jdbcType=VARCHAR},
591
+      audit_state = #{record.auditState,jdbcType=VARCHAR},
592
+      process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
593
+      process_definition_id = #{record.processDefinitionId,jdbcType=VARCHAR},
594
+      current_approve_path = #{record.currentApprovePath,jdbcType=VARCHAR},
595
+      agree_time = #{record.agreeTime,jdbcType=TIMESTAMP},
596
+      creater_id = #{record.createrId,jdbcType=INTEGER},
597
+      creater = #{record.creater,jdbcType=VARCHAR},
598
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
599
+      create_unit = #{record.createUnit,jdbcType=VARCHAR},
600
+      org_id = #{record.orgId,jdbcType=INTEGER},
601
+      in_application = #{record.inApplication,jdbcType=INTEGER},
602
+      total_quantity = #{record.totalQuantity,jdbcType=VARCHAR},
603
+      report_date = #{record.reportDate,jdbcType=TIMESTAMP},
604
+      send_date = #{record.sendDate,jdbcType=TIMESTAMP},
605
+      province_remark = #{record.provinceRemark,jdbcType=VARCHAR},
606
+      enterprise_remark = #{record.enterpriseRemark,jdbcType=VARCHAR},
607
+      attribute_type = #{record.attributeType,jdbcType=INTEGER},
608
+      refuse_reason = #{record.refuseReason,jdbcType=VARCHAR},
609
+      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
610
+      jhnd = #{record.jhnd,jdbcType=VARCHAR},
611
+      kszxrq = #{record.kszxrq,jdbcType=TIMESTAMP},
612
+      jzzxrq = #{record.jzzxrq,jdbcType=TIMESTAMP}
613
+    <if test="_parameter != null" >
614
+      <include refid="Update_By_Example_Where_Clause" />
615
+    </if>
616
+  </update>
617
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessPlan" >
618
+    <!--
619
+      WARNING - @mbggenerated
620
+      This element is automatically generated by MyBatis Generator, do not modify.
621
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
622
+    -->
623
+    update business_plan
624
+    <set >
625
+      <if test="planNumber != null" >
626
+        plan_number = #{planNumber,jdbcType=VARCHAR},
627
+      </if>
628
+      <if test="planTitle != null" >
629
+        plan_title = #{planTitle,jdbcType=VARCHAR},
630
+      </if>
631
+      <if test="referenceNumber != null" >
632
+        reference_number = #{referenceNumber,jdbcType=VARCHAR},
633
+      </if>
634
+      <if test="planDesc != null" >
635
+        plan_desc = #{planDesc,jdbcType=VARCHAR},
636
+      </if>
637
+      <if test="executeType != null" >
638
+        execute_type = #{executeType,jdbcType=INTEGER},
639
+      </if>
640
+      <if test="outAmount != null" >
641
+        out_amount = #{outAmount,jdbcType=VARCHAR},
642
+      </if>
643
+      <if test="inAmount != null" >
644
+        in_amount = #{inAmount,jdbcType=VARCHAR},
645
+      </if>
646
+      <if test="outTotalPrice != null" >
647
+        out_total_price = #{outTotalPrice,jdbcType=VARCHAR},
648
+      </if>
649
+      <if test="inTotalPrice != null" >
650
+        in_total_price = #{inTotalPrice,jdbcType=VARCHAR},
651
+      </if>
652
+      <if test="customerPlanState != null" >
653
+        customer_plan_state = #{customerPlanState,jdbcType=VARCHAR},
654
+      </if>
655
+      <if test="planCustomer != null" >
656
+        plan_customer = #{planCustomer,jdbcType=VARCHAR},
657
+      </if>
658
+      <if test="auditState != null" >
659
+        audit_state = #{auditState,jdbcType=VARCHAR},
660
+      </if>
661
+      <if test="processInstanceId != null" >
662
+        process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
663
+      </if>
664
+      <if test="processDefinitionId != null" >
665
+        process_definition_id = #{processDefinitionId,jdbcType=VARCHAR},
666
+      </if>
667
+      <if test="currentApprovePath != null" >
668
+        current_approve_path = #{currentApprovePath,jdbcType=VARCHAR},
669
+      </if>
670
+      <if test="agreeTime != null" >
671
+        agree_time = #{agreeTime,jdbcType=TIMESTAMP},
672
+      </if>
673
+      <if test="createrId != null" >
674
+        creater_id = #{createrId,jdbcType=INTEGER},
675
+      </if>
676
+      <if test="creater != null" >
677
+        creater = #{creater,jdbcType=VARCHAR},
678
+      </if>
679
+      <if test="createTime != null" >
680
+        create_time = #{createTime,jdbcType=TIMESTAMP},
681
+      </if>
682
+      <if test="createUnit != null" >
683
+        create_unit = #{createUnit,jdbcType=VARCHAR},
684
+      </if>
685
+      <if test="orgId != null" >
686
+        org_id = #{orgId,jdbcType=INTEGER},
687
+      </if>
688
+      <if test="inApplication != null" >
689
+        in_application = #{inApplication,jdbcType=INTEGER},
690
+      </if>
691
+      <if test="totalQuantity != null" >
692
+        total_quantity = #{totalQuantity,jdbcType=VARCHAR},
693
+      </if>
694
+      <if test="reportDate != null" >
695
+        report_date = #{reportDate,jdbcType=TIMESTAMP},
696
+      </if>
697
+      <if test="sendDate != null" >
698
+        send_date = #{sendDate,jdbcType=TIMESTAMP},
699
+      </if>
700
+      <if test="provinceRemark != null" >
701
+        province_remark = #{provinceRemark,jdbcType=VARCHAR},
702
+      </if>
703
+      <if test="enterpriseRemark != null" >
704
+        enterprise_remark = #{enterpriseRemark,jdbcType=VARCHAR},
705
+      </if>
706
+      <if test="attributeType != null" >
707
+        attribute_type = #{attributeType,jdbcType=INTEGER},
708
+      </if>
709
+      <if test="refuseReason != null" >
710
+        refuse_reason = #{refuseReason,jdbcType=VARCHAR},
711
+      </if>
712
+      <if test="updatetime != null" >
713
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
714
+      </if>
715
+      <if test="jhnd != null" >
716
+        jhnd = #{jhnd,jdbcType=VARCHAR},
717
+      </if>
718
+      <if test="kszxrq != null" >
719
+        kszxrq = #{kszxrq,jdbcType=TIMESTAMP},
720
+      </if>
721
+      <if test="jzzxrq != null" >
722
+        jzzxrq = #{jzzxrq,jdbcType=TIMESTAMP},
723
+      </if>
724
+    </set>
725
+    where id = #{id,jdbcType=INTEGER}
726
+  </update>
727
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessPlan" >
728
+    <!--
729
+      WARNING - @mbggenerated
730
+      This element is automatically generated by MyBatis Generator, do not modify.
731
+      This element was generated on Tue Jun 02 16:00:58 CST 2020.
732
+    -->
733
+    update business_plan
734
+    set plan_number = #{planNumber,jdbcType=VARCHAR},
735
+      plan_title = #{planTitle,jdbcType=VARCHAR},
736
+      reference_number = #{referenceNumber,jdbcType=VARCHAR},
737
+      plan_desc = #{planDesc,jdbcType=VARCHAR},
738
+      execute_type = #{executeType,jdbcType=INTEGER},
739
+      out_amount = #{outAmount,jdbcType=VARCHAR},
740
+      in_amount = #{inAmount,jdbcType=VARCHAR},
741
+      out_total_price = #{outTotalPrice,jdbcType=VARCHAR},
742
+      in_total_price = #{inTotalPrice,jdbcType=VARCHAR},
743
+      customer_plan_state = #{customerPlanState,jdbcType=VARCHAR},
744
+      plan_customer = #{planCustomer,jdbcType=VARCHAR},
745
+      audit_state = #{auditState,jdbcType=VARCHAR},
746
+      process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
747
+      process_definition_id = #{processDefinitionId,jdbcType=VARCHAR},
748
+      current_approve_path = #{currentApprovePath,jdbcType=VARCHAR},
749
+      agree_time = #{agreeTime,jdbcType=TIMESTAMP},
750
+      creater_id = #{createrId,jdbcType=INTEGER},
751
+      creater = #{creater,jdbcType=VARCHAR},
752
+      create_time = #{createTime,jdbcType=TIMESTAMP},
753
+      create_unit = #{createUnit,jdbcType=VARCHAR},
754
+      org_id = #{orgId,jdbcType=INTEGER},
755
+      in_application = #{inApplication,jdbcType=INTEGER},
756
+      total_quantity = #{totalQuantity,jdbcType=VARCHAR},
757
+      report_date = #{reportDate,jdbcType=TIMESTAMP},
758
+      send_date = #{sendDate,jdbcType=TIMESTAMP},
759
+      province_remark = #{provinceRemark,jdbcType=VARCHAR},
760
+      enterprise_remark = #{enterpriseRemark,jdbcType=VARCHAR},
761
+      attribute_type = #{attributeType,jdbcType=INTEGER},
762
+      refuse_reason = #{refuseReason,jdbcType=VARCHAR},
763
+      updatetime = #{updatetime,jdbcType=TIMESTAMP},
764
+      jhnd = #{jhnd,jdbcType=VARCHAR},
765
+      kszxrq = #{kszxrq,jdbcType=TIMESTAMP},
766
+      jzzxrq = #{jzzxrq,jdbcType=TIMESTAMP}
767
+    where id = #{id,jdbcType=INTEGER}
768
+  </update>
769
+  
770
+   <select id="getApprovalList" resultMap="approvalResultMap" parameterType="java.util.Map" >
771
+    select
772
+        a.id id, a.plan_number plan_number, a.reference_number reference_number, a.execute_type execute_type,
773
+        a.in_amount in_amount,a.out_amount out_amount, a.create_time create_time,
774
+        a.process_instance_id process_instance_id,
775
+        a.process_definition_id process_definition_id,
776
+        b.id auditId,
777
+        b.result result, b.task_id task_id,b.task_name task_name
778
+    from business_plan a, business_approval b
779
+    <where>
780
+        a.process_instance_id = b.process_instance_id
781
+        and
782
+        a.audit_state != 0
783
+        <if test="operator != null">
784
+           and b.operator = #{operator}
785
+        </if>
786
+        <if test="result != null">
787
+           and b.result = #{result}
788
+        </if>
789
+        <if test="planNumber != null">
790
+           and a.plan_number LIKE CONCAT(CONCAT('%', #{planNumber}), '%')
791
+        </if>
792
+        <if test="attributeType != null">
793
+           and a.attribute_type = #{attributeType}
794
+        </if>
795
+        <if test="executeType != null">
796
+           and a.execute_type = #{executeType}
797
+        </if>
798
+        order by FIELD(b.result, '待审批', '同意', '驳回', '拒绝'), b.create_time desc
799
+    </where>
800
+  </select>
801
+
802
+  <select id="selectByExampleToVO" resultMap="approvalResultMap" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" >select
803
+    <if test="distinct" >
804
+      distinct
805
+    </if>
806
+    <include refid="Base_Column_List" />
807
+    from business_plan
808
+    <if test="_parameter != null" >
809
+      <include refid="Example_Where_Clause" />
810
+    </if>
811
+    <if test="orderByClause != null" >
812
+      order by ${orderByClause}
813
+    </if>
814
+  </select>
815
+
816
+  <update id="updateByStatus" parameterType="java.lang.Integer">
817
+  	update business_plan set customer_plan_state=1 where id=#{id};
818
+  </update>
819
+
820
+ <!-- 审批结束的(audit_state = 2),终止(in_application = 3),已上报的(customer_plan_state=50)的轮换计划(execute_type=3156)-->
821
+  <select id="getAcceptanceList" resultMap="approvalResultMap" parameterType="java.util.Map" >
822
+    SELECT
823
+      a.id id,a.plan_number plan_number,a.reference_number reference_number,
824
+      a.execute_type execute_type,
825
+      a.customer_plan_state customer_plan_state,
826
+      a.in_application in_application,
827
+      detail.grain_kind grain_kind,
828
+      detail.grain_attribute grain_attribute,
829
+      detail.grain_annual grain_annual,
830
+      detail.house_id house_id,
831
+      detail.warehouse_id warehouse_id,
832
+      a.create_time create_time,
833
+      a.process_instance_id process_instance_id,
834
+      a.process_definition_id process_definition_id,
835
+      a.plan_title plan_title,
836
+      acceptance.application_date applicationDate,
837
+      acceptance.acceptance_type acceptanceType
838
+    FROM
839
+      business_plan a
840
+    LEFT JOIN business_plan_acceptance acceptance ON acceptance.plan_id = a.id
841
+    LEFT JOIN business_store_ware_detail detail ON detail.zid = a.id
842
+    <where>
843
+      a.audit_state = 2 AND a.in_application = 3 AND a.execute_type=3156 AND customer_plan_state=50
844
+      <if test="planTitle != null">
845
+        and a.plan_title LIKE CONCAT(CONCAT('%', #{planTitle}), '%')
846
+      </if>
847
+      <if test="planNumber != null">
848
+        and a.plan_number LIKE CONCAT(CONCAT('%', #{planNumber}), '%')
849
+      </if>
850
+      order by a.create_time desc
851
+    </where>
852
+  </select>
853
+
854
+  <insert id="addAcceptance" useGeneratedKeys="true" keyProperty="id"  parameterType="java.util.Map">
855
+      INSERT INTO business_plan_acceptance (plan_id, application_date, acceptance_number,acceptance_type) VALUES
856
+      ${sql}
857
+  </insert>
858
+
859
+  <insert id="addAcceptanceDetail" parameterType="java.util.Map">
860
+      INSERT INTO business_plan_acceptance_detail (acceptance_id, qualitycheck_id) VALUES
861
+      ${sqlDetail}
862
+  </insert>
863
+
864
+  <select id="getDataByZJId" resultMap="BaseResultMap" parameterType="java.util.Map" >
865
+    SELECT
866
+        quality.*,house.storehouse_name storehouseName,warehouse.warehouse_name wareHouseName, acceptance.id acceptanceId
867
+    FROM
868
+        business_plan_acceptance acceptance
869
+    INNER JOIN business_plan_acceptance_detail detail ON detail.acceptance_id = acceptance.id
870
+    INNER JOIN storage_qualitycheck quality ON quality.id = detail.qualitycheck_id
871
+    INNER JOIN basic_storehouse house ON house.storehouse_id = quality.house_id
872
+    INNER JOIN basic_warehouse warehouse ON warehouse.warehouse_id = quality.warehouse_id
873
+     where acceptance.plan_id = #{id,jdbcType=VARCHAR}
874
+  </select>
875
+  
876
+  
877
+  <select id="queryAcceptanceList" parameterType="java.util.Map" resultType="java.util.HashMap" >
878
+    select * from business_plan_acceptance a left join business_plan p on a.plan_id=p.id 
879
+    <!-- left join business_plan_acceptance_detail pa on pa.acceptance_id = a.id -->
880
+    <where>
881
+     p.creater_id = #{userId} and p.org_id = #{orgId}
882
+    	<if test="planTitle != null">
883
+          and p.plan_title LIKE CONCAT('%',#{planTitle,jdbcType=VARCHAR},'%')
884
+         </if>
885
+        <if test="planNumber != null">
886
+        and p.plan_number LIKE CONCAT('%',#{planNumber,jdbcType=VARCHAR},'%')
887
+        </if>     		       
888
+        <if test="customerPlanState != null">
889
+        and p.customer_plan_state = #{customerPlanState}
890
+        </if>
891
+        order by p.create_time desc
892
+    </where>
893
+  </select>
894
+  
895
+  <!-- 架空期查询 -->
896
+   <select id="getjkqPlanList" parameterType="java.util.Map" resultType="java.util.HashMap" >
897
+	SELECT
898
+	a.ch,
899
+	a.hwh,
900
+	a.wjh
901
+	FROM
902
+		lsreport_ts.data_kcgl_fcbgz_default a
903
+	LEFT JOIN lsreport_ts.data_kcgl_xckc_default b ON a.DataID = b.DataID
904
+	LEFT JOIN depot.business_delivery_storage_notice c ON b.tzdh = c.bill_number
905
+	LEFT JOIN depot.business_plan d ON  c.plan_number = d.plan_number
906
+	<where>
907
+	<if test="orgId != null">
908
+	AND d.org_id = #{orgId}
909
+	</if>
910
+	<if test="executeType != null">
911
+	AND d.execute_type = #{executeType}
912
+	</if>
913
+	<if test="cjsjA != null and cjsjB != null and cjsjA != '' and cjsjB != ''" >
914
+	AND a.cjsj between #{cjsjA} and #{cjsjB}
915
+	</if>
916
+	<if test="rqA != null and rqB != null and rqA != '' and rqB != ''" >
917
+	AND a.rq between #{rqA} and #{rqB}
918
+	</if>
919
+	</where>
920
+  </select>
921
+  <!-- 查询轮换日期 -->
922
+  <select id="getjkqDayList" parameterType="java.util.Map" resultType="java.util.HashMap" >
923
+	SELECT
924
+	distinct
925
+	a.cjsj AS modifydate,
926
+	a.ch,
927
+	a.hwh,
928
+	a.mxpz,
929
+	a.hwxz,
930
+	a.zcsl,
931
+	SUM(a.srsl) AS srsl,
932
+	c.bill_number,
933
+	c.plan_number AS jhbh,
934
+	(IFNULL(d.customer_plan_state,7))  AS planSp,
935
+	DATE_FORMAT(DATE_ADD(a.cjsj,INTERVAL 1 DAY),'%Y-%m-%d') AS jkqStart,
936
+	DATE_FORMAT(DATE_ADD(a.cjsj,INTERVAL 1 DAY),'%Y-%m-%d') AS jkqEnd,
937
+	a.rq
938
+	FROM
939
+		lsreport_ts.data_kcgl_fcbgz_default a
940
+	LEFT JOIN lsreport_ts.data_kcgl_xckc_default b ON a.DataID = b.DataID
941
+	LEFT JOIN depot.business_delivery_storage_notice c ON b.tzdh = c.bill_number
942
+	LEFT JOIN depot.business_plan d ON c.plan_number = d.plan_number
943
+	<where>
944
+	<if test="orgId != null">
945
+	AND d.org_id = #{orgId}
946
+	</if>
947
+	<if test="ch != null">
948
+	AND a.ch = #{ch}
949
+	</if>
950
+	<if test="hwh != null">
951
+	AND a.hwh = #{hwh}
952
+	</if>
953
+	<if test="wjh != null">
954
+	AND c.plan_number = #{wjh}
955
+	</if>
956
+	<if test="executeType != null">
957
+	AND d.execute_type = #{executeType}
958
+	</if>
959
+	<if test="cjsjA != null and cjsjB != null and cjsjA != '' and cjsjB != ''" >
960
+	AND a.cjsj between #{cjsjA} and #{cjsjB}
961
+	</if>
962
+	<if test="rqA != null and rqB != null and rqA != '' and rqB != ''" >
963
+	AND a.rq between #{rqA} and #{rqB}
964
+	</if>
965
+	</where>
966
+	ORDER BY
967
+	a.rq DESC
968
+  </select>
969
+</mapper>

+ 47 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessSceduleMapper.xml

@@ -0,0 +1,47 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessSceduleMapper" >
4
+  <select id="getPlanSceduleInPlanId" parameterType="java.lang.String" resultType="com.chinaitop.depot.business.model.BusinessScedule">
5
+  	SELECT
6
+		x.kybgh jhId, x.cazylx crkLx, sum(f.srsl) sumRksl, sum(f.zcsl) sumCksl
7
+	FROM
8
+		data_kcgl_xckc_default x,
9
+		data_kcgl_fcbgz_default f
10
+	WHERE
11
+		x.DataID = f.stockdataid
12
+		and x.kybgh IN ${planIds} GROUP BY x.kybgh, x.cazylx;
13
+  </select>
14
+  
15
+  <select id="getContractSceduleInContractId" parameterType="java.lang.String" resultType="com.chinaitop.depot.business.model.BusinessScedule">
16
+  	SELECT
17
+		x.htbh htId, x.cazylx crkLx, sum(f.srsl) sumRksl, sum(f.zcsl) sumCksl
18
+	FROM
19
+		data_kcgl_xckc_default x,
20
+		data_kcgl_fcbgz_default f
21
+	WHERE
22
+		x.DataID = f.stockdataid
23
+		and x.htbh IN ${contractIds} GROUP BY x.htbh, x.cazylx;
24
+  </select>
25
+  
26
+  <select id="getNoticeSceduleInNoticeId" parameterType="java.lang.String" resultType="com.chinaitop.depot.business.model.BusinessScedule">
27
+  	SELECT
28
+		x.tzdh tzdId, x.cazylx crkLx, sum(f.srsl) sumRksl, sum(f.zcsl) sumCksl
29
+	FROM
30
+		data_kcgl_xckc_default x,
31
+		data_kcgl_fcbgz_default f
32
+	WHERE
33
+		x.DataID = f.stockdataid
34
+		and x.tzdh IN ${noticeIds} GROUP BY x.tzdh, x.cazylx;
35
+  </select>
36
+  
37
+  <update id="updateNoticeStatus" parameterType="java.util.Map">
38
+  	UPDATE 
39
+  		fl_bill_relation 
40
+  	SET 
41
+  		FLOWSTATUS = ${FLOWSTATUS}
42
+	WHERE 
43
+		DATAID IN (SELECT DataID FROM data_crkyw_tzdxx_default WHERE tzdh = ${tzdh})
44
+		<!-- 不能修改已经执行完毕的通知单的状态  -->
45
+		and FLOWSTATUS != 2
46
+  </update>
47
+</mapper>

+ 575 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessStoreWareDetailMapper.xml

@@ -0,0 +1,575 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessStoreWareDetailMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="zid" property="zid" jdbcType="INTEGER" />
7
+    <result column="type" property="type" jdbcType="VARCHAR" />
8
+    <result column="house_id" property="houseId" jdbcType="INTEGER" />
9
+    <result column="house_name" property="houseName" jdbcType="VARCHAR" />
10
+    <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
11
+    <result column="warehouse_name" property="warehouseName" jdbcType="VARCHAR" />
12
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
13
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
14
+    <result column="grain_kind" property="grainKind" jdbcType="INTEGER" />
15
+    <result column="grain_detail_kind" property="grainDetailKind" jdbcType="INTEGER" />
16
+    <result column="grain_grade" property="grainGrade" jdbcType="INTEGER" />
17
+    <result column="grain_attribute" property="grainAttribute" jdbcType="INTEGER" />
18
+    <result column="grain_annual" property="grainAnnual" jdbcType="INTEGER" />
19
+    <result column="grain_producing_area" property="grainProducingArea" jdbcType="INTEGER" />
20
+    <result column="in_price" property="inPrice" jdbcType="VARCHAR" />
21
+    <result column="in_count" property="inCount" jdbcType="VARCHAR" />
22
+    <result column="in_detail_total_price" property="inDetailTotalPrice" jdbcType="VARCHAR" />
23
+    <result column="input_time" property="inputTime" jdbcType="TIMESTAMP" />
24
+    <result column="state" property="state" jdbcType="INTEGER" />
25
+    <result column="productive_year" property="productiveYear" jdbcType="INTEGER" />
26
+    <result column="remaining_number" property="remainingNumber" jdbcType="VARCHAR" />
27
+    <result column="out_price" property="outPrice" jdbcType="VARCHAR" />
28
+    <result column="out_count" property="outCount" jdbcType="VARCHAR" />
29
+    <result column="out_detail_total_price" property="outDetailTotalPrice" jdbcType="VARCHAR" />
30
+    <result column="out_remaining_number" property="outRemainingNumber" jdbcType="VARCHAR" />
31
+  </resultMap>
32
+  <sql id="Example_Where_Clause" >
33
+    <where >
34
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
35
+        <if test="criteria.valid" >
36
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
37
+            <foreach collection="criteria.criteria" item="criterion" >
38
+              <choose >
39
+                <when test="criterion.noValue" >
40
+                  and ${criterion.condition}
41
+                </when>
42
+                <when test="criterion.singleValue" >
43
+                  and ${criterion.condition} #{criterion.value}
44
+                </when>
45
+                <when test="criterion.betweenValue" >
46
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
47
+                </when>
48
+                <when test="criterion.listValue" >
49
+                  and ${criterion.condition}
50
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
51
+                    #{listItem}
52
+                  </foreach>
53
+                </when>
54
+              </choose>
55
+            </foreach>
56
+          </trim>
57
+        </if>
58
+      </foreach>
59
+    </where>
60
+  </sql>
61
+  <sql id="Update_By_Example_Where_Clause" >
62
+    <where >
63
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
64
+        <if test="criteria.valid" >
65
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
66
+            <foreach collection="criteria.criteria" item="criterion" >
67
+              <choose >
68
+                <when test="criterion.noValue" >
69
+                  and ${criterion.condition}
70
+                </when>
71
+                <when test="criterion.singleValue" >
72
+                  and ${criterion.condition} #{criterion.value}
73
+                </when>
74
+                <when test="criterion.betweenValue" >
75
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
76
+                </when>
77
+                <when test="criterion.listValue" >
78
+                  and ${criterion.condition}
79
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
80
+                    #{listItem}
81
+                  </foreach>
82
+                </when>
83
+              </choose>
84
+            </foreach>
85
+          </trim>
86
+        </if>
87
+      </foreach>
88
+    </where>
89
+  </sql>
90
+  <sql id="Base_Column_List" >
91
+    id, zid, type, house_id, house_name, warehouse_id, warehouse_name, create_time, org_id, 
92
+    grain_kind, grain_detail_kind, grain_grade, grain_attribute, grain_annual, grain_producing_area, 
93
+    in_price, in_count, in_detail_total_price, input_time, state, productive_year, remaining_number, 
94
+    out_price, out_count, out_detail_total_price, out_remaining_number
95
+  </sql>
96
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" >
97
+    select
98
+    <if test="distinct" >
99
+      distinct
100
+    </if>
101
+    <include refid="Base_Column_List" />
102
+    from business_store_ware_detail
103
+    <if test="_parameter != null" >
104
+      <include refid="Example_Where_Clause" />
105
+    </if>
106
+    <if test="orderByClause != null" >
107
+      order by ${orderByClause}
108
+    </if>
109
+  </select>
110
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
111
+    select 
112
+    <include refid="Base_Column_List" />
113
+    from business_store_ware_detail
114
+    where id = #{id,jdbcType=INTEGER}
115
+  </select>
116
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
117
+    delete from business_store_ware_detail
118
+    where id = #{id,jdbcType=INTEGER}
119
+  </delete>
120
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" >
121
+    delete from business_store_ware_detail
122
+    <if test="_parameter != null" >
123
+      <include refid="Example_Where_Clause" />
124
+    </if>
125
+  </delete>
126
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
127
+    insert into business_store_ware_detail (id, zid, type, 
128
+      house_id, house_name, warehouse_id, 
129
+      warehouse_name, create_time, org_id, 
130
+      grain_kind, grain_detail_kind, grain_grade, 
131
+      grain_attribute, grain_annual, grain_producing_area, 
132
+      in_price, in_count, in_detail_total_price, 
133
+      input_time, state, productive_year, 
134
+      remaining_number, out_price, out_count, 
135
+      out_detail_total_price, out_remaining_number
136
+      )
137
+    values (#{id,jdbcType=INTEGER}, #{zid,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, 
138
+      #{houseId,jdbcType=INTEGER}, #{houseName,jdbcType=VARCHAR}, #{warehouseId,jdbcType=INTEGER}, 
139
+      #{warehouseName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, 
140
+      #{grainKind,jdbcType=INTEGER}, #{grainDetailKind,jdbcType=INTEGER}, #{grainGrade,jdbcType=INTEGER}, 
141
+      #{grainAttribute,jdbcType=INTEGER}, #{grainAnnual,jdbcType=INTEGER}, #{grainProducingArea,jdbcType=INTEGER}, 
142
+      #{inPrice,jdbcType=VARCHAR}, #{inCount,jdbcType=VARCHAR}, #{inDetailTotalPrice,jdbcType=VARCHAR}, 
143
+      #{inputTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER}, #{productiveYear,jdbcType=INTEGER}, 
144
+      #{remainingNumber,jdbcType=VARCHAR}, #{outPrice,jdbcType=VARCHAR}, #{outCount,jdbcType=VARCHAR}, 
145
+      #{outDetailTotalPrice,jdbcType=VARCHAR}, #{outRemainingNumber,jdbcType=VARCHAR}
146
+      )
147
+  </insert>
148
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
149
+    insert into business_store_ware_detail
150
+    <trim prefix="(" suffix=")" suffixOverrides="," >
151
+      <if test="id != null" >
152
+        id,
153
+      </if>
154
+      <if test="zid != null" >
155
+        zid,
156
+      </if>
157
+      <if test="type != null" >
158
+        type,
159
+      </if>
160
+      <if test="houseId != null" >
161
+        house_id,
162
+      </if>
163
+      <if test="houseName != null" >
164
+        house_name,
165
+      </if>
166
+      <if test="warehouseId != null" >
167
+        warehouse_id,
168
+      </if>
169
+      <if test="warehouseName != null" >
170
+        warehouse_name,
171
+      </if>
172
+      <if test="createTime != null" >
173
+        create_time,
174
+      </if>
175
+      <if test="orgId != null" >
176
+        org_id,
177
+      </if>
178
+      <if test="grainKind != null" >
179
+        grain_kind,
180
+      </if>
181
+      <if test="grainDetailKind != null" >
182
+        grain_detail_kind,
183
+      </if>
184
+      <if test="grainGrade != null" >
185
+        grain_grade,
186
+      </if>
187
+      <if test="grainAttribute != null" >
188
+        grain_attribute,
189
+      </if>
190
+      <if test="grainAnnual != null" >
191
+        grain_annual,
192
+      </if>
193
+      <if test="grainProducingArea != null" >
194
+        grain_producing_area,
195
+      </if>
196
+      <if test="inPrice != null" >
197
+        in_price,
198
+      </if>
199
+      <if test="inCount != null" >
200
+        in_count,
201
+      </if>
202
+      <if test="inDetailTotalPrice != null" >
203
+        in_detail_total_price,
204
+      </if>
205
+      <if test="inputTime != null" >
206
+        input_time,
207
+      </if>
208
+      <if test="state != null" >
209
+        state,
210
+      </if>
211
+      <if test="productiveYear != null" >
212
+        productive_year,
213
+      </if>
214
+      <if test="remainingNumber != null" >
215
+        remaining_number,
216
+      </if>
217
+      <if test="outPrice != null" >
218
+        out_price,
219
+      </if>
220
+      <if test="outCount != null" >
221
+        out_count,
222
+      </if>
223
+      <if test="outDetailTotalPrice != null" >
224
+        out_detail_total_price,
225
+      </if>
226
+      <if test="outRemainingNumber != null" >
227
+        out_remaining_number,
228
+      </if>
229
+    </trim>
230
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
231
+      <if test="id != null" >
232
+        #{id,jdbcType=INTEGER},
233
+      </if>
234
+      <if test="zid != null" >
235
+        #{zid,jdbcType=INTEGER},
236
+      </if>
237
+      <if test="type != null" >
238
+        #{type,jdbcType=VARCHAR},
239
+      </if>
240
+      <if test="houseId != null" >
241
+        #{houseId,jdbcType=INTEGER},
242
+      </if>
243
+      <if test="houseName != null" >
244
+        #{houseName,jdbcType=VARCHAR},
245
+      </if>
246
+      <if test="warehouseId != null" >
247
+        #{warehouseId,jdbcType=INTEGER},
248
+      </if>
249
+      <if test="warehouseName != null" >
250
+        #{warehouseName,jdbcType=VARCHAR},
251
+      </if>
252
+      <if test="createTime != null" >
253
+        #{createTime,jdbcType=TIMESTAMP},
254
+      </if>
255
+      <if test="orgId != null" >
256
+        #{orgId,jdbcType=INTEGER},
257
+      </if>
258
+      <if test="grainKind != null" >
259
+        #{grainKind,jdbcType=INTEGER},
260
+      </if>
261
+      <if test="grainDetailKind != null" >
262
+        #{grainDetailKind,jdbcType=INTEGER},
263
+      </if>
264
+      <if test="grainGrade != null" >
265
+        #{grainGrade,jdbcType=INTEGER},
266
+      </if>
267
+      <if test="grainAttribute != null" >
268
+        #{grainAttribute,jdbcType=INTEGER},
269
+      </if>
270
+      <if test="grainAnnual != null" >
271
+        #{grainAnnual,jdbcType=INTEGER},
272
+      </if>
273
+      <if test="grainProducingArea != null" >
274
+        #{grainProducingArea,jdbcType=INTEGER},
275
+      </if>
276
+      <if test="inPrice != null" >
277
+        #{inPrice,jdbcType=VARCHAR},
278
+      </if>
279
+      <if test="inCount != null" >
280
+        #{inCount,jdbcType=VARCHAR},
281
+      </if>
282
+      <if test="inDetailTotalPrice != null" >
283
+        #{inDetailTotalPrice,jdbcType=VARCHAR},
284
+      </if>
285
+      <if test="inputTime != null" >
286
+        #{inputTime,jdbcType=TIMESTAMP},
287
+      </if>
288
+      <if test="state != null" >
289
+        #{state,jdbcType=INTEGER},
290
+      </if>
291
+      <if test="productiveYear != null" >
292
+        #{productiveYear,jdbcType=INTEGER},
293
+      </if>
294
+      <if test="remainingNumber != null" >
295
+        #{remainingNumber,jdbcType=VARCHAR},
296
+      </if>
297
+      <if test="outPrice != null" >
298
+        #{outPrice,jdbcType=VARCHAR},
299
+      </if>
300
+      <if test="outCount != null" >
301
+        #{outCount,jdbcType=VARCHAR},
302
+      </if>
303
+      <if test="outDetailTotalPrice != null" >
304
+        #{outDetailTotalPrice,jdbcType=VARCHAR},
305
+      </if>
306
+      <if test="outRemainingNumber != null" >
307
+        #{outRemainingNumber,jdbcType=VARCHAR},
308
+      </if>
309
+    </trim>
310
+  </insert>
311
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetailExample" resultType="java.lang.Integer" >
312
+    select count(*) from business_store_ware_detail
313
+    <if test="_parameter != null" >
314
+      <include refid="Example_Where_Clause" />
315
+    </if>
316
+  </select>
317
+  <update id="updateByExampleSelective" parameterType="map" >
318
+    update business_store_ware_detail
319
+    <set >
320
+      <if test="record.id != null" >
321
+        id = #{record.id,jdbcType=INTEGER},
322
+      </if>
323
+      <if test="record.zid != null" >
324
+        zid = #{record.zid,jdbcType=INTEGER},
325
+      </if>
326
+      <if test="record.type != null" >
327
+        type = #{record.type,jdbcType=VARCHAR},
328
+      </if>
329
+      <if test="record.houseId != null" >
330
+        house_id = #{record.houseId,jdbcType=INTEGER},
331
+      </if>
332
+      <if test="record.houseName != null" >
333
+        house_name = #{record.houseName,jdbcType=VARCHAR},
334
+      </if>
335
+      <if test="record.warehouseId != null" >
336
+        warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
337
+      </if>
338
+      <if test="record.warehouseName != null" >
339
+        warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
340
+      </if>
341
+      <if test="record.createTime != null" >
342
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
343
+      </if>
344
+      <if test="record.orgId != null" >
345
+        org_id = #{record.orgId,jdbcType=INTEGER},
346
+      </if>
347
+      <if test="record.grainKind != null" >
348
+        grain_kind = #{record.grainKind,jdbcType=INTEGER},
349
+      </if>
350
+      <if test="record.grainDetailKind != null" >
351
+        grain_detail_kind = #{record.grainDetailKind,jdbcType=INTEGER},
352
+      </if>
353
+      <if test="record.grainGrade != null" >
354
+        grain_grade = #{record.grainGrade,jdbcType=INTEGER},
355
+      </if>
356
+      <if test="record.grainAttribute != null" >
357
+        grain_attribute = #{record.grainAttribute,jdbcType=INTEGER},
358
+      </if>
359
+      <if test="record.grainAnnual != null" >
360
+        grain_annual = #{record.grainAnnual,jdbcType=INTEGER},
361
+      </if>
362
+      <if test="record.grainProducingArea != null" >
363
+        grain_producing_area = #{record.grainProducingArea,jdbcType=INTEGER},
364
+      </if>
365
+      <if test="record.inPrice != null" >
366
+        in_price = #{record.inPrice,jdbcType=VARCHAR},
367
+      </if>
368
+      <if test="record.inCount != null" >
369
+        in_count = #{record.inCount,jdbcType=VARCHAR},
370
+      </if>
371
+      <if test="record.inDetailTotalPrice != null" >
372
+        in_detail_total_price = #{record.inDetailTotalPrice,jdbcType=VARCHAR},
373
+      </if>
374
+      <if test="record.inputTime != null" >
375
+        input_time = #{record.inputTime,jdbcType=TIMESTAMP},
376
+      </if>
377
+      <if test="record.state != null" >
378
+        state = #{record.state,jdbcType=INTEGER},
379
+      </if>
380
+      <if test="record.productiveYear != null" >
381
+        productive_year = #{record.productiveYear,jdbcType=INTEGER},
382
+      </if>
383
+      <if test="record.remainingNumber != null" >
384
+        remaining_number = #{record.remainingNumber,jdbcType=VARCHAR},
385
+      </if>
386
+      <if test="record.outPrice != null" >
387
+        out_price = #{record.outPrice,jdbcType=VARCHAR},
388
+      </if>
389
+      <if test="record.outCount != null" >
390
+        out_count = #{record.outCount,jdbcType=VARCHAR},
391
+      </if>
392
+      <if test="record.outDetailTotalPrice != null" >
393
+        out_detail_total_price = #{record.outDetailTotalPrice,jdbcType=VARCHAR},
394
+      </if>
395
+      <if test="record.outRemainingNumber != null" >
396
+        out_remaining_number = #{record.outRemainingNumber,jdbcType=VARCHAR},
397
+      </if>
398
+    </set>
399
+    <if test="_parameter != null" >
400
+      <include refid="Update_By_Example_Where_Clause" />
401
+    </if>
402
+  </update>
403
+  <update id="updateByExample" parameterType="map" >
404
+    update business_store_ware_detail
405
+    set id = #{record.id,jdbcType=INTEGER},
406
+      zid = #{record.zid,jdbcType=INTEGER},
407
+      type = #{record.type,jdbcType=VARCHAR},
408
+      house_id = #{record.houseId,jdbcType=INTEGER},
409
+      house_name = #{record.houseName,jdbcType=VARCHAR},
410
+      warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
411
+      warehouse_name = #{record.warehouseName,jdbcType=VARCHAR},
412
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
413
+      org_id = #{record.orgId,jdbcType=INTEGER},
414
+      grain_kind = #{record.grainKind,jdbcType=INTEGER},
415
+      grain_detail_kind = #{record.grainDetailKind,jdbcType=INTEGER},
416
+      grain_grade = #{record.grainGrade,jdbcType=INTEGER},
417
+      grain_attribute = #{record.grainAttribute,jdbcType=INTEGER},
418
+      grain_annual = #{record.grainAnnual,jdbcType=INTEGER},
419
+      grain_producing_area = #{record.grainProducingArea,jdbcType=INTEGER},
420
+      in_price = #{record.inPrice,jdbcType=VARCHAR},
421
+      in_count = #{record.inCount,jdbcType=VARCHAR},
422
+      in_detail_total_price = #{record.inDetailTotalPrice,jdbcType=VARCHAR},
423
+      input_time = #{record.inputTime,jdbcType=TIMESTAMP},
424
+      state = #{record.state,jdbcType=INTEGER},
425
+      productive_year = #{record.productiveYear,jdbcType=INTEGER},
426
+      remaining_number = #{record.remainingNumber,jdbcType=VARCHAR},
427
+      out_price = #{record.outPrice,jdbcType=VARCHAR},
428
+      out_count = #{record.outCount,jdbcType=VARCHAR},
429
+      out_detail_total_price = #{record.outDetailTotalPrice,jdbcType=VARCHAR},
430
+      out_remaining_number = #{record.outRemainingNumber,jdbcType=VARCHAR}
431
+    <if test="_parameter != null" >
432
+      <include refid="Update_By_Example_Where_Clause" />
433
+    </if>
434
+  </update>
435
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
436
+    update business_store_ware_detail
437
+    <set >
438
+      <if test="zid != null" >
439
+        zid = #{zid,jdbcType=INTEGER},
440
+      </if>
441
+      <if test="type != null" >
442
+        type = #{type,jdbcType=VARCHAR},
443
+      </if>
444
+      <if test="houseId != null" >
445
+        house_id = #{houseId,jdbcType=INTEGER},
446
+      </if>
447
+      <if test="houseName != null" >
448
+        house_name = #{houseName,jdbcType=VARCHAR},
449
+      </if>
450
+      <if test="warehouseId != null" >
451
+        warehouse_id = #{warehouseId,jdbcType=INTEGER},
452
+      </if>
453
+      <if test="warehouseName != null" >
454
+        warehouse_name = #{warehouseName,jdbcType=VARCHAR},
455
+      </if>
456
+      <if test="createTime != null" >
457
+        create_time = #{createTime,jdbcType=TIMESTAMP},
458
+      </if>
459
+      <if test="orgId != null" >
460
+        org_id = #{orgId,jdbcType=INTEGER},
461
+      </if>
462
+      <if test="grainKind != null" >
463
+        grain_kind = #{grainKind,jdbcType=INTEGER},
464
+      </if>
465
+      <if test="grainDetailKind != null" >
466
+        grain_detail_kind = #{grainDetailKind,jdbcType=INTEGER},
467
+      </if>
468
+      <if test="grainGrade != null" >
469
+        grain_grade = #{grainGrade,jdbcType=INTEGER},
470
+      </if>
471
+      <if test="grainAttribute != null" >
472
+        grain_attribute = #{grainAttribute,jdbcType=INTEGER},
473
+      </if>
474
+      <if test="grainAnnual != null" >
475
+        grain_annual = #{grainAnnual,jdbcType=INTEGER},
476
+      </if>
477
+      <if test="grainProducingArea != null" >
478
+        grain_producing_area = #{grainProducingArea,jdbcType=INTEGER},
479
+      </if>
480
+      <if test="inPrice != null" >
481
+        in_price = #{inPrice,jdbcType=VARCHAR},
482
+      </if>
483
+      <if test="inCount != null" >
484
+        in_count = #{inCount,jdbcType=VARCHAR},
485
+      </if>
486
+      <if test="inDetailTotalPrice != null" >
487
+        in_detail_total_price = #{inDetailTotalPrice,jdbcType=VARCHAR},
488
+      </if>
489
+      <if test="inputTime != null" >
490
+        input_time = #{inputTime,jdbcType=TIMESTAMP},
491
+      </if>
492
+      <if test="state != null" >
493
+        state = #{state,jdbcType=INTEGER},
494
+      </if>
495
+      <if test="productiveYear != null" >
496
+        productive_year = #{productiveYear,jdbcType=INTEGER},
497
+      </if>
498
+      <if test="remainingNumber != null" >
499
+        remaining_number = #{remainingNumber,jdbcType=VARCHAR},
500
+      </if>
501
+      <if test="outPrice != null" >
502
+        out_price = #{outPrice,jdbcType=VARCHAR},
503
+      </if>
504
+      <if test="outCount != null" >
505
+        out_count = #{outCount,jdbcType=VARCHAR},
506
+      </if>
507
+      <if test="outDetailTotalPrice != null" >
508
+        out_detail_total_price = #{outDetailTotalPrice,jdbcType=VARCHAR},
509
+      </if>
510
+      <if test="outRemainingNumber != null" >
511
+        out_remaining_number = #{outRemainingNumber,jdbcType=VARCHAR},
512
+      </if>
513
+    </set>
514
+    where id = #{id,jdbcType=INTEGER}
515
+  </update>
516
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessStoreWareDetail" >
517
+    update business_store_ware_detail
518
+    set zid = #{zid,jdbcType=INTEGER},
519
+      type = #{type,jdbcType=VARCHAR},
520
+      house_id = #{houseId,jdbcType=INTEGER},
521
+      house_name = #{houseName,jdbcType=VARCHAR},
522
+      warehouse_id = #{warehouseId,jdbcType=INTEGER},
523
+      warehouse_name = #{warehouseName,jdbcType=VARCHAR},
524
+      create_time = #{createTime,jdbcType=TIMESTAMP},
525
+      org_id = #{orgId,jdbcType=INTEGER},
526
+      grain_kind = #{grainKind,jdbcType=INTEGER},
527
+      grain_detail_kind = #{grainDetailKind,jdbcType=INTEGER},
528
+      grain_grade = #{grainGrade,jdbcType=INTEGER},
529
+      grain_attribute = #{grainAttribute,jdbcType=INTEGER},
530
+      grain_annual = #{grainAnnual,jdbcType=INTEGER},
531
+      grain_producing_area = #{grainProducingArea,jdbcType=INTEGER},
532
+      in_price = #{inPrice,jdbcType=VARCHAR},
533
+      in_count = #{inCount,jdbcType=VARCHAR},
534
+      in_detail_total_price = #{inDetailTotalPrice,jdbcType=VARCHAR},
535
+      input_time = #{inputTime,jdbcType=TIMESTAMP},
536
+      state = #{state,jdbcType=INTEGER},
537
+      productive_year = #{productiveYear,jdbcType=INTEGER},
538
+      remaining_number = #{remainingNumber,jdbcType=VARCHAR},
539
+      out_price = #{outPrice,jdbcType=VARCHAR},
540
+      out_count = #{outCount,jdbcType=VARCHAR},
541
+      out_detail_total_price = #{outDetailTotalPrice,jdbcType=VARCHAR},
542
+      out_remaining_number = #{outRemainingNumber,jdbcType=VARCHAR}
543
+    where id = #{id,jdbcType=INTEGER}
544
+  </update>
545
+  <!-- 通过计划ID获取计划子表数据的已使用数量 -->
546
+  <select id="selectPlanUseCount" parameterType="java.util.Map" resultType="java.util.Map">
547
+    SELECT detail.plan_id, detail.id, detail.house_id,detail.warehouse_id, SUM(detail.in_count) in_count, SUM(detail.out_count) out_count FROM (
548
+	SELECT c.id plan_id, a.id, a.house_id,a.warehouse_id,a.in_count,a.out_count FROM business_store_ware_detail a
549
+	LEFT JOIN business_contract b on b.id=a.zid
550
+	LEFT JOIN business_plan c on c.id=b.plan_bid
551
+	WHERE 1=1 AND a.type='contract' AND b.audit_state!=4 AND b.changing=0
552
+	UNION
553
+	SELECT c.id plan_id, a.id, a.house_id,a.warehouse_id,a.in_count,a.out_count FROM business_store_ware_detail a
554
+	LEFT JOIN business_delivery_storage_notice b on b.id=a.zid
555
+	LEFT JOIN business_plan c on c.id=b.plan_bid
556
+	WHERE 1=1 AND a.type='notice' AND b.audit_state!=4 AND IFNULL(b.contract_bid, 0)=0 
557
+	) detail
558
+	WHERE detail.plan_id=#{plan_id}
559
+	GROUP BY detail.plan_id,detail.house_id,detail.warehouse_id
560
+	ORDER BY detail.id;
561
+  </select>
562
+  <!-- 通过合同ID获取合同子表数据的已使用数量 -->
563
+  <select id="selectContractUseCount" parameterType="java.util.Map" resultType="java.util.Map">
564
+    SELECT detail.contract_id, detail.id, detail.house_id,detail.warehouse_id, SUM(detail.in_count) in_count, SUM(detail.out_count) out_count FROM 
565
+	(
566
+	SELECT c.id contract_id,a.id, a.house_id,a.warehouse_id,a.in_count,a.out_count FROM business_store_ware_detail a
567
+	LEFT JOIN business_delivery_storage_notice b on b.id=a.zid
568
+	LEFT JOIN business_contract c ON c.id=b.contract_bid
569
+	WHERE 1=1 AND a.type='notice' AND b.audit_state!=4
570
+	) detail
571
+	WHERE detail.contract_id=#{contract_id} 
572
+	GROUP BY detail.contract_id,detail.house_id,detail.warehouse_id
573
+	ORDER BY detail.id
574
+  </select>
575
+</mapper>

+ 263 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/BusinessWarningMapper.xml

@@ -0,0 +1,263 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.BusinessWarningMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessWarning" >
5
+    <!--
6
+      WARNING - @mbggenerated
7
+      This element is automatically generated by MyBatis Generator, do not modify.
8
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
9
+    -->
10
+    <id column="id" property="id" jdbcType="INTEGER" />
11
+    <result column="warning_day" property="warningDay" jdbcType="INTEGER" />
12
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
13
+  </resultMap>
14
+  <sql id="Example_Where_Clause" >
15
+    <!--
16
+      WARNING - @mbggenerated
17
+      This element is automatically generated by MyBatis Generator, do not modify.
18
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
19
+    -->
20
+    <where >
21
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
22
+        <if test="criteria.valid" >
23
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
24
+            <foreach collection="criteria.criteria" item="criterion" >
25
+              <choose >
26
+                <when test="criterion.noValue" >
27
+                  and ${criterion.condition}
28
+                </when>
29
+                <when test="criterion.singleValue" >
30
+                  and ${criterion.condition} #{criterion.value}
31
+                </when>
32
+                <when test="criterion.betweenValue" >
33
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
34
+                </when>
35
+                <when test="criterion.listValue" >
36
+                  and ${criterion.condition}
37
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
38
+                    #{listItem}
39
+                  </foreach>
40
+                </when>
41
+              </choose>
42
+            </foreach>
43
+          </trim>
44
+        </if>
45
+      </foreach>
46
+    </where>
47
+  </sql>
48
+  <sql id="Update_By_Example_Where_Clause" >
49
+    <!--
50
+      WARNING - @mbggenerated
51
+      This element is automatically generated by MyBatis Generator, do not modify.
52
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
53
+    -->
54
+    <where >
55
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
56
+        <if test="criteria.valid" >
57
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
58
+            <foreach collection="criteria.criteria" item="criterion" >
59
+              <choose >
60
+                <when test="criterion.noValue" >
61
+                  and ${criterion.condition}
62
+                </when>
63
+                <when test="criterion.singleValue" >
64
+                  and ${criterion.condition} #{criterion.value}
65
+                </when>
66
+                <when test="criterion.betweenValue" >
67
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
68
+                </when>
69
+                <when test="criterion.listValue" >
70
+                  and ${criterion.condition}
71
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
72
+                    #{listItem}
73
+                  </foreach>
74
+                </when>
75
+              </choose>
76
+            </foreach>
77
+          </trim>
78
+        </if>
79
+      </foreach>
80
+    </where>
81
+  </sql>
82
+  <sql id="Base_Column_List" >
83
+    <!--
84
+      WARNING - @mbggenerated
85
+      This element is automatically generated by MyBatis Generator, do not modify.
86
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
87
+    -->
88
+    id, warning_day, org_id
89
+  </sql>
90
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessWarningExample" >
91
+    <!--
92
+      WARNING - @mbggenerated
93
+      This element is automatically generated by MyBatis Generator, do not modify.
94
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
95
+    -->
96
+    select
97
+    <if test="distinct" >
98
+      distinct
99
+    </if>
100
+    <include refid="Base_Column_List" />
101
+    from business_warning
102
+    <if test="_parameter != null" >
103
+      <include refid="Example_Where_Clause" />
104
+    </if>
105
+    <if test="orderByClause != null" >
106
+      order by ${orderByClause}
107
+    </if>
108
+  </select>
109
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
110
+    <!--
111
+      WARNING - @mbggenerated
112
+      This element is automatically generated by MyBatis Generator, do not modify.
113
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
114
+    -->
115
+    select 
116
+    <include refid="Base_Column_List" />
117
+    from business_warning
118
+    where id = #{id,jdbcType=INTEGER}
119
+  </select>
120
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
121
+    <!--
122
+      WARNING - @mbggenerated
123
+      This element is automatically generated by MyBatis Generator, do not modify.
124
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
125
+    -->
126
+    delete from business_warning
127
+    where id = #{id,jdbcType=INTEGER}
128
+  </delete>
129
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessWarningExample" >
130
+    <!--
131
+      WARNING - @mbggenerated
132
+      This element is automatically generated by MyBatis Generator, do not modify.
133
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
134
+    -->
135
+    delete from business_warning
136
+    <if test="_parameter != null" >
137
+      <include refid="Example_Where_Clause" />
138
+    </if>
139
+  </delete>
140
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.BusinessWarning" >
141
+    <!--
142
+      WARNING - @mbggenerated
143
+      This element is automatically generated by MyBatis Generator, do not modify.
144
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
145
+    -->
146
+    insert into business_warning (id, warning_day, org_id
147
+      )
148
+    values (#{id,jdbcType=INTEGER}, #{warningDay,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}
149
+      )
150
+  </insert>
151
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessWarning" >
152
+    <!--
153
+      WARNING - @mbggenerated
154
+      This element is automatically generated by MyBatis Generator, do not modify.
155
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
156
+    -->
157
+    insert into business_warning
158
+    <trim prefix="(" suffix=")" suffixOverrides="," >
159
+      <if test="id != null" >
160
+        id,
161
+      </if>
162
+      <if test="warningDay != null" >
163
+        warning_day,
164
+      </if>
165
+      <if test="orgId != null" >
166
+        org_id,
167
+      </if>
168
+    </trim>
169
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
170
+      <if test="id != null" >
171
+        #{id,jdbcType=INTEGER},
172
+      </if>
173
+      <if test="warningDay != null" >
174
+        #{warningDay,jdbcType=INTEGER},
175
+      </if>
176
+      <if test="orgId != null" >
177
+        #{orgId,jdbcType=INTEGER},
178
+      </if>
179
+    </trim>
180
+  </insert>
181
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessWarningExample" resultType="java.lang.Integer" >
182
+    <!--
183
+      WARNING - @mbggenerated
184
+      This element is automatically generated by MyBatis Generator, do not modify.
185
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
186
+    -->
187
+    select count(*) from business_warning
188
+    <if test="_parameter != null" >
189
+      <include refid="Example_Where_Clause" />
190
+    </if>
191
+  </select>
192
+  <update id="updateByExampleSelective" parameterType="map" >
193
+    <!--
194
+      WARNING - @mbggenerated
195
+      This element is automatically generated by MyBatis Generator, do not modify.
196
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
197
+    -->
198
+    update business_warning
199
+    <set >
200
+      <if test="record.id != null" >
201
+        id = #{record.id,jdbcType=INTEGER},
202
+      </if>
203
+      <if test="record.warningDay != null" >
204
+        warning_day = #{record.warningDay,jdbcType=INTEGER},
205
+      </if>
206
+      <if test="record.orgId != null" >
207
+        org_id = #{record.orgId,jdbcType=INTEGER},
208
+      </if>
209
+    </set>
210
+    <if test="_parameter != null" >
211
+      <include refid="Update_By_Example_Where_Clause" />
212
+    </if>
213
+  </update>
214
+  <update id="updateByExample" parameterType="map" >
215
+    <!--
216
+      WARNING - @mbggenerated
217
+      This element is automatically generated by MyBatis Generator, do not modify.
218
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
219
+    -->
220
+    update business_warning
221
+    set id = #{record.id,jdbcType=INTEGER},
222
+      warning_day = #{record.warningDay,jdbcType=INTEGER},
223
+      org_id = #{record.orgId,jdbcType=INTEGER}
224
+    <if test="_parameter != null" >
225
+      <include refid="Update_By_Example_Where_Clause" />
226
+    </if>
227
+  </update>
228
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessWarning" >
229
+    <!--
230
+      WARNING - @mbggenerated
231
+      This element is automatically generated by MyBatis Generator, do not modify.
232
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
233
+    -->
234
+    update business_warning
235
+    <set >
236
+      <if test="warningDay != null" >
237
+        warning_day = #{warningDay,jdbcType=INTEGER},
238
+      </if>
239
+      <if test="orgId != null" >
240
+        org_id = #{orgId,jdbcType=INTEGER},
241
+      </if>
242
+    </set>
243
+    where id = #{id,jdbcType=INTEGER}
244
+  </update>
245
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessWarning" >
246
+    <!--
247
+      WARNING - @mbggenerated
248
+      This element is automatically generated by MyBatis Generator, do not modify.
249
+      This element was generated on Tue Dec 17 09:53:35 CST 2019.
250
+    -->
251
+    update business_warning
252
+    set warning_day = #{warningDay,jdbcType=INTEGER},
253
+      org_id = #{orgId,jdbcType=INTEGER}
254
+    where id = #{id,jdbcType=INTEGER}
255
+  </update>
256
+  
257
+  <!-- 根据orgId修改数据 -->
258
+  <update id="updateByOrgId" parameterType="com.chinaitop.depot.business.model.BusinessWarning" >
259
+    update business_warning
260
+    set warning_day = #{warningDay,jdbcType=INTEGER}
261
+     where org_id = #{orgId,jdbcType=INTEGER}
262
+  </update>
263
+</mapper>

+ 845 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/OrgInfoMapper.xml

@@ -0,0 +1,845 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.OrgInfoMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.OrgInfo" >
5
+    <id column="org_id" property="orgId" jdbcType="INTEGER" />
6
+    <result column="org_name" property="orgName" jdbcType="VARCHAR" />
7
+    <result column="short_name" property="shortName" jdbcType="VARCHAR" />
8
+    <result column="org_code" property="orgCode" jdbcType="VARCHAR" />
9
+    <result column="org_class_id" property="orgClassId" jdbcType="INTEGER" />
10
+    <result column="company_nature" property="companyNature" jdbcType="INTEGER" />
11
+    <result column="busi_type" property="busiType" jdbcType="INTEGER" />
12
+    <result column="address" property="address" jdbcType="VARCHAR" />
13
+    <result column="contact" property="contact" jdbcType="VARCHAR" />
14
+    <result column="fax" property="fax" jdbcType="VARCHAR" />
15
+    <result column="charge_person" property="chargePerson" jdbcType="VARCHAR" />
16
+    <result column="longitude" property="longitude" jdbcType="VARCHAR" />
17
+    <result column="latitude" property="latitude" jdbcType="VARCHAR" />
18
+    <result column="regist_capital" property="registCapital" jdbcType="INTEGER" />
19
+    <result column="work_number" property="workNumber" jdbcType="INTEGER" />
20
+    <result column="area_code" property="areaCode" jdbcType="INTEGER" />
21
+    <result column="area_name" property="areaName" jdbcType="VARCHAR" />
22
+    <result column="post" property="post" jdbcType="INTEGER" />
23
+    <result column="depot_class" property="depotClass" jdbcType="INTEGER" />
24
+    <result column="design_capacity" property="designCapacity" jdbcType="INTEGER" />
25
+    <result column="effective_capacity" property="effectiveCapacity" jdbcType="INTEGER" />
26
+    <result column="depot_area" property="depotArea" jdbcType="REAL" />
27
+    <result column="complete_date" property="completeDate" jdbcType="TIMESTAMP" />
28
+    <result column="use_date" property="useDate" jdbcType="TIMESTAMP" />
29
+    <result column="company_org_code" property="companyOrgCode" jdbcType="VARCHAR" />
30
+    <result column="credit_code" property="creditCode" jdbcType="VARCHAR" />
31
+    <result column="regist_type" property="registType" jdbcType="INTEGER" />
32
+    <result column="qualification" property="qualification" jdbcType="INTEGER" />
33
+    <result column="independent_corporation" property="independentCorporation" jdbcType="INTEGER" />
34
+    <result column="legal_person" property="legalPerson" jdbcType="VARCHAR" />
35
+    <result column="whether_rent" property="whetherRent" jdbcType="INTEGER" />
36
+    <result column="info_regist" property="infoRegist" jdbcType="VARCHAR" />
37
+    <result column="regist_date" property="registDate" jdbcType="TIMESTAMP" />
38
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
39
+    <result column="parent_id" property="parentId" jdbcType="INTEGER" />
40
+    <result column="status" property="status" jdbcType="INTEGER" />
41
+    <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
42
+    <result column="birds_eye" property="birdsEye" jdbcType="VARCHAR" />
43
+    <result column="birds_Remote" property="birdsRemote" jdbcType="VARCHAR" />
44
+    <result column="brief_introduction" property="briefIntroduction" jdbcType="VARCHAR" />
45
+    <result column="invoice_title" property="invoiceTitle" jdbcType="VARCHAR" />
46
+    <result column="regist_number" property="registNumber" jdbcType="VARCHAR" />
47
+    <result column="bank_name" property="bankName" jdbcType="VARCHAR" />
48
+    <result column="account_name" property="accountName" jdbcType="VARCHAR" />
49
+    <result column="account_number" property="accountNumber" jdbcType="VARCHAR" />
50
+  </resultMap>
51
+  <sql id="Example_Where_Clause" >
52
+    <where >
53
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
54
+        <if test="criteria.valid" >
55
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
56
+            <foreach collection="criteria.criteria" item="criterion" >
57
+              <choose >
58
+                <when test="criterion.noValue" >
59
+                  and ${criterion.condition}
60
+                </when>
61
+                <when test="criterion.singleValue" >
62
+                  and ${criterion.condition} #{criterion.value}
63
+                </when>
64
+                <when test="criterion.betweenValue" >
65
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
66
+                </when>
67
+                <when test="criterion.listValue" >
68
+                  and ${criterion.condition}
69
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
70
+                    #{listItem}
71
+                  </foreach>
72
+                </when>
73
+              </choose>
74
+            </foreach>
75
+          </trim>
76
+        </if>
77
+      </foreach>
78
+    </where>
79
+  </sql>
80
+  <sql id="Update_By_Example_Where_Clause" >
81
+    <where >
82
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
83
+        <if test="criteria.valid" >
84
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
85
+            <foreach collection="criteria.criteria" item="criterion" >
86
+              <choose >
87
+                <when test="criterion.noValue" >
88
+                  and ${criterion.condition}
89
+                </when>
90
+                <when test="criterion.singleValue" >
91
+                  and ${criterion.condition} #{criterion.value}
92
+                </when>
93
+                <when test="criterion.betweenValue" >
94
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
95
+                </when>
96
+                <when test="criterion.listValue" >
97
+                  and ${criterion.condition}
98
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
99
+                    #{listItem}
100
+                  </foreach>
101
+                </when>
102
+              </choose>
103
+            </foreach>
104
+          </trim>
105
+        </if>
106
+      </foreach>
107
+    </where>
108
+  </sql>
109
+  <sql id="Base_Column_List" >
110
+    org_id, org_name, short_name, org_code, org_class_id, company_nature, busi_type, 
111
+    address, contact, fax, charge_person, longitude, latitude, regist_capital, work_number, 
112
+    area_code, area_name, post, depot_class, design_capacity, effective_capacity, depot_area, 
113
+    complete_date, use_date, company_org_code, credit_code, regist_type, qualification, 
114
+    independent_corporation, legal_person, whether_rent, info_regist, regist_date, remark, 
115
+    parent_id, status, del_flag, birds_eye, birds_Remote, brief_introduction, invoice_title, 
116
+    regist_number, bank_name, account_name, account_number
117
+  </sql>
118
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.OrgInfoExample" >
119
+    select
120
+    <if test="distinct" >
121
+      distinct
122
+    </if>
123
+    <include refid="Base_Column_List" />
124
+    from org_info
125
+    <if test="_parameter != null" >
126
+      <include refid="Example_Where_Clause" />
127
+    </if>
128
+    <if test="orderByClause != null" >
129
+      order by ${orderByClause}
130
+    </if>
131
+  </select>
132
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
133
+    select 
134
+    <include refid="Base_Column_List" />
135
+    from org_info
136
+    where org_id = #{orgId,jdbcType=INTEGER}
137
+  </select>
138
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
139
+    delete from org_info
140
+    where org_id = #{orgId,jdbcType=INTEGER}
141
+  </delete>
142
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.OrgInfoExample" >
143
+    delete from org_info
144
+    <if test="_parameter != null" >
145
+      <include refid="Example_Where_Clause" />
146
+    </if>
147
+  </delete>
148
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.OrgInfo" >
149
+    insert into org_info (org_id, org_name, short_name, 
150
+      org_code, org_class_id, company_nature, 
151
+      busi_type, address, contact, 
152
+      fax, charge_person, longitude, 
153
+      latitude, regist_capital, work_number, 
154
+      area_code, area_name, post, 
155
+      depot_class, design_capacity, effective_capacity, 
156
+      depot_area, complete_date, use_date, 
157
+      company_org_code, credit_code, regist_type, 
158
+      qualification, independent_corporation, 
159
+      legal_person, whether_rent, info_regist, 
160
+      regist_date, remark, parent_id, 
161
+      status, del_flag, birds_eye, 
162
+      birds_Remote, brief_introduction, invoice_title, 
163
+      regist_number, bank_name, account_name, 
164
+      account_number)
165
+    values (#{orgId,jdbcType=INTEGER}, #{orgName,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR}, 
166
+      #{orgCode,jdbcType=VARCHAR}, #{orgClassId,jdbcType=INTEGER}, #{companyNature,jdbcType=INTEGER}, 
167
+      #{busiType,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, #{contact,jdbcType=VARCHAR}, 
168
+      #{fax,jdbcType=VARCHAR}, #{chargePerson,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, 
169
+      #{latitude,jdbcType=VARCHAR}, #{registCapital,jdbcType=INTEGER}, #{workNumber,jdbcType=INTEGER}, 
170
+      #{areaCode,jdbcType=INTEGER}, #{areaName,jdbcType=VARCHAR}, #{post,jdbcType=INTEGER}, 
171
+      #{depotClass,jdbcType=INTEGER}, #{designCapacity,jdbcType=INTEGER}, #{effectiveCapacity,jdbcType=INTEGER}, 
172
+      #{depotArea,jdbcType=REAL}, #{completeDate,jdbcType=TIMESTAMP}, #{useDate,jdbcType=TIMESTAMP}, 
173
+      #{companyOrgCode,jdbcType=VARCHAR}, #{creditCode,jdbcType=VARCHAR}, #{registType,jdbcType=INTEGER}, 
174
+      #{qualification,jdbcType=INTEGER}, #{independentCorporation,jdbcType=INTEGER}, 
175
+      #{legalPerson,jdbcType=VARCHAR}, #{whetherRent,jdbcType=INTEGER}, #{infoRegist,jdbcType=VARCHAR}, 
176
+      #{registDate,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, 
177
+      #{status,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{birdsEye,jdbcType=VARCHAR}, 
178
+      #{birdsRemote,jdbcType=VARCHAR}, #{briefIntroduction,jdbcType=VARCHAR}, #{invoiceTitle,jdbcType=VARCHAR}, 
179
+      #{registNumber,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR}, 
180
+      #{accountNumber,jdbcType=VARCHAR})
181
+  </insert>
182
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.OrgInfo" >
183
+    insert into org_info
184
+    <trim prefix="(" suffix=")" suffixOverrides="," >
185
+      <if test="orgId != null" >
186
+        org_id,
187
+      </if>
188
+      <if test="orgName != null" >
189
+        org_name,
190
+      </if>
191
+      <if test="shortName != null" >
192
+        short_name,
193
+      </if>
194
+      <if test="orgCode != null" >
195
+        org_code,
196
+      </if>
197
+      <if test="orgClassId != null" >
198
+        org_class_id,
199
+      </if>
200
+      <if test="companyNature != null" >
201
+        company_nature,
202
+      </if>
203
+      <if test="busiType != null" >
204
+        busi_type,
205
+      </if>
206
+      <if test="address != null" >
207
+        address,
208
+      </if>
209
+      <if test="contact != null" >
210
+        contact,
211
+      </if>
212
+      <if test="fax != null" >
213
+        fax,
214
+      </if>
215
+      <if test="chargePerson != null" >
216
+        charge_person,
217
+      </if>
218
+      <if test="longitude != null" >
219
+        longitude,
220
+      </if>
221
+      <if test="latitude != null" >
222
+        latitude,
223
+      </if>
224
+      <if test="registCapital != null" >
225
+        regist_capital,
226
+      </if>
227
+      <if test="workNumber != null" >
228
+        work_number,
229
+      </if>
230
+      <if test="areaCode != null" >
231
+        area_code,
232
+      </if>
233
+      <if test="areaName != null" >
234
+        area_name,
235
+      </if>
236
+      <if test="post != null" >
237
+        post,
238
+      </if>
239
+      <if test="depotClass != null" >
240
+        depot_class,
241
+      </if>
242
+      <if test="designCapacity != null" >
243
+        design_capacity,
244
+      </if>
245
+      <if test="effectiveCapacity != null" >
246
+        effective_capacity,
247
+      </if>
248
+      <if test="depotArea != null" >
249
+        depot_area,
250
+      </if>
251
+      <if test="completeDate != null" >
252
+        complete_date,
253
+      </if>
254
+      <if test="useDate != null" >
255
+        use_date,
256
+      </if>
257
+      <if test="companyOrgCode != null" >
258
+        company_org_code,
259
+      </if>
260
+      <if test="creditCode != null" >
261
+        credit_code,
262
+      </if>
263
+      <if test="registType != null" >
264
+        regist_type,
265
+      </if>
266
+      <if test="qualification != null" >
267
+        qualification,
268
+      </if>
269
+      <if test="independentCorporation != null" >
270
+        independent_corporation,
271
+      </if>
272
+      <if test="legalPerson != null" >
273
+        legal_person,
274
+      </if>
275
+      <if test="whetherRent != null" >
276
+        whether_rent,
277
+      </if>
278
+      <if test="infoRegist != null" >
279
+        info_regist,
280
+      </if>
281
+      <if test="registDate != null" >
282
+        regist_date,
283
+      </if>
284
+      <if test="remark != null" >
285
+        remark,
286
+      </if>
287
+      <if test="parentId != null" >
288
+        parent_id,
289
+      </if>
290
+      <if test="status != null" >
291
+        status,
292
+      </if>
293
+      <if test="delFlag != null" >
294
+        del_flag,
295
+      </if>
296
+      <if test="birdsEye != null" >
297
+        birds_eye,
298
+      </if>
299
+      <if test="birdsRemote != null" >
300
+        birds_Remote,
301
+      </if>
302
+      <if test="briefIntroduction != null" >
303
+        brief_introduction,
304
+      </if>
305
+      <if test="invoiceTitle != null" >
306
+        invoice_title,
307
+      </if>
308
+      <if test="registNumber != null" >
309
+        regist_number,
310
+      </if>
311
+      <if test="bankName != null" >
312
+        bank_name,
313
+      </if>
314
+      <if test="accountName != null" >
315
+        account_name,
316
+      </if>
317
+      <if test="accountNumber != null" >
318
+        account_number,
319
+      </if>
320
+    </trim>
321
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
322
+      <if test="orgId != null" >
323
+        #{orgId,jdbcType=INTEGER},
324
+      </if>
325
+      <if test="orgName != null" >
326
+        #{orgName,jdbcType=VARCHAR},
327
+      </if>
328
+      <if test="shortName != null" >
329
+        #{shortName,jdbcType=VARCHAR},
330
+      </if>
331
+      <if test="orgCode != null" >
332
+        #{orgCode,jdbcType=VARCHAR},
333
+      </if>
334
+      <if test="orgClassId != null" >
335
+        #{orgClassId,jdbcType=INTEGER},
336
+      </if>
337
+      <if test="companyNature != null" >
338
+        #{companyNature,jdbcType=INTEGER},
339
+      </if>
340
+      <if test="busiType != null" >
341
+        #{busiType,jdbcType=INTEGER},
342
+      </if>
343
+      <if test="address != null" >
344
+        #{address,jdbcType=VARCHAR},
345
+      </if>
346
+      <if test="contact != null" >
347
+        #{contact,jdbcType=VARCHAR},
348
+      </if>
349
+      <if test="fax != null" >
350
+        #{fax,jdbcType=VARCHAR},
351
+      </if>
352
+      <if test="chargePerson != null" >
353
+        #{chargePerson,jdbcType=VARCHAR},
354
+      </if>
355
+      <if test="longitude != null" >
356
+        #{longitude,jdbcType=VARCHAR},
357
+      </if>
358
+      <if test="latitude != null" >
359
+        #{latitude,jdbcType=VARCHAR},
360
+      </if>
361
+      <if test="registCapital != null" >
362
+        #{registCapital,jdbcType=INTEGER},
363
+      </if>
364
+      <if test="workNumber != null" >
365
+        #{workNumber,jdbcType=INTEGER},
366
+      </if>
367
+      <if test="areaCode != null" >
368
+        #{areaCode,jdbcType=INTEGER},
369
+      </if>
370
+      <if test="areaName != null" >
371
+        #{areaName,jdbcType=VARCHAR},
372
+      </if>
373
+      <if test="post != null" >
374
+        #{post,jdbcType=INTEGER},
375
+      </if>
376
+      <if test="depotClass != null" >
377
+        #{depotClass,jdbcType=INTEGER},
378
+      </if>
379
+      <if test="designCapacity != null" >
380
+        #{designCapacity,jdbcType=INTEGER},
381
+      </if>
382
+      <if test="effectiveCapacity != null" >
383
+        #{effectiveCapacity,jdbcType=INTEGER},
384
+      </if>
385
+      <if test="depotArea != null" >
386
+        #{depotArea,jdbcType=REAL},
387
+      </if>
388
+      <if test="completeDate != null" >
389
+        #{completeDate,jdbcType=TIMESTAMP},
390
+      </if>
391
+      <if test="useDate != null" >
392
+        #{useDate,jdbcType=TIMESTAMP},
393
+      </if>
394
+      <if test="companyOrgCode != null" >
395
+        #{companyOrgCode,jdbcType=VARCHAR},
396
+      </if>
397
+      <if test="creditCode != null" >
398
+        #{creditCode,jdbcType=VARCHAR},
399
+      </if>
400
+      <if test="registType != null" >
401
+        #{registType,jdbcType=INTEGER},
402
+      </if>
403
+      <if test="qualification != null" >
404
+        #{qualification,jdbcType=INTEGER},
405
+      </if>
406
+      <if test="independentCorporation != null" >
407
+        #{independentCorporation,jdbcType=INTEGER},
408
+      </if>
409
+      <if test="legalPerson != null" >
410
+        #{legalPerson,jdbcType=VARCHAR},
411
+      </if>
412
+      <if test="whetherRent != null" >
413
+        #{whetherRent,jdbcType=INTEGER},
414
+      </if>
415
+      <if test="infoRegist != null" >
416
+        #{infoRegist,jdbcType=VARCHAR},
417
+      </if>
418
+      <if test="registDate != null" >
419
+        #{registDate,jdbcType=TIMESTAMP},
420
+      </if>
421
+      <if test="remark != null" >
422
+        #{remark,jdbcType=VARCHAR},
423
+      </if>
424
+      <if test="parentId != null" >
425
+        #{parentId,jdbcType=INTEGER},
426
+      </if>
427
+      <if test="status != null" >
428
+        #{status,jdbcType=INTEGER},
429
+      </if>
430
+      <if test="delFlag != null" >
431
+        #{delFlag,jdbcType=INTEGER},
432
+      </if>
433
+      <if test="birdsEye != null" >
434
+        #{birdsEye,jdbcType=VARCHAR},
435
+      </if>
436
+      <if test="birdsRemote != null" >
437
+        #{birdsRemote,jdbcType=VARCHAR},
438
+      </if>
439
+      <if test="briefIntroduction != null" >
440
+        #{briefIntroduction,jdbcType=VARCHAR},
441
+      </if>
442
+      <if test="invoiceTitle != null" >
443
+        #{invoiceTitle,jdbcType=VARCHAR},
444
+      </if>
445
+      <if test="registNumber != null" >
446
+        #{registNumber,jdbcType=VARCHAR},
447
+      </if>
448
+      <if test="bankName != null" >
449
+        #{bankName,jdbcType=VARCHAR},
450
+      </if>
451
+      <if test="accountName != null" >
452
+        #{accountName,jdbcType=VARCHAR},
453
+      </if>
454
+      <if test="accountNumber != null" >
455
+        #{accountNumber,jdbcType=VARCHAR},
456
+      </if>
457
+    </trim>
458
+  </insert>
459
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.OrgInfoExample" resultType="java.lang.Integer" >
460
+    select count(*) from org_info
461
+    <if test="_parameter != null" >
462
+      <include refid="Example_Where_Clause" />
463
+    </if>
464
+  </select>
465
+  <update id="updateByExampleSelective" parameterType="map" >
466
+    update org_info
467
+    <set >
468
+      <if test="record.orgId != null" >
469
+        org_id = #{record.orgId,jdbcType=INTEGER},
470
+      </if>
471
+      <if test="record.orgName != null" >
472
+        org_name = #{record.orgName,jdbcType=VARCHAR},
473
+      </if>
474
+      <if test="record.shortName != null" >
475
+        short_name = #{record.shortName,jdbcType=VARCHAR},
476
+      </if>
477
+      <if test="record.orgCode != null" >
478
+        org_code = #{record.orgCode,jdbcType=VARCHAR},
479
+      </if>
480
+      <if test="record.orgClassId != null" >
481
+        org_class_id = #{record.orgClassId,jdbcType=INTEGER},
482
+      </if>
483
+      <if test="record.companyNature != null" >
484
+        company_nature = #{record.companyNature,jdbcType=INTEGER},
485
+      </if>
486
+      <if test="record.busiType != null" >
487
+        busi_type = #{record.busiType,jdbcType=INTEGER},
488
+      </if>
489
+      <if test="record.address != null" >
490
+        address = #{record.address,jdbcType=VARCHAR},
491
+      </if>
492
+      <if test="record.contact != null" >
493
+        contact = #{record.contact,jdbcType=VARCHAR},
494
+      </if>
495
+      <if test="record.fax != null" >
496
+        fax = #{record.fax,jdbcType=VARCHAR},
497
+      </if>
498
+      <if test="record.chargePerson != null" >
499
+        charge_person = #{record.chargePerson,jdbcType=VARCHAR},
500
+      </if>
501
+      <if test="record.longitude != null" >
502
+        longitude = #{record.longitude,jdbcType=VARCHAR},
503
+      </if>
504
+      <if test="record.latitude != null" >
505
+        latitude = #{record.latitude,jdbcType=VARCHAR},
506
+      </if>
507
+      <if test="record.registCapital != null" >
508
+        regist_capital = #{record.registCapital,jdbcType=INTEGER},
509
+      </if>
510
+      <if test="record.workNumber != null" >
511
+        work_number = #{record.workNumber,jdbcType=INTEGER},
512
+      </if>
513
+      <if test="record.areaCode != null" >
514
+        area_code = #{record.areaCode,jdbcType=INTEGER},
515
+      </if>
516
+      <if test="record.areaName != null" >
517
+        area_name = #{record.areaName,jdbcType=VARCHAR},
518
+      </if>
519
+      <if test="record.post != null" >
520
+        post = #{record.post,jdbcType=INTEGER},
521
+      </if>
522
+      <if test="record.depotClass != null" >
523
+        depot_class = #{record.depotClass,jdbcType=INTEGER},
524
+      </if>
525
+      <if test="record.designCapacity != null" >
526
+        design_capacity = #{record.designCapacity,jdbcType=INTEGER},
527
+      </if>
528
+      <if test="record.effectiveCapacity != null" >
529
+        effective_capacity = #{record.effectiveCapacity,jdbcType=INTEGER},
530
+      </if>
531
+      <if test="record.depotArea != null" >
532
+        depot_area = #{record.depotArea,jdbcType=REAL},
533
+      </if>
534
+      <if test="record.completeDate != null" >
535
+        complete_date = #{record.completeDate,jdbcType=TIMESTAMP},
536
+      </if>
537
+      <if test="record.useDate != null" >
538
+        use_date = #{record.useDate,jdbcType=TIMESTAMP},
539
+      </if>
540
+      <if test="record.companyOrgCode != null" >
541
+        company_org_code = #{record.companyOrgCode,jdbcType=VARCHAR},
542
+      </if>
543
+      <if test="record.creditCode != null" >
544
+        credit_code = #{record.creditCode,jdbcType=VARCHAR},
545
+      </if>
546
+      <if test="record.registType != null" >
547
+        regist_type = #{record.registType,jdbcType=INTEGER},
548
+      </if>
549
+      <if test="record.qualification != null" >
550
+        qualification = #{record.qualification,jdbcType=INTEGER},
551
+      </if>
552
+      <if test="record.independentCorporation != null" >
553
+        independent_corporation = #{record.independentCorporation,jdbcType=INTEGER},
554
+      </if>
555
+      <if test="record.legalPerson != null" >
556
+        legal_person = #{record.legalPerson,jdbcType=VARCHAR},
557
+      </if>
558
+      <if test="record.whetherRent != null" >
559
+        whether_rent = #{record.whetherRent,jdbcType=INTEGER},
560
+      </if>
561
+      <if test="record.infoRegist != null" >
562
+        info_regist = #{record.infoRegist,jdbcType=VARCHAR},
563
+      </if>
564
+      <if test="record.registDate != null" >
565
+        regist_date = #{record.registDate,jdbcType=TIMESTAMP},
566
+      </if>
567
+      <if test="record.remark != null" >
568
+        remark = #{record.remark,jdbcType=VARCHAR},
569
+      </if>
570
+      <if test="record.parentId != null" >
571
+        parent_id = #{record.parentId,jdbcType=INTEGER},
572
+      </if>
573
+      <if test="record.status != null" >
574
+        status = #{record.status,jdbcType=INTEGER},
575
+      </if>
576
+      <if test="record.delFlag != null" >
577
+        del_flag = #{record.delFlag,jdbcType=INTEGER},
578
+      </if>
579
+      <if test="record.birdsEye != null" >
580
+        birds_eye = #{record.birdsEye,jdbcType=VARCHAR},
581
+      </if>
582
+      <if test="record.birdsRemote != null" >
583
+        birds_Remote = #{record.birdsRemote,jdbcType=VARCHAR},
584
+      </if>
585
+      <if test="record.briefIntroduction != null" >
586
+        brief_introduction = #{record.briefIntroduction,jdbcType=VARCHAR},
587
+      </if>
588
+      <if test="record.invoiceTitle != null" >
589
+        invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
590
+      </if>
591
+      <if test="record.registNumber != null" >
592
+        regist_number = #{record.registNumber,jdbcType=VARCHAR},
593
+      </if>
594
+      <if test="record.bankName != null" >
595
+        bank_name = #{record.bankName,jdbcType=VARCHAR},
596
+      </if>
597
+      <if test="record.accountName != null" >
598
+        account_name = #{record.accountName,jdbcType=VARCHAR},
599
+      </if>
600
+      <if test="record.accountNumber != null" >
601
+        account_number = #{record.accountNumber,jdbcType=VARCHAR},
602
+      </if>
603
+    </set>
604
+    <if test="_parameter != null" >
605
+      <include refid="Update_By_Example_Where_Clause" />
606
+    </if>
607
+  </update>
608
+  <update id="updateByExample" parameterType="map" >
609
+    update org_info
610
+    set org_id = #{record.orgId,jdbcType=INTEGER},
611
+      org_name = #{record.orgName,jdbcType=VARCHAR},
612
+      short_name = #{record.shortName,jdbcType=VARCHAR},
613
+      org_code = #{record.orgCode,jdbcType=VARCHAR},
614
+      org_class_id = #{record.orgClassId,jdbcType=INTEGER},
615
+      company_nature = #{record.companyNature,jdbcType=INTEGER},
616
+      busi_type = #{record.busiType,jdbcType=INTEGER},
617
+      address = #{record.address,jdbcType=VARCHAR},
618
+      contact = #{record.contact,jdbcType=VARCHAR},
619
+      fax = #{record.fax,jdbcType=VARCHAR},
620
+      charge_person = #{record.chargePerson,jdbcType=VARCHAR},
621
+      longitude = #{record.longitude,jdbcType=VARCHAR},
622
+      latitude = #{record.latitude,jdbcType=VARCHAR},
623
+      regist_capital = #{record.registCapital,jdbcType=INTEGER},
624
+      work_number = #{record.workNumber,jdbcType=INTEGER},
625
+      area_code = #{record.areaCode,jdbcType=INTEGER},
626
+      area_name = #{record.areaName,jdbcType=VARCHAR},
627
+      post = #{record.post,jdbcType=INTEGER},
628
+      depot_class = #{record.depotClass,jdbcType=INTEGER},
629
+      design_capacity = #{record.designCapacity,jdbcType=INTEGER},
630
+      effective_capacity = #{record.effectiveCapacity,jdbcType=INTEGER},
631
+      depot_area = #{record.depotArea,jdbcType=REAL},
632
+      complete_date = #{record.completeDate,jdbcType=TIMESTAMP},
633
+      use_date = #{record.useDate,jdbcType=TIMESTAMP},
634
+      company_org_code = #{record.companyOrgCode,jdbcType=VARCHAR},
635
+      credit_code = #{record.creditCode,jdbcType=VARCHAR},
636
+      regist_type = #{record.registType,jdbcType=INTEGER},
637
+      qualification = #{record.qualification,jdbcType=INTEGER},
638
+      independent_corporation = #{record.independentCorporation,jdbcType=INTEGER},
639
+      legal_person = #{record.legalPerson,jdbcType=VARCHAR},
640
+      whether_rent = #{record.whetherRent,jdbcType=INTEGER},
641
+      info_regist = #{record.infoRegist,jdbcType=VARCHAR},
642
+      regist_date = #{record.registDate,jdbcType=TIMESTAMP},
643
+      remark = #{record.remark,jdbcType=VARCHAR},
644
+      parent_id = #{record.parentId,jdbcType=INTEGER},
645
+      status = #{record.status,jdbcType=INTEGER},
646
+      del_flag = #{record.delFlag,jdbcType=INTEGER},
647
+      birds_eye = #{record.birdsEye,jdbcType=VARCHAR},
648
+      birds_Remote = #{record.birdsRemote,jdbcType=VARCHAR},
649
+      brief_introduction = #{record.briefIntroduction,jdbcType=VARCHAR},
650
+      invoice_title = #{record.invoiceTitle,jdbcType=VARCHAR},
651
+      regist_number = #{record.registNumber,jdbcType=VARCHAR},
652
+      bank_name = #{record.bankName,jdbcType=VARCHAR},
653
+      account_name = #{record.accountName,jdbcType=VARCHAR},
654
+      account_number = #{record.accountNumber,jdbcType=VARCHAR}
655
+    <if test="_parameter != null" >
656
+      <include refid="Update_By_Example_Where_Clause" />
657
+    </if>
658
+  </update>
659
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.OrgInfo" >
660
+    update org_info
661
+    <set >
662
+      <if test="orgName != null" >
663
+        org_name = #{orgName,jdbcType=VARCHAR},
664
+      </if>
665
+      <if test="shortName != null" >
666
+        short_name = #{shortName,jdbcType=VARCHAR},
667
+      </if>
668
+      <if test="orgCode != null" >
669
+        org_code = #{orgCode,jdbcType=VARCHAR},
670
+      </if>
671
+      <if test="orgClassId != null" >
672
+        org_class_id = #{orgClassId,jdbcType=INTEGER},
673
+      </if>
674
+      <if test="companyNature != null" >
675
+        company_nature = #{companyNature,jdbcType=INTEGER},
676
+      </if>
677
+      <if test="busiType != null" >
678
+        busi_type = #{busiType,jdbcType=INTEGER},
679
+      </if>
680
+      <if test="address != null" >
681
+        address = #{address,jdbcType=VARCHAR},
682
+      </if>
683
+      <if test="contact != null" >
684
+        contact = #{contact,jdbcType=VARCHAR},
685
+      </if>
686
+      <if test="fax != null" >
687
+        fax = #{fax,jdbcType=VARCHAR},
688
+      </if>
689
+      <if test="chargePerson != null" >
690
+        charge_person = #{chargePerson,jdbcType=VARCHAR},
691
+      </if>
692
+      <if test="longitude != null" >
693
+        longitude = #{longitude,jdbcType=VARCHAR},
694
+      </if>
695
+      <if test="latitude != null" >
696
+        latitude = #{latitude,jdbcType=VARCHAR},
697
+      </if>
698
+      <if test="registCapital != null" >
699
+        regist_capital = #{registCapital,jdbcType=INTEGER},
700
+      </if>
701
+      <if test="workNumber != null" >
702
+        work_number = #{workNumber,jdbcType=INTEGER},
703
+      </if>
704
+      <if test="areaCode != null" >
705
+        area_code = #{areaCode,jdbcType=INTEGER},
706
+      </if>
707
+      <if test="areaName != null" >
708
+        area_name = #{areaName,jdbcType=VARCHAR},
709
+      </if>
710
+      <if test="post != null" >
711
+        post = #{post,jdbcType=INTEGER},
712
+      </if>
713
+      <if test="depotClass != null" >
714
+        depot_class = #{depotClass,jdbcType=INTEGER},
715
+      </if>
716
+      <if test="designCapacity != null" >
717
+        design_capacity = #{designCapacity,jdbcType=INTEGER},
718
+      </if>
719
+      <if test="effectiveCapacity != null" >
720
+        effective_capacity = #{effectiveCapacity,jdbcType=INTEGER},
721
+      </if>
722
+      <if test="depotArea != null" >
723
+        depot_area = #{depotArea,jdbcType=REAL},
724
+      </if>
725
+      <if test="completeDate != null" >
726
+        complete_date = #{completeDate,jdbcType=TIMESTAMP},
727
+      </if>
728
+      <if test="useDate != null" >
729
+        use_date = #{useDate,jdbcType=TIMESTAMP},
730
+      </if>
731
+      <if test="companyOrgCode != null" >
732
+        company_org_code = #{companyOrgCode,jdbcType=VARCHAR},
733
+      </if>
734
+      <if test="creditCode != null" >
735
+        credit_code = #{creditCode,jdbcType=VARCHAR},
736
+      </if>
737
+      <if test="registType != null" >
738
+        regist_type = #{registType,jdbcType=INTEGER},
739
+      </if>
740
+      <if test="qualification != null" >
741
+        qualification = #{qualification,jdbcType=INTEGER},
742
+      </if>
743
+      <if test="independentCorporation != null" >
744
+        independent_corporation = #{independentCorporation,jdbcType=INTEGER},
745
+      </if>
746
+      <if test="legalPerson != null" >
747
+        legal_person = #{legalPerson,jdbcType=VARCHAR},
748
+      </if>
749
+      <if test="whetherRent != null" >
750
+        whether_rent = #{whetherRent,jdbcType=INTEGER},
751
+      </if>
752
+      <if test="infoRegist != null" >
753
+        info_regist = #{infoRegist,jdbcType=VARCHAR},
754
+      </if>
755
+      <if test="registDate != null" >
756
+        regist_date = #{registDate,jdbcType=TIMESTAMP},
757
+      </if>
758
+      <if test="remark != null" >
759
+        remark = #{remark,jdbcType=VARCHAR},
760
+      </if>
761
+      <if test="parentId != null" >
762
+        parent_id = #{parentId,jdbcType=INTEGER},
763
+      </if>
764
+      <if test="status != null" >
765
+        status = #{status,jdbcType=INTEGER},
766
+      </if>
767
+      <if test="delFlag != null" >
768
+        del_flag = #{delFlag,jdbcType=INTEGER},
769
+      </if>
770
+      <if test="birdsEye != null" >
771
+        birds_eye = #{birdsEye,jdbcType=VARCHAR},
772
+      </if>
773
+      <if test="birdsRemote != null" >
774
+        birds_Remote = #{birdsRemote,jdbcType=VARCHAR},
775
+      </if>
776
+      <if test="briefIntroduction != null" >
777
+        brief_introduction = #{briefIntroduction,jdbcType=VARCHAR},
778
+      </if>
779
+      <if test="invoiceTitle != null" >
780
+        invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
781
+      </if>
782
+      <if test="registNumber != null" >
783
+        regist_number = #{registNumber,jdbcType=VARCHAR},
784
+      </if>
785
+      <if test="bankName != null" >
786
+        bank_name = #{bankName,jdbcType=VARCHAR},
787
+      </if>
788
+      <if test="accountName != null" >
789
+        account_name = #{accountName,jdbcType=VARCHAR},
790
+      </if>
791
+      <if test="accountNumber != null" >
792
+        account_number = #{accountNumber,jdbcType=VARCHAR},
793
+      </if>
794
+    </set>
795
+    where org_id = #{orgId,jdbcType=INTEGER}
796
+  </update>
797
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.OrgInfo" >
798
+    update org_info
799
+    set org_name = #{orgName,jdbcType=VARCHAR},
800
+      short_name = #{shortName,jdbcType=VARCHAR},
801
+      org_code = #{orgCode,jdbcType=VARCHAR},
802
+      org_class_id = #{orgClassId,jdbcType=INTEGER},
803
+      company_nature = #{companyNature,jdbcType=INTEGER},
804
+      busi_type = #{busiType,jdbcType=INTEGER},
805
+      address = #{address,jdbcType=VARCHAR},
806
+      contact = #{contact,jdbcType=VARCHAR},
807
+      fax = #{fax,jdbcType=VARCHAR},
808
+      charge_person = #{chargePerson,jdbcType=VARCHAR},
809
+      longitude = #{longitude,jdbcType=VARCHAR},
810
+      latitude = #{latitude,jdbcType=VARCHAR},
811
+      regist_capital = #{registCapital,jdbcType=INTEGER},
812
+      work_number = #{workNumber,jdbcType=INTEGER},
813
+      area_code = #{areaCode,jdbcType=INTEGER},
814
+      area_name = #{areaName,jdbcType=VARCHAR},
815
+      post = #{post,jdbcType=INTEGER},
816
+      depot_class = #{depotClass,jdbcType=INTEGER},
817
+      design_capacity = #{designCapacity,jdbcType=INTEGER},
818
+      effective_capacity = #{effectiveCapacity,jdbcType=INTEGER},
819
+      depot_area = #{depotArea,jdbcType=REAL},
820
+      complete_date = #{completeDate,jdbcType=TIMESTAMP},
821
+      use_date = #{useDate,jdbcType=TIMESTAMP},
822
+      company_org_code = #{companyOrgCode,jdbcType=VARCHAR},
823
+      credit_code = #{creditCode,jdbcType=VARCHAR},
824
+      regist_type = #{registType,jdbcType=INTEGER},
825
+      qualification = #{qualification,jdbcType=INTEGER},
826
+      independent_corporation = #{independentCorporation,jdbcType=INTEGER},
827
+      legal_person = #{legalPerson,jdbcType=VARCHAR},
828
+      whether_rent = #{whetherRent,jdbcType=INTEGER},
829
+      info_regist = #{infoRegist,jdbcType=VARCHAR},
830
+      regist_date = #{registDate,jdbcType=TIMESTAMP},
831
+      remark = #{remark,jdbcType=VARCHAR},
832
+      parent_id = #{parentId,jdbcType=INTEGER},
833
+      status = #{status,jdbcType=INTEGER},
834
+      del_flag = #{delFlag,jdbcType=INTEGER},
835
+      birds_eye = #{birdsEye,jdbcType=VARCHAR},
836
+      birds_Remote = #{birdsRemote,jdbcType=VARCHAR},
837
+      brief_introduction = #{briefIntroduction,jdbcType=VARCHAR},
838
+      invoice_title = #{invoiceTitle,jdbcType=VARCHAR},
839
+      regist_number = #{registNumber,jdbcType=VARCHAR},
840
+      bank_name = #{bankName,jdbcType=VARCHAR},
841
+      account_name = #{accountName,jdbcType=VARCHAR},
842
+      account_number = #{accountNumber,jdbcType=VARCHAR}
843
+    where org_id = #{orgId,jdbcType=INTEGER}
844
+  </update>
845
+</mapper>

+ 228 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/RoleInfoMapper.xml

@@ -0,0 +1,228 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.RoleInfoMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.RoleInfo" >
5
+    <id column="role_id" property="roleId" jdbcType="INTEGER" />
6
+    <result column="role_name" property="roleName" jdbcType="VARCHAR" />
7
+    <result column="parent_id" property="parentId" jdbcType="INTEGER" />
8
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
9
+    <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
10
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
11
+  </resultMap>
12
+  <sql id="Example_Where_Clause" >
13
+    <where >
14
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
15
+        <if test="criteria.valid" >
16
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
17
+            <foreach collection="criteria.criteria" item="criterion" >
18
+              <choose >
19
+                <when test="criterion.noValue" >
20
+                  and ${criterion.condition}
21
+                </when>
22
+                <when test="criterion.singleValue" >
23
+                  and ${criterion.condition} #{criterion.value}
24
+                </when>
25
+                <when test="criterion.betweenValue" >
26
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
27
+                </when>
28
+                <when test="criterion.listValue" >
29
+                  and ${criterion.condition}
30
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
31
+                    #{listItem}
32
+                  </foreach>
33
+                </when>
34
+              </choose>
35
+            </foreach>
36
+          </trim>
37
+        </if>
38
+      </foreach>
39
+    </where>
40
+  </sql>
41
+  <sql id="Update_By_Example_Where_Clause" >
42
+    <where >
43
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
44
+        <if test="criteria.valid" >
45
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
46
+            <foreach collection="criteria.criteria" item="criterion" >
47
+              <choose >
48
+                <when test="criterion.noValue" >
49
+                  and ${criterion.condition}
50
+                </when>
51
+                <when test="criterion.singleValue" >
52
+                  and ${criterion.condition} #{criterion.value}
53
+                </when>
54
+                <when test="criterion.betweenValue" >
55
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
56
+                </when>
57
+                <when test="criterion.listValue" >
58
+                  and ${criterion.condition}
59
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
60
+                    #{listItem}
61
+                  </foreach>
62
+                </when>
63
+              </choose>
64
+            </foreach>
65
+          </trim>
66
+        </if>
67
+      </foreach>
68
+    </where>
69
+  </sql>
70
+  <sql id="Base_Column_List" >
71
+    role_id, role_name, parent_id, remark, del_flag, org_id
72
+  </sql>
73
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.RoleInfoExample" >
74
+    select
75
+    <if test="distinct" >
76
+      distinct
77
+    </if>
78
+    <include refid="Base_Column_List" />
79
+    from role_info
80
+    <if test="_parameter != null" >
81
+      <include refid="Example_Where_Clause" />
82
+    </if>
83
+    <if test="orderByClause != null" >
84
+      order by ${orderByClause}
85
+    </if>
86
+  </select>
87
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
88
+    select 
89
+    <include refid="Base_Column_List" />
90
+    from role_info
91
+    where role_id = #{roleId,jdbcType=INTEGER}
92
+  </select>
93
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
94
+    delete from role_info
95
+    where role_id = #{roleId,jdbcType=INTEGER}
96
+  </delete>
97
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.RoleInfoExample" >
98
+    delete from role_info
99
+    <if test="_parameter != null" >
100
+      <include refid="Example_Where_Clause" />
101
+    </if>
102
+  </delete>
103
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.RoleInfo" >
104
+    insert into role_info (role_id, role_name, parent_id, 
105
+      remark, del_flag, org_id
106
+      )
107
+    values (#{roleId,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, 
108
+      #{remark,jdbcType=VARCHAR}, #{delFlag,jdbcType=INTEGER}, #{orgId,jdbcType=INTEGER}
109
+      )
110
+  </insert>
111
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.RoleInfo" >
112
+    insert into role_info
113
+    <trim prefix="(" suffix=")" suffixOverrides="," >
114
+      <if test="roleId != null" >
115
+        role_id,
116
+      </if>
117
+      <if test="roleName != null" >
118
+        role_name,
119
+      </if>
120
+      <if test="parentId != null" >
121
+        parent_id,
122
+      </if>
123
+      <if test="remark != null" >
124
+        remark,
125
+      </if>
126
+      <if test="delFlag != null" >
127
+        del_flag,
128
+      </if>
129
+      <if test="orgId != null" >
130
+        org_id,
131
+      </if>
132
+    </trim>
133
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
134
+      <if test="roleId != null" >
135
+        #{roleId,jdbcType=INTEGER},
136
+      </if>
137
+      <if test="roleName != null" >
138
+        #{roleName,jdbcType=VARCHAR},
139
+      </if>
140
+      <if test="parentId != null" >
141
+        #{parentId,jdbcType=INTEGER},
142
+      </if>
143
+      <if test="remark != null" >
144
+        #{remark,jdbcType=VARCHAR},
145
+      </if>
146
+      <if test="delFlag != null" >
147
+        #{delFlag,jdbcType=INTEGER},
148
+      </if>
149
+      <if test="orgId != null" >
150
+        #{orgId,jdbcType=INTEGER},
151
+      </if>
152
+    </trim>
153
+  </insert>
154
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.RoleInfoExample" resultType="java.lang.Integer" >
155
+    select count(*) from role_info
156
+    <if test="_parameter != null" >
157
+      <include refid="Example_Where_Clause" />
158
+    </if>
159
+  </select>
160
+  <update id="updateByExampleSelective" parameterType="map" >
161
+    update role_info
162
+    <set >
163
+      <if test="record.roleId != null" >
164
+        role_id = #{record.roleId,jdbcType=INTEGER},
165
+      </if>
166
+      <if test="record.roleName != null" >
167
+        role_name = #{record.roleName,jdbcType=VARCHAR},
168
+      </if>
169
+      <if test="record.parentId != null" >
170
+        parent_id = #{record.parentId,jdbcType=INTEGER},
171
+      </if>
172
+      <if test="record.remark != null" >
173
+        remark = #{record.remark,jdbcType=VARCHAR},
174
+      </if>
175
+      <if test="record.delFlag != null" >
176
+        del_flag = #{record.delFlag,jdbcType=INTEGER},
177
+      </if>
178
+      <if test="record.orgId != null" >
179
+        org_id = #{record.orgId,jdbcType=INTEGER},
180
+      </if>
181
+    </set>
182
+    <if test="_parameter != null" >
183
+      <include refid="Update_By_Example_Where_Clause" />
184
+    </if>
185
+  </update>
186
+  <update id="updateByExample" parameterType="map" >
187
+    update role_info
188
+    set role_id = #{record.roleId,jdbcType=INTEGER},
189
+      role_name = #{record.roleName,jdbcType=VARCHAR},
190
+      parent_id = #{record.parentId,jdbcType=INTEGER},
191
+      remark = #{record.remark,jdbcType=VARCHAR},
192
+      del_flag = #{record.delFlag,jdbcType=INTEGER},
193
+      org_id = #{record.orgId,jdbcType=INTEGER}
194
+    <if test="_parameter != null" >
195
+      <include refid="Update_By_Example_Where_Clause" />
196
+    </if>
197
+  </update>
198
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.RoleInfo" >
199
+    update role_info
200
+    <set >
201
+      <if test="roleName != null" >
202
+        role_name = #{roleName,jdbcType=VARCHAR},
203
+      </if>
204
+      <if test="parentId != null" >
205
+        parent_id = #{parentId,jdbcType=INTEGER},
206
+      </if>
207
+      <if test="remark != null" >
208
+        remark = #{remark,jdbcType=VARCHAR},
209
+      </if>
210
+      <if test="delFlag != null" >
211
+        del_flag = #{delFlag,jdbcType=INTEGER},
212
+      </if>
213
+      <if test="orgId != null" >
214
+        org_id = #{orgId,jdbcType=INTEGER},
215
+      </if>
216
+    </set>
217
+    where role_id = #{roleId,jdbcType=INTEGER}
218
+  </update>
219
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.RoleInfo" >
220
+    update role_info
221
+    set role_name = #{roleName,jdbcType=VARCHAR},
222
+      parent_id = #{parentId,jdbcType=INTEGER},
223
+      remark = #{remark,jdbcType=VARCHAR},
224
+      del_flag = #{delFlag,jdbcType=INTEGER},
225
+      org_id = #{orgId,jdbcType=INTEGER}
226
+    where role_id = #{roleId,jdbcType=INTEGER}
227
+  </update>
228
+</mapper>

+ 465 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/SystemLogMapper.xml

@@ -0,0 +1,465 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.SystemLogMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.SystemLog" >
5
+    <id column="id" property="id" jdbcType="VARCHAR" />
6
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
7
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
8
+    <result column="user_zh" property="userZh" jdbcType="VARCHAR" />
9
+    <result column="user_name" property="userName" jdbcType="VARCHAR" />
10
+    <result column="user_role" property="userRole" jdbcType="VARCHAR" />
11
+    <result column="user_address" property="userAddress" jdbcType="VARCHAR" />
12
+    <result column="dl_time" property="dlTime" jdbcType="TIMESTAMP" />
13
+    <result column="zx_time" property="zxTime" jdbcType="TIMESTAMP" />
14
+    <result column="func_id" property="funcId" jdbcType="INTEGER" />
15
+    <result column="func_name" property="funcName" jdbcType="VARCHAR" />
16
+    <result column="btn_id" property="btnId" jdbcType="INTEGER" />
17
+    <result column="method_name" property="methodName" jdbcType="VARCHAR" />
18
+    <result column="oper_result" property="operResult" jdbcType="VARCHAR" />
19
+    <result column="parameter" property="parameter" jdbcType="VARCHAR" />
20
+    <result column="rtn_param" property="rtnParam" jdbcType="VARCHAR" />
21
+    <result column="describes" property="describes" jdbcType="VARCHAR" />
22
+    <result column="type" property="type" jdbcType="VARCHAR" />
23
+    <result column="device_ip" property="deviceIp" jdbcType="VARCHAR" />
24
+    <result column="system_identify" property="systemIdentify" jdbcType="VARCHAR" />
25
+    <result column="operation_time" property="operationTime" jdbcType="TIMESTAMP" />
26
+  </resultMap>
27
+  <sql id="Example_Where_Clause" >
28
+    <where >
29
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
30
+        <if test="criteria.valid" >
31
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
32
+            <foreach collection="criteria.criteria" item="criterion" >
33
+              <choose >
34
+                <when test="criterion.noValue" >
35
+                  and ${criterion.condition}
36
+                </when>
37
+                <when test="criterion.singleValue" >
38
+                  and ${criterion.condition} #{criterion.value}
39
+                </when>
40
+                <when test="criterion.betweenValue" >
41
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
42
+                </when>
43
+                <when test="criterion.listValue" >
44
+                  and ${criterion.condition}
45
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
46
+                    #{listItem}
47
+                  </foreach>
48
+                </when>
49
+              </choose>
50
+            </foreach>
51
+          </trim>
52
+        </if>
53
+      </foreach>
54
+    </where>
55
+  </sql>
56
+  <sql id="Update_By_Example_Where_Clause" >
57
+    <where >
58
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
59
+        <if test="criteria.valid" >
60
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
61
+            <foreach collection="criteria.criteria" item="criterion" >
62
+              <choose >
63
+                <when test="criterion.noValue" >
64
+                  and ${criterion.condition}
65
+                </when>
66
+                <when test="criterion.singleValue" >
67
+                  and ${criterion.condition} #{criterion.value}
68
+                </when>
69
+                <when test="criterion.betweenValue" >
70
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
71
+                </when>
72
+                <when test="criterion.listValue" >
73
+                  and ${criterion.condition}
74
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
75
+                    #{listItem}
76
+                  </foreach>
77
+                </when>
78
+              </choose>
79
+            </foreach>
80
+          </trim>
81
+        </if>
82
+      </foreach>
83
+    </where>
84
+  </sql>
85
+  <sql id="Base_Column_List" >
86
+    id, org_id, user_id, user_zh, user_name, user_role, user_address, dl_time, zx_time, 
87
+    func_id, func_name, btn_id, method_name, oper_result, parameter, rtn_param, describes, 
88
+    type, device_ip, system_identify, operation_time
89
+  </sql>
90
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.SystemLogExample" >
91
+    select
92
+    <if test="distinct" >
93
+      distinct
94
+    </if>
95
+    <include refid="Base_Column_List" />
96
+    from system_log
97
+    <if test="_parameter != null" >
98
+      <include refid="Example_Where_Clause" />
99
+    </if>
100
+    <if test="orderByClause != null" >
101
+      order by ${orderByClause}
102
+    </if>
103
+  </select>
104
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
105
+    select 
106
+    <include refid="Base_Column_List" />
107
+    from system_log
108
+    where id = #{id,jdbcType=VARCHAR}
109
+  </select>
110
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
111
+    delete from system_log
112
+    where id = #{id,jdbcType=VARCHAR}
113
+  </delete>
114
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.SystemLogExample" >
115
+    delete from system_log
116
+    <if test="_parameter != null" >
117
+      <include refid="Example_Where_Clause" />
118
+    </if>
119
+  </delete>
120
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.SystemLog" >
121
+    insert into system_log (id, org_id, user_id, 
122
+      user_zh, user_name, user_role, 
123
+      user_address, dl_time, zx_time, 
124
+      func_id, func_name, btn_id, 
125
+      method_name, oper_result, parameter, 
126
+      rtn_param, describes, type, 
127
+      device_ip, system_identify, operation_time
128
+      )
129
+    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 
130
+      #{userZh,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}, 
131
+      #{userAddress,jdbcType=VARCHAR}, #{dlTime,jdbcType=TIMESTAMP}, #{zxTime,jdbcType=TIMESTAMP}, 
132
+      #{funcId,jdbcType=INTEGER}, #{funcName,jdbcType=VARCHAR}, #{btnId,jdbcType=INTEGER}, 
133
+      #{methodName,jdbcType=VARCHAR}, #{operResult,jdbcType=VARCHAR}, #{parameter,jdbcType=VARCHAR}, 
134
+      #{rtnParam,jdbcType=VARCHAR}, #{describes,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
135
+      #{deviceIp,jdbcType=VARCHAR}, #{systemIdentify,jdbcType=VARCHAR}, #{operationTime,jdbcType=TIMESTAMP}
136
+      )
137
+  </insert>
138
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.SystemLog" >
139
+    insert into system_log
140
+    <trim prefix="(" suffix=")" suffixOverrides="," >
141
+      <if test="id != null" >
142
+        id,
143
+      </if>
144
+      <if test="orgId != null" >
145
+        org_id,
146
+      </if>
147
+      <if test="userId != null" >
148
+        user_id,
149
+      </if>
150
+      <if test="userZh != null" >
151
+        user_zh,
152
+      </if>
153
+      <if test="userName != null" >
154
+        user_name,
155
+      </if>
156
+      <if test="userRole != null" >
157
+        user_role,
158
+      </if>
159
+      <if test="userAddress != null" >
160
+        user_address,
161
+      </if>
162
+      <if test="dlTime != null" >
163
+        dl_time,
164
+      </if>
165
+      <if test="zxTime != null" >
166
+        zx_time,
167
+      </if>
168
+      <if test="funcId != null" >
169
+        func_id,
170
+      </if>
171
+      <if test="funcName != null" >
172
+        func_name,
173
+      </if>
174
+      <if test="btnId != null" >
175
+        btn_id,
176
+      </if>
177
+      <if test="methodName != null" >
178
+        method_name,
179
+      </if>
180
+      <if test="operResult != null" >
181
+        oper_result,
182
+      </if>
183
+      <if test="parameter != null" >
184
+        parameter,
185
+      </if>
186
+      <if test="rtnParam != null" >
187
+        rtn_param,
188
+      </if>
189
+      <if test="describes != null" >
190
+        describes,
191
+      </if>
192
+      <if test="type != null" >
193
+        type,
194
+      </if>
195
+      <if test="deviceIp != null" >
196
+        device_ip,
197
+      </if>
198
+      <if test="systemIdentify != null" >
199
+        system_identify,
200
+      </if>
201
+      <if test="operationTime != null" >
202
+        operation_time,
203
+      </if>
204
+    </trim>
205
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
206
+      <if test="id != null" >
207
+        #{id,jdbcType=VARCHAR},
208
+      </if>
209
+      <if test="orgId != null" >
210
+        #{orgId,jdbcType=INTEGER},
211
+      </if>
212
+      <if test="userId != null" >
213
+        #{userId,jdbcType=INTEGER},
214
+      </if>
215
+      <if test="userZh != null" >
216
+        #{userZh,jdbcType=VARCHAR},
217
+      </if>
218
+      <if test="userName != null" >
219
+        #{userName,jdbcType=VARCHAR},
220
+      </if>
221
+      <if test="userRole != null" >
222
+        #{userRole,jdbcType=VARCHAR},
223
+      </if>
224
+      <if test="userAddress != null" >
225
+        #{userAddress,jdbcType=VARCHAR},
226
+      </if>
227
+      <if test="dlTime != null" >
228
+        #{dlTime,jdbcType=TIMESTAMP},
229
+      </if>
230
+      <if test="zxTime != null" >
231
+        #{zxTime,jdbcType=TIMESTAMP},
232
+      </if>
233
+      <if test="funcId != null" >
234
+        #{funcId,jdbcType=INTEGER},
235
+      </if>
236
+      <if test="funcName != null" >
237
+        #{funcName,jdbcType=VARCHAR},
238
+      </if>
239
+      <if test="btnId != null" >
240
+        #{btnId,jdbcType=INTEGER},
241
+      </if>
242
+      <if test="methodName != null" >
243
+        #{methodName,jdbcType=VARCHAR},
244
+      </if>
245
+      <if test="operResult != null" >
246
+        #{operResult,jdbcType=VARCHAR},
247
+      </if>
248
+      <if test="parameter != null" >
249
+        #{parameter,jdbcType=VARCHAR},
250
+      </if>
251
+      <if test="rtnParam != null" >
252
+        #{rtnParam,jdbcType=VARCHAR},
253
+      </if>
254
+      <if test="describes != null" >
255
+        #{describes,jdbcType=VARCHAR},
256
+      </if>
257
+      <if test="type != null" >
258
+        #{type,jdbcType=VARCHAR},
259
+      </if>
260
+      <if test="deviceIp != null" >
261
+        #{deviceIp,jdbcType=VARCHAR},
262
+      </if>
263
+      <if test="systemIdentify != null" >
264
+        #{systemIdentify,jdbcType=VARCHAR},
265
+      </if>
266
+      <if test="operationTime != null" >
267
+        #{operationTime,jdbcType=TIMESTAMP},
268
+      </if>
269
+    </trim>
270
+  </insert>
271
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.SystemLogExample" resultType="java.lang.Integer" >
272
+    select count(*) from system_log
273
+    <if test="_parameter != null" >
274
+      <include refid="Example_Where_Clause" />
275
+    </if>
276
+  </select>
277
+  <update id="updateByExampleSelective" parameterType="map" >
278
+    update system_log
279
+    <set >
280
+      <if test="record.id != null" >
281
+        id = #{record.id,jdbcType=VARCHAR},
282
+      </if>
283
+      <if test="record.orgId != null" >
284
+        org_id = #{record.orgId,jdbcType=INTEGER},
285
+      </if>
286
+      <if test="record.userId != null" >
287
+        user_id = #{record.userId,jdbcType=INTEGER},
288
+      </if>
289
+      <if test="record.userZh != null" >
290
+        user_zh = #{record.userZh,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="record.userName != null" >
293
+        user_name = #{record.userName,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="record.userRole != null" >
296
+        user_role = #{record.userRole,jdbcType=VARCHAR},
297
+      </if>
298
+      <if test="record.userAddress != null" >
299
+        user_address = #{record.userAddress,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="record.dlTime != null" >
302
+        dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
303
+      </if>
304
+      <if test="record.zxTime != null" >
305
+        zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
306
+      </if>
307
+      <if test="record.funcId != null" >
308
+        func_id = #{record.funcId,jdbcType=INTEGER},
309
+      </if>
310
+      <if test="record.funcName != null" >
311
+        func_name = #{record.funcName,jdbcType=VARCHAR},
312
+      </if>
313
+      <if test="record.btnId != null" >
314
+        btn_id = #{record.btnId,jdbcType=INTEGER},
315
+      </if>
316
+      <if test="record.methodName != null" >
317
+        method_name = #{record.methodName,jdbcType=VARCHAR},
318
+      </if>
319
+      <if test="record.operResult != null" >
320
+        oper_result = #{record.operResult,jdbcType=VARCHAR},
321
+      </if>
322
+      <if test="record.parameter != null" >
323
+        parameter = #{record.parameter,jdbcType=VARCHAR},
324
+      </if>
325
+      <if test="record.rtnParam != null" >
326
+        rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
327
+      </if>
328
+      <if test="record.describes != null" >
329
+        describes = #{record.describes,jdbcType=VARCHAR},
330
+      </if>
331
+      <if test="record.type != null" >
332
+        type = #{record.type,jdbcType=VARCHAR},
333
+      </if>
334
+      <if test="record.deviceIp != null" >
335
+        device_ip = #{record.deviceIp,jdbcType=VARCHAR},
336
+      </if>
337
+      <if test="record.systemIdentify != null" >
338
+        system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
339
+      </if>
340
+      <if test="record.operationTime != null" >
341
+        operation_time = #{record.operationTime,jdbcType=TIMESTAMP},
342
+      </if>
343
+    </set>
344
+    <if test="_parameter != null" >
345
+      <include refid="Update_By_Example_Where_Clause" />
346
+    </if>
347
+  </update>
348
+  <update id="updateByExample" parameterType="map" >
349
+    update system_log
350
+    set id = #{record.id,jdbcType=VARCHAR},
351
+      org_id = #{record.orgId,jdbcType=INTEGER},
352
+      user_id = #{record.userId,jdbcType=INTEGER},
353
+      user_zh = #{record.userZh,jdbcType=VARCHAR},
354
+      user_name = #{record.userName,jdbcType=VARCHAR},
355
+      user_role = #{record.userRole,jdbcType=VARCHAR},
356
+      user_address = #{record.userAddress,jdbcType=VARCHAR},
357
+      dl_time = #{record.dlTime,jdbcType=TIMESTAMP},
358
+      zx_time = #{record.zxTime,jdbcType=TIMESTAMP},
359
+      func_id = #{record.funcId,jdbcType=INTEGER},
360
+      func_name = #{record.funcName,jdbcType=VARCHAR},
361
+      btn_id = #{record.btnId,jdbcType=INTEGER},
362
+      method_name = #{record.methodName,jdbcType=VARCHAR},
363
+      oper_result = #{record.operResult,jdbcType=VARCHAR},
364
+      parameter = #{record.parameter,jdbcType=VARCHAR},
365
+      rtn_param = #{record.rtnParam,jdbcType=VARCHAR},
366
+      describes = #{record.describes,jdbcType=VARCHAR},
367
+      type = #{record.type,jdbcType=VARCHAR},
368
+      device_ip = #{record.deviceIp,jdbcType=VARCHAR},
369
+      system_identify = #{record.systemIdentify,jdbcType=VARCHAR},
370
+      operation_time = #{record.operationTime,jdbcType=TIMESTAMP}
371
+    <if test="_parameter != null" >
372
+      <include refid="Update_By_Example_Where_Clause" />
373
+    </if>
374
+  </update>
375
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.SystemLog" >
376
+    update system_log
377
+    <set >
378
+      <if test="orgId != null" >
379
+        org_id = #{orgId,jdbcType=INTEGER},
380
+      </if>
381
+      <if test="userId != null" >
382
+        user_id = #{userId,jdbcType=INTEGER},
383
+      </if>
384
+      <if test="userZh != null" >
385
+        user_zh = #{userZh,jdbcType=VARCHAR},
386
+      </if>
387
+      <if test="userName != null" >
388
+        user_name = #{userName,jdbcType=VARCHAR},
389
+      </if>
390
+      <if test="userRole != null" >
391
+        user_role = #{userRole,jdbcType=VARCHAR},
392
+      </if>
393
+      <if test="userAddress != null" >
394
+        user_address = #{userAddress,jdbcType=VARCHAR},
395
+      </if>
396
+      <if test="dlTime != null" >
397
+        dl_time = #{dlTime,jdbcType=TIMESTAMP},
398
+      </if>
399
+      <if test="zxTime != null" >
400
+        zx_time = #{zxTime,jdbcType=TIMESTAMP},
401
+      </if>
402
+      <if test="funcId != null" >
403
+        func_id = #{funcId,jdbcType=INTEGER},
404
+      </if>
405
+      <if test="funcName != null" >
406
+        func_name = #{funcName,jdbcType=VARCHAR},
407
+      </if>
408
+      <if test="btnId != null" >
409
+        btn_id = #{btnId,jdbcType=INTEGER},
410
+      </if>
411
+      <if test="methodName != null" >
412
+        method_name = #{methodName,jdbcType=VARCHAR},
413
+      </if>
414
+      <if test="operResult != null" >
415
+        oper_result = #{operResult,jdbcType=VARCHAR},
416
+      </if>
417
+      <if test="parameter != null" >
418
+        parameter = #{parameter,jdbcType=VARCHAR},
419
+      </if>
420
+      <if test="rtnParam != null" >
421
+        rtn_param = #{rtnParam,jdbcType=VARCHAR},
422
+      </if>
423
+      <if test="describes != null" >
424
+        describes = #{describes,jdbcType=VARCHAR},
425
+      </if>
426
+      <if test="type != null" >
427
+        type = #{type,jdbcType=VARCHAR},
428
+      </if>
429
+      <if test="deviceIp != null" >
430
+        device_ip = #{deviceIp,jdbcType=VARCHAR},
431
+      </if>
432
+      <if test="systemIdentify != null" >
433
+        system_identify = #{systemIdentify,jdbcType=VARCHAR},
434
+      </if>
435
+      <if test="operationTime != null" >
436
+        operation_time = #{operationTime,jdbcType=TIMESTAMP},
437
+      </if>
438
+    </set>
439
+    where id = #{id,jdbcType=VARCHAR}
440
+  </update>
441
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.SystemLog" >
442
+    update system_log
443
+    set org_id = #{orgId,jdbcType=INTEGER},
444
+      user_id = #{userId,jdbcType=INTEGER},
445
+      user_zh = #{userZh,jdbcType=VARCHAR},
446
+      user_name = #{userName,jdbcType=VARCHAR},
447
+      user_role = #{userRole,jdbcType=VARCHAR},
448
+      user_address = #{userAddress,jdbcType=VARCHAR},
449
+      dl_time = #{dlTime,jdbcType=TIMESTAMP},
450
+      zx_time = #{zxTime,jdbcType=TIMESTAMP},
451
+      func_id = #{funcId,jdbcType=INTEGER},
452
+      func_name = #{funcName,jdbcType=VARCHAR},
453
+      btn_id = #{btnId,jdbcType=INTEGER},
454
+      method_name = #{methodName,jdbcType=VARCHAR},
455
+      oper_result = #{operResult,jdbcType=VARCHAR},
456
+      parameter = #{parameter,jdbcType=VARCHAR},
457
+      rtn_param = #{rtnParam,jdbcType=VARCHAR},
458
+      describes = #{describes,jdbcType=VARCHAR},
459
+      type = #{type,jdbcType=VARCHAR},
460
+      device_ip = #{deviceIp,jdbcType=VARCHAR},
461
+      system_identify = #{systemIdentify,jdbcType=VARCHAR},
462
+      operation_time = #{operationTime,jdbcType=TIMESTAMP}
463
+    where id = #{id,jdbcType=VARCHAR}
464
+  </update>
465
+</mapper>

+ 485 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/UserInfoMapper.xml

@@ -0,0 +1,485 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.business.mapper.UserInfoMapper">
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.UserInfo">
5
+    <id column="user_id" jdbcType="INTEGER" property="userId" />
6
+    <result column="username" jdbcType="VARCHAR" property="username" />
7
+    <result column="password" jdbcType="VARCHAR" property="password" />
8
+    <result column="org_id" jdbcType="INTEGER" property="orgId" />
9
+    <result column="real_name" jdbcType="VARCHAR" property="realName" />
10
+    <result column="user_alias" jdbcType="VARCHAR" property="userAlias" />
11
+    <result column="sex" jdbcType="INTEGER" property="sex" />
12
+    <result column="telphone" jdbcType="VARCHAR" property="telphone" />
13
+    <result column="mobile" jdbcType="VARCHAR" property="mobile" />
14
+    <result column="address" jdbcType="VARCHAR" property="address" />
15
+    <result column="email" jdbcType="VARCHAR" property="email" />
16
+    <result column="qq_number" jdbcType="VARCHAR" property="qqNumber" />
17
+    <result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
18
+    <result column="signature" jdbcType="VARCHAR" property="signature" />
19
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
20
+    <result column="create_user_id" jdbcType="INTEGER" property="createUserId" />
21
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
22
+    <result column="update_user_id" jdbcType="INTEGER" property="updateUserId" />
23
+    <result column="status" jdbcType="INTEGER" property="status" />
24
+    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
25
+  </resultMap>
26
+  <sql id="Example_Where_Clause">
27
+    <where>
28
+      <foreach collection="oredCriteria" item="criteria" separator="or">
29
+        <if test="criteria.valid">
30
+          <trim prefix="(" prefixOverrides="and" suffix=")">
31
+            <foreach collection="criteria.criteria" item="criterion">
32
+              <choose>
33
+                <when test="criterion.noValue">
34
+                  and ${criterion.condition}
35
+                </when>
36
+                <when test="criterion.singleValue">
37
+                  and ${criterion.condition} #{criterion.value}
38
+                </when>
39
+                <when test="criterion.betweenValue">
40
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
41
+                </when>
42
+                <when test="criterion.listValue">
43
+                  and ${criterion.condition}
44
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
45
+                    #{listItem}
46
+                  </foreach>
47
+                </when>
48
+              </choose>
49
+            </foreach>
50
+          </trim>
51
+        </if>
52
+      </foreach>
53
+    </where>
54
+  </sql>
55
+  <sql id="Update_By_Example_Where_Clause">
56
+    <where>
57
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
58
+        <if test="criteria.valid">
59
+          <trim prefix="(" prefixOverrides="and" suffix=")">
60
+            <foreach collection="criteria.criteria" item="criterion">
61
+              <choose>
62
+                <when test="criterion.noValue">
63
+                  and ${criterion.condition}
64
+                </when>
65
+                <when test="criterion.singleValue">
66
+                  and ${criterion.condition} #{criterion.value}
67
+                </when>
68
+                <when test="criterion.betweenValue">
69
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
70
+                </when>
71
+                <when test="criterion.listValue">
72
+                  and ${criterion.condition}
73
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
74
+                    #{listItem}
75
+                  </foreach>
76
+                </when>
77
+              </choose>
78
+            </foreach>
79
+          </trim>
80
+        </if>
81
+      </foreach>
82
+    </where>
83
+  </sql>
84
+  <sql id="Base_Column_List">
85
+    user_id, username, password, org_id, real_name, user_alias, sex, telphone, mobile, address, email, 
86
+    qq_number, img_url, signature, create_time, create_user_id, update_time, update_user_id, 
87
+    status, del_flag
88
+  </sql>
89
+  <select id="selectByExample" parameterType="com.chinaitop.depot.business.model.UserInfoExample" resultMap="BaseResultMap">
90
+    select
91
+    <if test="distinct">
92
+      distinct
93
+    </if>
94
+    <include refid="Base_Column_List" />
95
+    from user_info
96
+    <if test="_parameter != null">
97
+      <include refid="Example_Where_Clause" />
98
+    </if>
99
+    <if test="orderByClause != null">
100
+      order by ${orderByClause}
101
+    </if>
102
+  </select>
103
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
104
+    select 
105
+    <include refid="Base_Column_List" />
106
+    from user_info
107
+    where user_id = #{userId,jdbcType=INTEGER}
108
+  </select>
109
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
110
+    delete from user_info
111
+    where user_id = #{userId,jdbcType=INTEGER}
112
+  </delete>
113
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.UserInfoExample">
114
+    delete from user_info
115
+    <if test="_parameter != null">
116
+      <include refid="Example_Where_Clause" />
117
+    </if>
118
+  </delete>
119
+  <insert id="insert" useGeneratedKeys="true" keyProperty="userId" parameterType="com.chinaitop.depot.business.model.UserInfo">
120
+    insert into user_info (user_id, username, password, 
121
+      org_id, real_name, user_alias, sex, 
122
+      telphone, mobile, address, 
123
+      email, qq_number, img_url, 
124
+      signature, create_time, create_user_id, 
125
+      update_time, update_user_id, status, 
126
+      del_flag)
127
+    values (#{userId,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 
128
+      #{orgId,jdbcType=INTEGER}, #{realName,jdbcType=VARCHAR}, #{userAlias,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER}, 
129
+      #{telphone,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, 
130
+      #{email,jdbcType=VARCHAR}, #{qqNumber,jdbcType=VARCHAR}, #{imgUrl,jdbcType=VARCHAR}, 
131
+      #{signature,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=INTEGER}, 
132
+      #{updateTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
133
+      #{delFlag,jdbcType=INTEGER})
134
+  </insert>
135
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.UserInfo" useGeneratedKeys="true" keyProperty="userId">
136
+    insert into user_info
137
+    <trim prefix="(" suffix=")" suffixOverrides=",">
138
+      <if test="userId != null">
139
+        user_id,
140
+      </if>
141
+      <if test="username != null">
142
+        username,
143
+      </if>
144
+      <if test="password != null">
145
+        password,
146
+      </if>
147
+      <if test="orgId != null">
148
+        org_id,
149
+      </if>
150
+      <if test="realName != null">
151
+        real_name,
152
+      </if>
153
+      <if test="userAlias != null" >
154
+        user_alias,
155
+      </if>
156
+      <if test="sex != null">
157
+        sex,
158
+      </if>
159
+      <if test="telphone != null">
160
+        telphone,
161
+      </if>
162
+      <if test="mobile != null">
163
+        mobile,
164
+      </if>
165
+      <if test="address != null">
166
+        address,
167
+      </if>
168
+      <if test="email != null">
169
+        email,
170
+      </if>
171
+      <if test="qqNumber != null">
172
+        qq_number,
173
+      </if>
174
+      <if test="imgUrl != null">
175
+        img_url,
176
+      </if>
177
+      <if test="signature != null">
178
+        signature,
179
+      </if>
180
+      <if test="createTime != null">
181
+        create_time,
182
+      </if>
183
+      <if test="createUserId != null">
184
+        create_user_id,
185
+      </if>
186
+      <if test="updateTime != null">
187
+        update_time,
188
+      </if>
189
+      <if test="updateUserId != null">
190
+        update_user_id,
191
+      </if>
192
+      <if test="status != null">
193
+        status,
194
+      </if>
195
+      <if test="delFlag != null">
196
+        del_flag,
197
+      </if>
198
+    </trim>
199
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
200
+      <if test="userId != null">
201
+        #{userId,jdbcType=INTEGER},
202
+      </if>
203
+      <if test="username != null">
204
+        #{username,jdbcType=VARCHAR},
205
+      </if>
206
+      <if test="password != null">
207
+        #{password,jdbcType=VARCHAR},
208
+      </if>
209
+      <if test="orgId != null">
210
+        #{orgId,jdbcType=INTEGER},
211
+      </if>
212
+      <if test="realName != null">
213
+        #{realName,jdbcType=VARCHAR},
214
+      </if>
215
+      <if test="userAlias != null" >
216
+        #{userAlias,jdbcType=VARCHAR},
217
+      </if>
218
+      <if test="sex != null">
219
+        #{sex,jdbcType=INTEGER},
220
+      </if>
221
+      <if test="telphone != null">
222
+        #{telphone,jdbcType=VARCHAR},
223
+      </if>
224
+      <if test="mobile != null">
225
+        #{mobile,jdbcType=VARCHAR},
226
+      </if>
227
+      <if test="address != null">
228
+        #{address,jdbcType=VARCHAR},
229
+      </if>
230
+      <if test="email != null">
231
+        #{email,jdbcType=VARCHAR},
232
+      </if>
233
+      <if test="qqNumber != null">
234
+        #{qqNumber,jdbcType=VARCHAR},
235
+      </if>
236
+      <if test="imgUrl != null">
237
+        #{imgUrl,jdbcType=VARCHAR},
238
+      </if>
239
+      <if test="signature != null">
240
+        #{signature,jdbcType=VARCHAR},
241
+      </if>
242
+      <if test="createTime != null">
243
+        #{createTime,jdbcType=TIMESTAMP},
244
+      </if>
245
+      <if test="createUserId != null">
246
+        #{createUserId,jdbcType=INTEGER},
247
+      </if>
248
+      <if test="updateTime != null">
249
+        #{updateTime,jdbcType=TIMESTAMP},
250
+      </if>
251
+      <if test="updateUserId != null">
252
+        #{updateUserId,jdbcType=INTEGER},
253
+      </if>
254
+      <if test="status != null">
255
+        #{status,jdbcType=INTEGER},
256
+      </if>
257
+      <if test="delFlag != null">
258
+        #{delFlag,jdbcType=INTEGER},
259
+      </if>
260
+    </trim>
261
+  </insert>
262
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.UserInfoExample" resultType="java.lang.Integer">
263
+    select count(*) from user_info
264
+    <if test="_parameter != null">
265
+      <include refid="Example_Where_Clause" />
266
+    </if>
267
+  </select>
268
+  <update id="updateByExampleSelective" parameterType="map">
269
+    update user_info
270
+    <set>
271
+      <if test="record.userId != null">
272
+        user_id = #{record.userId,jdbcType=INTEGER},
273
+      </if>
274
+      <if test="record.username != null">
275
+        username = #{record.username,jdbcType=VARCHAR},
276
+      </if>
277
+      <if test="record.password != null">
278
+        password = #{record.password,jdbcType=VARCHAR},
279
+      </if>
280
+      <if test="record.orgId != null">
281
+        org_id = #{record.orgId,jdbcType=INTEGER},
282
+      </if>
283
+      <if test="record.realName != null">
284
+        real_name = #{record.realName,jdbcType=VARCHAR},
285
+      </if>
286
+      <if test="record.userAlias != null" >
287
+        user_alias = #{record.userAlias,jdbcType=VARCHAR},
288
+      </if>
289
+      <if test="record.sex != null">
290
+        sex = #{record.sex,jdbcType=INTEGER},
291
+      </if>
292
+      <if test="record.telphone != null">
293
+        telphone = #{record.telphone,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="record.mobile != null">
296
+        mobile = #{record.mobile,jdbcType=VARCHAR},
297
+      </if>
298
+      <if test="record.address != null">
299
+        address = #{record.address,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="record.email != null">
302
+        email = #{record.email,jdbcType=VARCHAR},
303
+      </if>
304
+      <if test="record.qqNumber != null">
305
+        qq_number = #{record.qqNumber,jdbcType=VARCHAR},
306
+      </if>
307
+      <if test="record.imgUrl != null">
308
+        img_url = #{record.imgUrl,jdbcType=VARCHAR},
309
+      </if>
310
+      <if test="record.signature != null">
311
+        signature = #{record.signature,jdbcType=VARCHAR},
312
+      </if>
313
+      <if test="record.createTime != null">
314
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
315
+      </if>
316
+      <if test="record.createUserId != null">
317
+        create_user_id = #{record.createUserId,jdbcType=INTEGER},
318
+      </if>
319
+      <if test="record.updateTime != null">
320
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
321
+      </if>
322
+      <if test="record.updateUserId != null">
323
+        update_user_id = #{record.updateUserId,jdbcType=INTEGER},
324
+      </if>
325
+      <if test="record.status != null">
326
+        status = #{record.status,jdbcType=INTEGER},
327
+      </if>
328
+      <if test="record.delFlag != null">
329
+        del_flag = #{record.delFlag,jdbcType=INTEGER},
330
+      </if>
331
+    </set>
332
+    <if test="_parameter != null">
333
+      <include refid="Update_By_Example_Where_Clause" />
334
+    </if>
335
+  </update>
336
+  <update id="updateByExample" parameterType="map">
337
+    update user_info
338
+    set user_id = #{record.userId,jdbcType=INTEGER},
339
+      username = #{record.username,jdbcType=VARCHAR},
340
+      password = #{record.password,jdbcType=VARCHAR},
341
+      org_id = #{record.orgId,jdbcType=INTEGER},
342
+      real_name = #{record.realName,jdbcType=VARCHAR},
343
+      user_alias = #{record.userAlias,jdbcType=VARCHAR},
344
+      sex = #{record.sex,jdbcType=INTEGER},
345
+      telphone = #{record.telphone,jdbcType=VARCHAR},
346
+      mobile = #{record.mobile,jdbcType=VARCHAR},
347
+      address = #{record.address,jdbcType=VARCHAR},
348
+      email = #{record.email,jdbcType=VARCHAR},
349
+      qq_number = #{record.qqNumber,jdbcType=VARCHAR},
350
+      img_url = #{record.imgUrl,jdbcType=VARCHAR},
351
+      signature = #{record.signature,jdbcType=VARCHAR},
352
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
353
+      create_user_id = #{record.createUserId,jdbcType=INTEGER},
354
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
355
+      update_user_id = #{record.updateUserId,jdbcType=INTEGER},
356
+      status = #{record.status,jdbcType=INTEGER},
357
+      del_flag = #{record.delFlag,jdbcType=INTEGER}
358
+    <if test="_parameter != null">
359
+      <include refid="Update_By_Example_Where_Clause" />
360
+    </if>
361
+  </update>
362
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.UserInfo">
363
+    update user_info
364
+    <set>
365
+      <if test="username != null">
366
+        username = #{username,jdbcType=VARCHAR},
367
+      </if>
368
+      <if test="password != null">
369
+        password = #{password,jdbcType=VARCHAR},
370
+      </if>
371
+      <if test="orgId != null">
372
+        org_id = #{orgId,jdbcType=INTEGER},
373
+      </if>
374
+      <if test="realName != null">
375
+        real_name = #{realName,jdbcType=VARCHAR},
376
+      </if>
377
+      <if test="userAlias != null" >
378
+        user_alias = #{userAlias,jdbcType=VARCHAR},
379
+      </if>
380
+      <if test="sex != null">
381
+        sex = #{sex,jdbcType=INTEGER},
382
+      </if>
383
+      <if test="telphone != null">
384
+        telphone = #{telphone,jdbcType=VARCHAR},
385
+      </if>
386
+      <if test="mobile != null">
387
+        mobile = #{mobile,jdbcType=VARCHAR},
388
+      </if>
389
+      <if test="address != null">
390
+        address = #{address,jdbcType=VARCHAR},
391
+      </if>
392
+      <if test="email != null">
393
+        email = #{email,jdbcType=VARCHAR},
394
+      </if>
395
+      <if test="qqNumber != null">
396
+        qq_number = #{qqNumber,jdbcType=VARCHAR},
397
+      </if>
398
+      <if test="imgUrl != null">
399
+        img_url = #{imgUrl,jdbcType=VARCHAR},
400
+      </if>
401
+      <if test="signature != null">
402
+        signature = #{signature,jdbcType=VARCHAR},
403
+      </if>
404
+      <if test="createTime != null">
405
+        create_time = #{createTime,jdbcType=TIMESTAMP},
406
+      </if>
407
+      <if test="createUserId != null">
408
+        create_user_id = #{createUserId,jdbcType=INTEGER},
409
+      </if>
410
+      <if test="updateTime != null">
411
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
412
+      </if>
413
+      <if test="updateUserId != null">
414
+        update_user_id = #{updateUserId,jdbcType=INTEGER},
415
+      </if>
416
+      <if test="status != null">
417
+        status = #{status,jdbcType=INTEGER},
418
+      </if>
419
+      <if test="delFlag != null">
420
+        del_flag = #{delFlag,jdbcType=INTEGER},
421
+      </if>
422
+    </set>
423
+    where user_id = #{userId,jdbcType=INTEGER}
424
+  </update>
425
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.UserInfo">
426
+    update user_info
427
+    set username = #{username,jdbcType=VARCHAR},
428
+      password = #{password,jdbcType=VARCHAR},
429
+      org_id = #{orgId,jdbcType=INTEGER},
430
+      real_name = #{realName,jdbcType=VARCHAR},
431
+      user_alias = #{userAlias,jdbcType=VARCHAR},
432
+      sex = #{sex,jdbcType=INTEGER},
433
+      telphone = #{telphone,jdbcType=VARCHAR},
434
+      mobile = #{mobile,jdbcType=VARCHAR},
435
+      address = #{address,jdbcType=VARCHAR},
436
+      email = #{email,jdbcType=VARCHAR},
437
+      qq_number = #{qqNumber,jdbcType=VARCHAR},
438
+      img_url = #{imgUrl,jdbcType=VARCHAR},
439
+      signature = #{signature,jdbcType=VARCHAR},
440
+      create_time = #{createTime,jdbcType=TIMESTAMP},
441
+      create_user_id = #{createUserId,jdbcType=INTEGER},
442
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
443
+      update_user_id = #{updateUserId,jdbcType=INTEGER},
444
+      status = #{status,jdbcType=INTEGER},
445
+      del_flag = #{delFlag,jdbcType=INTEGER}
446
+    where user_id = #{userId,jdbcType=INTEGER}
447
+  </update>
448
+   <resultMap id="UserRoleOrgMap" type="com.chinaitop.depot.business.model.UserInfo">
449
+    <id column="user_id" jdbcType="INTEGER" property="userId" />
450
+    <result column="username" jdbcType="VARCHAR" property="username" />
451
+    <result column="org_name" jdbcType="VARCHAR" property="orgName" />
452
+    <result column="real_name" jdbcType="VARCHAR" property="realName" />
453
+    <result column="telphone" jdbcType="VARCHAR" property="telphone" />
454
+  </resultMap>
455
+  <select id="queryAll" resultMap="UserRoleOrgMap" parameterType="map">
456
+		 SELECT
457
+			ui.user_id,
458
+			ui.real_name,
459
+			ui.username,
460
+			ui.telphone,
461
+			oi.org_name,
462
+			GROUP_CONCAT(ri.role_name)roleNames
463
+		FROM
464
+			user_info ui
465
+		LEFT JOIN user_role ur ON ui.user_id = ur.user_id
466
+		LEFT JOIN role_info ri ON ur.role_id = ri.role_id
467
+		LEFT JOIN org_info oi ON oi.org_id = ui.org_id
468
+		 <where>
469
+				<if test="username!=null">
470
+					and username like '%${username}%'
471
+				</if>
472
+				<if test="realName!=null">
473
+					and real_name like '%${realName}%'
474
+				</if>
475
+				<if test="orgIds!=null">
476
+                 and ui.org_id in
477
+                 <foreach collection="orgIds" index="index" item="item" open="(" separator="," close=")">
478
+                    #{item}
479
+                 </foreach>
480
+               </if>
481
+		</where>
482
+		GROUP BY
483
+			ui.user_id 
484
+  </select>
485
+</mapper>

+ 184 - 0
bin/src/main/java/com/chinaitop/depot/business/mapper/UserRoleMapper.xml

@@ -0,0 +1,184 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.business.mapper.UserRoleMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.UserRole" >
5
+    <id column="ur_id" property="urId" jdbcType="INTEGER" />
6
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
7
+    <result column="role_id" property="roleId" jdbcType="INTEGER" />
8
+  </resultMap>
9
+  <sql id="Example_Where_Clause" >
10
+    <where >
11
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
12
+        <if test="criteria.valid" >
13
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
14
+            <foreach collection="criteria.criteria" item="criterion" >
15
+              <choose >
16
+                <when test="criterion.noValue" >
17
+                  and ${criterion.condition}
18
+                </when>
19
+                <when test="criterion.singleValue" >
20
+                  and ${criterion.condition} #{criterion.value}
21
+                </when>
22
+                <when test="criterion.betweenValue" >
23
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
24
+                </when>
25
+                <when test="criterion.listValue" >
26
+                  and ${criterion.condition}
27
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
28
+                    #{listItem}
29
+                  </foreach>
30
+                </when>
31
+              </choose>
32
+            </foreach>
33
+          </trim>
34
+        </if>
35
+      </foreach>
36
+    </where>
37
+  </sql>
38
+  <sql id="Update_By_Example_Where_Clause" >
39
+    <where >
40
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
41
+        <if test="criteria.valid" >
42
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
43
+            <foreach collection="criteria.criteria" item="criterion" >
44
+              <choose >
45
+                <when test="criterion.noValue" >
46
+                  and ${criterion.condition}
47
+                </when>
48
+                <when test="criterion.singleValue" >
49
+                  and ${criterion.condition} #{criterion.value}
50
+                </when>
51
+                <when test="criterion.betweenValue" >
52
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
53
+                </when>
54
+                <when test="criterion.listValue" >
55
+                  and ${criterion.condition}
56
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
57
+                    #{listItem}
58
+                  </foreach>
59
+                </when>
60
+              </choose>
61
+            </foreach>
62
+          </trim>
63
+        </if>
64
+      </foreach>
65
+    </where>
66
+  </sql>
67
+  <sql id="Base_Column_List" >
68
+    ur_id, user_id, role_id
69
+  </sql>
70
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.UserRoleExample" >
71
+    select
72
+    <if test="distinct" >
73
+      distinct
74
+    </if>
75
+    <include refid="Base_Column_List" />
76
+    from user_role
77
+    <if test="_parameter != null" >
78
+      <include refid="Example_Where_Clause" />
79
+    </if>
80
+    <if test="orderByClause != null" >
81
+      order by ${orderByClause}
82
+    </if>
83
+  </select>
84
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
85
+    select 
86
+    <include refid="Base_Column_List" />
87
+    from user_role
88
+    where ur_id = #{urId,jdbcType=INTEGER}
89
+  </select>
90
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
91
+    delete from user_role
92
+    where ur_id = #{urId,jdbcType=INTEGER}
93
+  </delete>
94
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.UserRoleExample" >
95
+    delete from user_role
96
+    <if test="_parameter != null" >
97
+      <include refid="Example_Where_Clause" />
98
+    </if>
99
+  </delete>
100
+  <insert id="insert" parameterType="com.chinaitop.depot.business.model.UserRole">
101
+    insert into user_role (ur_id, user_id, role_id
102
+      )
103
+    values (#{urId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}
104
+      )
105
+  </insert>
106
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.UserRole" >
107
+    insert into user_role
108
+    <trim prefix="(" suffix=")" suffixOverrides="," >
109
+      <if test="urId != null" >
110
+        ur_id,
111
+      </if>
112
+      <if test="userId != null" >
113
+        user_id,
114
+      </if>
115
+      <if test="roleId != null" >
116
+        role_id,
117
+      </if>
118
+    </trim>
119
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
120
+      <if test="urId != null" >
121
+        #{urId,jdbcType=INTEGER},
122
+      </if>
123
+      <if test="userId != null" >
124
+        #{userId,jdbcType=INTEGER},
125
+      </if>
126
+      <if test="roleId != null" >
127
+        #{roleId,jdbcType=INTEGER},
128
+      </if>
129
+    </trim>
130
+  </insert>
131
+  <select id="countByExample" parameterType="com.chinaitop.depot.business.model.UserRoleExample" resultType="java.lang.Integer" >
132
+    select count(*) from user_role
133
+    <if test="_parameter != null" >
134
+      <include refid="Example_Where_Clause" />
135
+    </if>
136
+  </select>
137
+  <update id="updateByExampleSelective" parameterType="map" >
138
+    update user_role
139
+    <set >
140
+      <if test="record.urId != null" >
141
+        ur_id = #{record.urId,jdbcType=INTEGER},
142
+      </if>
143
+      <if test="record.userId != null" >
144
+        user_id = #{record.userId,jdbcType=INTEGER},
145
+      </if>
146
+      <if test="record.roleId != null" >
147
+        role_id = #{record.roleId,jdbcType=INTEGER},
148
+      </if>
149
+    </set>
150
+    <if test="_parameter != null" >
151
+      <include refid="Update_By_Example_Where_Clause" />
152
+    </if>
153
+  </update>
154
+  <update id="updateByExample" parameterType="map" >
155
+    update user_role
156
+    set ur_id = #{record.urId,jdbcType=INTEGER},
157
+      user_id = #{record.userId,jdbcType=INTEGER},
158
+      role_id = #{record.roleId,jdbcType=INTEGER}
159
+    <if test="_parameter != null" >
160
+      <include refid="Update_By_Example_Where_Clause" />
161
+    </if>
162
+  </update>
163
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.UserRole" >
164
+    update user_role
165
+    <set >
166
+      <if test="userId != null" >
167
+        user_id = #{userId,jdbcType=INTEGER},
168
+      </if>
169
+      <if test="roleId != null" >
170
+        role_id = #{roleId,jdbcType=INTEGER},
171
+      </if>
172
+    </set>
173
+    where ur_id = #{urId,jdbcType=INTEGER}
174
+  </update>
175
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.UserRole" >
176
+    update user_role
177
+    set user_id = #{userId,jdbcType=INTEGER},
178
+      role_id = #{roleId,jdbcType=INTEGER}
179
+    where ur_id = #{urId,jdbcType=INTEGER}
180
+  </update>
181
+  <delete id="deleteById" parameterType="java.lang.Integer">
182
+  	delete from user_role where user_id=#{userId};
183
+  </delete>
184
+</mapper>