|
|
@@ -9,6 +9,7 @@ import javax.annotation.Resource;
|
|
9
|
9
|
import javax.servlet.http.HttpServletRequest;
|
|
10
|
10
|
import javax.servlet.http.HttpServletResponse;
|
|
11
|
11
|
|
|
|
12
|
+import org.apache.commons.lang3.StringUtils;
|
|
12
|
13
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
13
|
14
|
import org.springframework.http.MediaType;
|
|
14
|
15
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
@@ -48,10 +49,11 @@ public class RegistrationController {
|
|
48
|
49
|
@ApiImplicitParam(name = "houseId", value = "仓房id", paramType = "query"),
|
|
49
|
50
|
@ApiImplicitParam(name = "warehouseId", value = "货位id", paramType = "query"),
|
|
50
|
51
|
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query"),
|
|
51
|
|
- @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query")
|
|
|
52
|
+ @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query"),
|
|
|
53
|
+ @ApiImplicitParam(name = "orgId", value = "组织机构ID", paramType = "query")
|
|
52
|
54
|
})
|
|
53
|
55
|
public PageInfo<Map<String,Object>> getWheatListPageInfo(HttpServletRequest request, Integer pageNum, Integer pageSize,
|
|
54
|
|
- String houseId, String warehouseId, String startDate, String endDate){
|
|
|
56
|
+ String houseId, String warehouseId, String startDate, String endDate, String orgId){
|
|
55
|
57
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
56
|
58
|
PageInfo<Map<String,Object>> pageInfo = null;
|
|
57
|
59
|
try {
|
|
|
@@ -62,8 +64,10 @@ public class RegistrationController {
|
|
62
|
64
|
map.put("warehouseId", warehouseId);
|
|
63
|
65
|
}
|
|
64
|
66
|
|
|
65
|
|
- map.put("orgId", request.getSession().getAttribute("orgId"));
|
|
66
|
|
-
|
|
|
67
|
+ if (StringUtils.isNotBlank(orgId)) {
|
|
|
68
|
+ map.put("orgId", orgId);
|
|
|
69
|
+ }
|
|
|
70
|
+
|
|
67
|
71
|
if (null != startDate && !"".equals(startDate)) {
|
|
68
|
72
|
map.put("startDate", startDate);
|
|
69
|
73
|
}
|
|
|
@@ -97,10 +101,11 @@ public class RegistrationController {
|
|
97
|
101
|
@ApiImplicitParam(name = "houseId", value = "仓房id", paramType = "query"),
|
|
98
|
102
|
@ApiImplicitParam(name = "warehouseId", value = "货位id", paramType = "query"),
|
|
99
|
103
|
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query"),
|
|
100
|
|
- @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query")
|
|
|
104
|
+ @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query"),
|
|
|
105
|
+ @ApiImplicitParam(name = "orgId", value = "组织机构ID", paramType = "query")
|
|
101
|
106
|
})
|
|
102
|
107
|
public PageInfo<Map<String,Object>> getCornListPageInfo(HttpServletRequest request, Integer pageNum, Integer pageSize,
|
|
103
|
|
- String houseId, String warehouseId, String startDate, String endDate){
|
|
|
108
|
+ String houseId, String warehouseId, String startDate, String endDate, String orgId){
|
|
104
|
109
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
105
|
110
|
PageInfo<Map<String,Object>> pageInfo = null;
|
|
106
|
111
|
try {
|
|
|
@@ -111,8 +116,10 @@ public class RegistrationController {
|
|
111
|
116
|
map.put("warehouseId", warehouseId);
|
|
112
|
117
|
}
|
|
113
|
118
|
|
|
114
|
|
- map.put("orgId", request.getSession().getAttribute("orgId"));
|
|
115
|
|
-
|
|
|
119
|
+ if (StringUtils.isNotBlank(orgId)) {
|
|
|
120
|
+ map.put("orgId", orgId);
|
|
|
121
|
+ }
|
|
|
122
|
+
|
|
116
|
123
|
if (null != startDate && !"".equals(startDate)) {
|
|
117
|
124
|
map.put("startDate", startDate);
|
|
118
|
125
|
}
|
|
|
@@ -146,10 +153,11 @@ public class RegistrationController {
|
|
146
|
153
|
@ApiImplicitParam(name = "houseId", value = "仓房id", paramType = "query"),
|
|
147
|
154
|
@ApiImplicitParam(name = "warehouseId", value = "货位id", paramType = "query"),
|
|
148
|
155
|
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query"),
|
|
149
|
|
- @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query")
|
|
|
156
|
+ @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query"),
|
|
|
157
|
+ @ApiImplicitParam(name = "orgId", value = "组织机构ID", paramType = "query")
|
|
150
|
158
|
})
|
|
151
|
159
|
public PageInfo<Map<String,Object>> getSoybeanListPageInfo(HttpServletRequest request, Integer pageNum, Integer pageSize,
|
|
152
|
|
- String houseId, String warehouseId, String startDate, String endDate){
|
|
|
160
|
+ String houseId, String warehouseId, String startDate, String endDate, String orgId){
|
|
153
|
161
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
154
|
162
|
PageInfo<Map<String,Object>> pageInfo = null;
|
|
155
|
163
|
try {
|
|
|
@@ -160,7 +168,9 @@ public class RegistrationController {
|
|
160
|
168
|
map.put("warehouseId", warehouseId);
|
|
161
|
169
|
}
|
|
162
|
170
|
|
|
163
|
|
- map.put("orgId", request.getSession().getAttribute("orgId"));
|
|
|
171
|
+ if (StringUtils.isNotBlank(orgId)) {
|
|
|
172
|
+ map.put("orgId", orgId);
|
|
|
173
|
+ }
|
|
164
|
174
|
|
|
165
|
175
|
if (null != startDate && !"".equals(startDate)) {
|
|
166
|
176
|
map.put("startDate", startDate);
|
|
|
@@ -195,10 +205,11 @@ public class RegistrationController {
|
|
195
|
205
|
@ApiImplicitParam(name = "houseId", value = "仓房id", paramType = "query"),
|
|
196
|
206
|
@ApiImplicitParam(name = "warehouseId", value = "货位id", paramType = "query"),
|
|
197
|
207
|
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query"),
|
|
198
|
|
- @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query")
|
|
|
208
|
+ @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query"),
|
|
|
209
|
+ @ApiImplicitParam(name = "orgId", value = "组织机构ID", paramType = "query")
|
|
199
|
210
|
})
|
|
200
|
211
|
public PageInfo<Map<String,Object>> getRiceListPageInfo(HttpServletRequest request, Integer pageNum, Integer pageSize,
|
|
201
|
|
- String houseId, String warehouseId, String startDate, String endDate){
|
|
|
212
|
+ String houseId, String warehouseId, String startDate, String endDate, String orgId){
|
|
202
|
213
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
203
|
214
|
PageInfo<Map<String,Object>> pageInfo = null;
|
|
204
|
215
|
try {
|
|
|
@@ -208,9 +219,11 @@ public class RegistrationController {
|
|
208
|
219
|
if (null != warehouseId && !"".equals(warehouseId)) {
|
|
209
|
220
|
map.put("warehouseId", warehouseId);
|
|
210
|
221
|
}
|
|
211
|
|
-
|
|
212
|
|
- map.put("orgId", request.getSession().getAttribute("orgId"));
|
|
213
|
|
-
|
|
|
222
|
+
|
|
|
223
|
+ if (StringUtils.isNotBlank(orgId)) {
|
|
|
224
|
+ map.put("orgId", orgId);
|
|
|
225
|
+ }
|
|
|
226
|
+
|
|
214
|
227
|
if (null != startDate && !"".equals(startDate)) {
|
|
215
|
228
|
map.put("startDate", startDate);
|
|
216
|
229
|
}
|
|
|
@@ -243,19 +256,22 @@ public class RegistrationController {
|
|
243
|
256
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
|
|
244
|
257
|
@ApiImplicitParam(name = "tankId", value = "油罐id", paramType = "query"),
|
|
245
|
258
|
@ApiImplicitParam(name = "startDate", value = "开始时间", paramType = "query"),
|
|
246
|
|
- @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query")
|
|
|
259
|
+ @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query"),
|
|
|
260
|
+ @ApiImplicitParam(name = "orgId", value = "组织机构ID", paramType = "query")
|
|
247
|
261
|
})
|
|
248
|
262
|
public PageInfo<Map<String,Object>> getCrudeOilListPageInfo(HttpServletRequest request, Integer pageNum, Integer pageSize,
|
|
249
|
|
- String tankId, String startDate, String endDate){
|
|
|
263
|
+ String tankId, String startDate, String endDate, String orgId){
|
|
250
|
264
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
251
|
265
|
PageInfo<Map<String,Object>> pageInfo = null;
|
|
252
|
266
|
try {
|
|
253
|
267
|
if (null != tankId && !"".equals(tankId)) {
|
|
254
|
268
|
map.put("tankId", tankId);
|
|
255
|
269
|
}
|
|
256
|
|
-
|
|
257
|
|
- map.put("orgId", request.getSession().getAttribute("orgId"));
|
|
258
|
|
-
|
|
|
270
|
+
|
|
|
271
|
+ if (StringUtils.isNotBlank(orgId)) {
|
|
|
272
|
+ map.put("orgId", orgId);
|
|
|
273
|
+ }
|
|
|
274
|
+
|
|
259
|
275
|
if (null != startDate && !"".equals(startDate)) {
|
|
260
|
276
|
map.put("startDate", startDate);
|
|
261
|
277
|
}
|
|
|
@@ -288,11 +304,12 @@ public class RegistrationController {
|
|
288
|
304
|
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query"),
|
|
289
|
305
|
@ApiImplicitParam(name = "zbr", value = "制表人", paramType = "query"),
|
|
290
|
306
|
@ApiImplicitParam(name = "shdw", value = "收货单位", paramType = "query"),
|
|
291
|
|
- @ApiImplicitParam(name = "dwfzr", value = "单位负责人", paramType = "query")
|
|
|
307
|
+ @ApiImplicitParam(name = "dwfzr", value = "单位负责人", paramType = "query"),
|
|
|
308
|
+ @ApiImplicitParam(name = "orgId", value = "组织机构ID", paramType = "query")
|
|
292
|
309
|
})
|
|
293
|
310
|
public void exportWheatListPageInfo(HttpServletResponse response,HttpServletRequest request,
|
|
294
|
311
|
String houseId, String warehouseId, String startDate, String endDate,
|
|
295
|
|
- String zbr, String shdw, String dwfzr){
|
|
|
312
|
+ String zbr, String shdw, String dwfzr, String orgId){
|
|
296
|
313
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
297
|
314
|
try {
|
|
298
|
315
|
if (null != houseId && !"".equals(houseId)) {
|
|
|
@@ -302,7 +319,9 @@ public class RegistrationController {
|
|
302
|
319
|
map.put("warehouseId", warehouseId);
|
|
303
|
320
|
}
|
|
304
|
321
|
|
|
305
|
|
- map.put("orgId", request.getSession().getAttribute("orgId"));
|
|
|
322
|
+ if (StringUtils.isNotBlank(orgId)) {
|
|
|
323
|
+ map.put("orgId", orgId);
|
|
|
324
|
+ }
|
|
306
|
325
|
|
|
307
|
326
|
if (null != startDate && !"".equals(startDate)) {
|
|
308
|
327
|
map.put("startDate", startDate);
|
|
|
@@ -348,11 +367,12 @@ public class RegistrationController {
|
|
348
|
367
|
@ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query"),
|
|
349
|
368
|
@ApiImplicitParam(name = "zbr", value = "制表人", paramType = "query"),
|
|
350
|
369
|
@ApiImplicitParam(name = "shdw", value = "收货单位", paramType = "query"),
|
|
351
|
|
- @ApiImplicitParam(name = "dwfzr", value = "单位负责人", paramType = "query")
|
|
|
370
|
+ @ApiImplicitParam(name = "dwfzr", value = "单位负责人", paramType = "query"),
|
|
|
371
|
+ @ApiImplicitParam(name = "orgId", value = "组织机构ID", paramType = "query")
|
|
352
|
372
|
})
|
|
353
|
373
|
public void exportRiceListPageInfo(HttpServletResponse response,HttpServletRequest request,
|
|
354
|
374
|
String houseId, String warehouseId, String startDate, String endDate,
|
|
355
|
|
- String zbr, String shdw, String dwfzr ){
|
|
|
375
|
+ String zbr, String shdw, String dwfzr, String orgId){
|
|
356
|
376
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
357
|
377
|
try {
|
|
358
|
378
|
if (null != houseId && !"".equals(houseId)) {
|
|
|
@@ -362,7 +382,9 @@ public class RegistrationController {
|
|
362
|
382
|
map.put("warehouseId", warehouseId);
|
|
363
|
383
|
}
|
|
364
|
384
|
|
|
365
|
|
- map.put("orgId", request.getSession().getAttribute("orgId"));
|
|
|
385
|
+ if (StringUtils.isNotBlank(orgId)) {
|
|
|
386
|
+ map.put("orgId", orgId);
|
|
|
387
|
+ }
|
|
366
|
388
|
|
|
367
|
389
|
if (null != startDate && !"".equals(startDate)) {
|
|
368
|
390
|
map.put("startDate", startDate);
|