入库修改
This commit is contained in:
@@ -41,7 +41,6 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
@@ -79,7 +78,7 @@
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map<String, Serializable> inStock(ConsInOutStockHeadParam param) {
|
||||
public ConsInOutStockHeadParam inStock(ConsInOutStockHeadParam param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
Long createUserId = StpKit.USER.getLoginIdAsLong();
|
||||
String createUserName = StpKit.USER.getAccount();
|
||||
@@ -87,10 +86,8 @@
|
||||
List<ConsStockFlow> entityList = BeanUtil.copyToList(param.getBodyList(), ConsStockFlow.class);
|
||||
List<ConsStockFlow> insertList = new ArrayList<>();
|
||||
List<ConsInfo> updateStockList = new ArrayList<>();
|
||||
ArrayList<ConsStockFlow> unInConList = new ArrayList<>();
|
||||
for (ConsStockFlow entity : entityList) {
|
||||
if (entity.getId() == null) {
|
||||
unInConList.add(entity);
|
||||
continue;
|
||||
}
|
||||
BeanUtil.copyProperties(head, entity, CopyOptions.create().ignoreNullValue());
|
||||
@@ -102,7 +99,6 @@
|
||||
Long conId = entity.getConId();
|
||||
ConsInfo consInfo = consInfoMapper.selectOneById(conId);
|
||||
if (consInfo == null) {
|
||||
unInConList.add(entity);
|
||||
continue;
|
||||
}
|
||||
entity.setBeforeNumber(consInfo.getStockNumber());
|
||||
@@ -116,10 +112,7 @@
|
||||
consInfoMapper.update(consInfo);
|
||||
}
|
||||
|
||||
return Map.of(
|
||||
"reason", "成功入库" + (entityList.size() - unInConList.size()) + "个耗材, " + unInConList.size() + "个耗材未入库",
|
||||
"unInConList", unInConList
|
||||
);
|
||||
return param;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user