|
|
|
@ -1356,6 +1356,8 @@ public class HeartService {
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
SyncDataBustypeService syncDataBustypeService;
|
|
|
|
|
|
|
|
|
|
//下载最近更新扫码单据--上级服务
|
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
@ -1391,21 +1393,35 @@ public class HeartService {
|
|
|
|
|
try {
|
|
|
|
|
List<IoOrderEntity> orderEntities = syncDataResponse.getOrderEntities();
|
|
|
|
|
for (IoOrderEntity orderEntity : orderEntities) {
|
|
|
|
|
|
|
|
|
|
SyncDataBustypeEntity syncDataBustypeEntity = syncDataBustypeService.findByAction(orderEntity.getAction(), 2);
|
|
|
|
|
orderEntity.setUpdateTime(null);
|
|
|
|
|
orderEntity.setFromType(ConstantStatus.FROM_UDISP);
|
|
|
|
|
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
|
|
|
|
|
if (syncDataBustypeEntity != null) {
|
|
|
|
|
if (syncDataBustypeEntity.getSyncStatus() == 1) {
|
|
|
|
|
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_DRAFT);
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
|
|
|
|
|
}
|
|
|
|
|
if (syncDataBustypeEntity.isSyncChange()) {
|
|
|
|
|
orderEntity.setOutChangeEnable(syncDataBustypeEntity.isSyncChange());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
IoOrderEntity temp = orderService.findByBillNo(orderEntity.getBillNo());
|
|
|
|
|
if (temp == null) {
|
|
|
|
|
orderEntity.setId(null);
|
|
|
|
|
orderService.insertOrder(orderEntity);
|
|
|
|
|
insetOrderDb(syncDataResponse, orderEntity);
|
|
|
|
|
orderEntity = orderService.findByBillNo(orderEntity.getBillNo());
|
|
|
|
|
addInoutService.dealProcess(orderEntity);
|
|
|
|
|
orderEntity = orderService.findByBillNo(orderEntity.getBillNo());
|
|
|
|
|
if (orderEntity.getStatus() != ConstantStatus.ORDER_STATS_ERROR && !ioCheckInoutService.checkManual(orderEntity.getBillNo())) {
|
|
|
|
|
ioCheckInoutService.check(orderEntity.getBillNo());
|
|
|
|
|
if (orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_TEMP_SAVE) {
|
|
|
|
|
addInoutService.dealProcess(orderEntity);
|
|
|
|
|
orderEntity = orderService.findByBillNo(orderEntity.getBillNo());
|
|
|
|
|
if (orderEntity.getStatus() != ConstantStatus.ORDER_STATS_ERROR && !ioCheckInoutService.checkManual(orderEntity.getBillNo())) {
|
|
|
|
|
ioCheckInoutService.check(orderEntity.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (fileJson != null&&fileJson.size()>0) {
|
|
|
|
|