From f1b97dcec8e07a5c72d240114b3908b8df5b1e44 Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期五, 13 十月 2023 10:25:12 +0800 Subject: [PATCH] Merge branch 'tzskasrs' of http://47.97.1.152:5880/r/zy-asrs into tzskasrs --- src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java | 36 ++++++++++++++++++++++++++++-------- 1 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java index 3ab967b..46c7a70 100644 --- a/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java @@ -100,13 +100,16 @@ } //鍑哄簱 - public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued) { + public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq) { Wrapper<LocDetl> wrapper = new EntityWrapper<LocDetl>().eq("matnr", matnr).orderBy("modi_time"); - if(Cools.isEmpty(batch)){ - wrapper.isNull("batch"); - }else { - wrapper.eq("batch",batch); - } + wapperSetCondition(wrapper,"batch",batch); + wapperSetCondition(wrapper,"three_code",csocode); + wapperSetCondition(wrapper,"dead_time",isoseq); +// if(Cools.isEmpty(batch)){ +// wrapper.isNull("batch"); +// }else { +// wrapper.eq("batch",batch); +// } List<LocDetl> locDetlList = this.selectList(wrapper); for (LocDetl locDetl : locDetlList) { @@ -121,7 +124,11 @@ anfme = anfme > issued ? issued : anfme; LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderNo, anfme); List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), ioType); + locDto.setStaNos(staNos); + locDto.setCsocode(csocode); + locDto.setIsoseq(isoseq); + locDto.setContainerCode(locDetl.getSuppCode()); locDtoList.add(locDto); // 鍓╀綑寰呭嚭鏁伴噺閫掑噺 issued = issued - locDetl.getAnfme(); @@ -157,8 +164,8 @@ @Override - public LocDetl selectItem(String locNo, String matnr, String batch) { - return this.baseMapper.selectItem(locNo, matnr, batch); + public LocDetl selectItem(String locNo, String matnr, String batch,String suppCode) { + return this.baseMapper.selectItem(locNo, matnr, batch,suppCode); } @Override @@ -175,7 +182,20 @@ } @Override + public List<String> selectLocNo(String matnr) { + return this.baseMapper.selectLocNo(matnr); + } + + @Override public int updateStockFreeze(String matnr, String locNo, Integer stockFreeze) { return this.baseMapper.updateStockFreeze(matnr, locNo, stockFreeze); } + + private void wapperSetCondition(Wrapper wrapper,String column, String condition){ + if(Cools.isEmpty(condition)){ + wrapper.andNew().eq(column,"").or().isNull(column); + }else { + wrapper.eq(column,condition); + } + } } -- Gitblit v1.9.1