From 202ca0f62257d108e95ca2e5912b86cf7b407906 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期一, 25 三月 2024 08:09:49 +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 | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 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..54bf11e 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;
@@ -63,6 +64,11 @@
// 鍖归厤閫昏緫
public boolean Normal(double width, double height, String line) {
+ List<Queue> ErrowQueues= QueueMapper.selectErrorQueues();
+ if (ErrowQueues.size()>0) {
+ //System.out.println("鏈夊尮閰嶅け璐ユ暟鎹湭鍘婚櫎");
+ return false;
+ }
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;
} 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 false;
}
// 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