| | |
| | | @PostMapping("/InsertQueueGlassId") |
| | | public Result InsertQueueGlassId(Short id, @RequestBody Queue queue) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Short zhi=200; |
| | | short result = homeMapper.SelectStorageByGlassId(queue.getglassId()); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | } else { |
| | | homeMapper.InsertQueueGlassId(queue, id); |
| | | |
| | | if (id == 1) { |
| | | // 调用伍存储过程 |
| | | spianService.selectAll(queue.getglassId()); |
| | | zhi=spianService.selectAll(queue.getglassId()); |
| | | if(zhi==200){ |
| | | homeMapper.InsertQueueGlassId(queue, id); |
| | | } |
| | | } |
| | | map.put("message", "200"); |
| | | |
| | | map.put("message",zhi); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | |
| | | // 根据铝框id删除出片队列玻璃 |
| | | @PostMapping("/DeleteProductionQueueGlass") |
| | | public Result DeleteProductionQueueGlass(String FrameNo) { |
| | | homeMapper.CompleteQueueByFrameNo(FrameNo); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | | return outSliceServive.CompleteQueueByFrameNo(FrameNo); |
| | | } |
| | | |
| | | // 添加铝框id对应玻璃到出片队列 |
| | |
| | | @PostMapping("/WriteGlassID") |
| | | public Result WriteGlassID(String glassid) { |
| | | // 扫码位写入玻璃id |
| | | spianService.outmesid(glassid, "DB103.256"); |
| | | spianService.outmesid(glassid, "DB103.286"); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |
| | |
| | | |
| | | // 切换PLC获取二维码方式 |
| | | @PostMapping("/SwitchScanMethod") |
| | | public Result SwitchScanMethod(Short scansmethod) { |
| | | S7control.getinstance().WriteWord("DB103.255", scansmethod); |
| | | public Result SwitchScanMethod(Boolean scansmethod) { |
| | | S7control.getinstance().WriteBit("DB101.11.4", scansmethod); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("message", "200"); |
| | | return Result.success(map); |