|
|
@@ -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
|
}
|