From 627d77af3fcc77d012160c916349adc2340a846f Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期一, 06 五月 2024 08:21:26 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java | 47 ++++++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
index cbbb948..d007afd 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/StorageCageService.java
@@ -1,5 +1,6 @@
package com.example.springboot.service;
+import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -14,6 +15,7 @@
import com.example.springboot.entity.Queue;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.StorageTask;
+import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.HomeMapper;
@Service
@@ -27,12 +29,16 @@
@Autowired
private SpianService spianService;
+ @Autowired
+ private JdbcConnections jdbcConnections;
+
public void EndTask(int types) {
String A01glassid1 = spianService.queGlassid("DB103.128", 14).toString();
String A01glassid2 = spianService.queGlassid("DB103.142", 14).toString();
String A02glassid1 = spianService.queGlassid("DB103.156", 14).toString();
String B01glassid = spianService.queGlassid("DB103.184", 14).toString();
String B02glassid = spianService.queGlassid("DB103.212", 14).toString();
+ String D02glassid = spianService.queGlassid("DB103.58", 14).toString();
List<Short> DeviceList = S7control.getinstance().ReadWord("DB103.0", 10);
if (types == 0) {// 缁堟杩涚墖浠诲姟
List<StorageTask> cageList = homeMapper.SelectTaskByState(types);
@@ -49,6 +55,10 @@
}
if (storageTask.getGlassId().equals(B02glassid) && DeviceList.get(3) == 0) {
ClearGlassId("DB101.10.3");
+ outSliceServive.StopTask(storageTask.getGlassId(), types);
+ }
+ if (storageTask.getGlassId().equals(D02glassid) && DeviceList.get(1) == 0) {
+ ClearGlassId("DB101.9.3");
outSliceServive.StopTask(storageTask.getGlassId(), types);
}
}
@@ -179,27 +189,26 @@
return Result.success(map);
}
- public Result InsertQueueGlassId(Short id, Queue queue) {
+ public Result InsertQueueGlassId(Short id, Queue queue) throws SQLException {
Map<String, Object> map = new HashMap<>();
- if (Plchome.FeedState == false) {
- Plchome.FeedState = true;
- Short zhi = 200;
- short result = homeMapper.SelectStorageByGlassId(queue.getglassId());
- if (result > 0) {
- map.put("message", "300");
- } else {
- if (id == 1) {
- // 璋冪敤浼嶅瓨鍌ㄨ繃绋�
- zhi = spianService.selectAll(queue.getglassId());
- if (zhi == 200) {
- homeMapper.InsertQueueGlassId(queue, id);
- }
- }
- map.put("message", zhi);
- }
- Plchome.FeedState = false;
+
+ Short zhi = 200;
+ short result = homeMapper.SelectStorageByGlassId(queue.getglassId());
+ if (result > 0) {
+ map.put("message", "300");
} else {
- map.put("message", 200);
+ if (id == 1) {
+ // 璋冪敤浼嶅瓨鍌ㄨ繃绋�
+ north_glass_buffer1 north_glass_buffer1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(queue.getglassId(), "", "");
+ zhi = spianService.selectAll(north_glass_buffer1);
+ if (zhi == 200) {
+ homeMapper.InsertQueueGlassId(queue, id);
+ }
+ }
+ map.put("message", zhi);
+ }
+ if (zhi != 200) {
+ Plchome.FeedState = true;
}
return Result.success(map);
}
--
Gitblit v1.8.0