ZengTao
2024-04-23 d3784e22324ba6ae25fffc0e19874a07dd0d12ae
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
@@ -26,6 +28,9 @@
    @Autowired
    private SpianService spianService;
    @Autowired
    private JdbcConnections jdbcConnections;
    public void EndTask(int types) {
        String A01glassid1 = spianService.queGlassid("DB103.128", 14).toString();
@@ -179,27 +184,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);
    }