...
|
...
|
@@ -344,6 +344,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
|
|
|
private static final Byte ABNORMAL_PACKAGE_STATUS_DEALED = 1;//异常包裹已处理
|
|
|
|
|
|
private static final Byte SIGN_FOR_PACKAGE_STATUS_NORMAL = 0;//正常包裹
|
|
|
|
|
|
private static final Byte SIGN_FOR_PACKAGE_STATUS_ABNORMAL = 1;//异常包裹
|
|
|
|
|
|
//已收货
|
|
|
private static final Byte QC_STATUS_RECEIVED = 0;
|
|
|
|
...
|
...
|
@@ -1201,7 +1205,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
}
|
|
|
|
|
|
//签收
|
|
|
signForPackage(sellerWaybillCode, getDepotNoByPhoneUid(req.getPhoneUid()));
|
|
|
signForPackage(sellerWaybillCode, getDepotNoByPhoneUid(req.getPhoneUid()), 0);
|
|
|
}
|
|
|
|
|
|
@Override
|
...
|
...
|
@@ -2683,7 +2687,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
|
|
|
@Override
|
|
|
@Database(ForceMaster = true)
|
|
|
public void signForPackage(String sellerWaybillCode, Integer depotNo) {
|
|
|
public void signForPackage(String sellerWaybillCode, Integer depotNo, Integer isNormal) {
|
|
|
BuyerOrderReq req = new BuyerOrderReq();
|
|
|
req.setSellerWaybillCode(sellerWaybillCode);
|
|
|
req.setDate(Integer.parseInt(DateUtil.getCurrentDateStr()));
|
...
|
...
|
@@ -2697,6 +2701,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
pkg.setSellerWaybillCode(sellerWaybillCode);
|
|
|
pkg.setDepotNo(depotNo);
|
|
|
pkg.setSignTime(DateUtil.getCurrentTimeSeconds());
|
|
|
pkg.setIsNormal(isNormal);
|
|
|
|
|
|
signForPackageMapper.insert(pkg);
|
|
|
}
|
...
|
...
|
@@ -2729,18 +2734,13 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
|
|
|
@Override
|
|
|
public PageResponseBO<SignForPackageRsp> queryPackageListByStatus(BuyerOrderReq req) {
|
|
|
PageResponseBO<SignForPackageRsp> result=new PageResponseBO<>();
|
|
|
if(req.getStatus().intValue() == 0) {//正常包裹
|
|
|
return queryNormalPackageList(req);
|
|
|
}else if(req.getStatus().intValue() == 1) {//异常包裹
|
|
|
buildQueryDate(req);
|
|
|
return queryAbnormalPackageList(req);
|
|
|
}
|
|
|
return result;
|
|
|
return querySignForPackageList(req);
|
|
|
}
|
|
|
|
|
|
private PageResponseBO<SignForPackageRsp> queryNormalPackageList(BuyerOrderReq req){
|
|
|
private PageResponseBO<SignForPackageRsp> querySignForPackageList(BuyerOrderReq req){
|
|
|
PageResponseBO<SignForPackageRsp> result=new PageResponseBO<>();
|
|
|
req.setDate(null == req.getDate() ? Integer.valueOf(DateUtil.getCurrentDateStr()) : req.getDate());
|
|
|
|
|
|
int total = signForPackageMapper.selectTotalByCondition(req);
|
|
|
if(total == 0) {
|
|
|
return null;
|
...
|
...
|
@@ -2776,13 +2776,15 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
req.setDepotNo(depotNo);
|
|
|
req.setSellerWaybillCode(sellerWaybillCode);
|
|
|
req.setDate(null == date ? Integer.valueOf(DateUtil.getCurrentDateStr()) : date);
|
|
|
req.setStatus(SIGN_FOR_PACKAGE_STATUS_NORMAL);
|
|
|
|
|
|
Map<String, Integer> result = Maps.newHashMap();
|
|
|
result.put("normalNum", signForPackageMapper.selectTotalByCondition(req));
|
|
|
|
|
|
//异常包裹
|
|
|
buildQueryDate(req);
|
|
|
result.put("abnormalNum", abnormalPackageMapper.selectCntByCondition(req));
|
|
|
// buildQueryDate(req);
|
|
|
req.setStatus(SIGN_FOR_PACKAGE_STATUS_ABNORMAL);
|
|
|
result.put("abnormalNum", signForPackageMapper.selectTotalByCondition(req));
|
|
|
|
|
|
return result;
|
|
|
}
|
...
|
...
|
@@ -3417,7 +3419,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon |
|
|
}
|
|
|
if(num > 0) {
|
|
|
//签收
|
|
|
signForPackage(sellerWaybillCode, depotNo);
|
|
|
signForPackage(sellerWaybillCode, depotNo, 1);//异常包裹
|
|
|
}
|
|
|
|
|
|
return num;
|
...
|
...
|
|