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.mapper.HomeMapper;
|
|
@Service
|
public class OutSliceServive {
|
|
@Autowired
|
private HomeMapper homeMapper;
|
|
@Autowired
|
private JdbcConnections jdbcConnections;
|
|
public void AddOutSliceS(String[][] AluminumFrames) throws SQLException {
|
int sequence = homeMapper.SelectMaxSquence();
|
|
// 添加到数据库
|
for (String[] item : AluminumFrames) {
|
if (item[1] == "true") {
|
String position = jdbcConnections.SelectPositionByFrameBarcode(item[3]);
|
homeMapper.AddOutSliceS(item[0], item[2], item[3], item[4], item[5], sequence, position);
|
sequence += 1;
|
}
|
}
|
}
|
|
|
|
}
|