From 7b26abe9d5e833901783613bbb3cfa27fa75a346 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期一, 20 十一月 2023 20:17:41 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/BasDevpServiceImpl.java | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/BasDevpServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/BasDevpServiceImpl.java
index fbee059..297e517 100644
--- a/src/main/java/com/zy/asrs/service/impl/BasDevpServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/BasDevpServiceImpl.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.exception.CoolException;
import com.zy.asrs.entity.BasDevp;
+import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.mapper.BasDevpMapper;
import com.zy.asrs.service.BasDevpService;
import com.zy.asrs.service.WrkMastService;
@@ -28,8 +29,8 @@
}
@Override
- public List<Integer> getAvailableOutSite() {
- return this.baseMapper.getAvailableOutSite(101);
+ public List<Integer> getAvailableOutSite(Integer typeNo) {
+ return this.baseMapper.getAvailableOutSite(typeNo);
}
@Override
@@ -43,23 +44,32 @@
}
@Override
- public BasDevp checkSiteStatus(Integer devpNo, boolean put) {
+ public BasDevp checkSiteStatus(Integer devpNo, boolean pakin) {
BasDevp station = selectById(devpNo);
if (station == null){
- throw new CoolException("绔欑偣涓嶅瓨鍦�");
+ throw new CoolException(devpNo+"绔欑偣涓嶅瓨鍦�");
}
- if (put) {
+ if (pakin) {
if(station.getAutoing()==null || !station.getAutoing().equals("Y")) {
- throw new CoolException("绔欑偣涓嶆槸鑷姩鐘舵��");
+ throw new CoolException(devpNo+"绔欑偣涓嶆槸鑷姩鐘舵��");
}
if(station.getLoading()==null || !station.getLoading().equals("Y")) {
- throw new CoolException("绔欑偣鏃犵墿");
+ throw new CoolException(devpNo+"绔欑偣鏃犵墿");
}
- if(station.getWrkNo()!=null && station.getWrkNo()>0) {
- throw new CoolException("绔欑偣宸叉湁宸ヤ綔鍙�");
+
+ if(station.getWrkNo()!=null && station.getWrkNo()>0 && station.getWrkNo() < 9990) {
+ WrkMast wrkMast = wrkMastService.selectById(station.getWrkNo());
+ if (wrkMast != null) {
+ if (wrkMast.getIoType() != 103 && wrkMast.getIoType() != 104 && wrkMast.getIoType() != 107) {
+ throw new CoolException(devpNo+"绔欑偣宸叉湁宸ヤ綔鍙�");
+ }
+ }
}
- if(wrkMastService.getWorkingMast(devpNo)>0){
- throw new CoolException("鍚屼竴绔欑偣涓嶈兘鍚屾椂鐢熸垚涓ょ瑪鍏ュ簱宸ヤ綔妗�");
+// if(!station.getInEnable().equals("Y")) {
+// throw new CoolException(devpNo+"绔欑偣涓嶆槸鍙叆鐘舵��");
+// }
+ if(wrkMastService.getWorkingMast(devpNo) > 0){
+ throw new CoolException(devpNo+"绔欑偣涓嶈兘鍚屾椂鐢熸垚涓ょ瑪鍏ュ簱宸ヤ綔妗�");
}
}
return station;
--
Gitblit v1.9.1