| | |
| | | import com.example.springboot.service.JdbcConnections; |
| | | import com.example.springboot.service.SpianService; |
| | | import com.example.springboot.common.Result; |
| | | import com.example.springboot.component.Plchome; |
| | | import com.example.springboot.component.S7control; |
| | | import com.example.springboot.entity.CarPosition; |
| | | import com.example.springboot.entity.StorageCage; |
| | |
| | | |
| | | // 根据玻璃id手动出片 |
| | | @GetMapping("/OutByGlassID") |
| | | public Result OutByGlassID(String glassid) { |
| | | public Result OutByGlassID(String glassid) throws SQLException { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用伍上片函数 |
| | | short result = homeMapper.SelectStorageByGlassId(glassid); |
| | | if (result > 0) { |
| | | Short results = spianService.selectout2(glassid); |
| | | if (results == 200) { |
| | | Out_slice result = homeMapper.SelectQueueByglassid(glassid); |
| | | if(result==null) { |
| | | north_glass_buffer1 north_glass_buffer1=jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(glassid, "", ""); |
| | | String flip=jdbcConnections.SelectFlipByFrameBarcode(north_glass_buffer1.getFrameBarcode()); |
| | | homeMapper.AddOutSliceS(glassid, flip, north_glass_buffer1.getFrameBarcode(), north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString()); |
| | | map.put("message2", "200"); |
| | | } else if (results == 300) { |
| | | map.put("message2", "300"); |
| | | } |
| | | } else { |
| | | map.put("message2", "500"); |
| | | } |
| | | |
| | | return Result.success(map); |
| | | } |
| | | |
| | |
| | | // 根据铝框id获取对应玻璃信息 |
| | | @PostMapping("/SelectAluminumFrameInfoById") |
| | | public Result SelectAluminumFrameInfoById(String FrameBarcode) throws SQLException { |
| | | |
| | | // List<north_glass_buffer1> listAluminumFrame = homeMapper.SelectAluminumFrameInfoById(FrameBarcode); |
| | | List<north_glass_buffer1> listAluminumFrame = jdbcConnections.SelectGlassByGlassIdOrderIdFrameIds("","",FrameBarcode); |
| | | String flip=homeMapper.SelectFlipByFrameBarcode(FrameBarcode); |
| | | String flip=jdbcConnections.SelectFlipByFrameBarcode(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())); |
| | |
| | | map.put("flip", flip); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | |
| | | |
| | | // 查询出片队列数据 |
| | | @PostMapping("/SelectProductionqueue") |
| | |
| | | } |
| | | Map<String, Object> maps = new HashMap<>(); |
| | | maps.put("listoutslice", listoutslice); |
| | | // Plchome.isAllowQueue=false; |
| | | return Result.success(maps); |
| | | |
| | | } |
| | | |
| | | // 根据玻璃id删除出片队列玻璃 |
| | |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // |
| | | //添加出片 |
| | | @PostMapping("/AddOutSliceS") |
| | | public Result AddOutSliceS(@RequestBody String[][] AluminumFrames ) { |
| | | for (String[] item : AluminumFrames) { |
| | |
| | | homeMapper.AddOutSliceS(item[0],item[2],item[3],item[4],item[5]); |
| | | } |
| | | } |
| | | System.out.println(AluminumFrames); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | //修改出片队列状态 |
| | | @PostMapping("/isAllowQueues") |
| | | public Result isAllowQueues(Boolean isAllowQueue) { |
| | | Plchome.isAllowQueue=isAllowQueue; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |