From 7883345f1eb514fcdd2dba26aa85741bbf2fb90b Mon Sep 17 00:00:00 2001
From: czkh <czkh@163.com>
Date: 星期三, 11 二月 2026 19:02:17 +0800
Subject: [PATCH] #1
---
src/main/java/com/zy/common/service/CommonService.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index b828f1f..460ec9f 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -13,6 +13,8 @@
import com.zy.common.model.LocTypeDto;
import com.zy.common.model.StartupDto;
import com.zy.common.properties.SlaveProperties;
+import com.zy.system.entity.Config;
+import com.zy.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -50,6 +52,8 @@
private SlaveProperties slaveProperties;
@Autowired
private MatServiceImpl matService;
+ @Autowired
+ private ConfigService configService;
/**
* 鐢熸垚宸ヤ綔鍙�
@@ -332,6 +336,24 @@
}
}
+ // 浣庡簱浣嶅悜楂樺簱浣嶅吋瀹�
+ if (locMasts.size() < 5 && locTypeDto.getLocType1() == 1){
+ Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "LowToHeigh"));
+ if (config == null){
+ throw new CoolException("浣庡簱浣嶅吋瀹归珮搴撲綅閰嶇疆鍙傛暟寮傚父--->涓嶅瓨鍦�");
+ }else if (config.getValue().equals("N")){
+ throw new CoolException("浣庡簱浣嶅吋瀹归珮搴撲綅閰嶇疆鍙傛暟寮傚父--->鍙傛暟鍊间负N--->鏈墦寮�");
+ } else if (config.getValue().equals("Y")) {
+ locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").eq("loc_type1", 5));
+ if (Cools.isEmpty(locMasts) || locMasts.size() <= 5){
+ if (nearRow == 2){
+ locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1",nearRow + 1).eq("loc_sts", "O").eq("loc_type1", 5));
+ } else if (nearRow == 3) {
+ locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1",nearRow - 1).eq("loc_sts", "O").eq("loc_type1", 5));
+ }
+ }
+ }
+ }
if (locMasts.size() < 5){
throw new CoolException("鏃犵┖搴撲綅鍙敤");
}
--
Gitblit v1.9.1