|
|
|
@ -82,20 +82,22 @@ public class DistributionDatarepair {
|
|
|
|
|
Map<Long, List<DistributionParcelListEntity>> packageMap = deliveryParcelListEntities.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getWarehouseId)); |
|
|
|
|
packageMap.forEach((k, v) -> { |
|
|
|
|
String orderPackageCodes = v.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(",")); |
|
|
|
|
stringBuffer.append("仓库:"+k).append("包件下架"+orderPackageCodes);; |
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
map.put("orderPackageCode",orderPackageCodes); |
|
|
|
|
map.put("warehouseId",k); |
|
|
|
|
stringBuffer.append("仓库:" + k).append("包件下架" + orderPackageCodes); |
|
|
|
|
; |
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
map.put("orderPackageCode", orderPackageCodes); |
|
|
|
|
map.put("warehouseId", k); |
|
|
|
|
warehouseUpdownTypeClient.downDeliveryPackage(map); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
log.info("执行包件下架操作>>>>>>>>>>>>>"+stringBuffer.toString()); |
|
|
|
|
log.info("执行包件下架操作>>>>>>>>>>>>>" + stringBuffer.toString()); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 对已签收包件进行解托 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("downTrayOldPackage") |
|
|
|
@ -108,144 +110,150 @@ public class DistributionDatarepair {
|
|
|
|
|
Map<Long, List<DistributionParcelListEntity>> packageMap = deliveryParcelListEntities.stream().collect(Collectors.groupingBy(DistributionParcelListEntity::getWarehouseId)); |
|
|
|
|
packageMap.forEach((k, v) -> { |
|
|
|
|
String orderPackageCodes = v.stream().map(DistributionParcelListEntity::getOrderPackageCode).collect(Collectors.joining(",")); |
|
|
|
|
stringBuffer.append("仓库:"+k).append("包件解托"+orderPackageCodes);; |
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, k,"签收下架解托"); |
|
|
|
|
stringBuffer.append("仓库:" + k).append("包件解托" + orderPackageCodes); |
|
|
|
|
; |
|
|
|
|
warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, k, "签收下架解托"); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
log.info("执行包件下架操作>>>>>>>>>>>>>"+stringBuffer.toString()); |
|
|
|
|
log.info("执行包件下架操作>>>>>>>>>>>>>" + stringBuffer.toString()); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 维护配送状态 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("maintenanceDeliveryStatus") |
|
|
|
|
public ReturnT<String> maintenanceDeliveryStatus(String params) { |
|
|
|
|
//维护配送的状态
|
|
|
|
|
String method = "######################DistributionDatarepair.maintenanceDeliveryStatus"; |
|
|
|
|
log.info(method+"维护配送订单id:{}",params); |
|
|
|
|
log.info(method + "维护配送订单id:{}", params); |
|
|
|
|
deliveryListClient.maintenanceDeliveryInfo(params); |
|
|
|
|
log.info(method+"维护配送订单结束"); |
|
|
|
|
log.info(method + "维护配送订单结束"); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 维护预约单信息 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("maintenanceReservationInfo") |
|
|
|
|
public ReturnT<String> maintenanceReservationInfo(String params) { |
|
|
|
|
//维护配送的状态
|
|
|
|
|
String method = "######################DistributionDatarepair.maintenanceDeliveryStatus"; |
|
|
|
|
log.info(method+"维护配送订单id:{}",params); |
|
|
|
|
log.info(method + "维护配送订单id:{}", params); |
|
|
|
|
distributionReservationClient.maintenanceReservationInfo(params); |
|
|
|
|
log.info(method+"维护配送订单结束"); |
|
|
|
|
log.info(method + "维护配送订单结束"); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 维护指定取消预约信息 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("maintenanceCancelReservation") |
|
|
|
|
public ReturnT<String> maintenanceCancelReservation(String params) { |
|
|
|
|
//维护配送的状态
|
|
|
|
|
String method = "######################DistributionDatarepair.maintenanceDeliveryStatus"; |
|
|
|
|
log.info(method+"维护配送订单id:{}",params); |
|
|
|
|
log.info(method + "维护配送订单id:{}", params); |
|
|
|
|
distributionReservationClient.maintenanceCancelReservation(params); |
|
|
|
|
log.info(method+"维护配送订单结束"); |
|
|
|
|
log.info(method + "维护配送订单结束"); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 维护指定取消预约信息 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("maintenanceDeliveryInfo") |
|
|
|
|
public ReturnT<String> maintenanceDeliveryInfo(String params) { |
|
|
|
|
//维护配送的状态
|
|
|
|
|
String method = "######################DistributionDatarepair.maintenanceDeliveryStatus"; |
|
|
|
|
log.info(method+"维护配送订单id:{}",params); |
|
|
|
|
log.info(method + "维护配送订单id:{}", params); |
|
|
|
|
deliveryListClient.maintenanceDeliveryInfoByWarehouseId(params); |
|
|
|
|
log.info(method+"维护配送订单结束"); |
|
|
|
|
log.info(method + "维护配送订单结束"); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 推送老系统系统 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("pushNotification") |
|
|
|
|
public ReturnT<String> pushNotification(String params) { |
|
|
|
|
// 得到当前仓库所有的签收任务
|
|
|
|
|
Integer parmeId = null; |
|
|
|
|
if(StringUtil.isNotBlank(params)){ |
|
|
|
|
if (StringUtil.isNotBlank(params)) { |
|
|
|
|
parmeId = Integer.parseInt(params); |
|
|
|
|
} |
|
|
|
|
List<JSONObject> allSignfor = warehouseMappingDataMapper.findAllSignfor(parmeId); |
|
|
|
|
for (JSONObject entries : allSignfor) { |
|
|
|
|
Long id = entries.getLong("singnforId"); |
|
|
|
|
|
|
|
|
|
Boolean b = distributionSignforClient.clerkCheckPushData(id); |
|
|
|
|
if(b!=null&&b){ |
|
|
|
|
Map<String, Object> map = distributionSignforClient.clerkCheckPushData(id); |
|
|
|
|
Boolean b = (Boolean) map.get("b"); |
|
|
|
|
if (b != null && b) { |
|
|
|
|
warehouseMappingDataMapper.updateClearSignforStatus(id, entries.getLong("warehouseId"), 1); |
|
|
|
|
log.info(">>> 推送成功 {}",id); |
|
|
|
|
}else{ |
|
|
|
|
log.error(">>> 推送失败 id="+id); |
|
|
|
|
log.info(">>> 推送成功 {}", id); |
|
|
|
|
} else { |
|
|
|
|
log.error(">>> 推送失败 id=" + id); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 推送单个 老系统系统 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("pushSingleNotification") |
|
|
|
|
public ReturnT<String> pushSingleNotification(String params) { |
|
|
|
|
Boolean b = distributionSignforClient.clerkCheckPushData(Long.parseLong(params)); |
|
|
|
|
if(b!=null&&b){ |
|
|
|
|
warehouseMappingDataMapper.updateClearSignforStatusBysignforId(Long.parseLong(params), 1); |
|
|
|
|
log.info(">>> 推送成功 {}",Long.parseLong(params)); |
|
|
|
|
}else{ |
|
|
|
|
log.error(">>> 推送失败 id="+Long.parseLong(params)); |
|
|
|
|
} |
|
|
|
|
Map<String, Object> map = distributionSignforClient.clerkCheckPushData(Long.parseLong(params)); |
|
|
|
|
Boolean b = (Boolean) map.get("b"); |
|
|
|
|
if (b != null && b) { |
|
|
|
|
warehouseMappingDataMapper.updateClearSignforStatusBysignforId(Long.parseLong(params), 1); |
|
|
|
|
log.info(">>> 推送成功 {}", Long.parseLong(params)); |
|
|
|
|
} else { |
|
|
|
|
log.error(">>> 推送失败 id=" + Long.parseLong(params)); |
|
|
|
|
} |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 推送自提签收老系统系统 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("pushBillNotification") |
|
|
|
|
public ReturnT<String> pushBillNotification(String params) { |
|
|
|
|
// 得到当前仓库所有的签收任务
|
|
|
|
|
Long parmeId = null; |
|
|
|
|
if(StringUtil.isNotBlank(params)){ |
|
|
|
|
if (StringUtil.isNotBlank(params)) { |
|
|
|
|
parmeId = Long.parseLong(params); |
|
|
|
|
} |
|
|
|
|
List<JSONObject> allSignfor = warehouseMappingDataMapper.findAllBillSign(parmeId); |
|
|
|
|
for (JSONObject entries : allSignfor) { |
|
|
|
|
try { |
|
|
|
|
Long id = entries.getLong("billId"); |
|
|
|
|
Boolean b =distrilbutionBillLadingClient.clerkBillCheckPushData(id); |
|
|
|
|
if(b!=null&&b){ |
|
|
|
|
Boolean b = distrilbutionBillLadingClient.clerkBillCheckPushData(id); |
|
|
|
|
if (b != null && b) { |
|
|
|
|
warehouseMappingDataMapper.updateClearBillSignforStatus(entries.getLong("id"), entries.getLong("warehouseId"), 1); |
|
|
|
|
log.info(">>> pushBillNotification 成功 id={}",id); |
|
|
|
|
}else{ |
|
|
|
|
log.error(">>> pushBillNotification 失败 id="+id); |
|
|
|
|
log.info(">>> pushBillNotification 成功 id={}", id); |
|
|
|
|
} else { |
|
|
|
|
log.error(">>> pushBillNotification 失败 id=" + id); |
|
|
|
|
} |
|
|
|
|
Thread.sleep(1000*60); |
|
|
|
|
Thread.sleep(1000 * 60); |
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} finally { |
|
|
|
@ -257,22 +265,17 @@ public class DistributionDatarepair {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 推送自提签收信息至工厂 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@XxlJob("sendFactorySignforInfo") |
|
|
|
|
public ReturnT<String> sendFactorySignforInfo(String params) { |
|
|
|
|
// 得到当前仓库所有的签收任务
|
|
|
|
|
Boolean b =distrilbutionBillLadingClient.sendFactorySignforInfo(params); |
|
|
|
|
Boolean b = distrilbutionBillLadingClient.sendFactorySignforInfo(params); |
|
|
|
|
return ReturnT.SUCCESS; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|