From 249e5581656200f6d8a86898fb5bd3b2af51f364 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 08 十二月 2022 13:08:24 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/WrkMastServiceImpl.java | 76 ++++++++++++++++++++++++++++++++++++++
1 files changed, 76 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..78e5554 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,79 @@
return wrkMasts.get(0);
}
+ @Override
+ public synchronized Double getIoPri(Integer ioType, String locNo) {
+ Double defaultIoPri = null;
+ if (Cools.isEmpty(ioType, locNo)) {
+ return 100.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 = wrkMast.getIoPri() - 2;
+// 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 = wrkMast.getIoPri() + 2;
+// 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 = wrkMast.getIoPri() - 2;
+// 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 = wrkMast.getIoPri() + 2;
+// defaultIoPri = defaultIoPri == null ? wrkMast.getIoPri() + 2 : defaultIoPri + 2;
+ }
+ }
+ }
+ }
+ // 绉诲簱
+ } else {
+// @Deprecated
+ }
+ return defaultIoPri == null ? 100.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