Преглед на файлове

质检给市平台推送数据的接口,并且把该表的关键字字段改为非关键字

mengy преди 5 години
родител
ревизия
762629beac

+ 20 - 1
src/main/java/com/chinaitop/depot/storage/controller/StorageQualitycheckController.java

@@ -1,6 +1,7 @@
1 1
 package com.chinaitop.depot.storage.controller;
2 2
 
3 3
 
4
+import com.alibaba.fastjson.JSON;
4 5
 import com.alibaba.fastjson.JSONArray;
5 6
 import com.chinaitop.depot.storage.model.StorageFoodbasicinfo;
6 7
 import com.chinaitop.depot.storage.model.StorageQualitycheck;
@@ -11,6 +12,7 @@ import com.chinaitop.depot.storage.service.StorageQualitycheckService;
11 12
 import com.chinaitop.depot.storage.service.StorageQualitycheckSonService;
12 13
 import com.chinaitop.depot.storage.utils.DataSynchronization;
13 14
 import com.chinaitop.depot.storage.utils.ParameterUtil;
15
+import com.chinaitop.depot.utils.HttpUtil;
14 16
 import com.fasterxml.jackson.databind.ObjectMapper;
15 17
 import com.github.pagehelper.PageHelper;
16 18
 import com.github.pagehelper.PageInfo;
@@ -20,6 +22,7 @@ import io.swagger.annotations.ApiImplicitParams;
20 22
 import io.swagger.annotations.ApiOperation;
21 23
 import org.apache.commons.lang.ObjectUtils;
22 24
 import org.apache.commons.lang3.StringUtils;
25
+import org.springframework.beans.factory.annotation.Value;
23 26
 import org.springframework.http.MediaType;
24 27
 import org.springframework.web.bind.annotation.RequestMapping;
25 28
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -46,7 +49,9 @@ public class StorageQualitycheckController {
46 49
 
47 50
     @Resource
48 51
     private StorageQualitycheckSonService qualitycheckSonService;
49
-
52
+    // 获取ip地址
53
+    @Value("${reportForSPT-Url}")
54
+    private String reportPath;
50 55
     /**
51 56
      * 封仓管理中查询出未封 仓的质量管理信息,已经封仓的不要展示
52 57
      * 分页获取
@@ -179,6 +184,20 @@ public class StorageQualitycheckController {
179 184
         try {
180 185
             StorageQualitycheck qualitycheck = (StorageQualitycheck)mapper.readValue(qualitycheckJson, StorageQualitycheck.class);
181 186
             storageQualitycheckService.save(qualitycheck,qualitycheckInspectionJson);
187
+
188
+
189
+            try {
190
+                //自检或出库 保存或修改数据 把数据推给市平台
191
+                Map<String, Object> dataMap = storageQualitycheckService.getcheckByIds(qualitycheck.getId());
192
+                String url = reportPath+"/api/kjjg/zjbg/receiveData";//市级接口
193
+                String strResult = HttpUtil.doPost(url, JSON.toJSONString(dataMap));
194
+            }catch (IOException e) {
195
+                e.printStackTrace();
196
+            } catch (Exception e) {
197
+                e.printStackTrace();
198
+            } finally {
199
+                modelMap.put("status", "success");
200
+            }
182 201
             modelMap.put("status", "success");
183 202
         } catch (IOException e) {
184 203
             modelMap.put("status", "error");

+ 37 - 5
src/main/java/com/chinaitop/depot/storage/mapper/StorageQualitycheckInspectionMapper.xml

@@ -70,6 +70,8 @@
70 70
     <result column="input_two" property="inputTwo" jdbcType="VARCHAR" />
71 71
     <result column="input_three" property="inputThree" jdbcType="VARCHAR" />
72 72
     <result column="input_four" property="inputFour" jdbcType="VARCHAR" />
73
+    <result column="sieve_residue" property="sieveResidue" jdbcType="VARCHAR" />
74
+    <result column="rice_yield" property="riceYield" jdbcType="VARCHAR" />
73 75
   </resultMap>
74 76
   <sql id="Example_Where_Clause" >
75 77
     <where >
@@ -143,7 +145,7 @@
143 145
     avg_length, rice_grains, brokenRice_total, brokenRice_big, brokenRice_small, machiningAccuracy, 
144 146
     chalkiness, machiningAccuracy_essence, machiningAccuracy_suitable, amylose, ash_content, 
145 147
     coarseness, gluten, silt_content, magnetic_metal, input_one, input_two, input_three, 
146
-    input_four
148
+    input_four,sieve_residue,rice_yield
147 149
   </sql>
148 150
   <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.storage.model.StorageQualitycheckInspectionExample" >
149 151
     select
@@ -200,7 +202,8 @@
200 202
       machiningAccuracy_suitable, amylose, ash_content, 
201 203
       coarseness, gluten, silt_content, 
202 204
       magnetic_metal, input_one, input_two, 
203
-      input_three, input_four)
205
+      input_three, input_four,
206
+      sieve_residue,rice_yield)
204 207
     values (#{id,jdbcType=INTEGER}, #{qualitycheckId,jdbcType=INTEGER}, #{unitWeight,jdbcType=VARCHAR}, 
205 208
       #{impurityTotal,jdbcType=VARCHAR}, #{impurityInorganic,jdbcType=VARCHAR}, #{impurityOrganic,jdbcType=VARCHAR}, 
206 209
       #{impurityBranPowder,jdbcType=VARCHAR}, #{imperfectgrainsTotal,jdbcType=VARCHAR}, 
@@ -225,7 +228,8 @@
225 228
       #{machiningaccuracySuitable,jdbcType=VARCHAR}, #{amylose,jdbcType=VARCHAR}, #{ashContent,jdbcType=VARCHAR}, 
226 229
       #{coarseness,jdbcType=VARCHAR}, #{gluten,jdbcType=VARCHAR}, #{siltContent,jdbcType=VARCHAR}, 
227 230
       #{magneticMetal,jdbcType=VARCHAR}, #{inputOne,jdbcType=VARCHAR}, #{inputTwo,jdbcType=VARCHAR}, 
228
-      #{inputThree,jdbcType=VARCHAR}, #{inputFour,jdbcType=VARCHAR})
231
+      #{inputThree,jdbcType=VARCHAR}, #{inputFour,jdbcType=VARCHAR},
232
+      #{sieveResidue,jdbcType=VARCHAR}, #{riceYield,jdbcType=VARCHAR})
229 233
   </insert>
230 234
   <insert id="insertSelective" parameterType="com.chinaitop.depot.storage.model.StorageQualitycheckInspection" >
231 235
     insert into storage_qualitycheck_inspection
@@ -432,6 +436,12 @@
432 436
       <if test="inputFour != null" >
433 437
         input_four,
434 438
       </if>
439
+      <if test="sieveResidue != null" >
440
+        sieve_residue,
441
+      </if>
442
+      <if test="riceYield != null" >
443
+        rice_yield,
444
+      </if>
435 445
     </trim>
436 446
     <trim prefix="values (" suffix=")" suffixOverrides="," >
437 447
       SEQ_STORAGE_QUALITYCHECK_INSPECTION.nextVal,
@@ -636,6 +646,12 @@
636 646
       <if test="inputFour != null" >
637 647
         #{inputFour,jdbcType=VARCHAR},
638 648
       </if>
649
+      <if test="sieveResidue != null" >
650
+        #{sieveResidue,jdbcType=VARCHAR},
651
+      </if>
652
+      <if test="riceYield != null" >
653
+        #{riceYield,jdbcType=VARCHAR},
654
+      </if>
639 655
     </trim>
640 656
   </insert>
641 657
   <select id="countByExample" parameterType="com.chinaitop.depot.storage.model.StorageQualitycheckInspectionExample" resultType="java.lang.Integer" >
@@ -851,6 +867,12 @@
851 867
       <if test="record.inputFour != null" >
852 868
         input_four = #{record.inputFour,jdbcType=VARCHAR},
853 869
       </if>
870
+      <if test="record.sieveResidue != null" >
871
+        sieve_residue = #{record.sieveResidue,jdbcType=VARCHAR},
872
+      </if>
873
+      <if test="record.riceYield != null" >
874
+        rice_yield = #{record.riceYield,jdbcType=VARCHAR},
875
+      </if>
854 876
     </set>
855 877
     <if test="_parameter != null" >
856 878
       <include refid="Update_By_Example_Where_Clause" />
@@ -925,7 +947,9 @@
925 947
       input_one = #{record.inputOne,jdbcType=VARCHAR},
926 948
       input_two = #{record.inputTwo,jdbcType=VARCHAR},
927 949
       input_three = #{record.inputThree,jdbcType=VARCHAR},
928
-      input_four = #{record.inputFour,jdbcType=VARCHAR}
950
+      input_four = #{record.inputFour,jdbcType=VARCHAR},
951
+      sieve_residue = #{record.sieveResidue,jdbcType=VARCHAR},
952
+      rice_yield = #{record.riceYield,jdbcType=VARCHAR}
929 953
     <if test="_parameter != null" >
930 954
       <include refid="Update_By_Example_Where_Clause" />
931 955
     </if>
@@ -1132,6 +1156,12 @@
1132 1156
       <if test="inputFour != null" >
1133 1157
         input_four = #{inputFour,jdbcType=VARCHAR},
1134 1158
       </if>
1159
+      <if test="sieveResidue != null" >
1160
+        sieve_residue = #{sieveResidue,jdbcType=VARCHAR},
1161
+      </if>
1162
+      <if test="riceYield != null" >
1163
+        rice_yield = #{riceYield,jdbcType=VARCHAR},
1164
+      </if>
1135 1165
     </set>
1136 1166
     where qualitycheck_id = #{qualitycheckId,jdbcType=INTEGER}
1137 1167
   </update>
@@ -1203,7 +1233,9 @@
1203 1233
       input_one = #{inputOne,jdbcType=VARCHAR},
1204 1234
       input_two = #{inputTwo,jdbcType=VARCHAR},
1205 1235
       input_three = #{inputThree,jdbcType=VARCHAR},
1206
-      input_four = #{inputFour,jdbcType=VARCHAR}
1236
+      input_four = #{inputFour,jdbcType=VARCHAR},
1237
+      sieve_residue = #{sieveResidue,jdbcType=VARCHAR},
1238
+      rice_yield = #{riceYield,jdbcType=VARCHAR}
1207 1239
     where id = #{id,jdbcType=INTEGER}
1208 1240
   </update>
1209 1241
 

+ 2 - 0
src/main/java/com/chinaitop/depot/storage/mapper/StorageQualitycheckMapper.java

@@ -59,4 +59,6 @@ public interface StorageQualitycheckMapper {
59 59
     List<Map<String, Object>> getAllQualityInfo(Map<String, Object> paramMap);
60 60
 
61 61
     List<Map<String, Object>> getAllFoodStocks(Map<String, Object> paramMap);
62
+
63
+    Map<String, Object> getcheckById(Integer id);
62 64
 }

+ 188 - 67
src/main/java/com/chinaitop/depot/storage/mapper/StorageQualitycheckMapper.xml

@@ -6,13 +6,13 @@
6 6
     <result column="depot_id" property="depotId" jdbcType="INTEGER" />
7 7
     <result column="house_id" property="houseId" jdbcType="INTEGER" />
8 8
     <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
9
-    <result column="type" property="type" jdbcType="VARCHAR" />
9
+    <result column="type_update" property="typeUpdate" jdbcType="VARCHAR" />
10 10
     <result column="sub_type" property="subType" jdbcType="INTEGER" />
11 11
     <result column="sub_type_detailed" property="subTypeDetailed" jdbcType="INTEGER" />
12 12
     <result column="check_time" property="checkTime" jdbcType="TIMESTAMP" />
13 13
     <result column="check_result" property="checkResult" jdbcType="VARCHAR" />
14 14
     <result column="checker" property="checker" jdbcType="VARCHAR" />
15
-    <result column="level" property="level" jdbcType="INTEGER" />
15
+    <result column="level_update" property="levelUpdate" jdbcType="INTEGER" />
16 16
     <result column="capacity" property="capacity" jdbcType="VARCHAR" />
17 17
     <result column="water" property="water" jdbcType="VARCHAR" />
18 18
     <result column="impurity" property="impurity" jdbcType="VARCHAR" />
@@ -37,7 +37,7 @@
37 37
     <result column="is_firstchecklevel_right" property="isFirstchecklevelRight" jdbcType="VARCHAR" />
38 38
     <result column="accept_unite" property="acceptUnite" jdbcType="VARCHAR" />
39 39
     <result column="input_time" property="inputTime" jdbcType="TIMESTAMP" />
40
-    <result column="number" property="number" jdbcType="VARCHAR" />
40
+    <result column="number_update" property="numberUpdate" jdbcType="VARCHAR" />
41 41
     <result column="location" property="location" jdbcType="INTEGER" />
42 42
     <result column="keeper" property="keeper" jdbcType="VARCHAR" />
43 43
     <result column="harvest_time" property="harvestTime" jdbcType="INTEGER" />
@@ -165,12 +165,12 @@
165 165
     </where>
166 166
   </sql>
167 167
   <sql id="Base_Column_List" >
168
-    id, depot_id, house_id, warehouse_id, type, sub_type, sub_type_detailed, check_time, 
169
-    check_result, checker, level, capacity, water, impurity, mineral, badpart, colorsmell, 
168
+    id, depot_id, house_id, warehouse_id, type_update, sub_type, sub_type_detailed, check_time,
169
+    check_result, checker, level_update, capacity, water, impurity, mineral, badpart, colorsmell,
170 170
     keeper_advices, keeper_advices_time, keeper_advices_paint, chief_advices, chief_advices_time, 
171 171
     chiet_advices_paint, vice_manager_advices, vice_manager_advices_time, vice_manager_advices_paint, 
172 172
     manager_advices, manager_advices_time, manager_advices_paint, improve_result, improve_time, 
173
-    improve_paint, is_firstchecklevel_right, accept_unite, input_time, number, location, 
173
+    improve_paint, is_firstchecklevel_right, accept_unite, input_time, number_update, location,
174 174
     keeper, harvest_time, goodpart, chooser, choose_organ, choose_time, boldfat_index, 
175 175
     check_type, hot_damage, protein_solution_ratio, eat_score, fat_index, husked_ration, 
176 176
     full_good_ration, yellow_part, out_husked_ration, pests, color_ratio, hard_index, 
@@ -215,9 +215,9 @@
215 215
   </delete>
216 216
   <insert id="insert" parameterType="com.chinaitop.depot.storage.model.StorageQualitycheck" >
217 217
     insert into storage_qualitycheck (id, depot_id, house_id, 
218
-      warehouse_id, type, sub_type, 
218
+      warehouse_id, type_update, sub_type,
219 219
       sub_type_detailed, check_time, check_result, 
220
-      checker, level, capacity, 
220
+      checker, level_update, capacity,
221 221
       water, impurity, mineral, 
222 222
       badpart, colorsmell, keeper_advices, 
223 223
       keeper_advices_time, keeper_advices_paint, 
@@ -227,7 +227,7 @@
227 227
       manager_advices_time, manager_advices_paint, 
228 228
       improve_result, improve_time, improve_paint, 
229 229
       is_firstchecklevel_right, accept_unite, input_time, 
230
-      number, location, keeper, 
230
+      number_update, location, keeper,
231 231
       harvest_time, goodpart, chooser, 
232 232
       choose_organ, choose_time, boldfat_index, 
233 233
       check_type, hot_damage, protein_solution_ratio, 
@@ -248,9 +248,9 @@
248 248
       qyqy,qydbh,zblb,jdrxm,ypbh,sfzcccnx,
249 249
       quailtycard_id, butyl_phenol, flag_type)
250 250
     values (SEQ_STORAGE_QUALITYCHECK.nextVal, #{depotId,jdbcType=INTEGER}, #{houseId,jdbcType=INTEGER},
251
-      #{warehouseId,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=INTEGER}, 
251
+      #{warehouseId,jdbcType=INTEGER}, #{typeUpdate,jdbcType=VARCHAR}, #{subType,jdbcType=INTEGER},
252 252
       #{subTypeDetailed,jdbcType=INTEGER}, #{checkTime,jdbcType=TIMESTAMP}, #{checkResult,jdbcType=VARCHAR}, 
253
-      #{checker,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{capacity,jdbcType=VARCHAR}, 
253
+      #{checker,jdbcType=VARCHAR}, #{levelUpdate,jdbcType=INTEGER}, #{capacity,jdbcType=VARCHAR},
254 254
       #{water,jdbcType=VARCHAR}, #{impurity,jdbcType=VARCHAR}, #{mineral,jdbcType=VARCHAR}, 
255 255
       #{badpart,jdbcType=VARCHAR}, #{colorsmell,jdbcType=VARCHAR}, #{keeperAdvices,jdbcType=VARCHAR}, 
256 256
       #{keeperAdvicesTime,jdbcType=VARCHAR}, #{keeperAdvicesPaint,jdbcType=VARCHAR}, 
@@ -260,7 +260,7 @@
260 260
       #{managerAdvicesTime,jdbcType=TIMESTAMP}, #{managerAdvicesPaint,jdbcType=VARCHAR}, 
261 261
       #{improveResult,jdbcType=VARCHAR}, #{improveTime,jdbcType=TIMESTAMP}, #{improvePaint,jdbcType=VARCHAR}, 
262 262
       #{isFirstchecklevelRight,jdbcType=VARCHAR}, #{acceptUnite,jdbcType=VARCHAR}, #{inputTime,jdbcType=TIMESTAMP}, 
263
-      #{number,jdbcType=VARCHAR}, #{location,jdbcType=INTEGER}, #{keeper,jdbcType=VARCHAR}, 
263
+      #{numberUpdate,jdbcType=VARCHAR}, #{location,jdbcType=INTEGER}, #{keeper,jdbcType=VARCHAR},
264 264
       #{harvestTime,jdbcType=INTEGER}, #{goodpart,jdbcType=VARCHAR}, #{chooser,jdbcType=VARCHAR}, 
265 265
       #{chooseOrgan,jdbcType=VARCHAR}, #{chooseTime,jdbcType=TIMESTAMP}, #{boldfatIndex,jdbcType=VARCHAR}, 
266 266
       #{checkType,jdbcType=VARCHAR}, #{hotDamage,jdbcType=VARCHAR}, #{proteinSolutionRatio,jdbcType=VARCHAR}, 
@@ -297,8 +297,8 @@
297 297
       <if test="warehouseId != null" >
298 298
         warehouse_id,
299 299
       </if>
300
-      <if test="type != null" >
301
-        type,
300
+      <if test="typeUpdate != null" >
301
+        type_update,
302 302
       </if>
303 303
       <if test="subType != null" >
304 304
         sub_type,
@@ -315,8 +315,8 @@
315 315
       <if test="checker != null" >
316 316
         checker,
317 317
       </if>
318
-      <if test="level != null" >
319
-        level,
318
+      <if test="levelUpdate != null" >
319
+        level_update,
320 320
       </if>
321 321
       <if test="capacity != null" >
322 322
         capacity,
@@ -390,8 +390,8 @@
390 390
       <if test="inputTime != null" >
391 391
         input_time,
392 392
       </if>
393
-      <if test="number != null" >
394
-        number,
393
+      <if test="numberUpdate != null" >
394
+        number_update,
395 395
       </if>
396 396
       <if test="location != null" >
397 397
         location,
@@ -599,8 +599,8 @@
599 599
       <if test="warehouseId != null" >
600 600
         #{warehouseId,jdbcType=INTEGER},
601 601
       </if>
602
-      <if test="type != null" >
603
-        #{type,jdbcType=VARCHAR},
602
+      <if test="typeUpdate != null" >
603
+        #{typeUpdate,jdbcType=VARCHAR},
604 604
       </if>
605 605
       <if test="subType != null" >
606 606
         #{subType,jdbcType=INTEGER},
@@ -617,8 +617,8 @@
617 617
       <if test="checker != null" >
618 618
         #{checker,jdbcType=VARCHAR},
619 619
       </if>
620
-      <if test="level != null" >
621
-        #{level,jdbcType=INTEGER},
620
+      <if test="levelUpdate != null" >
621
+        #{levelUpdate,jdbcType=INTEGER},
622 622
       </if>
623 623
       <if test="capacity != null" >
624 624
         #{capacity,jdbcType=VARCHAR},
@@ -692,8 +692,8 @@
692 692
       <if test="inputTime != null" >
693 693
         #{inputTime,jdbcType=TIMESTAMP},
694 694
       </if>
695
-      <if test="number != null" >
696
-        #{number,jdbcType=VARCHAR},
695
+      <if test="numberUpdate != null" >
696
+        #{numberUpdate,jdbcType=VARCHAR},
697 697
       </if>
698 698
       <if test="location != null" >
699 699
         #{location,jdbcType=INTEGER},
@@ -910,8 +910,8 @@
910 910
       <if test="record.warehouseId != null" >
911 911
         warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
912 912
       </if>
913
-      <if test="record.type != null" >
914
-        type = #{record.type,jdbcType=VARCHAR},
913
+      <if test="record.typeUpdate != null" >
914
+        type_update = #{record.typeUpdate,jdbcType=VARCHAR},
915 915
       </if>
916 916
       <if test="record.subType != null" >
917 917
         sub_type = #{record.subType,jdbcType=INTEGER},
@@ -928,8 +928,8 @@
928 928
       <if test="record.checker != null" >
929 929
         checker = #{record.checker,jdbcType=VARCHAR},
930 930
       </if>
931
-      <if test="record.level != null" >
932
-        level = #{record.level,jdbcType=INTEGER},
931
+      <if test="record.levelUpdate != null" >
932
+        level_update = #{record.levelUpdate,jdbcType=INTEGER},
933 933
       </if>
934 934
       <if test="record.capacity != null" >
935 935
         capacity = #{record.capacity,jdbcType=VARCHAR},
@@ -1003,8 +1003,8 @@
1003 1003
       <if test="record.inputTime != null" >
1004 1004
         input_time = #{record.inputTime,jdbcType=TIMESTAMP},
1005 1005
       </if>
1006
-      <if test="record.number != null" >
1007
-        number = #{record.number,jdbcType=VARCHAR},
1006
+      <if test="record.numberUpdate != null" >
1007
+        number_update = #{record.numberUpdate,jdbcType=VARCHAR},
1008 1008
       </if>
1009 1009
       <if test="record.location != null" >
1010 1010
         location = #{record.location,jdbcType=INTEGER},
@@ -1210,13 +1210,13 @@
1210 1210
       depot_id = #{record.depotId,jdbcType=INTEGER},
1211 1211
       house_id = #{record.houseId,jdbcType=INTEGER},
1212 1212
       warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
1213
-      type = #{record.type,jdbcType=VARCHAR},
1213
+      type_update = #{record.typeUpdate,jdbcType=VARCHAR},
1214 1214
       sub_type = #{record.subType,jdbcType=INTEGER},
1215 1215
       sub_type_detailed = #{record.subTypeDetailed,jdbcType=INTEGER},
1216 1216
       check_time = #{record.checkTime,jdbcType=TIMESTAMP},
1217 1217
       check_result = #{record.checkResult,jdbcType=VARCHAR},
1218 1218
       checker = #{record.checker,jdbcType=VARCHAR},
1219
-      level = #{record.level,jdbcType=INTEGER},
1219
+      level_update = #{record.levelUpdate,jdbcType=INTEGER},
1220 1220
       capacity = #{record.capacity,jdbcType=VARCHAR},
1221 1221
       water = #{record.water,jdbcType=VARCHAR},
1222 1222
       impurity = #{record.impurity,jdbcType=VARCHAR},
@@ -1241,7 +1241,7 @@
1241 1241
       is_firstchecklevel_right = #{record.isFirstchecklevelRight,jdbcType=VARCHAR},
1242 1242
       accept_unite = #{record.acceptUnite,jdbcType=VARCHAR},
1243 1243
       input_time = #{record.inputTime,jdbcType=TIMESTAMP},
1244
-      number = #{record.number,jdbcType=VARCHAR},
1244
+      number_update = #{record.numberUpdate,jdbcType=VARCHAR},
1245 1245
       location = #{record.location,jdbcType=INTEGER},
1246 1246
       keeper = #{record.keeper,jdbcType=VARCHAR},
1247 1247
       harvest_time = #{record.harvestTime,jdbcType=INTEGER},
@@ -1322,8 +1322,8 @@
1322 1322
       <if test="warehouseId != null" >
1323 1323
         warehouse_id = #{warehouseId,jdbcType=INTEGER},
1324 1324
       </if>
1325
-      <if test="type != null" >
1326
-        type = #{type,jdbcType=VARCHAR},
1325
+      <if test="typeUpdate != null" >
1326
+        type_update = #{typeUpdate,jdbcType=VARCHAR},
1327 1327
       </if>
1328 1328
       <if test="subType != null" >
1329 1329
         sub_type = #{subType,jdbcType=INTEGER},
@@ -1340,8 +1340,8 @@
1340 1340
       <if test="checker != null" >
1341 1341
         checker = #{checker,jdbcType=VARCHAR},
1342 1342
       </if>
1343
-      <if test="level != null" >
1344
-        level = #{level,jdbcType=INTEGER},
1343
+      <if test="levelUpdate != null" >
1344
+        level_update = #{level,jdbcType=INTEGER},
1345 1345
       </if>
1346 1346
       <if test="capacity != null" >
1347 1347
         capacity = #{capacity,jdbcType=VARCHAR},
@@ -1415,8 +1415,8 @@
1415 1415
       <if test="inputTime != null" >
1416 1416
         input_time = #{inputTime,jdbcType=TIMESTAMP},
1417 1417
       </if>
1418
-      <if test="number != null" >
1419
-        number = #{number,jdbcType=VARCHAR},
1418
+      <if test="numberUpdate != null" >
1419
+        number_update = #{numberUpdate,jdbcType=VARCHAR},
1420 1420
       </if>
1421 1421
       <if test="location != null" >
1422 1422
         location = #{location,jdbcType=INTEGER},
@@ -1619,13 +1619,13 @@
1619 1619
     set depot_id = #{depotId,jdbcType=INTEGER},
1620 1620
       house_id = #{houseId,jdbcType=INTEGER},
1621 1621
       warehouse_id = #{warehouseId,jdbcType=INTEGER},
1622
-      type = #{type,jdbcType=VARCHAR},
1622
+      type_update = #{typeUpdate,jdbcType=VARCHAR},
1623 1623
       sub_type = #{subType,jdbcType=INTEGER},
1624 1624
       sub_type_detailed = #{subTypeDetailed,jdbcType=INTEGER},
1625 1625
       check_time = #{checkTime,jdbcType=TIMESTAMP},
1626 1626
       check_result = #{checkResult,jdbcType=VARCHAR},
1627 1627
       checker = #{checker,jdbcType=VARCHAR},
1628
-      level = #{level,jdbcType=INTEGER},
1628
+      level_update = #{levelUpdate,jdbcType=INTEGER},
1629 1629
       capacity = #{capacity,jdbcType=VARCHAR},
1630 1630
       water = #{water,jdbcType=VARCHAR},
1631 1631
       impurity = #{impurity,jdbcType=VARCHAR},
@@ -1650,7 +1650,7 @@
1650 1650
       is_firstchecklevel_right = #{isFirstchecklevelRight,jdbcType=VARCHAR},
1651 1651
       accept_unite = #{acceptUnite,jdbcType=VARCHAR},
1652 1652
       input_time = #{inputTime,jdbcType=TIMESTAMP},
1653
-      number = #{number,jdbcType=VARCHAR},
1653
+      number_update = #{numberUpdate,jdbcType=VARCHAR},
1654 1654
       location = #{location,jdbcType=INTEGER},
1655 1655
       keeper = #{keeper,jdbcType=VARCHAR},
1656 1656
       harvest_time = #{harvestTime,jdbcType=INTEGER},
@@ -1724,15 +1724,15 @@
1724 1724
     row_number() over(partition by house_id order by id desc) rn,
1725 1725
     id,
1726 1726
     house_id,
1727
-    LEVEL level,
1727
+    level_update levelUpdate,
1728 1728
     sub_type_detailed
1729 1729
     FROM
1730 1730
     storage_qualitycheck
1731 1731
     WHERE
1732
-    type = 5
1732
+    type_update = 5
1733 1733
     )a where rn = 1
1734
-    <if test="level != null">
1735
-      AND level = #{level}
1734
+    <if test="levelUpdate != null">
1735
+      AND level_update = #{levelUpdate}
1736 1736
     </if>
1737 1737
     <if test="subTypeDetailed != null">
1738 1738
       AND sub_type_detailed = #{subTypeDetailed}
@@ -1745,18 +1745,18 @@
1745 1745
     row_number() over(partition by house_id order by id desc) rn,
1746 1746
     id,
1747 1747
     warehouse_id,
1748
-    LEVEL,
1748
+    levelUpdate,
1749 1749
     sub_type_detailed
1750 1750
     FROM
1751 1751
     storage_qualitycheck
1752 1752
     WHERE
1753
-    type = 5
1753
+    type_update = 5
1754 1754
     <if test="houseId != null">
1755 1755
       AND house_id = #{houseId, jdbcType=VARCHAR}
1756 1756
     </if>
1757 1757
     )a where rn = 1
1758
-    <if test="level != null">
1759
-      AND a.level = #{level}
1758
+    <if test="levelUpdate != null">
1759
+      AND a.level_update = #{levelUpdate}
1760 1760
     </if>
1761 1761
     <if test="subTypeDetailed != null">
1762 1762
       AND a.sub_type_detailed = #{subTypeDetailed}
@@ -1777,7 +1777,7 @@
1777 1777
     WHERE
1778 1778
     sfs.foodbasicinfo_id =#{id}
1779 1779
     )
1780
-    and sqk.type = '5'
1780
+    and sqk.type_update = '5'
1781 1781
     and sqk.house_id =#{houseId}
1782 1782
     and sqk.warehouse_id = #{warehouseId}
1783 1783
 
@@ -1798,12 +1798,12 @@
1798 1798
 
1799 1799
 
1800 1800
   <sql id="ExtBase_Column_List">
1801
-    sqk.id, sqk.depot_id, sqk.house_id, sqk.warehouse_id, sqk.type, sqk.sub_type, sqk.sub_type_detailed, sqk.check_time, sqk.check_result,
1802
-    sqk.checker, sqk.level, sqk.capacity, sqk.water, sqk.impurity, sqk.mineral, sqk.badpart, sqk.colorsmell,
1801
+    sqk.id, sqk.depot_id, sqk.house_id, sqk.warehouse_id, sqk.type_update, sqk.sub_type, sqk.sub_type_detailed, sqk.check_time, sqk.check_result,
1802
+    sqk.checker, sqk.level_update, sqk.capacity, sqk.water, sqk.impurity, sqk.mineral, sqk.badpart, sqk.colorsmell,
1803 1803
     sqk.keeper_advices, sqk.keeper_advices_time, sqk.keeper_advices_paint, sqk.chief_advices, sqk.chief_advices_time,
1804 1804
     sqk.chiet_advices_paint, sqk.vice_manager_advices, sqk.vice_manager_advices_time, sqk.vice_manager_advices_paint,
1805 1805
     sqk.manager_advices, sqk.manager_advices_time, sqk.manager_advices_paint, sqk.improve_result, sqk.improve_time,
1806
-    sqk.improve_paint, sqk.is_firstchecklevel_right, sqk.accept_unite, sqk.input_time, sqk.number, sqk.location,
1806
+    sqk.improve_paint, sqk.is_firstchecklevel_right, sqk.accept_unite, sqk.input_time, sqk.number_update, sqk.location,
1807 1807
     sqk.keeper, sqk.harvest_time, sqk.goodpart, sqk.chooser, sqk.choose_organ, sqk.choose_time, sqk.boldfat_index,
1808 1808
     sqk.check_type, sqk.hot_damage, sqk.protein_solution_ratio, sqk.eat_score, sqk.fat_index, sqk.husked_ration,
1809 1809
     sqk.full_good_ration, sqk.yellow_part, sqk.out_husked_ration, sqk.pests, sqk.color_ratio, sqk.hard_index,
@@ -1847,7 +1847,7 @@
1847 1847
         and sq.warehouse_id = #{warehouseId}
1848 1848
       </if>
1849 1849
       <if test="typeList != null and typeList.size() > 0">
1850
-        and sq.type in
1850
+        and sq.type_update in
1851 1851
         <foreach close=")" collection="typeList" item="typeList" open="(" separator=",">
1852 1852
           #{typeList}
1853 1853
         </foreach>
@@ -1855,8 +1855,8 @@
1855 1855
       <if test="subTypeDetailed !=null">
1856 1856
         and sq.sub_type_detailed = #{subTypeDetailed}
1857 1857
       </if>
1858
-      <if test="level !=null">
1859
-        and sq.level = #{level}
1858
+      <if test="levelUpdate !=null">
1859
+        and sq.level_update = #{levelUpdate}
1860 1860
       </if>
1861 1861
       <if test="historyStatus !=null">
1862 1862
         and sq.history_status = #{historyStatus}
@@ -1884,16 +1884,16 @@
1884 1884
     <include refid="Base_Column_List" />
1885 1885
     from storage_qualitycheck
1886 1886
     where
1887
-    type=5 and history_status=0 and store_quality=1 and org_id =#{orgId} ;
1887
+    type_update=5 and history_status=0 and store_quality=1 and org_id =#{orgId} ;
1888 1888
   </select>
1889 1889
 
1890 1890
 
1891 1891
   <select id="getTrdStoreQualityList" resultType="java.util.Map">
1892 1892
     select
1893
-      house_id,warehouse_id,quality,sub_type_detailed,level,number
1893
+      house_id,warehouse_id,quality,sub_type_detailed,level_update,number_update
1894 1894
     from storage_qualitycheck
1895 1895
     where
1896
-    type=5 and history_status=0 and store_quality=1;
1896
+    type_update=5 and history_status=0 and store_quality=1;
1897 1897
   </select>
1898 1898
 
1899 1899
 
@@ -1947,14 +1947,14 @@
1947 1947
       <if test="id != null">
1948 1948
         and sqk.id = #{id}
1949 1949
       </if>
1950
-      <if test="type !=null">
1951
-        and sqk.type = #{type}
1950
+      <if test="typeUpdate !=null">
1951
+        and sqk.type_update = #{typeUpdate}
1952 1952
       </if>
1953 1953
       <if test="subTypeDetailed !=null">
1954 1954
         and sqk.sub_type_detailed = #{subTypeDetailed}
1955 1955
       </if>
1956
-      <if test="level !=null">
1957
-        and sqk.level = #{level}
1956
+      <if test="levelUpdate !=null">
1957
+        and sqk.level_update = #{levelUpdate}
1958 1958
       </if>
1959 1959
       <if test="historyStatus !=null">
1960 1960
         and sqk.history_status = #{historyStatus}
@@ -1968,7 +1968,128 @@
1968 1968
     </where>
1969 1969
     order by sqk.id desc
1970 1970
   </select>
1971
-
1971
+  <select id="getcheckById" resultType="java.util.Map" parameterType="com.chinaitop.depot.storage.model.StorageQualitycheckForSPT" >
1972
+    SELECT
1973
+      sqk.id,
1974
+      sqk.house_id,
1975
+      sqk.warehouse_id,
1976
+      sqk.org_id,
1977
+      sqk.keeper,
1978
+      sqk.number_update,
1979
+      sqk.ypsl,
1980
+      sqk.dbsl,
1981
+      sqk.type_update,
1982
+      sqk.checker,
1983
+      sqk.chooser,
1984
+      sqk.choose_time,
1985
+      sqk.check_time,
1986
+      sqk.check_result_time,
1987
+      sqk.remarks,
1988
+      sqk.fat_index,
1989
+      sqk.husked_ration,
1990
+      sqk.full_good_ration,
1991
+      sqk.yellow_part,
1992
+      sqk.out_husked_ration,
1993
+      sqk.smelltaste,
1994
+      sqk.transparency,
1995
+      sqk.peroxide_value,
1996
+      sqk.smoke_point,
1997
+      sqk.reeze_test,
1998
+      sqk.residual_solvent,
1999
+      sqk.lead,
2000
+      sqk.total_arsenic,
2001
+      sqk.aflatoxin,
2002
+      sqk.butyl_phenol,
2003
+      sqk.intermixing_rate,
2004
+      sqk.pests,
2005
+      sqk.color_ratio,
2006
+      sqk.damage_ratio,
2007
+      sqk.hot_damage_ratio,
2008
+      sqk.husked_rice_weight,
2009
+      sqk.check_time_type,
2010
+      sqk.water,
2011
+      sqk.hard_index,
2012
+      sqk.mildew_count,
2013
+      sqk.colorsmell,
2014
+      sqk.goodpart,
2015
+      sqk.badpart,
2016
+      sqk.gluten_water_count,
2017
+      sqk.eat_score,
2018
+      sqk.hot_damage,
2019
+      oi.level_code,
2020
+      bs.storeHouse_name storehouseName,
2021
+      bs.keeping_way,
2022
+      bw.warehouse_name wareHouseName,
2023
+      bw.hwbm,
2024
+      pz.enumName subType,
2025
+      fs.enumName keepingWay,
2026
+      qr.enumName quality,
2027
+      cd.enumName location,
2028
+      dj.enumName levelUpdate,
2029
+      shnd.enumName harvestTime,
2030
+      sqi.qualitycheck_id,
2031
+      sqi.unit_weight,
2032
+      sqi.impurity_total,
2033
+      sqi.impurity_inorganic,
2034
+      sqi.impurity_organic,
2035
+      sqi.impurity_bran_powder,
2036
+      sqi.imperfectGrains_total,
2037
+      sqi.imperfectGrains_injuredKernel,
2038
+      sqi.imperfectGrains_scab,
2039
+      sqi.imperfectGrains_scab_total,
2040
+      sqi.imperfectGrains_scab_blackEmbryo,
2041
+      sqi.imperfectGrains_scab_gibberella,
2042
+      sqi.imperfectGrains_damage,
2043
+      sqi.imperfectGrains_sproutedKernel,
2044
+      sqi.imperfectGrains_frostbite,
2045
+      sqi.imperfectGrains_immatureGrain,
2046
+      sqi.imperfectGrains_content,
2047
+      sqi.imperfectGrains_brownRice,
2048
+      sqi.naturally,
2049
+      sqi.stoving,
2050
+      sqi.crude_fat_content,
2051
+      sqi.proteolysis,
2052
+      sqi.mildew,
2053
+      sqi.immature_grain_rate,
2054
+      sqi.crushing_rate,
2055
+      sqi.yellow_rice,
2056
+      sqi.relative_density,
2057
+      sqi.water_volatiles,
2058
+      sqi.insoluble_impurity,
2059
+      sqi.acid_value,
2060
+      sqi.soap_content,
2061
+      sqi.heat,
2062
+      sqi.wood_tar,
2063
+      sqi.avg_length,
2064
+      sqi.rice_grains,
2065
+      sqi.brokenRice_total,
2066
+      sqi.brokenRice_big,
2067
+      sqi.brokenRice_small,
2068
+      sqi.machiningAccuracy,
2069
+      sqi.chalkiness,
2070
+      sqi.machiningAccuracy_essence,
2071
+      sqi.machiningAccuracy_suitable,
2072
+      sqi.amylose,
2073
+      sqi.ash_content,
2074
+      sqi.coarseness,
2075
+      sqi.gluten,
2076
+      sqi.silt_content,
2077
+      sqi.magnetic_metal
2078
+  FROM
2079
+      depot:storage_qualitycheck sqk
2080
+      LEFT JOIN depot:basic_storehouse bs ON bs.storehouse_id = sqk.house_id
2081
+      LEFT JOIN depot:basic_warehouse bw ON bw.warehouse_id = sqk.warehouse_id
2082
+      LEFT JOIN depot:storage_qualitycheck_inspection sqi ON sqi.qualitycheck_id = sqk.id
2083
+      LEFT JOIN depot:org_info oi ON sqk.org_id = oi.org_id
2084
+      LEFT JOIN depot:basic_enum pz ON pz.enumId = sqk.sub_type
2085
+      LEFT JOIN depot:basic_enum qr ON qr.enumId = sqk.quality
2086
+      LEFT JOIN depot:basic_enum cd ON cd.enumId = sqk.location
2087
+      LEFT JOIN depot:basic_enum fs ON fs.enumId = bs.keeping_way
2088
+      LEFT JOIN depot:basic_enum dj ON dj.enumId = sqk.level_update
2089
+      LEFT JOIN depot:basic_enum shnd ON shnd.enumId = sqk.harvest_time
2090
+      WHERE
2091
+        sqk.id =#{id};
2092
+  </select>
1972 2093
   <select id="queryByQualitycheckusiness" parameterType="com.chinaitop.depot.storage.model.StorageQualitycheck" resultMap="BaseResultMap">
1973 2094
     SELECT DISTINCT
1974 2095
     sqk.id,
@@ -1986,8 +2107,8 @@
1986 2107
       <if test="id != null">
1987 2108
         and sqk.id = #{id}
1988 2109
       </if>
1989
-      <if test="type !=null">
1990
-        and sqk.type = #{type}
2110
+      <if test="typeUpdate !=null">
2111
+        and sqk.type_update = #{typeUpdate}
1991 2112
       </if>
1992 2113
       <if test="historyStatus !=null">
1993 2114
         and sqk.history_status = #{historyStatus}

Файловите разлики са ограничени, защото са твърде много
+ 203 - 67
src/main/java/com/chinaitop/depot/storage/model/StorageQualitycheck.java


Файловите разлики са ограничени, защото са твърде много
+ 1531 - 0
src/main/java/com/chinaitop/depot/storage/model/StorageQualitycheckForSPT.java


+ 19 - 0
src/main/java/com/chinaitop/depot/storage/model/StorageQualitycheckInspection.java

@@ -137,6 +137,25 @@ public class StorageQualitycheckInspection {
137 137
 
138 138
     private String inputFour;
139 139
 
140
+    private String sieveResidue;//筛下物%2020.12.21  新增字段
141
+
142
+    private String riceYield;//出米率%2020.12.21  新增字段
143
+
144
+
145
+    public String getSieveResidue() {
146
+        return sieveResidue;
147
+    }
148
+
149
+    public void setSieveResidue(String sieveResidue) {
150
+        this.sieveResidue = sieveResidue;
151
+    }
152
+    public String getRiceYield() {
153
+        return riceYield;
154
+    }
155
+
156
+    public void setRiceYield(String riceYield) {
157
+        this.riceYield = riceYield;
158
+    }
140 159
     /**
141 160
      * id
142 161
      * @return id id

+ 2 - 0
src/main/java/com/chinaitop/depot/storage/service/StorageQualitycheckService.java

@@ -124,4 +124,6 @@ public interface StorageQualitycheckService {
124 124
 
125 125
     //获取仓房
126 126
     JSONArray getHouseIdAll(Integer orgId, HttpServletRequest request);
127
+
128
+	Map<String, Object> getcheckByIds(Integer id);
127 129
 }

+ 7 - 0
src/main/java/com/chinaitop/depot/storage/service/impl/StorageQualitycheckServiceImpl.java

@@ -86,6 +86,7 @@ public class StorageQualitycheckServiceImpl implements StorageQualitycheckServic
86 86
                     }
87 87
 
88 88
                 }
89
+
89 90
             }
90 91
         } catch (IOException e) {
91 92
             e.printStackTrace();
@@ -314,6 +315,12 @@ public class StorageQualitycheckServiceImpl implements StorageQualitycheckServic
314 315
     }
315 316
 
316 317
     @Override
318
+    public Map<String, Object> getcheckByIds(Integer Id) {
319
+        Map<String, Object> checkMap = qualitycheckMapper.getcheckById(Id);
320
+        return checkMap;
321
+    }
322
+
323
+    @Override
317 324
     public List<Map<String, Object>> getAllFoodStocks(Map<String, Object> paramMap) {
318 325
         return qualitycheckMapper.getAllFoodStocks(paramMap);
319 326
     }