|
@@ -3,7 +3,6 @@ package com.fjhx.victoriatourist.service;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
|
import com.fjhx.area.utils.CustomizeAreaUtil;
|
|
import com.fjhx.area.utils.CustomizeAreaUtil;
|
|
import com.fjhx.victoriatourist.entity.abnormal.po.AbnormalInfo;
|
|
import com.fjhx.victoriatourist.entity.abnormal.po.AbnormalInfo;
|
|
import com.fjhx.victoriatourist.entity.group.dto.GroupRecordDto;
|
|
import com.fjhx.victoriatourist.entity.group.dto.GroupRecordDto;
|
|
@@ -72,13 +71,15 @@ public class WmsServiceImpl implements WmsService {
|
|
LogisticsInfos logisticsInfos = logisticsInfosService.getOne(q -> q.eq(LogisticsInfos::getBusinessId, deliverGoodsId));
|
|
LogisticsInfos logisticsInfos = logisticsInfosService.getOne(q -> q.eq(LogisticsInfos::getBusinessId, deliverGoodsId));
|
|
|
|
|
|
AbnormalInfo abnormalInfo = new AbnormalInfo();
|
|
AbnormalInfo abnormalInfo = new AbnormalInfo();
|
|
- abnormalInfo.setId(IdWorker.getId());
|
|
|
|
|
|
|
|
//搜索物流单号是否已经存在 异常信息
|
|
//搜索物流单号是否已经存在 异常信息
|
|
List<LogisticsInfos> logisticsInfosList = logisticsInfosService.list(q -> q.eq(LogisticsInfos::getCode, logisticsInfos.getCode()));
|
|
List<LogisticsInfos> logisticsInfosList = logisticsInfosService.list(q -> q.eq(LogisticsInfos::getCode, logisticsInfos.getCode()));
|
|
if (ObjectUtil.isNotEmpty(logisticsInfosList)) {
|
|
if (ObjectUtil.isNotEmpty(logisticsInfosList)) {
|
|
List<Long> ids = logisticsInfosList.stream().map(LogisticsInfos::getId).collect(Collectors.toList());
|
|
List<Long> ids = logisticsInfosList.stream().map(LogisticsInfos::getId).collect(Collectors.toList());
|
|
- AbnormalInfo oldAbnormalInfo = abnormalInfoService.getOne(q -> q.in(AbnormalInfo::getLogisticsInfosId, ids));
|
|
|
|
|
|
+ AbnormalInfo oldAbnormalInfo = abnormalInfoService.getOne(q -> q
|
|
|
|
+ .in(AbnormalInfo::getLogisticsInfosId, ids)
|
|
|
|
+ .eq(AbnormalInfo::getType,50)
|
|
|
|
+ );
|
|
if (ObjectUtil.isNotEmpty(oldAbnormalInfo)) {
|
|
if (ObjectUtil.isNotEmpty(oldAbnormalInfo)) {
|
|
abnormalInfo = oldAbnormalInfo;
|
|
abnormalInfo = oldAbnormalInfo;
|
|
}
|
|
}
|
|
@@ -90,7 +91,7 @@ public class WmsServiceImpl implements WmsService {
|
|
abnormalInfo.setLinkCode(stockWait.getBusinessCode());
|
|
abnormalInfo.setLinkCode(stockWait.getBusinessCode());
|
|
abnormalInfo.setTitle("入库数量差异");
|
|
abnormalInfo.setTitle("入库数量差异");
|
|
abnormalInfo.setPurchaseId(purchaseId);
|
|
abnormalInfo.setPurchaseId(purchaseId);
|
|
- abnormalInfoService.save(abnormalInfo);
|
|
|
|
|
|
+ abnormalInfoService.saveOrUpdate(abnormalInfo);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|