| | |
| | | } |
| | | }else { |
| | | //有满板出库时禁止空板入库 |
| | | int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type",101).or().eq("io_type",110)); |
| | | int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("sta_no",200).andNew().eq("io_type",101).or().eq("io_type",110)); |
| | | if(wrkCount > 0){ |
| | | return Re.error("有满板出库时禁止空板入库"); |
| | | } |
| | |
| | | @PostMapping("/fromwcs/task") |
| | | @ResponseBody |
| | | public Re status(@RequestBody StatusParam statusParam) { |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", statusParam.getTaskId())); |
| | | String[] wrkNo=statusParam.getTaskId().split("-",2); |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", Integer.parseInt(wrkNo[0]))); |
| | | if(Cools.isEmpty(wrkMast)&&statusParam.getTaskStatus()!=8){ |
| | | return Re.error("没有找到:"+statusParam.getTaskId()+"这条任务"); |
| | | }else if(Cools.isEmpty(wrkMast)&&statusParam.getTaskStatus()==8){ |
| | |
| | | wrkMast.setWrkSts(6L);//6.任务中断 |
| | | } else if (statusParam.getTaskStatus()==4 || statusParam.getTaskStatus()==8){ |
| | | // wrkMast.setWrkSts(7L);//6.放货完成 |
| | | if(wrkMast.getIoType()==1 || wrkMast.getIoType() == 10){ |
| | | if(wrkMast.getIoType()==1 || wrkMast.getIoType() == 10 || wrkMast.getIoType() == 11){ |
| | | wrkMast.setWrkSts(4L);//4.入库完成 |
| | | }else if (wrkMast.getIoType()==101){ |
| | | }else if (wrkMast.getIoType()==101 || wrkMast.getIoType()==110){ |
| | | wrkMast.setWrkSts(14L);//14.已出库未确认 |
| | | } else if (wrkMast.getIoType()==110) { |
| | | wrkMast.setWrkSts(7L); |
| | | } |
| | | } |
| | | wrkMastService.updateById(wrkMast); |