|
|
|
@ -1144,6 +1144,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
if (CollectionUtil.isEmpty(list)) return;
|
|
|
|
|
Map<String, List<ThrInvOrderDetail>> grouped = list.stream()
|
|
|
|
|
.collect(Collectors.groupingBy(ThrInvOrderDetail::getOrderIdFk));
|
|
|
|
|
log.info("分组的列表",grouped.toString());
|
|
|
|
|
for (Map.Entry<String, List<ThrInvOrderDetail>> entry : grouped.entrySet()) {
|
|
|
|
|
String orderIdFk = entry.getKey();
|
|
|
|
|
log.info("扫描处理第三方普耗明细生成单据定时任务==orderIdFk==:[" + orderIdFk + "]");
|
|
|
|
@ -1244,7 +1245,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
thrInvOrderDetailMapper.updateBatchById(updateThrInvOrderDetails);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (updateThrInvOrderDetails.size() > 0 || addThrInvOrderDetails.size() > 0) {
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
IoOrderEntity ioOrderEntity = new IoOrderEntity();
|
|
|
|
|
ioOrderEntity.setBillNo(newBillNo);
|
|
|
|
@ -1264,7 +1265,7 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
ioOrderEntity.setUpdateTime(new Date());
|
|
|
|
|
ioOrderEntity.setCreateTime(new Date());
|
|
|
|
|
ioOrderEntity.setCustomerId("110");
|
|
|
|
|
Long userId = customerService.getUserId();
|
|
|
|
|
Long userId = 1l;
|
|
|
|
|
ioOrderEntity.setCreateUser(userId + "");
|
|
|
|
|
ioOrderEntity.setUpdateUser(userId + "");
|
|
|
|
|
ioOrderEntity.setOrderType(ConstantStatus.ORDER_TYPE_SCAN);//正常单据处理
|
|
|
|
@ -1272,12 +1273,12 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService {
|
|
|
|
|
|
|
|
|
|
if (updateThrInvOrderDetails.size() > 0) {
|
|
|
|
|
if (!copyOrderDetailBiz(updateThrInvOrderDetails, newOrderDetailBiz, newBillNo)) {
|
|
|
|
|
throw new JsonException("第三方普耗明细自动转化单据异常");
|
|
|
|
|
log.info("第三方普耗明细自动转化单据异常");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (addThrInvOrderDetails.size() > 0) {
|
|
|
|
|
if (!copyOrderDetailBiz(addThrInvOrderDetails, newOrderDetailBiz, newBillNo)) {
|
|
|
|
|
throw new JsonException("第三方普耗明细自动转化单据异常");
|
|
|
|
|
log.info("第三方普耗明细自动转化单据异常");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
String toBillNo = (thrInvOrder.getToBillNo() == null ? "" : thrInvOrder.getToBillNo()) + ("," + newBillNo);
|
|
|
|
|