| | |
| | | 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.stereotype.Service; |
| | | |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.entity.Out_slice; |
| | | import com.example.springboot.mapper.HomeMapper; |
| | | |
| | | @Service |
| | |
| | | |
| | | public void AddOutSliceS(String[][] AluminumFrames) throws SQLException { |
| | | int sequence = homeMapper.SelectMaxSquence(); |
| | | |
| | | |
| | | // 添加到数据库 |
| | | for (String[] item : AluminumFrames) { |
| | | if (item[1] == "true") { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // 查询出片队列 |
| | | 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) { |
| | | homeMapper.CompleteQueue(id); |
| | | Short num=homeMapper.SelectCountByFrameNo(frameid); |
| | | if(num==0){ |
| | | homeMapper.CompleteQueueByFrameNo(frameid); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | } |