From 25e6a77fdca15feccadb9d4ccf5baf83e1bfd62a Mon Sep 17 00:00:00 2001 From: lsh <lsh@163.com> Date: 星期五, 18 四月 2025 14:04:25 +0800 Subject: [PATCH] * --- src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 70 ++++++++++++++++++++++++++++------ 1 files changed, 57 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java index 56b2679..150385a 100644 --- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java @@ -8,10 +8,7 @@ import com.core.exception.CoolException; import com.zy.asrs.domain.enums.TaskStatusType; import com.zy.asrs.domain.enums.WorkNoType; -import com.zy.asrs.entity.LocMast; -import com.zy.asrs.entity.StaDesc; -import com.zy.asrs.entity.TaskWrk; -import com.zy.asrs.entity.ToWmsDTO; +import com.zy.asrs.entity.*; import com.zy.asrs.entity.param.TaskOverParam; import com.zy.asrs.entity.param.WMSAndAGVInterfaceParam; import com.zy.asrs.entity.param.TaskCreateParam; @@ -50,6 +47,8 @@ private CommonService commonService; @Autowired private LocMastService locMastService; + @Autowired + private BasDevpService basDevpService; @@ -80,6 +79,17 @@ taskWrk.setWrkNo(workNo1); taskWrk.setStatus(TaskStatusType.RECEIVE.id);//浠诲姟鐘舵�侊細鎺ユ敹 taskWrk.setCreateTime(now); + taskWrk.setModiTime(now); + taskWrk.setAssignTime(new Date()); + taskWrk.setModiUser(6666L); + try{ + if (param.getIoType()>1){ + if (Utils.locNoRowBoolean(locMast.getRow1())){ + param.setTaskPriority(11); + } + } + }catch (Exception e){ + } taskWrk.setIoType(param.getIoType());//浠诲姟绫诲瀷 taskWrk.setIoPri(param.getTaskPriority());//浼樺厛绾� taskWrk.setBarcode(param.getBarcode());//鏉$爜 @@ -219,12 +229,12 @@ } else { staProtocol = staProtocol.clone(); } - Short workNo = staProtocol.getWorkNo(); + Integer workNo = staProtocol.getWorkNo(); if (wharfCode1.contains(param.getWharfCode())){ - if (!staProtocol.isLoading() && !staProtocol.isCar() && staProtocol.getWorkNo() >0){ + if (!staProtocol.isLoading() && staProtocol.getWorkNo() >0){ //AGV鍑哄簱瀹屾垚浠ュ悗 - staProtocol.setWorkNo((short) 0); - staProtocol.setStaNo((short)0); + staProtocol.setWorkNo( 0); + staProtocol.setStaNo(0); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); if (result) { @@ -236,10 +246,10 @@ for (DevpSlave.Sta inSta : devp.getInSta()) { if (inSta.getBackSta().equals(staDesc.getStnNo())){ - if (staProtocol.isLoading() && !staProtocol.isCar() && workNo == 0){ + if (staProtocol.isLoading() && workNo == 0){ //AGV鍏ュ簱瀹屾垚浠ュ悗 - staProtocol.setWorkNo((short) 9999); - staProtocol.setStaNo(inSta.getStaNo().shortValue()); + staProtocol.setWorkNo(9999); + staProtocol.setStaNo(inSta.getStaNo()); boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); if (result) { @@ -254,6 +264,40 @@ } } + +// @Override +// public R getAgvPickAndPlaceV1(TaskOverParam param) { +// BasDevp basDevp = basDevpService.selectById(param.getStaNo()); +// if (Cools.isEmpty(basDevp)){ +// return R.error("绔欑偣鍙锋湁璇�"+param.getStaNo()); +// } +// if (param.getType()==0 && basDevp.getAgvStartPick()==1){ +// return R.ok(); +// }else if (param.getType()==1 && basDevp.getAgvStartPlace()==1){ +// return R.ok(); +// }else { +// return R.error("涓嶅厑璁�"); +// } +// } + +// @Override +// public R getAgvPickAndPlaceV2(TaskOverParam param) { +// BasDevp basDevp = basDevpService.selectById(param.getStaNo()); +// if (Cools.isEmpty(basDevp)){ +// return R.error("绔欑偣鍙锋湁璇�"+param.getStaNo()); +// } +// if (param.getType()==0){ +// basDevp.setAgvTargetPick(1); +// basDevpService.updateById(basDevp); +// return R.ok(); +// }else if (param.getType()==1){ +// basDevp.setAgvTargetPlace(1); +// basDevpService.updateById(basDevp); +// return R.ok(); +// }else { +// return R.error("璇锋眰绫诲瀷寮傚父"+param.getType()); +// } +// } public List<Integer> getInEnableRoadway(){ int[] roadway = null; @@ -278,7 +322,7 @@ } else { staProtocol = staProtocol.clone(); } - Short workNo = staProtocol.getWorkNo(); + Integer workNo = staProtocol.getWorkNo(); if (workNo == 0 && !staProtocol.isLoading()){ if (Cools.isEmpty( map.get(inSta.getStaNo()))){ continue; @@ -314,7 +358,7 @@ } else { staProtocol = staProtocol.clone(); } - Short workNo = staProtocol.getWorkNo(); + Integer workNo = staProtocol.getWorkNo(); if (workNo == 0 && !staProtocol.isLoading()){ if (Cools.isEmpty( map.get(inSta.getStaNo()))){ continue; -- Gitblit v1.9.1