退货单入库逻辑调整:适配空物料情况

This commit is contained in:
1378012178@qq.com 2025-12-31 14:09:07 +08:00
parent 36dc38632b
commit 5584085a2e
1 changed files with 158 additions and 158 deletions

View File

@ -373,7 +373,7 @@ public class ThdServiceImpl implements ITuiHuoApi {
thdMainMapper.updateById(main);
//购物车数据 挪到info表里
//========================================================================
if (!CollectionUtils.isEmpty(gwcList)) {
wlList = gwcList.stream().map(NuInvoicingThdGwc::getWlId).collect(Collectors.toList());
//查出对应物料信息存储到info表和日志表中
@ -410,17 +410,6 @@ public class ThdServiceImpl implements ITuiHuoApi {
infoList.add(info);
}
thdInfoService.saveBatch(infoList);
//========================================================================
//日志记录
NuInvoicingThdLog logData = new NuInvoicingThdLog();
logData.setThdId(dto.getId());//退货指令id
logData.setThdNo(thdNo);//退货单号
logData.setStatus(status);//操作状态
logData.setOpeBy(sysUser.getId());//操作人
logData.setOpeTime(new Date());//操作时间
logData.setNuId(main.getNuId());//护理单元id
logData.setElderId(main.getElderId());//长者id
thdLogMapper.insert(logData);
//库房出入库日志+库存
{
@ -538,6 +527,17 @@ public class ThdServiceImpl implements ITuiHuoApi {
}
}
}
//日志记录
NuInvoicingThdLog logData = new NuInvoicingThdLog();
logData.setThdId(dto.getId());//退货指令id
logData.setThdNo(thdNo);//退货单号
logData.setStatus(status);//操作状态
logData.setOpeBy(sysUser.getId());//操作人
logData.setOpeTime(new Date());//操作时间
logData.setNuId(main.getNuId());//护理单元id
logData.setElderId(main.getElderId());//长者id
thdLogMapper.insert(logData);
}
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号入库时才生成的退货单号