From 9a942fabdc8afdc9610425641739d5b97cbcb79a Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期日, 24 三月 2024 10:01:18 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/Albania_Mes
---
springboot-vue3/src/main/java/com/example/springboot/service/HomeService.java | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/HomeService.java b/springboot-vue3/src/main/java/com/example/springboot/service/HomeService.java
index 4842b26..b70f990 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/HomeService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/HomeService.java
@@ -21,6 +21,7 @@
import com.example.springboot.entity.GlassInfo;
import com.example.springboot.entity.MeasureSetting;
+import com.example.springboot.entity.Queue;
import com.example.springboot.mapper.GlassInfoMapper;
import com.example.springboot.mapper.MeasureSettingMapper;
import com.example.springboot.mapper.QueueMapper;
@@ -62,7 +63,12 @@
}
// 鍖归厤閫昏緫
- public boolean Normal(double width, double height, String line) {
+ public GlassInfo Normal(double width, double height, String line) {
+ List<Queue> ErrowQueues= QueueMapper.selectErrorQueues();
+ if (ErrowQueues.size()>0) {
+ //System.out.println("鏈夊尮閰嶅け璐ユ暟鎹湭鍘婚櫎");
+ return new GlassInfo();
+ }
List<GlassInfo> Result = NormalGlassInfo(width, height, "1");
if (Result.size() == 1) {
// 鍖归厤鎴愬姛 灏变竴绉嶇被鍨� 娣诲姞鏁版嵁
@@ -70,22 +76,19 @@
QueueMapper.insert(GlassInfo.getGlassid(), width, height, 1);
GlassInfoMapper.updatemeasurenumber(GlassInfo.getId());
System.out.println("鍖归厤鎴愬姛");
-
- // S7control.getinstance().WriteWord(plcmes.getPlcParameter("GaToMES").getAddress(),
- // (short) 1);
System.out.println(GlassInfo.getGlassid());
- return true;
+ return GlassInfo;
} else if (Result.size() > 1) {
// 鍖归厤澶辫触 鍖归厤鍒板鏉$鍚堢殑鏁版嵁 娣诲姞鏁版嵁
- QueueMapper.insert(null, width, height, 2);
+ QueueMapper.insertMatchFailure(width, height, 0);
System.out.println("鍖归厤澶辫触");
- return false;
+
} else {
// 鍖归厤澶辫触 鏈壘鍒扮鍚堢殑鏁版嵁 娣诲姞鏁版嵁
- QueueMapper.insert(null, width, height, 3);
+ QueueMapper.insertMatchFailure(width, height, -1);
System.out.println("鏈壘鍒扮鍚堢殑鏁版嵁");
- return false;
}
+ return new GlassInfo();
}
// Execl琛ㄦ牸 浼犲叆鏂囦欢璺緞
@@ -93,6 +96,10 @@
try {
// 鍒涘缓鏂囦欢瀵硅薄
File file = new File(filename);
+ if (!file.exists()) {
+ System.out.println("鏂囦欢涓嶅瓨鍦紒 "+filename);
+ return new ArrayList<>();
+ }
// 鍒涘缓鏂囦欢杈撳叆娴佸璞�
FileInputStream inputStream = new FileInputStream(file);
// 鍒涘缓宸ヤ綔绨垮璞�
--
Gitblit v1.8.0