zy-asrs-flow/src/pages/device/conveyor/index.jsx
@@ -17,7 +17,6 @@ const [staNo, setStaNo] = useState(null); useEffect(() => { console.log('yes'); connect(); return () => { @@ -28,7 +27,6 @@ }, []) useEffect(() => { console.log('yes'); if (ws) { ws.onopen = function () { console.log("open"); zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
@@ -3,11 +3,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.zy.asrs.framework.common.Cools; import com.zy.asrs.wcs.core.domain.dto.MotionDto; import com.zy.asrs.wcs.core.entity.BasConveyorPath; import com.zy.asrs.wcs.core.entity.ShuttleStandby; import com.zy.asrs.wcs.core.entity.Task; import com.zy.asrs.wcs.core.model.enums.DeviceCtgType; import com.zy.asrs.wcs.core.model.enums.MotionCtgType; import com.zy.asrs.wcs.core.model.enums.TaskStsType; import com.zy.asrs.wcs.core.service.BasConveyorPathService; import com.zy.asrs.wcs.core.service.ShuttleStandbyService; import com.zy.asrs.wcs.core.service.TaskService; import com.zy.asrs.wcs.core.utils.ConveyorDispatcher; @@ -53,6 +55,8 @@ private DeviceService deviceService; @Autowired private ShuttleStandbyService shuttleStandbyService; @Autowired private BasConveyorPathService basConveyorPathService; public List<Motion> generateMotion(Task task) { List<Motion> motionList = new ArrayList<>(); @@ -492,6 +496,14 @@ //穿梭车出提升机后小车待机位 String shuttleFromLiftStandbyLoc = shuttleStandbyFrom.getStandbyLoc(); //获取输送线路径 BasConveyorPath basConveyorPath = basConveyorPathService.getOne(new LambdaQueryWrapper<BasConveyorPath>() .eq(BasConveyorPath::getDeviceStn, task.getOriginSite()) .eq(BasConveyorPath::getDeviceNo, liftProtocol.getLiftNo())); if (basConveyorPath == null) { return motionList; } /** * 出库 * 一、出库起始层有穿梭车 @@ -630,6 +642,19 @@ dto.setLocNo(shuttleFromLiftStandbyLoc); })), MotionCtgType.SHUTTLE_MOVE )); // 输送线运输至出库口 motionList.addAll(kernelService.conveyorOutbound( MotionDto.build((dto -> { dto.setDevpNo(basConveyorPath.getDeviceId().intValue()); dto.setStaNo(basConveyorPath.getDeviceStn()); })), MotionDto.build((dto -> { dto.setDevpNo(basConveyorPath.getDeviceId().intValue()); dto.setStaNo(basConveyorPath.getStnNo()); })), MotionCtgType.CONVEYOR_OUTBOUND )); /** @@ -877,6 +902,19 @@ MotionCtgType.SHUTTLE_MOVE )); // 输送线运输至出库口 motionList.addAll(kernelService.conveyorOutbound( MotionDto.build((dto -> { dto.setDevpNo(basConveyorPath.getDeviceId().intValue()); dto.setStaNo(basConveyorPath.getDeviceStn()); })), MotionDto.build((dto -> { dto.setDevpNo(basConveyorPath.getDeviceId().intValue()); dto.setStaNo(basConveyorPath.getStnNo()); })), MotionCtgType.CONVEYOR_OUTBOUND )); } } zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SiemensDevpThread.java
@@ -251,7 +251,7 @@ } @Override public boolean writeWorkSta(int siteId, short staNo, short workNo) { public boolean writeWorkSta(int siteId, short workNo, short staNo) { int index = findStaNosIndex(siteId); OperateResult write1 = siemensS7Net.Write("DB100." + index*6, workNo); // 工作号 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/SuopaiSiemensDevpThread.java
@@ -192,7 +192,7 @@ public boolean writeWorkNo(int siteId, short workNo) { int index = findStaNosIndex(siteId); OperateResult write = siemensS7Net.Write("DB100." + index*6, workNo); // 工作号 OperateResult write = siemensS7Net.Write("DB1001." + (index * 20 + 100 + 2), workNo); // 工作号 if (!write.IsSuccess) { StaProtocol staProtocol = station.get(siteId); @@ -213,7 +213,7 @@ public boolean writeStaNo(int siteId,short staNo) { int index = findStaNosIndex(siteId); OperateResult write = siemensS7Net.Write("DB100." + (index*6+4), staNo); // 目标站 OperateResult write = siemensS7Net.Write("DB1001." + (index * 20 + 100 + 4), staNo); // 目标站 if (!write.IsSuccess) { StaProtocol staProtocol = station.get(siteId); @@ -231,11 +231,13 @@ } @Override public boolean writeWorkSta(int siteId, short staNo, short workNo) { public boolean writeWorkSta(int siteId, short workNo, short staNo) { int index = findStaNosIndex(siteId); OperateResult write1 = siemensS7Net.Write("DB100." + index*6, workNo); // 工作号 OperateResult write2 = siemensS7Net.Write("DB100." + (index*6+4), staNo); // 目标站 String workNoAddress = "DB1001." + (index * 20 + 100 + 2); String staNoAddress = "DB1001." + (index * 20 + 100 + 4); OperateResult write1 = siemensS7Net.Write(workNoAddress, workNo); // 工作号 OperateResult write2 = siemensS7Net.Write(staNoAddress, staNo); // 目标站 if (!(write1.IsSuccess && write2.IsSuccess)) { StaProtocol staProtocol = station.get(siteId);