| | |
| | | public Result UpdateTask(Integer types, Integer shelfrack, String glassid) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | homeMapper.UpdateTask(types, glassid); |
| | | StorageCage glass = homeMapper.SelectGlassInfo(glassid); |
| | | if (types == 0) { |
| | | homeMapper.UpdateCageTask1(glassid); |
| | | S7control.getinstance().WriteWord("DB105.14", (short) 0); |
| | | } else { |
| | | spianMapper.UpdataOutCage1(glass.getGlassWidth(), glass.getCage(), glass.getCell()); |
| | | homeMapper.UpdateCageTask2(glassid); |
| | | S7control.getinstance().WriteWord("DB105.12", (short) 0); |
| | | // homeMapper.UpdateCageTask1(glassid); |
| | | spianService.overtask(glassid); |
| | | } else if (types == 1) { |
| | | // homeMapper.DeleteByGlassID(glassid); |
| | | spianService.overtask(glassid); |
| | | } else if (types == 2) {//终止进片任务 |
| | | spianService.overtask(glassid); |
| | | StorageCage glassinfor = homeMapper.SelectGlassInfo(glassid); |
| | | spianMapper.UpdataOutCage1(glassinfor.getGlassWidth(), glassinfor.getCage(), glassinfor.getCell()); |
| | | homeMapper.DeleteByGlassID(glassid); |
| | | // 发送终止进片任务信号 |
| | | }else{//终止出片任务 |
| | | spianService.overtask(glassid); |
| | | homeMapper.UpdateOutSliceGlass(glassid); |
| | | } |
| | | map.put("message3", "200"); |
| | | return Result.success(map); |
| | |
| | | int sequence = homeMapper.SelectMaxSquence(); |
| | | homeMapper.AddOutSliceS(glassid, flip, north_glass_buffer1.getFrameBarcode(), |
| | | north_glass_buffer1.getglasslengthmm().toString(), north_glass_buffer1.getglassheightmm().toString(), |
| | | sequence, position, 0); |
| | | sequence, position, (short) 0, north_glass_buffer1.getordernumber(), north_glass_buffer1.getlistnumber(), |
| | | north_glass_buffer1.getboxnumber(), north_glass_buffer1.getglasslength().toString(), |
| | | north_glass_buffer1.getglassheight().toString()); |
| | | |
| | | map.put("message2", "200"); |
| | | } else { |
| | | map.put("message2", "300"); |
| | | } |
| | | |
| | | } else { |
| | | map.put("message2", "400"); |
| | | } |
| | |
| | | map.put("message", "200"); |
| | | } |
| | | } |
| | | return Result.success(map); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询玻璃信息 |