|
@@ -262,18 +262,14 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -262,18 +262,14 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
262
|
@Autowired
|
262
|
@Autowired
|
263
|
private AbnormalPackageMapper abnormalPackageMapper;
|
263
|
private AbnormalPackageMapper abnormalPackageMapper;
|
264
|
|
264
|
|
265
|
- //南京月结账号
|
|
|
266
|
-// private static final String NANJING_CUSTID = "0255045253";
|
|
|
267
|
-// private static final String NANJING_CUSTID = "9999999999";
|
|
|
268
|
-
|
|
|
269
|
- //北京月结账号
|
|
|
270
|
-// private static final String BEIJING_CUSTID = "0100026158";
|
|
|
271
|
-// private static final String BEIJING_CUSTID = "9999999999";
|
|
|
272
|
-
|
|
|
273
|
private static final Integer PAY_METHOD_MONTHLY = 1;//寄付月结
|
265
|
private static final Integer PAY_METHOD_MONTHLY = 1;//寄付月结
|
274
|
|
266
|
|
275
|
private static final Integer PAY_METHOD_FREIGHT_COLLECT = 2;//到付
|
267
|
private static final Integer PAY_METHOD_FREIGHT_COLLECT = 2;//到付
|
276
|
|
268
|
|
|
|
269
|
+ private static final Integer DEPOT_NO_BEIJING= 0;//北京
|
|
|
270
|
+
|
|
|
271
|
+ private static final Integer DEPOT_NO_NANJING=1;//南京
|
|
|
272
|
+
|
277
|
//已收货
|
273
|
//已收货
|
278
|
private static final Byte QC_STATUS_RECEIVED = 0;
|
274
|
private static final Byte QC_STATUS_RECEIVED = 0;
|
279
|
|
275
|
|
|
@@ -366,11 +362,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -366,11 +362,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
366
|
return resultMap;
|
362
|
return resultMap;
|
367
|
}
|
363
|
}
|
368
|
|
364
|
|
369
|
- public Map<String, Integer> getCountForQc(BuyerOrderReq req){
|
|
|
370
|
- if(null == req.getDepotNo()) {
|
|
|
371
|
- req.setDepotNo(1);//默认南京
|
365
|
+ private Integer getDepotNoByPhoneUid(String phoneUid) {
|
|
|
366
|
+ if(StringUtils.isEmpty(phoneUid)) {
|
|
|
367
|
+ return DEPOT_NO_NANJING;
|
|
|
368
|
+ }
|
|
|
369
|
+ PhoneUidDepot record = phoneUidDepotMapper.selectByphoneUid(phoneUid);
|
|
|
370
|
+ if(null != record) {
|
|
|
371
|
+ return record.getDepotNo();
|
|
|
372
|
+ }else {
|
|
|
373
|
+ return DEPOT_NO_NANJING;
|
372
|
}
|
374
|
}
|
373
|
|
375
|
|
|
|
376
|
+ }
|
|
|
377
|
+
|
|
|
378
|
+ public Map<String, Integer> getCountForQc(BuyerOrderReq req){
|
|
|
379
|
+ req.setDepotNo(getDepotNoByPhoneUid(req.getPhoneUid()));
|
|
|
380
|
+
|
374
|
//根据查询条件(订单号或卖家运单号)
|
381
|
//根据查询条件(订单号或卖家运单号)
|
375
|
if(StringUtils.isNotEmpty(req.getQueryStr())) {
|
382
|
if(StringUtils.isNotEmpty(req.getQueryStr())) {
|
376
|
return queryOrderNumByStatus(req.getQueryStr(), req.getDepotNo());
|
383
|
return queryOrderNumByStatus(req.getQueryStr(), req.getDepotNo());
|
|
@@ -388,7 +395,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -388,7 +395,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
388
|
resultMap.put("problemNum", problemNum);
|
395
|
resultMap.put("problemNum", problemNum);
|
389
|
|
396
|
|
390
|
//查询异常包裹
|
397
|
//查询异常包裹
|
391
|
- resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(null));
|
398
|
+ resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(null, req.getDepotNo()));
|
392
|
|
399
|
|
393
|
return resultMap;
|
400
|
return resultMap;
|
394
|
}
|
401
|
}
|
|
@@ -425,7 +432,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -425,7 +432,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
425
|
resultMap.put("alreadyDeliverNum", alreadyDeliverNum);
|
432
|
resultMap.put("alreadyDeliverNum", alreadyDeliverNum);
|
426
|
resultMap.put("problemNum", problemNum);
|
433
|
resultMap.put("problemNum", problemNum);
|
427
|
//查询异常包裹
|
434
|
//查询异常包裹
|
428
|
- resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(queryStr));
|
435
|
+ resultMap.put("exceptionNum", abnormalPackageMapper.selectValidCnt(queryStr, depotNo));
|
429
|
|
436
|
|
430
|
return resultMap;
|
437
|
return resultMap;
|
431
|
}
|
438
|
}
|
|
@@ -750,6 +757,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -750,6 +757,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
750
|
|
757
|
|
751
|
@Override
|
758
|
@Override
|
752
|
public PageResponseBO<BuyerOrderResp> queryOrderListByStatusForQc(BuyerOrderReq req) {
|
759
|
public PageResponseBO<BuyerOrderResp> queryOrderListByStatusForQc(BuyerOrderReq req) {
|
|
|
760
|
+ req.setDepotNo(getDepotNoByPhoneUid(req.getPhoneUid()));
|
753
|
Byte status = req.getStatus();
|
761
|
Byte status = req.getStatus();
|
754
|
List<Byte> checkStatusList = Lists.newArrayList();
|
762
|
List<Byte> checkStatusList = Lists.newArrayList();
|
755
|
String platformExpressInfoFlag = "";
|
763
|
String platformExpressInfoFlag = "";
|
|
@@ -2532,11 +2540,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -2532,11 +2540,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
2532
|
}
|
2540
|
}
|
2533
|
|
2541
|
|
2534
|
@Override
|
2542
|
@Override
|
2535
|
- public int addAbnormalPackage(String sellerWaybillCode) {
|
2543
|
+ public int addAbnormalPackage(String sellerWaybillCode, String phoneUid) {
|
|
|
2544
|
+ Integer depotNo = getDepotNoByPhoneUid(phoneUid);
|
2536
|
//数据库已存在
|
2545
|
//数据库已存在
|
2537
|
AbnormalPackage pkg = abnormalPackageMapper.selectBySellerWaybillCode(sellerWaybillCode);
|
2546
|
AbnormalPackage pkg = abnormalPackageMapper.selectBySellerWaybillCode(sellerWaybillCode);
|
2538
|
if(null != pkg) {
|
2547
|
if(null != pkg) {
|
2539
|
- return abnormalPackageMapper.update(new UserHelper().getUserId(), DateUtil.getCurrentTimeSeconds(), sellerWaybillCode);
|
2548
|
+ return abnormalPackageMapper.update(new UserHelper().getUserId(), DateUtil.getCurrentTimeSeconds(), sellerWaybillCode, depotNo);
|
2540
|
}
|
2549
|
}
|
2541
|
|
2550
|
|
2542
|
pkg = new AbnormalPackage();
|
2551
|
pkg = new AbnormalPackage();
|
|
@@ -2544,15 +2553,19 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -2544,15 +2553,19 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
2544
|
pkg.setIsDel(0);
|
2553
|
pkg.setIsDel(0);
|
2545
|
pkg.setCreateTime(DateUtil.getCurrentTimeSeconds());
|
2554
|
pkg.setCreateTime(DateUtil.getCurrentTimeSeconds());
|
2546
|
pkg.setOperateUid(new UserHelper().getUserId());
|
2555
|
pkg.setOperateUid(new UserHelper().getUserId());
|
|
|
2556
|
+ pkg.setDepotNo(depotNo);
|
2547
|
return abnormalPackageMapper.insert(pkg);
|
2557
|
return abnormalPackageMapper.insert(pkg);
|
2548
|
}
|
2558
|
}
|
2549
|
|
2559
|
|
2550
|
@Override
|
2560
|
@Override
|
2551
|
public PageResponseBO<String> queryAbnormalPackage(BuyerOrderReq req){
|
2561
|
public PageResponseBO<String> queryAbnormalPackage(BuyerOrderReq req){
|
2552
|
- int total = abnormalPackageMapper.selectValidCnt(req.getSellerWaybillCode());
|
2562
|
+ Integer depotNo = getDepotNoByPhoneUid(req.getPhoneUid());
|
|
|
2563
|
+ int total = abnormalPackageMapper.selectValidCnt(req.getSellerWaybillCode(), depotNo);
|
2553
|
if(total == 0){
|
2564
|
if(total == 0){
|
2554
|
return null;
|
2565
|
return null;
|
2555
|
}
|
2566
|
}
|
|
|
2567
|
+
|
|
|
2568
|
+ req.setDepotNo(depotNo);
|
2556
|
List<String> list = abnormalPackageMapper.selectValidSellerWaybillCodeList(req);
|
2569
|
List<String> list = abnormalPackageMapper.selectValidSellerWaybillCodeList(req);
|
2557
|
PageResponseBO<String> result=new PageResponseBO<>();
|
2570
|
PageResponseBO<String> result=new PageResponseBO<>();
|
2558
|
result.setPage(req.getPage());
|
2571
|
result.setPage(req.getPage());
|