From 7070f965955247622396886bf6ad70519cc3818c Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 21 十二月 2023 13:07:43 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java | 56 ++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 38 insertions(+), 18 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
index e320119..91bdb2c 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -30,6 +30,7 @@
import com.example.springboot.component.S7control;
import com.example.springboot.entity.CarPosition;
import com.example.springboot.entity.StorageCage;
+import com.example.springboot.entity.StorageTask;
import com.example.springboot.entity.User;
import com.example.springboot.entity.alarmmg;
import com.example.springboot.entity.north_glass_buffer1;
@@ -136,27 +137,47 @@
return Result.success(map);
}
- // 鎵嬪姩瀹屾垚杩�/鍑虹墖浠诲姟
+ // 鎵嬪姩瀹屾垚杩�/鍑虹墖浠诲姟 缁堟杩涚墖/鍑虹墖浠诲姟
@GetMapping("/UpdateTask")
public Result UpdateTask(Integer types, Integer shelfrack, String glassid) {
Map<String, Object> map = new HashMap<>();
- homeMapper.UpdateTask(types, glassid);
- if (types == 0) {
- // homeMapper.UpdateCageTask1(glassid);
+ if (types == 0) {// 瀹屾垚杩涚墖
spianService.overtask(glassid);
- } else if (types == 1) {
- // homeMapper.DeleteByGlassID(glassid);
+ } else if (types == 1) {// 瀹屾垚鍑虹墖
spianService.overtask(glassid);
- } else if (types == 2) {//缁堟杩涚墖浠诲姟
- spianService.overtask(glassid);
- StorageCage glassinfor = homeMapper.SelectGlassInfo(glassid);
- spianMapper.UpdataOutCage1(glassinfor.getGlassWidth(), glassinfor.getCage(), glassinfor.getCell());
- homeMapper.DeleteByGlassID(glassid);
+ } else if (types == 2) {// 缁堟杩涚墖浠诲姟
+ outSliceServive.StopTask(glassid, 0);
// 鍙戦�佺粓姝㈣繘鐗囦换鍔′俊鍙�
- }else{//缁堟鍑虹墖浠诲姟
- spianService.overtask(glassid);
- homeMapper.UpdateOutSliceGlass(glassid);
+ } else {// 缁堟鍑虹墖浠诲姟
+ outSliceServive.StopTask(glassid, 1);
}
+ map.put("message3", "200");
+ return Result.success(map);
+ }
+
+ //缁堟杩涚墖/鍑虹墖浠诲姟
+ @GetMapping("/EndTask")
+ public Result EndTask(int types) {
+ if (types == 0) {// 缁堟杩涚墖浠诲姟
+ List<StorageTask> cageList = homeMapper.SelectTaskByState(types);
+ for (StorageTask storageTask : cageList) {
+ outSliceServive.StopTask(storageTask.getGlassId(), types);
+ }
+ // 鍙戦�佺粓姝㈣繘鐗囦换鍔′俊鍙�
+ } else {// 缁堟鍑虹墖浠诲姟
+ List<StorageCage> storageCages =homeMapper.selectinout(types);
+ for (StorageCage storageCage : storageCages) {
+ List<StorageCage> storageCagess=homeMapper.SelectStoragesGlassById(storageCage.getGlassId());
+ for (StorageCage storageCagez : storageCagess) {
+ if (storageCagez.getState().equals("2")) {//璋冩嫧杩涚墖
+ outSliceServive.StopTask(storageCagez.getGlassId(), 0);
+ }else{//鍑虹墖
+ outSliceServive.StopTask(storageCagez.getGlassId(), types);
+ }
+ }
+ }
+ }
+ Map<String, Object> map = new HashMap<>();
map.put("message3", "200");
return Result.success(map);
}
@@ -182,9 +203,7 @@
// 鎵嬪姩鍒犻櫎鐞嗙墖绗肩幓鐠�
@GetMapping("/DeleteByGlassID")
public Result DeleteByGlassID(String glassid) {
- StorageCage glassinfor = homeMapper.SelectGlassInfo(glassid);
- spianMapper.UpdataOutCage1(glassinfor.getGlassWidth(), glassinfor.getCage(), glassinfor.getCell());
- homeMapper.DeleteByGlassID(glassid);
+ outSliceServive.DeleteByGlassID(glassid);
Map<String, Object> map = new HashMap<>();
map.put("message3", "200");
return Result.success(map);
@@ -202,6 +221,7 @@
String position = jdbcConnections.SelectPositionByFrameBarcode(north_glass_buffer1.getFrameBarcode());
if (position != null) {
int sequence = homeMapper.SelectMaxSquence();
+
homeMapper.AddOutSliceS(glassid, flip, north_glass_buffer1.getFrameBarcode(),
north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(),
sequence, position, (short) 0, north_glass_buffer1.getordernumber(), north_glass_buffer1.getlistnumber(),
@@ -349,6 +369,7 @@
@PostMapping("/DeleteProductionQueueGlass")
public Result DeleteProductionQueueGlass(String FrameNo) {
homeMapper.CompleteQueueByFrameNo(FrameNo);
+
Map<String, Object> map = new HashMap<>();
map.put("message", "200");
return Result.success(map);
@@ -390,7 +411,6 @@
@PostMapping("/CompleteQueue")
public Result CompleteQueue(String id, String frameid, String glassid) {
return outSliceServive.CompleteQueue(id, frameid, glassid);
-
}
}
--
Gitblit v1.8.0