From f15d99d9d4fdaff8b13776e861ce958ec9f26749 Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期一, 29 九月 2025 15:03:50 +0800 Subject: [PATCH] 诊所erp --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java index 58a0076..27daf7c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java @@ -14,6 +14,7 @@ import com.ruoyi.system.mapper.*; import com.ruoyi.system.model.*; import com.ruoyi.system.query.TClinicGoodsWarehouseQuery; +import com.ruoyi.system.query.TErpGoodsAdminQuery; import com.ruoyi.system.query.TErpGoodsInventoryQuery; import com.ruoyi.system.query.TErpGoodsQuery; import com.ruoyi.system.service.TErpGoodsService; @@ -128,6 +129,24 @@ } pageInfo.setRecords(list); + return pageInfo; + } + + @Override + public PageInfo<TErpGoodsVO> pageAdminList(TErpGoodsAdminQuery query) { + PageInfo<TErpGoodsVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); + List<TErpGoodsVO> list = this.baseMapper.pageAdminList(query, pageInfo); + if (list.isEmpty()) { + return pageInfo; + } + List<String> typeIds = list.stream().map(TErpGoods::getTypeId).collect(Collectors.toList()); + if (!typeIds.isEmpty()) { + List<TErpGoodsType> typeList = erpGoodsTypeMapper.selectBatchIds(typeIds); + for (TErpGoodsVO tErpGoodsVO : list) { + typeList.stream().filter(t -> t.getId().equals(tErpGoodsVO.getTypeId())).findFirst().ifPresent(t -> tErpGoodsVO.setTypeName(t.getTypeName())); + } + } + pageInfo.setRecords( list); return pageInfo; } @@ -415,6 +434,7 @@ outboundGoodsDetailVo.setCreateBy(tErpClinicOutbound.getCreateBy()); outboundGoodsDetailVo.setOutboundType(tErpClinicOutbound.getOutboundType()); outboundGoodsDetailVo.setOrderNumber(tErpClinicOutbound.getOrderNumber()); + outboundGoodsDetailVo.setOutboundReason(tErpClinicOutbound.getOutboundReason()); if(tErpClinicOutbound.getOutboundType()==6){ TErpClinicInventory tErpClinicInventory = erpClinicInventoryMapper.selectById(tErpClinicOutbound.getInventoryId()); outboundGoodsDetailVo.setInventoryNumber(tErpClinicInventory.getInventoryNumber()); @@ -429,7 +449,7 @@ outboundGoodsDetailNextVo.setWarehouseNo(tErpClinicWarehousing.getWarehouseNo()); outboundGoodsDetailNextVo.setGoodsId(outboundGoods.getGoodsId()); - TErpGoods goods = erpGoodsMapper.selectById(outboundGoods.getGoodsId()); + TErpGoods goods = erpGoodsMapper.getGoodsById(outboundGoods.getGoodsId()); outboundGoodsDetailNextVo.setGoodsName(goods.getGoodsName()); outboundGoodsDetailNextVo.setTypeId(goods.getTypeId()); -- Gitblit v1.7.1