| | |
| | | if (param.getFromPort().equals("100")) { |
| | | |
| | | //有空板出库时禁止入库 |
| | | int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type",110).eq("sta_no",100)); |
| | | int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type",110).eq("sta_no",100).notIn("wrk_sts",7)); |
| | | if(wrkCount > 0){ |
| | | return Re.error("有空板出库到100站时时禁止入库"); |
| | | } |
| | |
| | | } |
| | | }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("有满板出库时禁止空板入库"); |
| | | } |
| | |
| | | wrkMast.setLinkMis("Y"); |
| | | wrkMast.setCtnType(sourceStaNo.getCtnType()); // 容器类型 |
| | | wrkMast.setMk("N");//是否完成上报wcs |
| | | wrkMast.setFullPlt("N");//出库空板消除标记 |
| | | // 操作人员数据 |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiTime(now); |
| | |
| | | @PostMapping("/fromwcs/task") |
| | | @ResponseBody |
| | | public Re status(@RequestBody StatusParam statusParam) { |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", statusParam.getTaskId())); |
| | | if(Cools.isEmpty(wrkMast)){ |
| | | 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){ |
| | | return Re.ok(); |
| | | }else if(!Cools.isEmpty(wrkMast)&&statusParam.getTaskStatus()==8&&wrkMast.getIoType()==110){ |
| | | return Re.ok(); |
| | | } |
| | | /** |
| | | * 任务状态 |
| | |
| | | wrkMast.setWrkSts(3L);//3.取货完成 |
| | | }else if (statusParam.getTaskStatus()==3){ |
| | | wrkMast.setWrkSts(6L);//6.任务中断 |
| | | } else if (statusParam.getTaskStatus()==4){ |
| | | wrkMast.setWrkSts(7L);//6.放货完成 |
| | | }if (statusParam.getTaskStatus()==8){ |
| | | if(wrkMast.getIoType()==1 || wrkMast.getIoType() == 10){ |
| | | } else if (statusParam.getTaskStatus()==4 || statusParam.getTaskStatus()==8){ |
| | | // wrkMast.setWrkSts(7L);//6.放货完成 |
| | | if(wrkMast.getIoType()==1 || wrkMast.getIoType() == 10 || wrkMast.getIoType() == 11){ |
| | | wrkMast.setWrkSts(4L);//4.入库完成 |
| | | }else if (wrkMast.getIoType()==101 || wrkMast.getIoType() == 110){ |
| | | }else if (wrkMast.getIoType()==101 || wrkMast.getIoType()==110){ |
| | | wrkMast.setWrkSts(14L);//14.已出库未确认 |
| | | } |
| | | } |