| | |
| | | package com.example.springboot.component; |
| | | |
| | | import java.sql.SQLException; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.example.springboot.service.JdbcConnections; |
| | | import com.example.springboot.service.SpianService; |
| | | |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | import com.example.springboot.mapper.AlarmMapper; |
| | | import com.example.springboot.mapper.SpianMapper; |
| | |
| | | private JdbcConnections jdbcConnections; |
| | | private SpianMapper spianMapper; |
| | | private SpianService spianService; |
| | | |
| | | int aaa; |
| | | |
| | | @Override |
| | |
| | | // \\ TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | // if (S7control.getinstance().CheckConnected() == false) { |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianService.class); |
| | | spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); |
| | | |
| | | jdbcConnections = WebSocketServer.applicationContext.getBean(JdbcConnections.class); |
| | | // 根据玻璃id获取订单号,单独数据源 |
| | | |
| | | // try { |
| | | // north_glass_buffer1 glass = jdbcConnections.selectGlass(112); |
| | | // // System.out.println(glass.getOrderId()); |
| | | // spianService.selectAll(jdbcConnections.SelectGlassByGlassIdOrderIdFrameId("X12345610102GV","","")); |
| | | |
| | | // } catch (SQLException e) { |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // } |
| | | //spianService.selectout2("X12345610102GV"); |
| | | |
| | | |
| | | // 出片任务//////////////////////////////// |
| | | //spianService.selectout2("X21942613103GV"); |
| | | |
| | | List<Short> outlist = S7control.getinstance().ReadWord("DB106.20", 1); // 出片车状态 |
| | | List<Short> outlist1 = S7control.getinstance().ReadWord("DB105.18", 1); // 出片任务是否启动 |
| | | |
| | |
| | | |
| | | int questate = spianMapper.Selectquecount(queueid1.toString());// 判断扫码位是否有玻璃已确认 |
| | | // queueid1.toString().isEmpty() |
| | | north_glass_buffer1 glass1 = spianMapper.selectGlass(queueid1.toString());// D01的玻璃信息 |
| | | north_glass_buffer1 glass2 = spianMapper.selectGlass(queueid2.toString());// D02玻璃信息 |
| | | // north_glass_buffer1 glass1 = spianMapper.selectGlass(queueid1.toString());// D01的玻璃信息 |
| | | // north_glass_buffer1 glass2 = spianMapper.selectGlass(queueid2.toString());// D02玻璃信息 |
| | | north_glass_buffer1 glass1=null; |
| | | north_glass_buffer1 glass2=null; |
| | | try { |
| | | glass1 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(queueid1.toString(),"","");// D01玻璃信息 |
| | | glass2 = jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(queueid2.toString(),"","");// D02玻璃信息 |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | // 当扫码位玻璃id为空时 宽度为0 |
| | | if (queueid1 != null && questate == 0) { |
| | | // 写入D01的数据到上片队列表 |