Browse Source

天合库存预警模版分页修复

master
songguoqiang 6 months ago
parent
commit
78fb16915e
  1. 20
      win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/service/item/ItemServiceImpl.java
  2. 1
      win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/service/itemoutlocation/ItemOutLocationServiceImpl.java

20
win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/service/item/ItemServiceImpl.java

@ -348,24 +348,10 @@ public class ItemServiceImpl implements ItemService {
public PageResult<ItemDO> getWarningPage(ItemPageReqVO pageReqVO) {
pageReqVO.setFlag("2");
PageResult<ItemDO> pageResult = itemMapper.selectPage(pageReqVO);
List<ItemDO> itemNewList=new ArrayList();
for (ItemDO itemDO : pageResult.getList()) {
QueryWrapper<ItemAccountsDO> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("item_number",itemDO.getNumber());
queryWrapper.eq("available","TRUE");
List<ItemAccountsDO> itemAccountsDOList = itemAccountsMapper.selectList(queryWrapper);
BigDecimal allCount = BigDecimal.ZERO;
for (ItemAccountsDO itemAccountsDO : itemAccountsDOList) {
allCount=allCount.add(itemAccountsDO.getQty());
}
//如果各种类型的备件库存数量总数低于最低库存数量
if(allCount.compareTo(itemDO.getMinInventory())==-1){
itemDO.setAllCount(allCount);
itemNewList.add(itemDO);
}
for(ItemDO en: pageResult.getList()){
BigDecimal bigDecimal = itemAccountsMapper.selectInventorySum(en.getNumber());
en.setAllCount(bigDecimal);
}
pageResult.setList(itemNewList);
pageResult.setTotal(Long.valueOf(itemNewList.size()).longValue());
return pageResult;
}

1
win-module-eam/win-module-eam-biz/src/main/java/com/win/module/eam/service/itemoutlocation/ItemOutLocationServiceImpl.java

@ -153,6 +153,7 @@ public class ItemOutLocationServiceImpl implements ItemOutLocationService {
}
@Override
@Transactional
public Long createPDA(ItemOutLocationCreateReqVO createReqVO) {
long i = 0l;
List<Map<String, Object>> itemList = createReqVO.getItemNumbers();//备件号集合

Loading…
Cancel
Save