From 92dab966727b26c69a8a1d5839b064f7942895e8 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期四, 09 五月 2024 09:20:33 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java | 100 ++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 92 insertions(+), 8 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
index 2fb7429..0c05948 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/service/SpianService.java
@@ -15,6 +15,7 @@
import com.example.springboot.component.S7control;
import com.example.springboot.entity.StorageCage;
import com.example.springboot.entity.north_glass_buffer1;
+import com.example.springboot.mapper.HomeMapper;
import com.example.springboot.mapper.SpianMapper;
import com.google.common.primitives.Bytes;
@@ -22,6 +23,8 @@
public class SpianService {
@Autowired
private SpianMapper spianMapper;
+ @Autowired
+ private HomeMapper homeMapper;
public static List<String> result=new ArrayList<String>();
// @GetMapping("/all")
public Short selectAll(north_glass_buffer1 glasslist) {
@@ -195,7 +198,7 @@
int cages;
int cells;
double glasswidth = cageout.getGlassWidth();
-
+
// 鍒ゆ柇鐜荤拑鍐呭鐗�
if (tier == 2) {
int state = spianMapper.selectGlassState(cage, cell);// 鑾峰彇鏍煎瓙鏁伴噺
@@ -410,14 +413,95 @@
spianMapper.UpdateCageOver(glassid.toString(), 0);// 鏇存敼绗煎瓙琛ㄥ嚭鐗囩姸鎬�
spianMapper.UpdateCageadd(glassid.toString(), 1);// 鏇存敼绗煎瓙琛ㄨ繘鐗囩姸鎬�
String barcode = spianMapper.SelectBarcode(glassid.toString());// 鑾峰彇璇ョ幓鐠冪殑閾濇id
- spianMapper.UpdateAddQueue(glassid.toString());// 鎶婅繘鐗囩殑鐜荤拑鏇存柊鍒板嚭鐗囬槦鍒椾腑
- // if (barcode != null) {
- // int barcodeState = spianMapper.SelectOverState(barcode);// 鑾峰彇璇ラ摑妗嗙殑鐘舵��
- // if (barcodeState == 0) {// 褰撹閾濇鎵�鏈夌殑鐜荤拑閮芥槸瀹屾垚鐘舵�佹椂鍒犻櫎鍦ㄥ嚭鐗囬槦鍒楃殑鏁版嵁
- // spianMapper.DeleteQueue(barcode);
- // }
- // }
+ //spianMapper.UpdateAddQueue(glassid.toString());// 鎶婅繘鐗囩殑鐜荤拑鏇存柊鍒板嚭鐗囬槦鍒椾腑
+
}
+
+ public Short selectAlls(north_glass_buffer1 glasslist) {
+ try {
+
+ int cage1 = 0;
+ int cells;
+ int ids;
+ int prcid;
+ int tiers;
+ int prctier;
+ double width;
+ double minwidth = 0;
+ double widths;
+ // north_glass_buffer1 glasslist = spianMapper.selectGlass(glassid); // 鑾峰彇鐜荤拑鍙傛暟
+ // 濡傛灉娌℃湁姝d鏃�
+ if (glasslist == null) {
+ return (300);
+ }
+ //鍒ゆ柇鏄惁瀛樺湪绗煎瓙閲�
+ short result = homeMapper.SelectStorageByGlassId(glasslist.getbarcode());
+ if (result > 0) {
+ return (500);
+ }
+
+
+ if(glasslist.getglasslengthmm()>glasslist.getglassheightmm()) {
+ widths= glasslist.getglasslengthmm();
+ }else{
+ widths= glasslist.getglassheightmm();
+ }
+ // Map result=new HashMap();
+
+
+ String orderids = glasslist.getordernumber();
+ String FrameBarcode = glasslist.getFrameBarcode();
+ String glassid = glasslist.getbarcode();
+
+
+ // String orderid="A001";
+ // 鑾峰彇閾濇鐩稿叧搴︽渶楂樼殑绗煎瓙鎺掑簭
+ List<StorageCage> storageCage = spianMapper.selectAllFbarcode(FrameBarcode, widths, 400);
+ // 鍒ゆ柇閾濇鎸囧畾绌烘牸鏄惁闇�瑕侀棿闅旂┖闂�
+
+ if (storageCage.size() == 0) {
+ storageCage = spianMapper.selectAll(orderids, FrameBarcode);
+ }
+
+ if (storageCage == null) {
+ return (400);
+ }
+ for (StorageCage storageCage2 : storageCage) {
+ // 淇濆瓨璁㈠崟浼樺厛椤哄簭绗煎瓙鍙�
+ cage1 = storageCage2.getCage();
+ // 鍒ゆ柇璇ョ瀛愬彿鐩搁偦鏈�澶х殑绌烘牸鏁�
+ StorageCage cages = spianMapper.selectCage(cage1);
+
+ // 濡傛灉鐩搁偦绗煎瓙娌℃湁绌烘牸,鎴栬�呮湁姝e湪鎵ц鐨勫嚭鐗囦换鍔℃椂杩斿洖400
+ if (cages == null) {
+ return (400);
+ }
+ StorageCage cages1;
+ // 鍒ゆ柇鏄惁鏄浜岀墖闇�瑕佸姞闂撮殧鐗�
+ prctier = spianMapper.selectsum(cage1, storageCage2.getCell());// 浼犵粰prc鐨勬牸瀛愬唴鐜荤拑鏁�
+ if (prctier > 0) {
+ cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths + 400);
+ } else {
+ cages1 = spianMapper.selectCage1(cage1, storageCage2.getCell(), widths);
+ }
+ // 鍒ゆ柇閫変腑绗煎瓙鏄惁鏈夊悎閫傚搴︾┖鏍�
+ // 鏈夊悎閫傜┖鏍兼椂杩涚墖
+ if (cages1 != null && cages.getCell() >= 1 && storageCage2.getDisabled() == 0) {
+
+ return (0);
+
+ }
+
+ }
+ return (400);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return (500);
+ // TODO: handle exception
+ }
+
+ }
+
}
--
Gitblit v1.8.0