|
|
@@ -405,7 +405,7 @@ public class StorageQualitycheckServiceImpl implements StorageQualitycheckServic
|
|
405
|
405
|
|
|
406
|
406
|
@Override
|
|
407
|
407
|
public void pushQualitycheckLsdj_crk(StorageQualitycheck qualitycheck, String ws_path) throws Exception {
|
|
408
|
|
- if ("0".equals(qualitycheck.getTypeUpdate())) {
|
|
|
408
|
+ if ("0".equals(qualitycheck.getTypeUpdate())) {//只有粮食自检才走这里
|
|
409
|
409
|
String crk_yjd_url = qualitycheckMapper.findConditionCrkYjdUrl(qualitycheck.getOrgId());
|
|
410
|
410
|
if (StringUtils.isNotBlank(crk_yjd_url)) {
|
|
411
|
411
|
//拼接完整URL
|
|
|
@@ -429,11 +429,11 @@ public class StorageQualitycheckServiceImpl implements StorageQualitycheckServic
|
|
429
|
429
|
|
|
430
|
430
|
@Override
|
|
431
|
431
|
public List<StorageQualitycheck> getList(Integer houseId, Integer wareId, String checkType, String checkResult,
|
|
432
|
|
- Integer historyStatus, Integer orgId, Integer processState) throws Exception {
|
|
|
432
|
+ Integer historyStatus, Integer orgId, Integer processState, String isdx, String checkTime) throws Exception {
|
|
433
|
433
|
StorageQualitycheckExample example = new StorageQualitycheckExample();
|
|
434
|
434
|
Criteria criteria = example.createCriteria();
|
|
435
|
435
|
|
|
436
|
|
- //0:初检 1:验收 2:质量普查 3:出库,5:第三方检验
|
|
|
436
|
+ //0:初检 1:验收 2:质量普查 3:出库, 4:春秋普查,5:第三方检验
|
|
437
|
437
|
if (StringUtils.isNotBlank(checkType)){
|
|
438
|
438
|
criteria.andTypeUpdateEqualTo(checkType);
|
|
439
|
439
|
}
|
|
|
@@ -463,9 +463,22 @@ public class StorageQualitycheckServiceImpl implements StorageQualitycheckServic
|
|
463
|
463
|
if (null != historyStatus) {
|
|
464
|
464
|
criteria.andHistoryStatusEqualTo(historyStatus);
|
|
465
|
465
|
}
|
|
|
466
|
+
|
|
|
467
|
+ //按照isdx查询检验时间范围
|
|
|
468
|
+ if (StringUtils.isNotBlank(isdx)) {
|
|
|
469
|
+ if ("0".equals(isdx) && StringUtils.isNotBlank(checkTime)) {
|
|
|
470
|
+ criteria.andCheckTimeGreaterThan(ParameterUtil.string2datetime(checkTime));
|
|
|
471
|
+ }
|
|
|
472
|
+ if ("1".equals(isdx) && StringUtils.isNotBlank(checkTime)) {
|
|
|
473
|
+ criteria.andCheckTimeLessThan(ParameterUtil.string2datetime(checkTime));
|
|
|
474
|
+ }
|
|
|
475
|
+ }
|
|
|
476
|
+
|
|
466
|
477
|
//查询从质量管理功能里面添加到数据库的数据
|
|
467
|
478
|
criteria.andFlagTypeIsNull();
|
|
468
|
479
|
|
|
|
480
|
+ example.setOrderByClause(" check_time desc");
|
|
|
481
|
+
|
|
469
|
482
|
List<StorageQualitycheck> list = qualitycheckMapper.selectByExample(example);
|
|
470
|
483
|
|
|
471
|
484
|
return list;
|
|
|
@@ -474,7 +487,7 @@ public class StorageQualitycheckServiceImpl implements StorageQualitycheckServic
|
|
474
|
487
|
@Override
|
|
475
|
488
|
public Map<String, Object> queryCheckDataDetail(Integer houseId, Integer wareId, String checkType,
|
|
476
|
489
|
Integer historyStatus, Integer orgId, Integer processState) throws Exception {
|
|
477
|
|
- List<StorageQualitycheck> list = getList(houseId, wareId, checkType, null, historyStatus, orgId, processState);
|
|
|
490
|
+ List<StorageQualitycheck> list = getList(houseId, wareId, checkType, null, historyStatus, orgId, processState, null , null);
|
|
478
|
491
|
Map<String, Object> retMap = null;
|
|
479
|
492
|
if (null != list && list.size() > 0) {
|
|
480
|
493
|
Integer id = list.get(0).getId();
|
|
|
@@ -482,4 +495,35 @@ public class StorageQualitycheckServiceImpl implements StorageQualitycheckServic
|
|
482
|
495
|
}
|
|
483
|
496
|
return retMap;
|
|
484
|
497
|
}
|
|
|
498
|
+
|
|
|
499
|
+ @Override
|
|
|
500
|
+ public Map<String, Object> findConditionCkCheck(Integer houseId, Integer wareId, String checkType) throws Exception {
|
|
|
501
|
+
|
|
|
502
|
+ //查询最近的封仓时间
|
|
|
503
|
+ Map<String, Object> paramMap = new HashMap<>();
|
|
|
504
|
+ if (null != houseId) {
|
|
|
505
|
+ paramMap.put("houseId", houseId);
|
|
|
506
|
+ }
|
|
|
507
|
+ if (null != wareId) {
|
|
|
508
|
+ paramMap.put("warehouseId", wareId);
|
|
|
509
|
+ }
|
|
|
510
|
+ String fcsj = qualitycheckMapper.findConditionFcsj(paramMap);
|
|
|
511
|
+
|
|
|
512
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
513
|
+ if (StringUtils.isNotBlank(fcsj)) {
|
|
|
514
|
+ List<StorageQualitycheck> list = getList(houseId, wareId, checkType, null, null, null, 2, "0" , fcsj);
|
|
|
515
|
+ if (null != list && list.size() > 0) {
|
|
|
516
|
+ resultMap.put("status", "200");
|
|
|
517
|
+ resultMap.put("msg", list);
|
|
|
518
|
+ } else {
|
|
|
519
|
+ resultMap.put("status", "500");
|
|
|
520
|
+ resultMap.put("msg", "未查到封仓之后的出库质检数据");
|
|
|
521
|
+ }
|
|
|
522
|
+ } else {
|
|
|
523
|
+ resultMap.put("status", "500");
|
|
|
524
|
+ resultMap.put("msg", "连封仓数据都没查到");
|
|
|
525
|
+ }
|
|
|
526
|
+
|
|
|
527
|
+ return resultMap;
|
|
|
528
|
+ }
|
|
485
|
529
|
}
|