From f35ed4cfcdf2ebd1f160d159cf8a2147cabc3923 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期一, 24 十月 2022 11:15:28 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java | 72 ++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java index 85ef4d2..1738b59 100644 --- a/src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java @@ -6,6 +6,7 @@ import com.zy.asrs.entity.WrkMast; import com.zy.asrs.mapper.WrkMastMapper; import com.zy.asrs.service.WrkMastService; +import com.zy.asrs.utils.Utils; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -39,4 +40,75 @@ return wrkMasts.get(0); } + @Override + public synchronized Double getIoPri(Integer ioType, String locNo) { + Double defaultIoPri = null; + if (Cools.isEmpty(ioType, locNo)) { + return 15.0D; + } + if (ioType != 11) { + // 鍏ュ簱 + if (ioType < 100) { + List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo); + if (!Cools.isEmpty(groupOuterLoc)) { + for (String outerLoc : groupOuterLoc) { + WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(outerLoc); + if (wrkMast != null) { + defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2; + } + } + } + List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo); + if (!Cools.isEmpty(groupInsideLoc)) { + for (String insideLoc : groupInsideLoc) { + WrkMast wrkMast = this.baseMapper.selectByLocNoOfPakin(insideLoc); + if (wrkMast != null) { + defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2; + } + } + } + // 鍑哄簱 + } else { + List<String> groupOuterLoc = Utils.getGroupOuterLoc(locNo); + if (!Cools.isEmpty(groupOuterLoc)) { + for (String outerLoc : groupOuterLoc) { + WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(outerLoc); + if (wrkMast != null) { + defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() - 2 : defaultIoPri - 2; + } + } + } + List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo); + if (!Cools.isEmpty(groupInsideLoc)) { + for (String insideLoc : groupInsideLoc) { + WrkMast wrkMast = this.baseMapper.selectBySourceLocNoOfPakout(insideLoc); + if (wrkMast != null) { + defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2; + } + } + } + } + // 绉诲簱 + } else { +// @Deprecated + } + return defaultIoPri == null ? 15.0D : defaultIoPri; + } + + @Override + public int getStoreCount(Integer crnNo) { + return selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo) + .last(" and (wrk_sts in (1,2) or (wrk_sts=3 and wrk_no in (select wrk_no from asr_bas_devp)))")); + } + + @Override + public Boolean setSteEmpty(Integer wrkNo) { + return this.baseMapper.setSteEmpty(wrkNo) > 0; + } + + @Override + public WrkMast selectOfPick(Integer wrkNo, Integer ioType) { + return this.baseMapper.selectOfPick(wrkNo, ioType); + } + } -- Gitblit v1.9.1