|
|
|
@ -75,86 +75,16 @@ public class SpsSyncDownloadService {
|
|
|
|
|
//查询数据同步设置
|
|
|
|
|
SyncDataSetResponse syncDataSetEntity = syncDataSetService.selectSet();
|
|
|
|
|
List<IoOrderEntity> orderEntities = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//待校验
|
|
|
|
|
if (syncDataSetEntity.isOrderUnCheck()) {
|
|
|
|
|
FilterOrderRequest orderFilterRequest = new FilterOrderRequest();
|
|
|
|
|
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(syncDataSetEntity.getBusTypes())) {
|
|
|
|
|
for (SyncDataBustypeEntity syncDataBustypeEntity : syncDataSetEntity.getBusTypes()) {
|
|
|
|
|
List<String> filterList = new ArrayList<>();
|
|
|
|
|
filterList.add(syncDataBustypeEntity.getAction());
|
|
|
|
|
orderFilterRequest.setActions(filterList);
|
|
|
|
|
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
|
|
|
|
|
List<IoOrderEntity> temps = orderService.filterOrderList(orderFilterRequest);
|
|
|
|
|
if (CollUtil.isNotEmpty(temps)) {
|
|
|
|
|
orderEntities.addAll(temps);
|
|
|
|
|
}
|
|
|
|
|
FilterOrderRequest orderFilterRequest = new FilterOrderRequest();
|
|
|
|
|
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
|
|
|
|
|
if (CollUtil.isNotEmpty(syncDataSetEntity.getBusTypes())) {
|
|
|
|
|
for (SyncDataBustypeEntity syncDataBustypeEntity : syncDataSetEntity.getBusTypes()) {
|
|
|
|
|
List<IoOrderEntity> temps = orderService.findByStatus(syncDataBustypeEntity.getAction(), syncDataBustypeEntity.getOrderStatus());
|
|
|
|
|
if (CollUtil.isNotEmpty(temps)) {
|
|
|
|
|
orderEntities.addAll(temps);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//待核对
|
|
|
|
|
if (syncDataSetEntity.isOrderUnCheck()) {
|
|
|
|
|
FilterOrderRequest orderFilterRequest = new FilterOrderRequest();
|
|
|
|
|
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(syncDataSetEntity.getBusTypes())) {
|
|
|
|
|
for (SyncDataBustypeEntity syncDataBustypeEntity : syncDataSetEntity.getBusTypes()) {
|
|
|
|
|
List<String> filterList = new ArrayList<>();
|
|
|
|
|
filterList.add(syncDataBustypeEntity.getAction());
|
|
|
|
|
orderFilterRequest.setActions(filterList);
|
|
|
|
|
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS);
|
|
|
|
|
List<IoOrderEntity> temps = orderService.filterOrderList(orderFilterRequest);
|
|
|
|
|
if (CollUtil.isNotEmpty(temps)) {
|
|
|
|
|
orderEntities.addAll(temps);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//待审核
|
|
|
|
|
if (syncDataSetEntity.isOrderUnReceive()) {
|
|
|
|
|
FilterOrderRequest orderFilterRequest = new FilterOrderRequest();
|
|
|
|
|
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(syncDataSetEntity.getBusTypes())) {
|
|
|
|
|
for (SyncDataBustypeEntity syncDataBustypeEntity : syncDataSetEntity.getBusTypes()) {
|
|
|
|
|
List<String> filterList = new ArrayList<>();
|
|
|
|
|
filterList.add(syncDataBustypeEntity.getAction());
|
|
|
|
|
orderFilterRequest.setActions(filterList);
|
|
|
|
|
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW);
|
|
|
|
|
List<IoOrderEntity> temps = orderService.filterOrderList(orderFilterRequest);
|
|
|
|
|
if (CollUtil.isNotEmpty(temps)) {
|
|
|
|
|
orderEntities.addAll(temps);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//已完成
|
|
|
|
|
if (syncDataSetEntity.isOrderScanFinish()) {
|
|
|
|
|
FilterOrderRequest orderFilterRequest = new FilterOrderRequest();
|
|
|
|
|
BeanUtils.copyProperties(spsSyncDataRequest, orderFilterRequest);
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(syncDataSetEntity.getBusTypes())) {
|
|
|
|
|
for (SyncDataBustypeEntity syncDataBustypeEntity : syncDataSetEntity.getBusTypes()) {
|
|
|
|
|
List<String> filterList = new ArrayList<>();
|
|
|
|
|
filterList.add(syncDataBustypeEntity.getAction());
|
|
|
|
|
orderFilterRequest.setActions(filterList);
|
|
|
|
|
orderFilterRequest.setStatus(ConstantStatus.ORDER_STATUS_AUDITED);
|
|
|
|
|
List<IoOrderEntity> temps = orderService.filterOrderList(orderFilterRequest);
|
|
|
|
|
if (CollUtil.isNotEmpty(temps)) {
|
|
|
|
|
orderEntities.addAll(temps);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
syncOrderResponse.setOrderEntities(orderEntities);
|
|
|
|
|
List<IoCodeEntity> codeEntities = new ArrayList<>();
|
|
|
|
|
List<IoOrderDetailBizEntity> orderDetailBizEntities = new ArrayList<>();
|
|
|
|
|