From 79e603ec5550093b6401c781c3f0cde45b12396c Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期四, 28 十二月 2023 08:43:52 +0800 Subject: [PATCH] # --- zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/LocDetlServiceImpl.java | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/LocDetlServiceImpl.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/LocDetlServiceImpl.java index 16b3861..2cdd85f 100644 --- a/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/LocDetlServiceImpl.java +++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/wms/service/impl/LocDetlServiceImpl.java @@ -1,12 +1,45 @@ package com.zy.asrs.common.wms.service.impl; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.zy.asrs.common.domain.dto.QueryStockPreDo; import com.zy.asrs.common.wms.mapper.LocDetlMapper; import com.zy.asrs.common.wms.entity.LocDetl; import com.zy.asrs.common.wms.service.LocDetlService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + @Service("locDetlService") public class LocDetlServiceImpl extends ServiceImpl<LocDetlMapper, LocDetl> implements LocDetlService { + @Override + public IPage<LocDetl> getStockStatis(Integer curr, Integer limit, Map<String, Object> param) { + Page<LocDetl> page = new Page<>(curr, limit); + return this.baseMapper.getStockStatis(page, param); + } + + /** + * 鑾峰彇搴撳瓨鎬绘暟 + * @return + */ + @Override + public Integer sum() { + return this.baseMapper.sum(); + } + + @Override + public List<LocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos) { + List<LocDetl> result = new ArrayList<>(); + List<QueryStockPreDo> preDos = this.baseMapper.queryStockPre(matnr); + for (QueryStockPreDo preDo : preDos) { + List<LocDetl> locDetls = this.baseMapper.queryStock(matnr, preDo.getNo(), preDo.getOrderBy(), preDo.getBay()); + result.addAll(locDetls); + } + return result; + } } -- Gitblit v1.9.1