退货单入库逻辑调整:适配空物料情况
This commit is contained in:
parent
36dc38632b
commit
5584085a2e
|
|
@ -276,8 +276,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
||||||
//指令工单处判断是否允许提交
|
//指令工单处判断是否允许提交
|
||||||
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
InvoicingOrdersEntity p_ = new InvoicingOrdersEntity();
|
||||||
p_.setPoolId(dto.getId());
|
p_.setPoolId(dto.getId());
|
||||||
Map<String,String> j = invoicingThOrdersApi.izCanSubmit(p_);
|
Map<String, String> j = invoicingThOrdersApi.izCanSubmit(p_);
|
||||||
if(!j.get("error_code").equals("0")){
|
if (!j.get("error_code").equals("0")) {
|
||||||
result.put("status", "nodeError");
|
result.put("status", "nodeError");
|
||||||
result.put("message", j.get("msg"));
|
result.put("message", j.get("msg"));
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -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,17 +410,6 @@ 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);
|
|
||||||
|
|
||||||
//库房出入库日志+库存
|
//库房出入库日志+库存
|
||||||
{
|
{
|
||||||
|
|
@ -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();
|
InvoicingOrdersEntity orderEntity = new InvoicingOrdersEntity();
|
||||||
orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
orderEntity.setPoolId(dto.getId());//退货主表id 入库时会根据更新为对应退货单号(入库时才生成的退货单号)
|
||||||
|
|
@ -642,10 +642,10 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Map<String,String> requireTH(InvoicingThdMainEntity dto) {
|
public Map<String, String> requireTH(InvoicingThdMainEntity dto) {
|
||||||
Map<String,String> map = new HashMap();
|
Map<String, String> map = new HashMap();
|
||||||
map.put("error_code","0");
|
map.put("error_code", "0");
|
||||||
map.put("msg","操作成功");
|
map.put("msg", "操作成功");
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String status = "0";//发起待执行
|
String status = "0";//发起待执行
|
||||||
|
|
||||||
|
|
@ -654,9 +654,9 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
||||||
qw.eq("elder_id", dto.getElderId());
|
qw.eq("elder_id", dto.getElderId());
|
||||||
qw.eq("status", status);
|
qw.eq("status", status);
|
||||||
NuInvoicingThdMain qwMain = thdMainMapper.selectOne(qw);
|
NuInvoicingThdMain qwMain = thdMainMapper.selectOne(qw);
|
||||||
if(qwMain!=null){
|
if (qwMain != null) {
|
||||||
map.put("error_code","1");
|
map.put("error_code", "1");
|
||||||
map.put("msg","退货单已存在");
|
map.put("msg", "退货单已存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
NuInvoicingThdMain main = new NuInvoicingThdMain();
|
NuInvoicingThdMain main = new NuInvoicingThdMain();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue