请领单、退货单提交必须有物料检测

This commit is contained in:
1378012178@qq.com 2025-12-31 14:15:07 +08:00
parent 5584085a2e
commit 4a38ac5397
2 changed files with 176 additions and 176 deletions

View File

@ -293,14 +293,14 @@ public class QingLingServiceImpl implements IQinglingApi {
} }
//检测是否有物料 //检测是否有物料
// QueryWrapper<NuInvoicingQldInfo> infoQW = new QueryWrapper<>(); QueryWrapper<NuInvoicingQldInfo> infoQW = new QueryWrapper<>();
// infoQW.eq("qld_no", dto.getQldNo()); infoQW.eq("qld_no", dto.getQldNo());
// List<NuInvoicingQldInfo> infoList = invoicingQldInfoMapper.selectList(infoQW); List<NuInvoicingQldInfo> infoList = invoicingQldInfoMapper.selectList(infoQW);
// if (CollectionUtils.isEmpty(infoList)) { if (CollectionUtils.isEmpty(infoList)) {
// result.put("status", "faild"); result.put("status", "faild");
// result.put("message", "不存在物料,无法提交"); result.put("message", "不存在物料,无法提交");
// return result; return result;
// } }
//回退单-提交 //回退单-提交
QueryWrapper<NuInvoicingQldMain> qw = new QueryWrapper<>(); QueryWrapper<NuInvoicingQldMain> qw = new QueryWrapper<>();
@ -370,11 +370,11 @@ public class QingLingServiceImpl implements IQinglingApi {
List<NuInvoicingQldGwc> gwcList = invoicingQldGwcService.list(gwcQW); List<NuInvoicingQldGwc> gwcList = invoicingQldGwcService.list(gwcQW);
//请购车未添加物料 //请购车未添加物料
// if (CollectionUtils.isEmpty(gwcList)) { if (CollectionUtils.isEmpty(gwcList)) {
// result.put("status", "empty"); result.put("status", "empty");
// result.put("message", "请选择请领物料"); result.put("message", "请选择请领物料");
// return result; return result;
// } }
//检测哪些物料有未完成请领流程的 //检测哪些物料有未完成请领流程的
{ {

View File

@ -310,11 +310,11 @@ public class ThdServiceImpl implements ITuiHuoApi {
// return result; // return result;
// } // }
//未添加退货物料检测 //未添加退货物料检测
// if (CollectionUtils.isEmpty(gwcList)) { if (CollectionUtils.isEmpty(gwcList)) {
// result.put("status", "faild"); result.put("status", "faild");
// result.put("message", "未添加物料"); result.put("message", "未添加物料");
// return result; return result;
// } }
} }
//处理数据 主表当前数据main //处理数据 主表当前数据main
@ -373,7 +373,7 @@ public class ThdServiceImpl implements ITuiHuoApi {
thdMainMapper.updateById(main); thdMainMapper.updateById(main);
//购物车数据 挪到info表里 //购物车数据 挪到info表里
if (!CollectionUtils.isEmpty(gwcList)) { //========================================================================
wlList = gwcList.stream().map(NuInvoicingThdGwc::getWlId).collect(Collectors.toList()); wlList = gwcList.stream().map(NuInvoicingThdGwc::getWlId).collect(Collectors.toList());
//查出对应物料信息存储到info表和日志表中 //查出对应物料信息存储到info表和日志表中
@ -410,6 +410,17 @@ public class ThdServiceImpl implements ITuiHuoApi {
infoList.add(info); infoList.add(info);
} }
thdInfoService.saveBatch(infoList); 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);
//库房出入库日志+库存 //库房出入库日志+库存
{ {
@ -527,17 +538,6 @@ 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(); InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号入库时才生成的退货单号 orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号入库时才生成的退货单号