| | |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.entity.north_glass_buffer1; |
| | | import com.example.springboot.entity.Out_slice; |
| | | import com.example.springboot.entity.Queue; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | |
| | | map.put("list2", storageCagelist2); |
| | | map.put("list3", storageCagelist3); |
| | | map.put("list4", storageCagelist4); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | // 查询进/出片任务 |
| | | @GetMapping("/loadinout") |
| | | public Result selectinout(Integer types) throws SQLException{ |
| | | List<StorageCage> storageCageinout = homeMapper.selectinout(types); |
| | | |
| | | for (StorageCage storageCage : storageCageinout) { |
| | | storageCage.setnorth_glass_buffer1s(jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(storageCage.getGlassId(), "", "")); |
| | | // storageCage.setnorth_glass_buffer1s(homeMapper.SelectBoxNo(storageCage.getGlassId())); |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list", storageCageinout); |
| | | return Result.success(map); |
| | | } |
| | | |
| | |
| | | @GetMapping("/SelectCageInfo") |
| | | public Result SelectCageInfo(short cage) throws SQLException { |
| | | List<StorageCage> cageinfo = homeMapper.SelectCageInfo(cage); |
| | | for (StorageCage storageCage : cageinfo) { |
| | | // storageCage.setnorth_glass_buffer1s(homeMapper.SelectBoxNo(storageCage.getGlassId())); |
| | | storageCage.setnorth_glass_buffer1s(jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(storageCage.getGlassId(), "", "")); |
| | | |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("cageinfo", cageinfo); |
| | | return Result.success(map); |
| | |
| | | @GetMapping("/SelectGlassByGlassID") |
| | | public Result SelectGlassByGlassID(String glassid) throws SQLException { |
| | | // north_glass_buffer1 north_glass_buffer1s = homeMapper.SelectGlassByGlassID(glassid); |
| | | |
| | | north_glass_buffer1 north_glass_buffer1s=jdbcConnections.SelectGlassByGlassIdOrderIdFrameId(glassid, "", ""); |
| | | Queue queue=jdbcConnections.SelectGlassByGlassIdOrderIdFrameIdQueue(glassid, "", ""); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(glassid!=""){ |
| | | |
| | | map.put("form", north_glass_buffer1s); |
| | | |
| | | map.put("form", queue); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | |
| | | |
| | | // 手动往理片笼添加玻璃 |
| | | @PostMapping("/Inglassid") |
| | | public Result Inglassid(short cage, short cell, short tier, @RequestBody north_glass_buffer1 north_glass_buffer1s) { |
| | | public Result Inglassid(short cage, short cell, short tier, @RequestBody Queue queue) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short result = homeMapper.SelectStorageByGlassId(north_glass_buffer1s.getbarcode()); |
| | | short result = homeMapper.SelectStorageByGlassId(queue.getglassId()); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | } else { |
| | | homeMapper.Inglassid(north_glass_buffer1s, cage, cell, tier); |
| | | spianMapper.UpdataAddCage1(north_glass_buffer1s.getglasslengthmm(), cage, cell); |
| | | homeMapper.Inglassid(queue, cage, cell, tier); |
| | | spianMapper.UpdataAddCage1(queue.getglasswidth(), cage, cell); |
| | | } |
| | | return Result.success(map); |
| | | } |
| | |
| | | |
| | | // 手动添加扫码位玻璃 |
| | | @PostMapping("/InsertQueueGlassId") |
| | | public Result InsertQueueGlassId(String glassid, Short id) { |
| | | public Result InsertQueueGlassId(Short id,@RequestBody Queue queue) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | short result = homeMapper.SelectStorageByGlassId(glassid); |
| | | short result = homeMapper.SelectStorageByGlassId(queue.getglassId()); |
| | | if (result > 0) { |
| | | map.put("message", "300"); |
| | | } else { |
| | | homeMapper.InsertQueueGlassId(glassid, id); |
| | | homeMapper.InsertQueueGlassId(queue, id); |
| | | //调用伍存储过程 |
| | | spianService.selectAll(glassid); |
| | | spianService.selectAll(queue.getglassId()); |
| | | map.put("message", "200"); |
| | | } |
| | | return Result.success(map); |