...
|
...
|
@@ -72,25 +72,25 @@ public class StorageDepositAutoDown implements YhJob { |
|
|
storageDeposits.stream().forEach(item -> {
|
|
|
LOGGER.info("method StorageDepositAutoDown.process item is {}", item);
|
|
|
|
|
|
int downResult = 0;
|
|
|
if (item.getOrderStatus() == 1) {
|
|
|
boolean offResult = offShelveByErp(item);
|
|
|
if (offResult) { // 下架成功之后触发,变成待拣货状态
|
|
|
downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
|
|
|
0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
|
|
|
}
|
|
|
} else { // 下架成功之后触发,变成待拣货状态
|
|
|
downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
|
|
|
0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
|
|
|
//int downResult = 0;
|
|
|
if (item.getOrderStatus() == 1 && offShelveByErp(item)) { // 到期商品直接下架
|
|
|
notifyOwnerUid(item); // 修改成功之后,调用发通知
|
|
|
}
|
|
|
//if (offResult) { // 下架成功之后触发,变成待拣货状态
|
|
|
//downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
|
|
|
// 0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
|
|
|
// }
|
|
|
//} else { // 下架成功之后触发,变成待拣货状态
|
|
|
// downResult = storageDepositService.updateStatus(item.getId(), StorageDepositStatusEnum.WAITING_QUERY.getCode(),
|
|
|
// 0, DepositOutTypeEnum.OUTTYPE_EXPIRED.getCode(), StorageDepositStatusEnum.HAS_IN.getCode());
|
|
|
//}
|
|
|
|
|
|
if (downResult > 0) {
|
|
|
notifyOwnerUid(item); // 修改成功之后,调用发通知
|
|
|
//if (downResult > 0) {
|
|
|
|
|
|
clearOrderInfoCache(item);
|
|
|
} else {
|
|
|
LOGGER.error("storageDepositService.updateStatus find wrong, item is {}", item);
|
|
|
}
|
|
|
|
|
|
//clearOrderInfoCache(item);
|
|
|
//} else {
|
|
|
// LOGGER.error("storageDepositService.updateStatus find wrong, item is {}", item);
|
|
|
});
|
|
|
|
|
|
result.setJobResultCode(JobResultCode.SUCCESS);
|
...
|
...
|
|