入库修改
This commit is contained in:
@@ -87,9 +87,7 @@
|
|||||||
List<ConsStockFlow> insertList = new ArrayList<>();
|
List<ConsStockFlow> insertList = new ArrayList<>();
|
||||||
List<ConsInfo> updateStockList = new ArrayList<>();
|
List<ConsInfo> updateStockList = new ArrayList<>();
|
||||||
for (ConsStockFlow entity : entityList) {
|
for (ConsStockFlow entity : entityList) {
|
||||||
if (entity.getId() == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
BeanUtil.copyProperties(head, entity, CopyOptions.create().ignoreNullValue());
|
BeanUtil.copyProperties(head, entity, CopyOptions.create().ignoreNullValue());
|
||||||
entity.setShopId(shopId);
|
entity.setShopId(shopId);
|
||||||
entity.setInOutType(InOutTypeEnum.IN.value());
|
entity.setInOutType(InOutTypeEnum.IN.value());
|
||||||
@@ -97,7 +95,14 @@
|
|||||||
entity.setCreateUserId(createUserId);
|
entity.setCreateUserId(createUserId);
|
||||||
entity.setCreateUserName(createUserName);
|
entity.setCreateUserName(createUserName);
|
||||||
Long conId = entity.getConId();
|
Long conId = entity.getConId();
|
||||||
ConsInfo consInfo = consInfoMapper.selectOneById(conId);
|
ConsInfo consInfo;
|
||||||
|
if (entity.getId() == null) {
|
||||||
|
consInfo = consInfoMapper.selectOneByQuery(new QueryWrapper().like(ConsInfo::getConName, entity.getConName())
|
||||||
|
.eq(ConsInfo::getShopId, shopId).limit(1));
|
||||||
|
entity.setConId(consInfo == null ? null : consInfo.getId());
|
||||||
|
}else {
|
||||||
|
consInfo = consInfoMapper.selectOneById(conId);
|
||||||
|
}
|
||||||
if (consInfo == null) {
|
if (consInfo == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user