From 7f1806c6a01318f3b1eff38da7c7c41ae82ff8c0 Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期一, 11 十二月 2023 13:19:52 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes --- springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java | 37 +++++++++++++++++++++++++++++++++++-- 1 files changed, 35 insertions(+), 2 deletions(-) diff --git a/springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java b/springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java index ed546f4..4e670f0 100644 --- a/springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java +++ b/springboot-vue3/src/main/java/com/example/springboot/service/OutSliceServive.java @@ -1,25 +1,35 @@ package com.example.springboot.service; import java.sql.SQLException; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoProperties.Storage; import org.springframework.stereotype.Service; +import com.example.springboot.common.Result; +import com.example.springboot.component.S7control; +import com.example.springboot.entity.Out_slice; +import com.example.springboot.entity.StorageCage; import com.example.springboot.mapper.HomeMapper; +import com.example.springboot.mapper.SpianMapper; @Service public class OutSliceServive { @Autowired private HomeMapper homeMapper; + @Autowired + private SpianMapper spianMapper; @Autowired private JdbcConnections jdbcConnections; public void AddOutSliceS(String[][] AluminumFrames) throws SQLException { int sequence = homeMapper.SelectMaxSquence(); - + // 娣诲姞鍒版暟鎹簱 for (String[] item : AluminumFrames) { if (item[1] == "true") { @@ -30,6 +40,29 @@ } } - + // 鏌ヨ鍑虹墖闃熷垪 + public List<Out_slice> SelectProductionqueue() { + List<Out_slice> listoutslice = homeMapper.SelectProductionqueue(); + for (Out_slice out_slice : listoutslice) { + out_slice.setstorageCage(homeMapper.SelectStorageGlassById(out_slice.getGlassId())); + } + return listoutslice; + } + + public Result CompleteQueue(String id, String frameid, String glassid) { + homeMapper.CompleteQueue(id); + Short num = homeMapper.SelectCountByFrameNo(frameid); + if (num == 0) { + homeMapper.CompleteQueueByFrameNo(frameid); + } + StorageCage storageCage = homeMapper.SelectGlassInfo(glassid); + spianMapper.UpdataOutCage1(storageCage.getGlassWidth(), storageCage.getCage(), storageCage.getCell()); + + homeMapper.UpdateCageTask2(glassid); + S7control.getinstance().WriteWord("DB105.12", (short) 0); + Map<String, Object> map = new HashMap<>(); + map.put("message", "200"); + return Result.success(map); + } } -- Gitblit v1.8.0