ZengTao
2023-12-07 800f3b71efdb0a9d2fb2c1f688cc194c88960d25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.example.springboot.service;
 
import java.sql.SQLException;
import java.util.List;
 
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import com.example.springboot.entity.north_glass_buffer1;
import com.example.springboot.mapper.HomeMapper;
 
@Service
public class North_Glass_Buffer1Service {
    @Autowired
    private HomeMapper homeMapper;
 
    @Autowired
    private JdbcConnections jdbcConnections;
 
    public List<north_glass_buffer1> SelectAluminumFrameInfoById(String FrameBarcode) throws SQLException {
        List<north_glass_buffer1> listAluminumFrame = jdbcConnections
                .SelectGlassByGlassIdOrderIdFrameIdss(FrameBarcode);
        for (north_glass_buffer1 north_glass_buffer1 : listAluminumFrame) {
            north_glass_buffer1.setstorageCage(homeMapper.SelectStorageGlassById(north_glass_buffer1.getbarcode()));
            north_glass_buffer1.setOut_slice(homeMapper.SelectQueueByglassid(north_glass_buffer1.getbarcode()));
        }
        return listAluminumFrame;
    }
 
    public void AddOutSliceS(String FrameBarcode) throws SQLException{
        List<north_glass_buffer1> north_glass_buffer1s=SelectAluminumFrameInfoById(FrameBarcode);
        String flip = jdbcConnections.SelectFlipByFrameBarcode(FrameBarcode);
        String position =jdbcConnections.SelectPositionByFrameBarcode(FrameBarcode);
        int sequence=homeMapper.SelectMaxSquence();
        for (north_glass_buffer1 north_glass_buffer1 : north_glass_buffer1s) {
            if(north_glass_buffer1.getstorageCage()!=null&&north_glass_buffer1.getOut_slice()==null){
                homeMapper.AddOutSliceS(north_glass_buffer1.getbarcode(), flip, FrameBarcode, north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(), sequence, position);
                sequence+=1;
            }
        }
    }
 
    
}