| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvBasDevp; |
| | | import com.zy.asrs.entity.AgvLocMast; |
| | | import com.zy.asrs.entity.AgvWrkMast; |
| | | import com.zy.asrs.entity.WrkMastExecute; |
| | | import com.zy.asrs.entity.param.AgvTaskCallBackParam; |
| | |
| | | } |
| | | AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("wrk_no", wrkNo)); |
| | | if (Cools.isEmpty(agvWrkMast)) { |
| | | agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", param.getPodCode())); |
| | | if (Cools.isEmpty(agvWrkMast)) { |
| | | //agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", param.getPodCode())); |
| | | //if (Cools.isEmpty(agvWrkMast)) { |
| | | r = R.error("任务编号错误"); |
| | | logPost(param, JSONObject.toJSONString(r), false); |
| | | return r; |
| | | //} |
| | | } |
| | | try { |
| | | if (!Cools.isEmpty(agvWrkMast.getBarcode()) && !Cools.isEmpty(param.getPodCode())) { |
| | | if (!agvWrkMast.getBarcode().equals(param.getPodCode())) { |
| | | log.info("AGV回调的返回的托盘码和工作档托盘不一致,{}{}", agvWrkMast.getBarcode(), param.getPodCode()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if (agvWrkMast.getIoType().equals(121)) { |
| | | try { |
| | |
| | | end { |
| | | @Transactional |
| | | public void success(AgvWrkMast agvWrkMast, AgvTaskCallBackParam param) { |
| | | try { |
| | | if (!Cools.isEmpty(agvWrkMast.getBarcode()) && !Cools.isEmpty(param.getPodCode())) { |
| | | if (!agvWrkMast.getBarcode().equals(param.getPodCode())) { |
| | | agvWrkMast.setTakeNone(agvWrkMast.getBarcode() + "!=" + param.getPodCode()); |
| | | log.info("AGV回调的返回的托盘码和工作档托盘不一致,{}{}", agvWrkMast.getBarcode(), param.getPodCode()); |
| | | log.error("AGV回调的返回的托盘码和工作档托盘不一致,{}{}", agvWrkMast.getBarcode(), param.getPodCode()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | //修改AGV工作档的工作状态为205.工作完成 |
| | | agvWrkMast.setWrkSts(205L); |
| | | |
| | |
| | | } |
| | | |
| | | if (agvWrkMast.getIoType() == 108 || agvWrkMast.getIoType() == 114) { |
| | | //更新库存明细 |
| | | agvLocDetlService.updateStock(agvWrkMast.getSourceLocNo(), agvWrkMast.getLocNo(), agvWrkMast.getAppeUser()); |
| | | //修改源库位状态为O |
| | | agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(), "O", "", agvWrkMast.getWhsType().shortValue(), "", (short) 0); |
| | | AgvLocMast agvLocMast = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvWrkMast.getSourceLocNo())); |
| | | if(agvLocMast.getLocSts().equals("R")){ |
| | | //更新库存明细 |
| | | agvLocDetlService.updateStock(agvWrkMast.getSourceLocNo(), agvWrkMast.getLocNo(), agvWrkMast.getAppeUser()); |
| | | //修改源库位状态为O |
| | | agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(), "O", "", agvWrkMast.getWhsType().shortValue(), "", (short) 0); |
| | | } |
| | | } else if (agvWrkMast.getIoType() == 109 && !agvWrkMast.getSourceLocNo().substring(0, 2).equals("DB")) { |
| | | //修改源库位状态为O |
| | | agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(), "O", "", agvWrkMast.getWhsType().shortValue(), "", (short) 0); |
| | | AgvLocMast agvLocMast = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", agvWrkMast.getSourceLocNo())); |
| | | if(agvLocMast.getLocSts().equals("R")){ |
| | | //修改源库位状态为O |
| | | agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(), "O", "", agvWrkMast.getWhsType().shortValue(), "", (short) 0); |
| | | } |
| | | } |
| | | //if(agvWrkMast.getIoType() == 1 || agvWrkMast.getIoType() == 53 || agvWrkMast.getIoType() == 57 || agvWrkMast.getIoType() == 10){ |
| | | // //修改源站点状态为O.空,以及解绑托盘条码 |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | String s = null; |
| | | System.out.println(s.equals("1")); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |