gaodd 4 年 前
コミット
0d71dc5c04

+ 4 - 4
src/main/java/com/chinaitop/depot/basic/controller/BasicStorehouseController.java

@@ -118,13 +118,13 @@ public class BasicStorehouseController {
118 118
 
119 119
 			list = basicStorehouseService.findBasicStorehouseNew(modelMap);
120 120
 			//获取当前仓房的保管员
121
-			if (null != list && list.size() > 0 && ParameterUtil.isequal("0",libraryType)) {
121
+			/*if (null != list && list.size() > 0 && ParameterUtil.isequal("0",libraryType)) {
122 122
 				String keeperNames = "";
123 123
 				for (BasicStorehouse storehouse : list) {
124 124
 					keeperNames = basicStorehouseService.getStorehouseKeeper(storehouse.getStorehouseId(), orgId, true);
125 125
 					storehouse.setDutystoreman(keeperNames);
126 126
 				}
127
-			}
127
+			}*/
128 128
 		} catch (Exception e) {
129 129
 			e.printStackTrace();
130 130
 		}
@@ -149,11 +149,11 @@ public class BasicStorehouseController {
149 149
 		try {
150 150
 			if (id != null) {
151 151
 				basicStorehouse = basicStorehouseService.findByPrimary(id);
152
-				if(ParameterUtil.isequal(basicStorehouse.getLibraryType(),"0")){
152
+				/*if(ParameterUtil.isequal(basicStorehouse.getLibraryType(),"0")){
153 153
 					//获取当前仓房的保管员
154 154
 					String keeperNames = basicStorehouseService.getStorehouseKeeper(id, orgId, false);
155 155
 					basicStorehouse.setDutystoreman(keeperNames);
156
-				}
156
+				}*/
157 157
 			} else {
158 158
 				basicStorehouse = new BasicStorehouse();
159 159
 			}

+ 423 - 423
src/main/java/com/chinaitop/depot/basic/mapper/BasicTankMapper.xml

@@ -1,198 +1,198 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 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.basic.mapper.BasicTankMapper">
4
-  <resultMap id="BaseResultMap" type="com.chinaitop.depot.basic.model.BasicTank">
5
-    <id column="id" jdbcType="INTEGER" property="id" />
6
-    <result column="storageTank_code" jdbcType="VARCHAR" property="storagetankCode" />
7
-    <result column="storageTank_name" jdbcType="VARCHAR" property="storagetankName" />
8
-    <result column="org_code" jdbcType="VARCHAR" property="orgCode" />
9
-    <result column="tank_capacity" jdbcType="DECIMAL" property="tankCapacity" />
10
-    <result column="createDate" jdbcType="TIMESTAMP" property="createdate" />
11
-    <result column="facilities_type" jdbcType="INTEGER" property="facilitiesType" />
12
-    <result column="heating_type" jdbcType="INTEGER" property="heatingType" />
13
-    <result column="tank_type" jdbcType="INTEGER" property="tankType" />
14
-    <result column="diameter" jdbcType="DECIMAL" property="diameter" />
3
+<mapper namespace="com.chinaitop.depot.basic.mapper.BasicTankMapper">
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.basic.model.BasicTank">
5
+    <id column="id" jdbcType="INTEGER" property="id" />
6
+    <result column="storageTank_code" jdbcType="VARCHAR" property="storagetankCode" />
7
+    <result column="storageTank_name" jdbcType="VARCHAR" property="storagetankName" />
8
+    <result column="org_code" jdbcType="VARCHAR" property="orgCode" />
9
+    <result column="tank_capacity" jdbcType="DECIMAL" property="tankCapacity" />
10
+    <result column="createDate" jdbcType="TIMESTAMP" property="createdate" />
11
+    <result column="facilities_type" jdbcType="INTEGER" property="facilitiesType" />
12
+    <result column="heating_type" jdbcType="INTEGER" property="heatingType" />
13
+    <result column="tank_type" jdbcType="INTEGER" property="tankType" />
14
+    <result column="diameter" jdbcType="DECIMAL" property="diameter" />
15 15
     <result column="height" jdbcType="DECIMAL" property="height" />
16
-    <result column="buildDate" jdbcType="TIMESTAMP" property="builddate" />
17
-    <result column="check_way" jdbcType="INTEGER" property="checkWay" />
18
-    <result column="weld_way" jdbcType="INTEGER" property="weldWay" />
19
-    <result column="tank_apply" jdbcType="INTEGER" property="tankApply" />
20
-    <result column="tank_status" jdbcType="INTEGER" property="tankStatus" />
21
-    <result column="org_id" jdbcType="INTEGER" property="orgId" />
22
-    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
16
+    <result column="buildDate" jdbcType="TIMESTAMP" property="builddate" />
17
+    <result column="check_way" jdbcType="INTEGER" property="checkWay" />
18
+    <result column="weld_way" jdbcType="INTEGER" property="weldWay" />
19
+    <result column="tank_apply" jdbcType="INTEGER" property="tankApply" />
20
+    <result column="tank_status" jdbcType="INTEGER" property="tankStatus" />
21
+    <result column="org_id" jdbcType="INTEGER" property="orgId" />
22
+    <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
23 23
     <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
24 24
     <result column="crk_status" jdbcType="VARCHAR" property="crkStatus" />
25 25
     <result column="ygdm" property="crkStatus" jdbcType="VARCHAR" />
26
-    <result column="ygajdm" property="crkStatus" jdbcType="VARCHAR" />
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="(" prefixOverrides="and" suffix=")">
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 close=")" collection="criterion.value" item="listItem" open="(" 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="(" prefixOverrides="and" suffix=")">
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 close=")" collection="criterion.value" item="listItem" open="(" 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, storageTank_code, storageTank_name, org_code, tank_capacity, createDate, facilities_type, 
88
-    heating_type, tank_type, diameter, height, buildDate, check_way, weld_way, tank_apply, tank_status, 
89
-    org_id, del_flag, updatetime, crk_status, ygdm, ygajdm
90
-  </sql>
91
-  <select id="selectByExample" parameterType="com.chinaitop.depot.basic.model.BasicTankExample" resultMap="BaseResultMap">
92
-    select
93
-    <if test="distinct">
94
-      distinct
95
-    </if>
96
-    <include refid="Base_Column_List" />
97
-    from basic_tank
98
-    <if test="_parameter != null">
99
-      <include refid="Example_Where_Clause" />
100
-    </if>
101
-    <if test="orderByClause != null">
102
-      order by ${orderByClause}
103
-    </if>
104
-  </select>
105
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
106
-    select 
107
-    <include refid="Base_Column_List" />
108
-    from basic_tank
109
-    where id = #{id,jdbcType=INTEGER}
110
-  </select>
111
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
112
-    delete from basic_tank
113
-    where id = #{id,jdbcType=INTEGER}
114
-  </delete>
115
-  <delete id="deleteByExample" parameterType="com.chinaitop.depot.basic.model.BasicTankExample">
116
-    delete from basic_tank
117
-    <if test="_parameter != null">
118
-      <include refid="Example_Where_Clause" />
119
-    </if>
120
-  </delete>
121
-  <insert id="insert" parameterType="com.chinaitop.depot.basic.model.BasicTank">
122
-    insert into basic_tank (id, storageTank_code, storageTank_name, 
123
-      org_code, tank_capacity, createDate, 
124
-      facilities_type, heating_type, tank_type, 
125
-      diameter, height, buildDate, check_way, 
126
-      weld_way, tank_apply, tank_status, 
127
-      org_id, del_flag, updatetime, crk_status, ygdm, ygajdm
128
-      )
129
-    values (#{id,jdbcType=INTEGER}, #{storagetankCode,jdbcType=VARCHAR}, #{storagetankName,jdbcType=VARCHAR}, 
130
-      #{orgCode,jdbcType=VARCHAR}, #{tankCapacity,jdbcType=DECIMAL}, #{createdate,jdbcType=TIMESTAMP}, 
131
-      #{facilitiesType,jdbcType=INTEGER}, #{heatingType,jdbcType=INTEGER}, #{tankType,jdbcType=INTEGER}, 
132
-      #{diameter,jdbcType=DECIMAL}, #{height,jdbcType=DECIMAL}, #{builddate,jdbcType=TIMESTAMP}, #{checkWay,jdbcType=INTEGER}, 
133
-      #{weldWay,jdbcType=INTEGER}, #{tankApply,jdbcType=INTEGER}, #{tankStatus,jdbcType=INTEGER}, 
134
-      #{orgId,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, #{crkStatus,jdbcType=VARCHAR},
135
-      #{ygdm,jdbcType=VARCHAR},#{ygajdm,jdbcType=VARCHAR})
136
-  </insert>
137
-  <insert id="insertSelective" parameterType="com.chinaitop.depot.basic.model.BasicTank"  keyProperty="id" useGeneratedKeys="true">
138
-    insert into basic_tank
139
-    <trim prefix="(" suffix=")" suffixOverrides=",">
140
-      <if test="id != null">
141
-        id,
142
-      </if>
143
-      <if test="storagetankCode != null">
144
-        storageTank_code,
145
-      </if>
146
-      <if test="storagetankName != null">
147
-        storageTank_name,
148
-      </if>
149
-      <if test="orgCode != null">
150
-        org_code,
151
-      </if>
152
-      <if test="tankCapacity != null">
153
-        tank_capacity,
154
-      </if>
155
-      <if test="createdate != null">
156
-        createDate,
157
-      </if>
158
-      <if test="facilitiesType != null">
159
-        facilities_type,
160
-      </if>
161
-      <if test="heatingType != null">
162
-        heating_type,
163
-      </if>
164
-      <if test="tankType != null">
165
-        tank_type,
166
-      </if>
167
-      <if test="diameter != null">
168
-        diameter,
169
-      </if>
170
-      <if test="height != null">
171
-        height,
172
-      </if>
173
-      <if test="builddate != null">
174
-        buildDate,
175
-      </if>
176
-      <if test="checkWay != null">
177
-        check_way,
178
-      </if>
179
-      <if test="weldWay != null">
180
-        weld_way,
181
-      </if>
182
-      <if test="tankApply != null">
183
-        tank_apply,
184
-      </if>
185
-      <if test="tankStatus != null">
186
-        tank_status,
187
-      </if>
188
-      <if test="orgId != null">
189
-        org_id,
190
-      </if>
191
-      <if test="delFlag != null">
192
-        del_flag,
193
-      </if>
194
-      <if test="updatetime != null">
195
-        updatetime,
26
+    <result column="ygajdm" property="crkStatus" jdbcType="VARCHAR" />
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="(" prefixOverrides="and" suffix=")">
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 close=")" collection="criterion.value" item="listItem" open="(" 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="(" prefixOverrides="and" suffix=")">
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 close=")" collection="criterion.value" item="listItem" open="(" 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, storageTank_code, storageTank_name, org_code, tank_capacity, createDate, facilities_type, 
88
+    heating_type, tank_type, diameter, height, buildDate, check_way, weld_way, tank_apply, tank_status, 
89
+    org_id, del_flag, updatetime, crk_status, ygdm, ygajdm
90
+  </sql>
91
+  <select id="selectByExample" parameterType="com.chinaitop.depot.basic.model.BasicTankExample" resultMap="BaseResultMap">
92
+    select
93
+    <if test="distinct">
94
+      distinct
95
+    </if>
96
+    <include refid="Base_Column_List" />
97
+    from basic_tank
98
+    <if test="_parameter != null">
99
+      <include refid="Example_Where_Clause" />
100
+    </if>
101
+    <if test="orderByClause != null">
102
+      order by ${orderByClause}
103
+    </if>
104
+  </select>
105
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
106
+    select 
107
+    <include refid="Base_Column_List" />
108
+    from basic_tank
109
+    where id = #{id,jdbcType=INTEGER}
110
+  </select>
111
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
112
+    delete from basic_tank
113
+    where id = #{id,jdbcType=INTEGER}
114
+  </delete>
115
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.basic.model.BasicTankExample">
116
+    delete from basic_tank
117
+    <if test="_parameter != null">
118
+      <include refid="Example_Where_Clause" />
119
+    </if>
120
+  </delete>
121
+  <insert id="insert" parameterType="com.chinaitop.depot.basic.model.BasicTank">
122
+    insert into basic_tank (id, storageTank_code, storageTank_name, 
123
+      org_code, tank_capacity, createDate, 
124
+      facilities_type, heating_type, tank_type, 
125
+      diameter, height, buildDate, check_way, 
126
+      weld_way, tank_apply, tank_status, 
127
+      org_id, del_flag, updatetime, crk_status, ygdm, ygajdm
128
+      )
129
+    values (#{id,jdbcType=INTEGER}, #{storagetankCode,jdbcType=VARCHAR}, #{storagetankName,jdbcType=VARCHAR}, 
130
+      #{orgCode,jdbcType=VARCHAR}, #{tankCapacity,jdbcType=DECIMAL}, #{createdate,jdbcType=TIMESTAMP}, 
131
+      #{facilitiesType,jdbcType=INTEGER}, #{heatingType,jdbcType=INTEGER}, #{tankType,jdbcType=INTEGER}, 
132
+      #{diameter,jdbcType=DECIMAL}, #{height,jdbcType=DECIMAL}, #{builddate,jdbcType=TIMESTAMP}, #{checkWay,jdbcType=INTEGER}, 
133
+      #{weldWay,jdbcType=INTEGER}, #{tankApply,jdbcType=INTEGER}, #{tankStatus,jdbcType=INTEGER}, 
134
+      #{orgId,jdbcType=INTEGER}, #{delFlag,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, #{crkStatus,jdbcType=VARCHAR},
135
+      #{ygdm,jdbcType=VARCHAR},#{ygajdm,jdbcType=VARCHAR})
136
+  </insert>
137
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.basic.model.BasicTank"  keyProperty="id" useGeneratedKeys="true">
138
+    insert into basic_tank
139
+    <trim prefix="(" suffix=")" suffixOverrides=",">
140
+      <if test="id != null">
141
+        id,
142
+      </if>
143
+      <if test="storagetankCode != null">
144
+        storageTank_code,
145
+      </if>
146
+      <if test="storagetankName != null">
147
+        storageTank_name,
148
+      </if>
149
+      <if test="orgCode != null">
150
+        org_code,
151
+      </if>
152
+      <if test="tankCapacity != null">
153
+        tank_capacity,
154
+      </if>
155
+      <if test="createdate != null">
156
+        createDate,
157
+      </if>
158
+      <if test="facilitiesType != null">
159
+        facilities_type,
160
+      </if>
161
+      <if test="heatingType != null">
162
+        heating_type,
163
+      </if>
164
+      <if test="tankType != null">
165
+        tank_type,
166
+      </if>
167
+      <if test="diameter != null">
168
+        diameter,
169
+      </if>
170
+      <if test="height != null">
171
+        height,
172
+      </if>
173
+      <if test="builddate != null">
174
+        buildDate,
175
+      </if>
176
+      <if test="checkWay != null">
177
+        check_way,
178
+      </if>
179
+      <if test="weldWay != null">
180
+        weld_way,
181
+      </if>
182
+      <if test="tankApply != null">
183
+        tank_apply,
184
+      </if>
185
+      <if test="tankStatus != null">
186
+        tank_status,
187
+      </if>
188
+      <if test="orgId != null">
189
+        org_id,
190
+      </if>
191
+      <if test="delFlag != null">
192
+        del_flag,
193
+      </if>
194
+      <if test="updatetime != null">
195
+        updatetime,
196 196
       </if>
197 197
       <if test="crkStatus != null">
198 198
         crk_status,
@@ -202,65 +202,65 @@
202 202
       </if>
203 203
       <if test="ygajdm != null">
204 204
       	ygajdm,
205
-      </if>
206
-    </trim>
207
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
208
-      <if test="id != null">
209
-        #{id,jdbcType=INTEGER},
210
-      </if>
211
-      <if test="storagetankCode != null">
212
-        #{storagetankCode,jdbcType=VARCHAR},
213
-      </if>
214
-      <if test="storagetankName != null">
215
-        #{storagetankName,jdbcType=VARCHAR},
216
-      </if>
217
-      <if test="orgCode != null">
218
-        #{orgCode,jdbcType=VARCHAR},
219
-      </if>
220
-      <if test="tankCapacity != null">
221
-        #{tankCapacity,jdbcType=DECIMAL},
222
-      </if>
223
-      <if test="createdate != null">
224
-        #{createdate,jdbcType=TIMESTAMP},
225
-      </if>
226
-      <if test="facilitiesType != null">
227
-        #{facilitiesType,jdbcType=INTEGER},
228
-      </if>
229
-      <if test="heatingType != null">
230
-        #{heatingType,jdbcType=INTEGER},
231
-      </if>
232
-      <if test="tankType != null">
233
-        #{tankType,jdbcType=INTEGER},
234
-      </if>
235
-      <if test="diameter != null">
236
-        #{diameter,jdbcType=DECIMAL},
237
-      </if>
238
-      <if test="height != null">
239
-        #{height,jdbcType=DECIMAL},
205
+      </if>
206
+    </trim>
207
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
208
+      <if test="id != null">
209
+        #{id,jdbcType=INTEGER},
210
+      </if>
211
+      <if test="storagetankCode != null">
212
+        #{storagetankCode,jdbcType=VARCHAR},
213
+      </if>
214
+      <if test="storagetankName != null">
215
+        #{storagetankName,jdbcType=VARCHAR},
216
+      </if>
217
+      <if test="orgCode != null">
218
+        #{orgCode,jdbcType=VARCHAR},
219
+      </if>
220
+      <if test="tankCapacity != null">
221
+        #{tankCapacity,jdbcType=DECIMAL},
222
+      </if>
223
+      <if test="createdate != null">
224
+        #{createdate,jdbcType=TIMESTAMP},
225
+      </if>
226
+      <if test="facilitiesType != null">
227
+        #{facilitiesType,jdbcType=INTEGER},
228
+      </if>
229
+      <if test="heatingType != null">
230
+        #{heatingType,jdbcType=INTEGER},
231
+      </if>
232
+      <if test="tankType != null">
233
+        #{tankType,jdbcType=INTEGER},
234
+      </if>
235
+      <if test="diameter != null">
236
+        #{diameter,jdbcType=DECIMAL},
237
+      </if>
238
+      <if test="height != null">
239
+        #{height,jdbcType=DECIMAL},
240 240
       </if>
241 241
       <if test="builddate != null">
242 242
         #{builddate,jdbcType=TIMESTAMP},
243
-      </if>
244
-      <if test="checkWay != null">
245
-        #{checkWay,jdbcType=INTEGER},
246
-      </if>
247
-      <if test="weldWay != null">
248
-        #{weldWay,jdbcType=INTEGER},
249
-      </if>
250
-      <if test="tankApply != null">
251
-        #{tankApply,jdbcType=INTEGER},
252
-      </if>
253
-      <if test="tankStatus != null">
254
-        #{tankStatus,jdbcType=INTEGER},
255
-      </if>
256
-      <if test="orgId != null">
257
-        #{orgId,jdbcType=INTEGER},
258
-      </if>
259
-      <if test="delFlag != null">
260
-        #{delFlag,jdbcType=INTEGER},
261
-      </if>
262
-      <if test="updatetime != null">
263
-        #{updatetime,jdbcType=TIMESTAMP},
243
+      </if>
244
+      <if test="checkWay != null">
245
+        #{checkWay,jdbcType=INTEGER},
246
+      </if>
247
+      <if test="weldWay != null">
248
+        #{weldWay,jdbcType=INTEGER},
249
+      </if>
250
+      <if test="tankApply != null">
251
+        #{tankApply,jdbcType=INTEGER},
252
+      </if>
253
+      <if test="tankStatus != null">
254
+        #{tankStatus,jdbcType=INTEGER},
255
+      </if>
256
+      <if test="orgId != null">
257
+        #{orgId,jdbcType=INTEGER},
258
+      </if>
259
+      <if test="delFlag != null">
260
+        #{delFlag,jdbcType=INTEGER},
261
+      </if>
262
+      <if test="updatetime != null">
263
+        #{updatetime,jdbcType=TIMESTAMP},
264 264
       </if>
265 265
       <if test="crkStatus != null">
266 266
         #{crkStatus,jdbcType=VARCHAR},
@@ -270,74 +270,74 @@
270 270
       </if>
271 271
       <if test="ygajdm != null">
272 272
         #{ygajdm,jdbcType=VARCHAR},
273
-      </if>
274
-    </trim>
275
-  </insert>
276
-  <select id="countByExample" parameterType="com.chinaitop.depot.basic.model.BasicTankExample" resultType="java.lang.Integer">
277
-    select count(*) from basic_tank
278
-    <if test="_parameter != null">
279
-      <include refid="Example_Where_Clause" />
280
-    </if>
281
-  </select>
282
-  <update id="updateByExampleSelective" parameterType="map">
283
-    update basic_tank
284
-    <set>
285
-      <if test="record.id != null">
286
-        id = #{record.id,jdbcType=INTEGER},
287
-      </if>
288
-      <if test="record.storagetankCode != null">
289
-        storageTank_code = #{record.storagetankCode,jdbcType=VARCHAR},
290
-      </if>
291
-      <if test="record.storagetankName != null">
292
-        storageTank_name = #{record.storagetankName,jdbcType=VARCHAR},
293
-      </if>
294
-      <if test="record.orgCode != null">
295
-        org_code = #{record.orgCode,jdbcType=VARCHAR},
296
-      </if>
297
-      <if test="record.tankCapacity != null">
298
-        tank_capacity = #{record.tankCapacity,jdbcType=DECIMAL},
299
-      </if>
300
-      <if test="record.createdate != null">
301
-        createDate = #{record.createdate,jdbcType=TIMESTAMP},
302
-      </if>
303
-      <if test="record.facilitiesType != null">
304
-        facilities_type = #{record.facilitiesType,jdbcType=INTEGER},
305
-      </if>
306
-      <if test="record.heatingType != null">
307
-        heating_type = #{record.heatingType,jdbcType=INTEGER},
308
-      </if>
309
-      <if test="record.tankType != null">
310
-        tank_type = #{record.tankType,jdbcType=INTEGER},
311
-      </if>
312
-      <if test="record.diameter != null">
313
-        diameter = #{record.diameter,jdbcType=DECIMAL},
314
-      </if>
315
-      <if test="record.height != null">
316
-        height = #{record.height,jdbcType=DECIMAL},
273
+      </if>
274
+    </trim>
275
+  </insert>
276
+  <select id="countByExample" parameterType="com.chinaitop.depot.basic.model.BasicTankExample" resultType="java.lang.Integer">
277
+    select count(*) from basic_tank
278
+    <if test="_parameter != null">
279
+      <include refid="Example_Where_Clause" />
280
+    </if>
281
+  </select>
282
+  <update id="updateByExampleSelective" parameterType="map">
283
+    update basic_tank
284
+    <set>
285
+      <if test="record.id != null">
286
+        id = #{record.id,jdbcType=INTEGER},
287
+      </if>
288
+      <if test="record.storagetankCode != null">
289
+        storageTank_code = #{record.storagetankCode,jdbcType=VARCHAR},
290
+      </if>
291
+      <if test="record.storagetankName != null">
292
+        storageTank_name = #{record.storagetankName,jdbcType=VARCHAR},
293
+      </if>
294
+      <if test="record.orgCode != null">
295
+        org_code = #{record.orgCode,jdbcType=VARCHAR},
296
+      </if>
297
+      <if test="record.tankCapacity != null">
298
+        tank_capacity = #{record.tankCapacity,jdbcType=DECIMAL},
299
+      </if>
300
+      <if test="record.createdate != null">
301
+        createDate = #{record.createdate,jdbcType=TIMESTAMP},
302
+      </if>
303
+      <if test="record.facilitiesType != null">
304
+        facilities_type = #{record.facilitiesType,jdbcType=INTEGER},
305
+      </if>
306
+      <if test="record.heatingType != null">
307
+        heating_type = #{record.heatingType,jdbcType=INTEGER},
308
+      </if>
309
+      <if test="record.tankType != null">
310
+        tank_type = #{record.tankType,jdbcType=INTEGER},
311
+      </if>
312
+      <if test="record.diameter != null">
313
+        diameter = #{record.diameter,jdbcType=DECIMAL},
314
+      </if>
315
+      <if test="record.height != null">
316
+        height = #{record.height,jdbcType=DECIMAL},
317 317
       </if>
318 318
       <if test="record.builddate != null">
319 319
         buildDate = #{record.builddate,jdbcType=TIMESTAMP},
320
-      </if>
321
-      <if test="record.checkWay != null">
322
-        check_way = #{record.checkWay,jdbcType=INTEGER},
323
-      </if>
324
-      <if test="record.weldWay != null">
325
-        weld_way = #{record.weldWay,jdbcType=INTEGER},
326
-      </if>
327
-      <if test="record.tankApply != null">
328
-        tank_apply = #{record.tankApply,jdbcType=INTEGER},
329
-      </if>
330
-      <if test="record.tankStatus != null">
331
-        tank_status = #{record.tankStatus,jdbcType=INTEGER},
332
-      </if>
333
-      <if test="record.orgId != null">
334
-        org_id = #{record.orgId,jdbcType=INTEGER},
335
-      </if>
336
-      <if test="record.delFlag != null">
337
-        del_flag = #{record.delFlag,jdbcType=INTEGER},
338
-      </if>
339
-      <if test="record.updatetime != null">
340
-        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
320
+      </if>
321
+      <if test="record.checkWay != null">
322
+        check_way = #{record.checkWay,jdbcType=INTEGER},
323
+      </if>
324
+      <if test="record.weldWay != null">
325
+        weld_way = #{record.weldWay,jdbcType=INTEGER},
326
+      </if>
327
+      <if test="record.tankApply != null">
328
+        tank_apply = #{record.tankApply,jdbcType=INTEGER},
329
+      </if>
330
+      <if test="record.tankStatus != null">
331
+        tank_status = #{record.tankStatus,jdbcType=INTEGER},
332
+      </if>
333
+      <if test="record.orgId != null">
334
+        org_id = #{record.orgId,jdbcType=INTEGER},
335
+      </if>
336
+      <if test="record.delFlag != null">
337
+        del_flag = #{record.delFlag,jdbcType=INTEGER},
338
+      </if>
339
+      <if test="record.updatetime != null">
340
+        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
341 341
       </if>
342 342
       <if test="record.crkStatus != null">
343 343
         crk_status = #{record.crkStatus,jdbcType=VARCHAR},
@@ -347,96 +347,96 @@
347 347
       </if>
348 348
       <if test="record.ygajdm != null">
349 349
         ygajdm = #{record.ygajdm,jdbcType=VARCHAR},
350
-      </if>
351
-    </set>
352
-    <if test="_parameter != null">
353
-      <include refid="Update_By_Example_Where_Clause" />
354
-    </if>
355
-  </update>
356
-  <update id="updateByExample" parameterType="map">
357
-    update basic_tank
358
-    set id = #{record.id,jdbcType=INTEGER},
359
-      storageTank_code = #{record.storagetankCode,jdbcType=VARCHAR},
360
-      storageTank_name = #{record.storagetankName,jdbcType=VARCHAR},
361
-      org_code = #{record.orgCode,jdbcType=VARCHAR},
362
-      tank_capacity = #{record.tankCapacity,jdbcType=DECIMAL},
363
-      createDate = #{record.createdate,jdbcType=TIMESTAMP},
364
-      facilities_type = #{record.facilitiesType,jdbcType=INTEGER},
365
-      heating_type = #{record.heatingType,jdbcType=INTEGER},
366
-      tank_type = #{record.tankType,jdbcType=INTEGER},
367
-      diameter = #{record.diameter,jdbcType=DECIMAL},
368
-      height = #{record.height,jdbcType=DECIMAL},
369
-      buildDate = #{record.builddate,jdbcType=TIMESTAMP},
370
-      check_way = #{record.checkWay,jdbcType=INTEGER},
371
-      weld_way = #{record.weldWay,jdbcType=INTEGER},
372
-      tank_apply = #{record.tankApply,jdbcType=INTEGER},
373
-      tank_status = #{record.tankStatus,jdbcType=INTEGER},
374
-      org_id = #{record.orgId,jdbcType=INTEGER},
375
-      del_flag = #{record.delFlag,jdbcType=INTEGER},
350
+      </if>
351
+    </set>
352
+    <if test="_parameter != null">
353
+      <include refid="Update_By_Example_Where_Clause" />
354
+    </if>
355
+  </update>
356
+  <update id="updateByExample" parameterType="map">
357
+    update basic_tank
358
+    set id = #{record.id,jdbcType=INTEGER},
359
+      storageTank_code = #{record.storagetankCode,jdbcType=VARCHAR},
360
+      storageTank_name = #{record.storagetankName,jdbcType=VARCHAR},
361
+      org_code = #{record.orgCode,jdbcType=VARCHAR},
362
+      tank_capacity = #{record.tankCapacity,jdbcType=DECIMAL},
363
+      createDate = #{record.createdate,jdbcType=TIMESTAMP},
364
+      facilities_type = #{record.facilitiesType,jdbcType=INTEGER},
365
+      heating_type = #{record.heatingType,jdbcType=INTEGER},
366
+      tank_type = #{record.tankType,jdbcType=INTEGER},
367
+      diameter = #{record.diameter,jdbcType=DECIMAL},
368
+      height = #{record.height,jdbcType=DECIMAL},
369
+      buildDate = #{record.builddate,jdbcType=TIMESTAMP},
370
+      check_way = #{record.checkWay,jdbcType=INTEGER},
371
+      weld_way = #{record.weldWay,jdbcType=INTEGER},
372
+      tank_apply = #{record.tankApply,jdbcType=INTEGER},
373
+      tank_status = #{record.tankStatus,jdbcType=INTEGER},
374
+      org_id = #{record.orgId,jdbcType=INTEGER},
375
+      del_flag = #{record.delFlag,jdbcType=INTEGER},
376 376
       updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
377 377
       crk_status = #{record.crkStatus,jdbcType=VARCHAR},
378 378
       ygdm = #{record.ygdm,jdbcType=VARCHAR},
379
-      ygajdm = #{record.ygajdm,jdbcType=VARCHAR}
380
-    <if test="_parameter != null">
381
-      <include refid="Update_By_Example_Where_Clause" />
382
-    </if>
383
-  </update>
384
-  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.basic.model.BasicTank">
385
-    update basic_tank
386
-    <set>
387
-      <if test="storagetankCode != null">
388
-        storageTank_code = #{storagetankCode,jdbcType=VARCHAR},
389
-      </if>
390
-      <if test="storagetankName != null">
391
-        storageTank_name = #{storagetankName,jdbcType=VARCHAR},
392
-      </if>
393
-      <if test="orgCode != null">
394
-        org_code = #{orgCode,jdbcType=VARCHAR},
395
-      </if>
396
-      <if test="tankCapacity != null">
397
-        tank_capacity = #{tankCapacity,jdbcType=DECIMAL},
398
-      </if>
399
-      <if test="createdate != null">
400
-        createDate = #{createdate,jdbcType=TIMESTAMP},
401
-      </if>
402
-      <if test="facilitiesType != null">
403
-        facilities_type = #{facilitiesType,jdbcType=INTEGER},
404
-      </if>
405
-      <if test="heatingType != null">
406
-        heating_type = #{heatingType,jdbcType=INTEGER},
407
-      </if>
408
-      <if test="tankType != null">
409
-        tank_type = #{tankType,jdbcType=INTEGER},
410
-      </if>
411
-      <if test="diameter != null">
412
-        diameter = #{diameter,jdbcType=DECIMAL},
413
-      </if>
414
-      <if test="height != null">
415
-        height = #{height,jdbcType=DECIMAL},
416
-      </if>
417
-      <if test="builddate != null">
418
-        buildDate = #{builddate,jdbcType=TIMESTAMP},
419
-      </if>
420
-      <if test="checkWay != null">
421
-        check_way = #{checkWay,jdbcType=INTEGER},
422
-      </if>
423
-      <if test="weldWay != null">
424
-        weld_way = #{weldWay,jdbcType=INTEGER},
425
-      </if>
426
-      <if test="tankApply != null">
427
-        tank_apply = #{tankApply,jdbcType=INTEGER},
428
-      </if>
429
-      <if test="tankStatus != null">
430
-        tank_status = #{tankStatus,jdbcType=INTEGER},
431
-      </if>
432
-      <if test="orgId != null">
433
-        org_id = #{orgId,jdbcType=INTEGER},
434
-      </if>
435
-      <if test="delFlag != null">
436
-        del_flag = #{delFlag,jdbcType=INTEGER},
437
-      </if>
438
-      <if test="updatetime != null">
439
-        updatetime = #{updatetime,jdbcType=TIMESTAMP},
379
+      ygajdm = #{record.ygajdm,jdbcType=VARCHAR}
380
+    <if test="_parameter != null">
381
+      <include refid="Update_By_Example_Where_Clause" />
382
+    </if>
383
+  </update>
384
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.basic.model.BasicTank">
385
+    update basic_tank
386
+    <set>
387
+      <if test="storagetankCode != null">
388
+        storageTank_code = #{storagetankCode,jdbcType=VARCHAR},
389
+      </if>
390
+      <if test="storagetankName != null">
391
+        storageTank_name = #{storagetankName,jdbcType=VARCHAR},
392
+      </if>
393
+      <if test="orgCode != null">
394
+        org_code = #{orgCode,jdbcType=VARCHAR},
395
+      </if>
396
+      <if test="tankCapacity != null">
397
+        tank_capacity = #{tankCapacity,jdbcType=DECIMAL},
398
+      </if>
399
+      <if test="createdate != null">
400
+        createDate = #{createdate,jdbcType=TIMESTAMP},
401
+      </if>
402
+      <if test="facilitiesType != null">
403
+        facilities_type = #{facilitiesType,jdbcType=INTEGER},
404
+      </if>
405
+      <if test="heatingType != null">
406
+        heating_type = #{heatingType,jdbcType=INTEGER},
407
+      </if>
408
+      <if test="tankType != null">
409
+        tank_type = #{tankType,jdbcType=INTEGER},
410
+      </if>
411
+      <if test="diameter != null">
412
+        diameter = #{diameter,jdbcType=DECIMAL},
413
+      </if>
414
+      <if test="height != null">
415
+        height = #{height,jdbcType=DECIMAL},
416
+      </if>
417
+      <if test="builddate != null">
418
+        buildDate = #{builddate,jdbcType=TIMESTAMP},
419
+      </if>
420
+      <if test="checkWay != null">
421
+        check_way = #{checkWay,jdbcType=INTEGER},
422
+      </if>
423
+      <if test="weldWay != null">
424
+        weld_way = #{weldWay,jdbcType=INTEGER},
425
+      </if>
426
+      <if test="tankApply != null">
427
+        tank_apply = #{tankApply,jdbcType=INTEGER},
428
+      </if>
429
+      <if test="tankStatus != null">
430
+        tank_status = #{tankStatus,jdbcType=INTEGER},
431
+      </if>
432
+      <if test="orgId != null">
433
+        org_id = #{orgId,jdbcType=INTEGER},
434
+      </if>
435
+      <if test="delFlag != null">
436
+        del_flag = #{delFlag,jdbcType=INTEGER},
437
+      </if>
438
+      <if test="updatetime != null">
439
+        updatetime = #{updatetime,jdbcType=TIMESTAMP},
440 440
       </if>
441 441
       <if test="crkStatus != null">
442 442
         crk_status = #{crkStatus,jdbcType=VARCHAR},
@@ -446,33 +446,33 @@
446 446
       </if>
447 447
       <if test="ygajdm != null">
448 448
         ygajdm = #{ygajdm,jdbcType=VARCHAR},
449
-      </if>
450
-    </set>
451
-    where id = #{id,jdbcType=INTEGER}
452
-  </update>
453
-  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.basic.model.BasicTank">
454
-    update basic_tank
455
-    set storageTank_code = #{storagetankCode,jdbcType=VARCHAR},
456
-      storageTank_name = #{storagetankName,jdbcType=VARCHAR},
457
-      org_code = #{orgCode,jdbcType=VARCHAR},
458
-      tank_capacity = #{tankCapacity,jdbcType=DECIMAL},
459
-      createDate = #{createdate,jdbcType=TIMESTAMP},
460
-      facilities_type = #{facilitiesType,jdbcType=INTEGER},
461
-      heating_type = #{heatingType,jdbcType=INTEGER},
462
-      tank_type = #{tankType,jdbcType=INTEGER},
463
-      diameter = #{diameter,jdbcType=DECIMAL},
464
-      height = #{height,jdbcType=DECIMAL},
465
-      buildDate = #{builddate,jdbcType=TIMESTAMP},
466
-      check_way = #{checkWay,jdbcType=INTEGER},
467
-      weld_way = #{weldWay,jdbcType=INTEGER},
468
-      tank_apply = #{tankApply,jdbcType=INTEGER},
469
-      tank_status = #{tankStatus,jdbcType=INTEGER},
470
-      org_id = #{orgId,jdbcType=INTEGER},
471
-      del_flag = #{delFlag,jdbcType=INTEGER},
449
+      </if>
450
+    </set>
451
+    where id = #{id,jdbcType=INTEGER}
452
+  </update>
453
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.basic.model.BasicTank">
454
+    update basic_tank
455
+    set storageTank_code = #{storagetankCode,jdbcType=VARCHAR},
456
+      storageTank_name = #{storagetankName,jdbcType=VARCHAR},
457
+      org_code = #{orgCode,jdbcType=VARCHAR},
458
+      tank_capacity = #{tankCapacity,jdbcType=DECIMAL},
459
+      createDate = #{createdate,jdbcType=TIMESTAMP},
460
+      facilities_type = #{facilitiesType,jdbcType=INTEGER},
461
+      heating_type = #{heatingType,jdbcType=INTEGER},
462
+      tank_type = #{tankType,jdbcType=INTEGER},
463
+      diameter = #{diameter,jdbcType=DECIMAL},
464
+      height = #{height,jdbcType=DECIMAL},
465
+      buildDate = #{builddate,jdbcType=TIMESTAMP},
466
+      check_way = #{checkWay,jdbcType=INTEGER},
467
+      weld_way = #{weldWay,jdbcType=INTEGER},
468
+      tank_apply = #{tankApply,jdbcType=INTEGER},
469
+      tank_status = #{tankStatus,jdbcType=INTEGER},
470
+      org_id = #{orgId,jdbcType=INTEGER},
471
+      del_flag = #{delFlag,jdbcType=INTEGER},
472 472
       updatetime = #{updatetime,jdbcType=TIMESTAMP},
473 473
       crk_status = #{crkStatus,jdbcType=VARCHAR},
474 474
       ygdm = #{ygdm,jdbcType=VARCHAR},
475
-      ygajdm = #{ygajdm,jdbcType=VARCHAR}
476
-    where id = #{id,jdbcType=INTEGER}
477
-  </update>
475
+      ygajdm = #{ygajdm,jdbcType=VARCHAR}
476
+    where id = #{id,jdbcType=INTEGER}
477
+  </update>
478 478
 </mapper>

File diff suppressed because it is too large
+ 526 - 526
src/main/java/com/chinaitop/depot/basic/mapper/BasicWarehouseMapper.xml


+ 0 - 9
src/main/java/com/chinaitop/depot/basic/service/BasicStorehouseService.java

@@ -87,15 +87,6 @@ public interface BasicStorehouseService {
87 87
 	 */
88 88
 	public String importData(List<List<String>> list, JSONObject userInfo);
89 89
 
90
-	/**
91
-	 * 根据仓房ID获取当前仓房的保管员名称
92
-	 * 
93
-	 * @param id 仓房ID
94
-	 * @param orgId 单位ID
95
-	 * @param flag 是否需要格式化省略
96
-	 * @return
97
-	 */
98
-	public String getStorehouseKeeper(Integer id, Integer orgId, boolean flag);
99 90
 	
100 91
 	/**
101 92
 	 * 查询三温检查列表最新数据所对应的仓房

+ 630 - 0
src/main/java/com/chinaitop/depot/basic/service/impl/BasicStorehouseServiceImpl.java

@@ -0,0 +1,630 @@
1
+package com.chinaitop.depot.basic.service.impl;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.ArrayList;
5
+import java.util.Date;
6
+import java.util.HashMap;
7
+import java.util.List;
8
+import java.util.Map;
9
+import java.util.UUID;
10
+
11
+import javax.annotation.Resource;
12
+import javax.servlet.http.HttpServletRequest;
13
+
14
+import com.chinaitop.depot.basic.mapper.BasicEnumMapper;
15
+import com.chinaitop.depot.basic.model.*;
16
+import com.chinaitop.utils.ParameterUtil;
17
+import com.fasterxml.jackson.databind.ObjectMapper;
18
+
19
+import org.apache.commons.lang.ObjectUtils;
20
+import org.springframework.stereotype.Service;
21
+
22
+import com.alibaba.fastjson.JSONObject;
23
+import com.chinaitop.depot.basic.mapper.BasicStorehouseMapper;
24
+import com.chinaitop.depot.basic.mapper.BasicTankMapper;
25
+import com.chinaitop.depot.basic.mapper.BasicWarehouseMapper;
26
+import com.chinaitop.depot.basic.model.BasicStorehouseExample.Criteria;
27
+import com.chinaitop.depot.basic.service.BasicStorehouseService;
28
+import com.chinaitop.depot.basic.service.BasicWarehouseService;
29
+import com.chinaitop.depot.utils.BusinessUtils;
30
+
31
+@Service
32
+@SuppressWarnings("all")
33
+public class BasicStorehouseServiceImpl implements BasicStorehouseService {
34
+
35
+	@Resource
36
+	private BasicStorehouseMapper basic;
37
+
38
+	@Resource
39
+	private BasicWarehouseMapper wareMapper;
40
+
41
+	@Resource
42
+	private BasicWarehouseService warehouseService;
43
+
44
+	@Resource
45
+	private BasicEnumMapper enumMapper;
46
+
47
+	@Resource
48
+	private BasicTankMapper basicTankMapper;
49
+
50
+	@Override
51
+	public void addBasicStorehouse(BasicStorehouse basicStorehouse) throws Exception {
52
+		basic.insertSelective(basicStorehouse);
53
+	}
54
+
55
+	@Override
56
+	public void removeBasicStorehouse(Integer id) throws Exception {
57
+		basic.deleteByPrimaryKey(id);
58
+	}
59
+
60
+	@Override
61
+	public void updateBasicStorehouse(BasicStorehouse basicStorehouse) throws Exception {
62
+		basic.updateByPrimaryKey(basicStorehouse);
63
+	}
64
+
65
+	@Override
66
+	public BasicStorehouse findByPrimary(Integer id) throws Exception {
67
+		return basic.selectByPrimaryKey(id);
68
+	}
69
+
70
+	@Override
71
+	public List<BasicStorehouse> findBasicStorehouse(BasicStorehouseExample basicStorehouseExample) throws Exception {
72
+		return basic.selectByExample(basicStorehouseExample);
73
+	}
74
+
75
+	@Override
76
+	public List<BasicStorehouse> findBasicStorehouseNew(Map<String, Object> map) throws Exception {
77
+		return basic.selectByExampleNew(map);
78
+	}
79
+
80
+	@Override
81
+	public int count(BasicStorehouseExample basicStorehouseExample) throws Exception {
82
+		return basic.countByExample(basicStorehouseExample);
83
+	}
84
+
85
+	@Override
86
+	public Map<String, Object> getStorehouseData(Integer orgId, String libraryType) {
87
+		Map<String, Object> modelMap = new HashMap<String, Object>();
88
+		BasicStorehouseExample example = new BasicStorehouseExample();
89
+		Criteria criteria = example.createCriteria();
90
+		List<BasicStorehouse> houselist = null;
91
+		try {
92
+			example.setOrderByClause("storehouse_id asc");
93
+			if (ParameterUtil.isnotnull(orgId)) { 
94
+				criteria.andOrgIdEqualTo(orgId);
95
+			}
96
+			if (ParameterUtil.isnotnull(libraryType)) {
97
+				criteria.andLibraryTypeEqualTo(libraryType);
98
+			}else if(ParameterUtil.isnull(libraryType)){
99
+				criteria.andLibraryTypeEqualTo("0");//如果不传值则默认查询主库数据,不查询代储库数据
100
+			}
101
+			criteria.andDelFlagEqualTo(1); // 查询正常数据
102
+			houselist = basic.selectByExample(example); //获取当前单位下的所有有效数据
103
+		} catch (Exception e) {
104
+			e.printStackTrace();
105
+		}
106
+		modelMap.put("houseList", houselist);
107
+		modelMap.put("houseObj", getStorehouseObj(orgId,libraryType));
108
+		modelMap.put("houseCodeObj", getStorehouseCodeObj(orgId,libraryType));
109
+		return modelMap;
110
+	}
111
+
112
+	/**
113
+	 * 获取当前单位下所有仓房数据(全局接口,不可随便修改)
114
+	 *
115
+	 * @param orgId
116
+	 * @return
117
+	 */
118
+	private Map<Integer, Object> getStorehouseObj(Integer orgId,String libraryType) {
119
+		BasicStorehouseExample example = new BasicStorehouseExample();
120
+		Criteria criteria = example.createCriteria();
121
+		List<BasicStorehouse> houseObj = null;
122
+		try {
123
+			example.setOrderByClause("storehouse_id asc");
124
+
125
+			if (ParameterUtil.isnotnull(libraryType)) {
126
+				criteria.andLibraryTypeEqualTo(libraryType);
127
+			}else if(ParameterUtil.isnull(libraryType)){
128
+				criteria.andLibraryTypeEqualTo("0");//如果不传值则默认查询主库数据,不查询代储库数据
129
+			}
130
+			if (ParameterUtil.isnotnull(orgId)) {
131
+				criteria.andOrgIdEqualTo(orgId);
132
+			}
133
+			
134
+			/*criteria.andDelFlagEqualTo(1); // 查询正常数据
135
+*/			houseObj = basic.selectByExample(example); //获取当前单位所有的仓房数据
136
+		} catch (Exception e) {
137
+			e.printStackTrace();
138
+		}
139
+		Map<Integer, Object> objMap = new HashMap<Integer, Object>();
140
+		for (BasicStorehouse obj : houseObj) {
141
+			objMap.put(obj.getStorehouseId(), obj);
142
+		}
143
+		return objMap;
144
+	}
145
+
146
+	/**
147
+	 * 获取当前单位下所有仓房数据-仓房编码(全局接口,不可随便修改)
148
+	 *
149
+	 * @param depotId
150
+	 * @return
151
+	 */
152
+	private Map<String, Object> getStorehouseCodeObj(Integer orgId,String libraryType) {
153
+		BasicStorehouseExample example = new BasicStorehouseExample();
154
+		Criteria criteria = example.createCriteria();
155
+		List<BasicStorehouse> houseObj = null;
156
+		try {
157
+			example.setOrderByClause("storehouse_id asc");
158
+
159
+			if (ParameterUtil.isnotnull(libraryType)) {
160
+				criteria.andLibraryTypeEqualTo(libraryType);
161
+			}else if(ParameterUtil.isnull(libraryType)){
162
+				criteria.andLibraryTypeEqualTo("0");//如果不传值则默认查询主库数据,不查询代储库数据
163
+			}
164
+			if (ParameterUtil.isnotnull(orgId)) {
165
+				criteria.andOrgIdEqualTo(orgId);
166
+			}
167
+			criteria.andDelFlagEqualTo(1); // 查询正常数据
168
+			houseObj = basic.selectByExample(example); //获取当前单位所有的仓房数据
169
+		} catch (Exception e) {
170
+			e.printStackTrace();
171
+		}
172
+		Map<String, Object> objMap = new HashMap<>();
173
+		for (BasicStorehouse obj : houseObj) {
174
+			objMap.put(obj.getStorehouseCode(), obj);
175
+		}
176
+		return objMap;
177
+	}
178
+
179
+	@Override
180
+	public String importData(List<List<String>> list, JSONObject user) {
181
+
182
+		Integer orgId = null;
183
+		String orgName = "";
184
+		if (null != user) {
185
+			orgId = Integer.parseInt(user.get("orgId") == null?"":user.get("orgId").toString());
186
+			orgName = user.get("orgName") == null?"":user.get("orgName").toString();
187
+		}
188
+
189
+		String uuid = null;
190
+		Date date = new Date();
191
+		Map<String, Integer> map = new HashMap<String, Integer>();
192
+		BasicStorehouse storehouse = null;
193
+		BasicWarehouse warehouse = null;
194
+		String msg = "";//消息
195
+		boolean value_flag = false;
196
+		int len = 0;//长度
197
+		//根据字典名字查询字典编号
198
+		BasicEnumExample enumExample = new BasicEnumExample();
199
+		BasicEnumExample.Criteria Criteria = enumExample.createCriteria();
200
+		List<BasicEnum> basicEnums;
201
+
202
+		for (int i = 0; i < list.size(); i++) {
203
+			List<String> revList = list.get(i);
204
+			uuid = UUID.randomUUID().toString();
205
+
206
+			for (int j = 0; j < revList.size(); j++) {
207
+				switch(j) {
208
+					case 0://仓房编号
209
+						if (ParameterUtil.isnotnull(revList.get(j))) {
210
+							len = revList.get(j).length();
211
+							if (len > 50) {
212
+								msg = "第 "+(i+1)+" 行第 1 列的值的长度不能超过50!";
213
+								return msg;
214
+							}
215
+
216
+							Integer mapKey = map.get(revList.get(j));
217
+							if (mapKey == null) {
218
+								storehouse = new BasicStorehouse();
219
+								map.put(revList.get(j), null);
220
+								storehouse.setStorehouseCode(revList.get(j));
221
+							}
222
+						}
223
+						break;
224
+					case 1://仓房名称
225
+						if (storehouse != null) {
226
+							len = revList.get(j).length();
227
+							if (len > 50) {
228
+								msg = "第 "+(i+1)+" 行第 2 列的值的长度不能超过50!";
229
+								return msg;
230
+							}
231
+							storehouse.setStorehouseName(revList.get(j));
232
+						}
233
+						break;
234
+					case 2://仓房类型
235
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
236
+							enumExample.clear();
237
+							Criteria = enumExample.createCriteria();
238
+							Criteria.andEnumnameEqualTo(revList.get(j));
239
+							basicEnums = enumMapper.selectByExample(enumExample);
240
+							if(basicEnums.size() == 0){
241
+								msg = "第 "+(i+1)+" 行第 3 列的值不正确,请查找后在导入!";
242
+								return msg;
243
+							}
244
+							len = revList.get(j).length();
245
+							if (len > 11) {
246
+								msg = "第 "+(i+1)+" 行第 3 列的值的长度不能超过11!";
247
+								return msg;
248
+							}
249
+							storehouse.setStorehouseType(basicEnums.get(0).getEnumid());
250
+						}
251
+						break;
252
+					case 3://设计仓容(吨)
253
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
254
+							value_flag = revList.get(j).matches("[0-9]+");
255
+							if (!value_flag) {
256
+								msg = "第 "+(i+1)+" 行的第 4 列的值只能是数字!";
257
+								return msg;
258
+							}
259
+							len = revList.get(j).length();
260
+							if (len > 30) {
261
+								msg = "第 "+(i+1)+" 行第 4 列的值的长度不能超过30!";
262
+								return msg;
263
+							}
264
+							storehouse.setDesignCapacity(BigDecimal.valueOf(Integer.parseInt(revList.get(j))));
265
+						}
266
+						break;
267
+					case 4://实际仓容(吨)
268
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
269
+							value_flag = revList.get(j).matches("[0-9]+");
270
+							if (!value_flag) {
271
+								msg = "第 "+(i+1)+" 行的第 5 列的值只能是数字!";
272
+								return msg;
273
+							}
274
+							len = revList.get(j).length();
275
+							if (len > 30) {
276
+								msg = "第 "+(i+1)+" 行第 5 列的值的长度不能超过30!";
277
+								return msg;
278
+							}
279
+							storehouse.setActualCapacity(BigDecimal.valueOf(Integer.parseInt(revList.get(j))));
280
+						}
281
+						break;
282
+					case 5://通风方式
283
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
284
+							enumExample.clear();
285
+							Criteria = enumExample.createCriteria();
286
+							Criteria.andEnumnameEqualTo(revList.get(j));
287
+							basicEnums = enumMapper.selectByExample(enumExample);
288
+							if(basicEnums.size() == 0){
289
+								msg = "第 "+(i+1)+" 行第 6 列的值不正确,请查找后在导入!";
290
+								return msg;
291
+							}
292
+							len = revList.get(j).length();
293
+							if (len > 100) {
294
+								msg = "第 "+(i+1)+" 行第 6 列的值的长度不能超过100!";
295
+								return msg;
296
+							}
297
+							storehouse.setDrafttype(basicEnums.get(0).getEnumid());
298
+						}
299
+						break;
300
+					case 6://保管方式
301
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
302
+							enumExample.clear();
303
+							Criteria = enumExample.createCriteria();
304
+							Criteria.andEnumnameEqualTo(revList.get(j));
305
+							basicEnums = enumMapper.selectByExample(enumExample);
306
+							if(basicEnums.size() == 0){
307
+								msg = "第 "+(i+1)+" 行第 7 列的值不正确,请查找后在导入!";
308
+								return msg;
309
+							}
310
+							len = revList.get(j).length();
311
+							if (len > 100) {
312
+								msg = "第 "+(i+1)+" 行第 7 列的值的长度不能超过100!";
313
+								return msg;
314
+							}
315
+							storehouse.setKeepingWay(basicEnums.get(0).getEnumid());
316
+						}
317
+						break;
318
+					case 7://装粮线高度(m)
319
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
320
+							value_flag = revList.get(j).matches("[0-9]+");
321
+							if (!value_flag) {
322
+								msg = "第 "+(i+1)+" 行的第 8 列的值只能是数字!";
323
+								return msg;
324
+							}
325
+							len = revList.get(j).length();
326
+							if (len > 30) {
327
+								msg = "第 "+(i+1)+" 行第 8 列的值的长度不能超过30!";
328
+								return msg;
329
+							}
330
+							storehouse.setGrainHeigth(new BigDecimal(revList.get(j)));
331
+						}
332
+						break;
333
+					/*case 8://保管员 注:liangs 2019/07/08 注掉保管员列
334
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
335
+							len = revList.get(j).length();
336
+							if (len > 50) {
337
+								msg = "第 "+(i+1)+" 行第 9 列的值的长度不能超过50!";
338
+								return msg;
339
+							}
340
+							storehouse.setDutystoreman(revList.get(j));
341
+						}
342
+						break;*/
343
+					case 8://仓房状态
344
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
345
+							enumExample.clear();
346
+							Criteria = enumExample.createCriteria();
347
+							Criteria.andEnumnameEqualTo(revList.get(j));
348
+							basicEnums = enumMapper.selectByExample(enumExample);
349
+							if(basicEnums.size() == 0){
350
+								msg = "第 "+(i+1)+" 行第 9 列的值不正确,请查找后在导入!";
351
+								return msg;
352
+							}
353
+							len = revList.get(j).length();
354
+							if (len > 11) {
355
+								msg = "第 "+(i+1)+" 行第 9 列的值的长度不能超过11!";
356
+								return msg;
357
+							}
358
+							storehouse.setStorehouseState(basicEnums.get(0).getEnumid());
359
+						}
360
+						break;
361
+					case 9://交付使用日期
362
+						if (ParameterUtil.isnotnull(revList.get(j)) && storehouse != null) {
363
+							if(!ParameterUtil.stringIsTime(revList.get(j))){
364
+								msg = "第 "+(i+1)+" 行第 10 列的值不属于时间,请确认后再提交!";
365
+								return msg;
366
+							}
367
+							storehouse.setUsedate(ParameterUtil.string2datetime(revList.get(j)));
368
+						}
369
+						if (storehouse != null) {
370
+							storehouse.setUuid(uuid);
371
+							storehouse.setDelFlag(1);
372
+							storehouse.setCreatedate(date);
373
+							storehouse.setOrgId(orgId);
374
+						}
375
+						break;
376
+					case 10://货位编号
377
+						if (ParameterUtil.isnotnull(revList.get(j))) {
378
+							len = revList.get(j).length();
379
+							if (len > 50) {
380
+								msg = "第 "+(i+1)+" 行第 11 列的值的长度不能超过50!";
381
+								return msg;
382
+							}
383
+
384
+							warehouse = new BasicWarehouse();
385
+							warehouse.setWarehouseCode(revList.get(j));
386
+						}
387
+						break;
388
+					case 11://货位名称
389
+						if (ParameterUtil.isnotnull(revList.get(j))) {
390
+							len = revList.get(j).length();
391
+							if (len > 50) {
392
+								msg = "第 "+(i+1)+" 行第 12 列的值的长度不能超过50!";
393
+								return msg;
394
+							}
395
+							if (warehouse != null) {
396
+								warehouse.setWarehouseName(revList.get(j));
397
+							}
398
+						}
399
+						break;
400
+					case 12://货位容量(吨)
401
+						if (ParameterUtil.isnotnull(revList.get(j))) {
402
+							len = revList.get(j).length();
403
+							if (len > 50) {
404
+								msg = "第 "+(i+1)+" 行第 13 列的值的长度不能超过50!";
405
+								return msg;
406
+							}
407
+							if (warehouse != null) {
408
+								warehouse.setWarehouseCapacity(new BigDecimal(revList.get(j)));
409
+							}
410
+						}
411
+						if (warehouse != null) {
412
+							warehouse.setDelFlag(1);
413
+							warehouse.setCreatedate(date);
414
+							warehouse.setOrgId(orgId);
415
+							warehouse.setWarehouseStatus(2963); //添加时默认货位状态为空仓
416
+						}
417
+						break;
418
+					case 13:
419
+						if (ParameterUtil.isnotnull(revList.get(j))) {
420
+							//插入仓房信息
421
+							if (storehouse != null) {
422
+								storehouse.setLibraryType(revList.get(j));
423
+							}
424
+							if (warehouse != null) {
425
+								if("1".equals(revList.get(j))){
426
+									warehouse.setLibraryType(revList.get(j));
427
+								}
428
+							}
429
+						}
430
+						break;
431
+					case 14:
432
+						//if (ParameterUtil.isnotnull(revList.get(j))) {
433
+							Map<String,Object> depotMap = new HashMap<String, Object>();
434
+
435
+							//插入仓房信息
436
+							if (storehouse != null) {
437
+
438
+								//判断是否有代储粮库
439
+								if ("1".equals(storehouse.getLibraryType())) {
440
+									depotMap.put("agentDepotName",revList.get(j));
441
+									depotMap = basic.getAgentDepotId(depotMap);
442
+									if(ParameterUtil.isnull(depotMap)){
443
+										msg = "第 "+(i+1)+" 行第 15 列的值的不正确,请查询后再添加!";
444
+										return msg;
445
+									}
446
+								}
447
+
448
+								if(ParameterUtil.isequal("1",storehouse.getLibraryType())){
449
+									storehouse.setDepotId(Integer.parseInt(depotMap.get("id").toString()));
450
+									storehouse.setDepotName(revList.get(j));
451
+									map.put(storehouse.getDepotName(), storehouse.getDepotId());
452
+								}else{
453
+									storehouse.setDepotId(orgId);
454
+									storehouse.setDepotName(orgName);
455
+								}
456
+								basic.insertSelective(storehouse);
457
+								map.put(storehouse.getStorehouseCode(), storehouse.getStorehouseId());
458
+							}
459
+							if (warehouse != null) {
460
+								if(ParameterUtil.isequal("1",warehouse.getLibraryType())){
461
+									warehouse.setDepotId(map.get(revList.get(j)));
462
+									warehouse.setDepotName(revList.get(j));
463
+								}else{
464
+									warehouse.setDepotId(orgId);
465
+									warehouse.setDepotName(orgName);
466
+								}
467
+								warehouse.setStorehouseId(map.get(revList.get(0)));
468
+								wareMapper.insertSelective(warehouse);
469
+							}
470
+						//}
471
+						storehouse = null;
472
+						warehouse = null;
473
+						break;
474
+					default :
475
+						break;
476
+
477
+				}
478
+
479
+			}
480
+
481
+		}
482
+		return msg;
483
+	}
484
+
485
+	/*@Override
486
+	public String getStorehouseKeeper(Integer id, Integer orgId, boolean flag) {
487
+		String keeperNames = "";
488
+
489
+		 获取这个仓房的所有保管员的员工ID 
490
+		List<Integer> keep_list = keeperHouseService.getKeeperId(orgId, id);
491
+
492
+		//2、然后把这些人的翻译过来,展示出来
493
+		if (null != keep_list && keep_list.size() > 0) {
494
+			keeperNames = keeperService.getKeeperNames(keep_list);
495
+			if (flag) {
496
+				if (keeperNames.length() > 7) {
497
+					keeperNames = keeperNames.substring(0, 7) + "...";
498
+				}
499
+			}
500
+		}
501
+
502
+		return keeperNames;
503
+	}*/
504
+	
505
+
506
+	@Override
507
+	public Map<String, Object> getThreeTempCheckList(Integer orgId) {
508
+		Map<String, Object> modelMap = new HashMap<String, Object>();
509
+		Map<String, Object> map = new HashMap<String, Object>();
510
+		List<BasicStorehouse> houselist = null;
511
+		try {
512
+			if (ParameterUtil.isnotnull(orgId)) {
513
+				map.put("orgId", orgId);
514
+			}
515
+			map.put("libraryType", 0);//默认查询主库数据,不查询代储库数据
516
+			map.put("delFlag", 1);//查询正常数据
517
+			houselist = basic.getThreeTempCheckList(map); //获取当前单位下的所有有效数据
518
+		} catch (Exception e) {
519
+			e.printStackTrace();
520
+		}
521
+		modelMap.put("houseList", houselist);
522
+		return modelMap;
523
+	}
524
+
525
+	@Override
526
+	public Map<String, Object> saveOrUpdate(HttpServletRequest request, String storehouseJson, String warehouseJson, String userInfo) throws Exception {
527
+		Map<String, Object> modelMap = new HashMap<String, Object>();
528
+		JSONObject user = null;
529
+		Integer orgId = null;
530
+		String userName = "";
531
+		if (null != userInfo && !"".equals(userInfo)) {
532
+			user = JSONObject.parseObject(userInfo);
533
+			orgId = Integer.parseInt(user.get("orgId") == null?"":user.get("orgId").toString());
534
+			userName = user.get("username") == null?"":user.get("username").toString();
535
+		}
536
+		//获取单位信息
537
+		String orgInfo = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
538
+		String dwbm = "";
539
+		JSONObject org = null;
540
+		if (null != orgInfo && !"".equals(orgInfo)) {
541
+			org = JSONObject.parseObject(orgInfo);
542
+			dwbm = org.get("creditCode") == null?"":org.get("creditCode").toString();
543
+		}
544
+		Date date = new Date();
545
+
546
+		// JSON字符串转对象
547
+		ObjectMapper mapper = new ObjectMapper();
548
+		BasicStorehouse basicStorehouse = (BasicStorehouse) mapper.readValue(storehouseJson, BasicStorehouse.class);
549
+		basicStorehouse.setDelFlag(1);
550
+
551
+		String cfbm = "";//仓房编码
552
+		String ajbm = "";//廒间编码
553
+
554
+		if (!"".equals(basicStorehouse.getStorehouseCode())) {
555
+			cfbm = BusinessUtils.setBZcfandygbm(dwbm, basicStorehouse.getStorehouseCode(), "0", orgId+"");
556
+			ajbm = BusinessUtils.setBZajbm(cfbm, basicStorehouse.getStorehouseType()+"", "0");
557
+			basicStorehouse.setCfbm(cfbm);
558
+			basicStorehouse.setAjbm(ajbm);
559
+		}
560
+		if (basicStorehouse.getStorehouseId() == null) {
561
+			String uuid = UUID.randomUUID().toString();
562
+			//String uuid = UUID.randomUUID().toString().replaceAll("-", "");
563
+			basicStorehouse.setUuid(uuid);
564
+			
565
+			if(!ParameterUtil.isequal(basicStorehouse.getLibraryType(),"1")){
566
+				basicStorehouse.setDepotId(orgId);
567
+			}
568
+			basicStorehouse.setOrgId(orgId);
569
+			basicStorehouse.setCreatename(userName);
570
+			basicStorehouse.setCreatedate(date);
571
+			basic.insertSelective(basicStorehouse);
572
+
573
+		} else {
574
+			if(!ParameterUtil.isequal(basicStorehouse.getLibraryType(),"1")){
575
+				basicStorehouse.setDutystoreman(null);
576
+			}
577
+			basicStorehouse.setUpdatename(userName);
578
+			basicStorehouse.setUpdatedate(date);
579
+			basic.updateByPrimaryKey(basicStorehouse);
580
+		}
581
+
582
+		//更新货位数据
583
+		warehouseService.saveOrUpdate(basicStorehouse, warehouseJson);
584
+
585
+		//更新单位表仓房数、油罐数、有效仓容、有效罐容
586
+		editOrgChNum(orgId);
587
+
588
+		modelMap.put("status", "success");
589
+
590
+		return modelMap;
591
+	}
592
+
593
+	/**
594
+	 * 更新单位表中仓房数、油罐数、有效仓容、有效罐容
595
+	 * @param orgId
596
+	 */
597
+	@Override
598
+	public void editOrgChNum(Integer orgId) throws Exception {
599
+		//查询当前单位仓房数
600
+		BasicStorehouseExample cf_example = new BasicStorehouseExample();
601
+		BasicStorehouseExample.Criteria cf_criteria = cf_example.createCriteria();
602
+		cf_criteria.andOrgIdEqualTo(orgId);
603
+		cf_criteria.andLibraryTypeEqualTo("0");
604
+		cf_criteria.andDelFlagEqualTo(1);
605
+		int ch_count = basic.countByExample(cf_example);
606
+		
607
+		//查询当前单位的油罐数
608
+		BasicTankExample yg_example = new BasicTankExample();
609
+		BasicTankExample.Criteria yg_criteria = yg_example.createCriteria();
610
+		yg_criteria.andOrgIdEqualTo(orgId);
611
+		//yg_criteria.andLibraryTypeEqualTo("0");
612
+		yg_criteria.andDelFlagEqualTo(1);
613
+		int yg_count = basicTankMapper.countByExample(yg_example);
614
+
615
+		//查询当前单位仓房总实际容量和油罐总实际容量
616
+		Map<String, Object> rl_map = basic.queryCrAndgw(orgId);
617
+		
618
+
619
+		//更新当前单位下仓房数、油罐数数、有效仓房、有效罐容
620
+		Map<String, Object> map = new HashMap<String, Object>();
621
+		map.put("orgId", orgId);
622
+		map.put("cf_count", ch_count);
623
+		map.put("yg_count", yg_count);
624
+		map.put("cr_count", rl_map.get("cr_count"));
625
+		map.put("gr_count", rl_map.get("gr_count"));
626
+
627
+		basic.editOrgCfAndHwNum(map);
628
+	}
629
+
630
+}