mengy 4 jaren geleden
bovenliggende
commit
791bc027a1

+ 5 - 1
src/main/java/com/chinaitop/depot/storage/controller/StorageChangeStoragehouseTaskController.java

@@ -316,9 +316,10 @@ public class StorageChangeStoragehouseTaskController {
316 316
 			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
317 317
 			@ApiImplicitParam(name = "planStartDateA", value = "计划开始日期A", paramType = "query"),
318 318
 			@ApiImplicitParam(name = "planStartDateB", value = "计划开始日期B", paramType = "query"),
319
+			@ApiImplicitParam(name = "workNo", value = "作业单号", paramType = "query"),
319 320
 			@ApiImplicitParam(name = "orgId", value = "单位ID", paramType = "query") })
320 321
 	public PageInfo<StorageChangeStoragehouseTask> getWorkPageInfo(Integer pageNum, Integer pageSize, Integer orgId,
321
-			String planStartDateA, String planStartDateB) {
322
+			String planStartDateA, String planStartDateB, String workNo) {
322 323
 		StorageChangeStoragehouseTaskExample example = new StorageChangeStoragehouseTaskExample();
323 324
 		Criteria Criteria = example.createCriteria();
324 325
 		String planType = "ChangeWork";
@@ -333,6 +334,9 @@ public class StorageChangeStoragehouseTaskController {
333 334
 			Date starDate = ParameterUtil.string2datetime(planStartDateB + " 23:59:59");
334 335
 			Criteria.andPlanStartDateLessThanOrEqualTo(starDate);
335 336
 		}
337
+		if (workNo != null && !"".equals(workNo)) {
338
+			Criteria.andWorkNoEqualTo(workNo);
339
+		}
336 340
 		if (orgId != null && !"".equals(orgId)) {
337 341
 			Criteria.andOrgIdEqualTo(orgId);
338 342
 		}

+ 6 - 1
src/main/java/com/chinaitop/depot/storage/controller/StorageDumpController.java

@@ -52,6 +52,7 @@ public class StorageDumpController {
52 52
 			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
53 53
 			@ApiImplicitParam(name = "houseId", value = "仓房ID", paramType = "query"),
54 54
 			@ApiImplicitParam(name = "wareId", value = "货位ID", paramType = "query"),
55
+			@ApiImplicitParam(name = "subType", value = "粮食品种", paramType = "query"),
55 56
 			@ApiImplicitParam(name = "ylsxz", value = "原粮食性质", paramType = "query"),
56 57
 			@ApiImplicitParam(name = "xlsxz", value = "转储后性质", paramType = "query"),
57 58
 			@ApiImplicitParam(name = "startTime", value = "业务发生起始时间", paramType = "query"),
@@ -59,7 +60,7 @@ public class StorageDumpController {
59 60
 			@ApiImplicitParam(name = "orgId", value = "单位ID", paramType = "query")
60 61
 	})
61 62
 	public PageInfo<StorageDump> getList(Integer pageNum, Integer pageSize,
62
-										Integer houseId, Integer wareId, Integer ylsxz, Integer xlsxz, 
63
+										Integer houseId, Integer wareId,Integer subType, Integer ylsxz, Integer xlsxz,
63 64
 										String startTime, String endTime, Integer orgId) {
64 65
 
65 66
 		StorageDumpExample example = new StorageDumpExample();
@@ -75,6 +76,10 @@ public class StorageDumpController {
75 76
 			criteria.andWareIdEqualTo(wareId);
76 77
 		}
77 78
 
79
+		if (subType!= null){
80
+			criteria.andLspzEqualTo(subType);
81
+		}
82
+
78 83
 		/* 原粮食性质 */
79 84
 		if (null != ylsxz) {
80 85
 			criteria.andYLsxzEqualTo(ylsxz);

+ 29 - 2
src/main/java/com/chinaitop/depot/storage/controller/StorageFoodbasicInfoController.java

@@ -1,5 +1,6 @@
1 1
 package com.chinaitop.depot.storage.controller;
2 2
 
3
+import com.alibaba.fastjson.JSON;
3 4
 import com.chinaitop.depot.storage.model.StorageFoodbasicinfo;
4 5
 import com.chinaitop.depot.storage.model.StorageFoodbasicinfoExample;
5 6
 import com.chinaitop.depot.storage.model.StorageFoodbasicinfoExample.Criteria;
@@ -15,6 +16,7 @@ import io.swagger.annotations.Api;
15 16
 import io.swagger.annotations.ApiImplicitParam;
16 17
 import io.swagger.annotations.ApiImplicitParams;
17 18
 import io.swagger.annotations.ApiOperation;
19
+import org.apache.commons.lang3.StringUtils;
18 20
 import org.springframework.http.MediaType;
19 21
 import org.springframework.web.bind.annotation.RequestMapping;
20 22
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -102,10 +104,19 @@ public class StorageFoodbasicInfoController {
102 104
             @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
103 105
             @ApiImplicitParam(name = "houseId", value = "仓房ID", paramType = "query"),
104 106
             @ApiImplicitParam(name = "warehouseId", value = "货位ID", paramType = "query"),
105
-            @ApiImplicitParam(name = "orgId", value = "单位ID", paramType = "query")
107
+            @ApiImplicitParam(name = "orgId", value = "单位ID", paramType = "query"),
108
+            @ApiImplicitParam(name = "quality", value = "储粮性质", paramType = "query"),
109
+            @ApiImplicitParam(name = "subType", value = "粮食品种", paramType = "query"),
110
+            @ApiImplicitParam(name = "sealStatus", value = "封仓状态", paramType = "query"),
111
+            @ApiImplicitParam(name = "searchStartDate", value = "开始日期", paramType = "query"),
112
+            @ApiImplicitParam(name = "searchEndDate", value = "结束日期", paramType = "query")
113
+
114
+
106 115
     })
107 116
     public PageInfo<StorageFoodbasicinfo> basicinfoPageInfo(Integer pageNum, Integer pageSize ,
108
-                                                            Integer houseId, Integer warehouseId ,Integer orgId){
117
+                                                            Integer houseId, Integer warehouseId ,Integer orgId,
118
+                                                            String quality, Integer subType,String sealStatus,
119
+                                                            String searchStartDate, String searchEndDate){
109 120
         StorageFoodbasicinfo foodbasicinfo = new StorageFoodbasicinfo();
110 121
         if(houseId != null){
111 122
             foodbasicinfo.setHouseId(houseId);
@@ -113,6 +124,22 @@ public class StorageFoodbasicInfoController {
113 124
         if(warehouseId != null){
114 125
             foodbasicinfo.setWarehouseId(warehouseId);
115 126
         }
127
+        if (StringUtils.isNotBlank(quality)){
128
+            HashMap hashMap = JSON.parseObject(quality, HashMap.class);
129
+            String ax = String.valueOf(hashMap.get("id"));
130
+            foodbasicinfo.setQuality(ax);
131
+        }
132
+        if (subType!= null){
133
+            foodbasicinfo.setSubType(subType);
134
+        }
135
+
136
+        if(ParameterUtil.isnotnull(searchStartDate) && ParameterUtil.isnotnull(searchEndDate)){
137
+            foodbasicinfo.setSearchStartDate(searchStartDate);
138
+            foodbasicinfo.setSearchEndDate(searchEndDate);
139
+        }
140
+        if(ParameterUtil.isnotnull(sealStatus)){
141
+            foodbasicinfo.setSealStatus(sealStatus);
142
+        }
116 143
         if (pageNum!=null && pageSize!=null) {
117 144
             PageHelper.startPage(pageNum, pageSize);
118 145
         }

+ 24 - 3
src/main/java/com/chinaitop/depot/storage/controller/StorageQualitycheckController.java

@@ -292,10 +292,16 @@ public class StorageQualitycheckController {
292 292
             @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
293 293
             @ApiImplicitParam(name = "houseId", value = "仓房ID", paramType = "query"),
294 294
             @ApiImplicitParam(name = "warehouseId", value = "货位ID", paramType = "query"),
295
-            @ApiImplicitParam(name = "orgId", value = "单位ID", paramType = "query")
296
-    })
295
+            @ApiImplicitParam(name = "orgId", value = "单位ID", paramType = "query"),
296
+            @ApiImplicitParam(name = "quality", value = "储粮性质", paramType = "query"),
297
+            @ApiImplicitParam(name = "subType", value = "粮食品种", paramType = "query"),
298
+            @ApiImplicitParam(name = "sealStatus", value = "封仓状态", paramType = "query"),
299
+            @ApiImplicitParam(name = "searchStartDate", value = "开始日期", paramType = "query"),
300
+            @ApiImplicitParam(name = "searchEndDate", value = "结束日期", paramType = "query")})
297 301
     public PageInfo<StorageQualitycheck> listPage(Integer pageNum, Integer pageSize ,
298
-                                                  String houseId, String warehouseId, Integer orgId) {
302
+                                                  String houseId, String warehouseId,Integer orgId,
303
+                                                  String quality, Integer subType,String sealStatus,
304
+                                                  String searchStartDate, String searchEndDate) {
299 305
     	StorageQualitycheck qualityCheck = new StorageQualitycheck();
300 306
         if(StringUtils.isNoneBlank(houseId)){
301 307
             qualityCheck.setHouseId(Integer.valueOf(houseId));
@@ -311,7 +317,22 @@ public class StorageQualitycheckController {
311 317
         qualityCheck.setType("1");///查找验收质量管理的信息
312 318
 
313 319
         qualityCheck.setHistoryStatus(0);//0:最新数据  1:历史数据
320
+        if (StringUtils.isNotBlank(quality)){
321
+            HashMap hashMap = JSON.parseObject(quality, HashMap.class);
322
+            String ax = String.valueOf(hashMap.get("id"));
323
+            qualityCheck.setQuality(ax);
324
+        }
325
+        if (subType!= null){
326
+            qualityCheck.setSubType(subType);
327
+        }
314 328
 
329
+        if(ParameterUtil.isnotnull(searchStartDate) && ParameterUtil.isnotnull(searchEndDate)){
330
+            qualityCheck.setSearchStartDate(searchStartDate);
331
+            qualityCheck.setSearchEndDate(searchEndDate);
332
+        }
333
+        if(sealStatus != null && ParameterUtil.isnotnull(sealStatus)){
334
+            qualityCheck.setSealStatus(sealStatus);
335
+        }
315 336
         if (pageNum!=null && pageSize!=null) {
316 337
             PageHelper.startPage(pageNum, pageSize);
317 338
         }

+ 15 - 0
src/main/java/com/chinaitop/depot/storage/mapper/StorageFoodbasicinfoMapper.xml

@@ -1034,6 +1034,21 @@
1034 1034
       <if test="warehouseId != null">
1035 1035
         and sfo.warehouse_id = #{warehouseId}
1036 1036
       </if>
1037
+     <if test="sealStatus !=null">
1038
+       and sfo.seal_status = #{sealStatus}
1039
+     </if>
1040
+     <if test="quality !=null">
1041
+       and sfo.quality = #{quality}
1042
+     </if>
1043
+     <if test="subType !=null">
1044
+       and sfo.sub_type = #{subType}
1045
+     </if>
1046
+     <if test="searchStartDate !=null">
1047
+       and STR_TO_DATE(sfo.seal_date, '%Y-%m-%d')  <![CDATA[ >= ]]> #{searchStartDate}
1048
+     </if>
1049
+     <if test="searchEndDate !=null">
1050
+       and STR_TO_DATE(sfo.seal_date, '%Y-%m-%d')  &lt;= #{searchEndDate}
1051
+     </if>
1037 1052
      <if test="orgId != null">
1038 1053
         and sfo.org_id = #{orgId}
1039 1054
       </if>

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

@@ -1915,6 +1915,9 @@
1915 1915
       <if test="level !=null">
1916 1916
         and sqk.level = #{level}
1917 1917
       </if>
1918
+      <if test="quality !=null">
1919
+        and sqk.quality = #{quality}
1920
+      </if>
1918 1921
       <if test="historyStatus !=null">
1919 1922
         and sqk.history_status = #{historyStatus}
1920 1923
       </if>

+ 20 - 0
src/main/java/com/chinaitop/depot/storage/model/StorageFoodbasicinfo.java

@@ -4,6 +4,26 @@ import java.math.BigDecimal;
4 4
 import java.util.Date;
5 5
 
6 6
 public class StorageFoodbasicinfo {
7
+    //开始日期和结束日期
8
+    private String searchStartDate;
9
+
10
+    public String getSearchStartDate() {
11
+        return searchStartDate;
12
+    }
13
+
14
+    public void setSearchStartDate(String searchStartDate) {
15
+        this.searchStartDate = searchStartDate;
16
+    }
17
+
18
+    public String getSearchEndDate() {
19
+        return searchEndDate;
20
+    }
21
+
22
+    public void setSearchEndDate(String searchEndDate) {
23
+        this.searchEndDate = searchEndDate;
24
+    }
25
+
26
+    private String searchEndDate;
7 27
     private Integer id;
8 28
     private Date sealDate;//封仓日期
9 29
     private BigDecimal deductVolume;//扣除体积