#
Junjie
2024-04-15 5f7592e30296aa6c48373befbcbfc8173009a787
#
5个文件已修改
44 ■■■■ 已修改文件
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/Motion.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/LiftCommandService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MotionServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/resources/application.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/entity/Motion.java
@@ -49,7 +49,7 @@
     * 任务号
     */
    @ApiModelProperty(value= "任务号")
    private Integer wrkNo;
    private Integer taskNo;
    /**
     * 序列号
@@ -228,9 +228,9 @@
    public Motion() {}
    public Motion(String uuid,Integer wrkNo,String serialNo,String title,Integer priority,Integer sync,Long motionCtg,Long motionSts,Long deviceCtg,String device,String origin,Integer oriDrt,String target,Integer tarDrt,String dockNo,Date ioTime,Date startTime,Date endTime,Date errTime,Long errCode,String errDesc,String temp,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Integer deleted,Long hostId) {
    public Motion(String uuid,Integer taskNo,String serialNo,String title,Integer priority,Integer sync,Long motionCtg,Long motionSts,Long deviceCtg,String device,String origin,Integer oriDrt,String target,Integer tarDrt,String dockNo,Date ioTime,Date startTime,Date endTime,Date errTime,Long errCode,String errDesc,String temp,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Integer deleted,Long hostId) {
        this.uuid = uuid;
        this.wrkNo = wrkNo;
        this.taskNo = taskNo;
        this.serialNo = serialNo;
        this.title = title;
        this.priority = priority;
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/LiftCommandService.java
@@ -63,7 +63,7 @@
        ArrayList<LiftCommand> list = new ArrayList<>();
        LiftAssignCommand assignCommand = new LiftAssignCommand();
        assignCommand.setLiftNo(liftProtocol.getLiftNo());
        assignCommand.setTaskNo(motion.getWrkNo());
        assignCommand.setTaskNo(motion.getTaskNo());
        assignCommand.setCommands(list);
        LiftCommand command = new LiftCommand();
@@ -71,11 +71,11 @@
            case LIFT_MOVE:
                // 如果已经在目标层,那边层过滤
                if (liftProtocol.getLev().equals(Integer.valueOf(motion.getTarget()))) {
                    liftProtocol.setTaskNo(motion.getWrkNo());
                    liftProtocol.setTaskNo(motion.getTaskNo());
                    break;
                }
                command = liftThread.getEmptyMoveCommand(motion.getWrkNo(), Integer.parseInt(motion.getTarget()));
                command = liftThread.getEmptyMoveCommand(motion.getTaskNo(), Integer.parseInt(motion.getTarget()));
                list.add(command);
                return liftAction.assignWork(liftThread.getDevice(), assignCommand);
            case LIFT_WITH_GOODS:
@@ -93,7 +93,7 @@
                    return false;
                }
                command = liftThread.getMoveWithShuttleCommand(motion.getWrkNo(), Integer.parseInt(motion.getOrigin()), Integer.parseInt(motion.getTarget()));
                command = liftThread.getMoveWithShuttleCommand(motion.getTaskNo(), Integer.parseInt(motion.getOrigin()), Integer.parseInt(motion.getTarget()));
                list.add(command);
                return liftAction.assignWork(liftThread.getDevice(), assignCommand);
            case LIFT_WITH_GOODS_AND_SHUTTLE:
@@ -209,7 +209,7 @@
            return false;
        }
        if (liftProtocol.getRun() || liftProtocol.getTaskNo() != motion.getWrkNo().shortValue()) {
        if (liftProtocol.getRun() || liftProtocol.getTaskNo() != motion.getTaskNo().shortValue()) {
            return false;
        }
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java
@@ -81,7 +81,7 @@
        ShuttleAssignCommand assignCommand = new ShuttleAssignCommand();
        assignCommand.setShuttleNo(deviceNo);
        assignCommand.setTaskNo(motion.getWrkNo());
        assignCommand.setTaskNo(motion.getTaskNo());
        assignCommand.setSourceLocNo(motion.getOrigin());
        assignCommand.setLocNo(motion.getTarget());
        assignCommand.setDeviceId(Integer.parseInt(motion.getDevice()));
@@ -106,12 +106,12 @@
            case SHUTTLE_MOVE_LIFT_PALLET://穿梭车顶升并移动
                shuttleCommands = this.shuttleAssignCommand(motion.getOrigin(), motion.getTarget(), NavigationMapType.DFX.id, assignCommand, shuttleThread);
                shuttleTaskModeType = ShuttleTaskModeType.PAK_IN;
                shuttleCommands.add(0, shuttleThread.getLiftCommand(motion.getWrkNo(), true));
                shuttleCommands.add(0, shuttleThread.getLiftCommand(motion.getTaskNo(), true));
                break;
            case SHUTTLE_MOVE_DOWN_PALLET://穿梭车移动并托盘下降
                shuttleCommands = this.shuttleAssignCommand(motion.getOrigin(), motion.getTarget(), NavigationMapType.DFX.id, assignCommand, shuttleThread);
                shuttleTaskModeType = ShuttleTaskModeType.PAK_IN;
                shuttleCommands.add(shuttleCommands.size(), shuttleThread.getLiftCommand(motion.getWrkNo(), false));
                shuttleCommands.add(shuttleCommands.size(), shuttleThread.getLiftCommand(motion.getTaskNo(), false));
                break;
            case SHUTTLE_MOVE_FROM_LIFT://出提升机
                // 判断提升机状态
@@ -151,7 +151,7 @@
//                }
                //判断提升机工作号是否和当前任务相同
                if (liftProtocol.getTaskNo().intValue() != motion.getWrkNo()) {
                if (liftProtocol.getTaskNo().intValue() != motion.getTaskNo()) {
                    return false;
                }
@@ -188,7 +188,7 @@
//                }
                //判断提升机工作号是否和当前任务相同
                if (liftProtocol.getTaskNo().intValue() != motion.getWrkNo()) {
                if (liftProtocol.getTaskNo().intValue() != motion.getTaskNo()) {
                    return false;
                }
@@ -197,21 +197,21 @@
                break;
            case SHUTTLE_CHARGE_ON://充电开
                shuttleTaskModeType = ShuttleTaskModeType.CHARGE;
                shuttleCommands.add(shuttleThread.getChargeCommand(motion.getWrkNo(), true));
                shuttleCommands.add(shuttleThread.getChargeCommand(motion.getTaskNo(), true));
                assignCommand.setCharge(Boolean.TRUE);
                break;
            case SHUTTLE_CHARGE_OFF://充电关
                shuttleTaskModeType = ShuttleTaskModeType.CHARGE;
                shuttleCommands.add(shuttleThread.getChargeCommand(motion.getWrkNo(), false));
                shuttleCommands.add(shuttleThread.getChargeCommand(motion.getTaskNo(), false));
                assignCommand.setCharge(Boolean.TRUE);
                break;
            case SHUTTLE_PALLET_LIFT://托盘顶升
                shuttleTaskModeType = ShuttleTaskModeType.PALLET_LIFT;
                shuttleCommands.add(shuttleThread.getLiftCommand(motion.getWrkNo(), true));
                shuttleCommands.add(shuttleThread.getLiftCommand(motion.getTaskNo(), true));
                break;
            case SHUTTLE_PALLET_DOWN://托盘下降
                shuttleTaskModeType = ShuttleTaskModeType.PALLET_DOWN;
                shuttleCommands.add(shuttleThread.getLiftCommand(motion.getWrkNo(), false));
                shuttleCommands.add(shuttleThread.getLiftCommand(motion.getTaskNo(), false));
                break;
            default:
                throw new CoolException(motion.getMotionCtgEl() + "没有指定任务作业流程!!!");
@@ -245,7 +245,7 @@
            return false;
        }
        if (shuttleProtocol.getTaskNo() != 0 && shuttleProtocol.getTaskNo().intValue() != motion.getWrkNo()) {
        if (shuttleProtocol.getTaskNo() != 0 && shuttleProtocol.getTaskNo().intValue() != motion.getTaskNo()) {
            return false;
        }
@@ -308,7 +308,7 @@
//                }
                //判断提升机工作号是否和当前任务相同
                if (liftProtocol.getTaskNo().intValue() != motion.getWrkNo()) {
                if (liftProtocol.getTaskNo().intValue() != motion.getTaskNo()) {
                    return false;
                }
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/service/impl/MotionServiceImpl.java
@@ -81,7 +81,7 @@
        int i = motionList.size();
        for (Motion motion : motionList) {
            motion.setPriority(i);
            motion.setWrkNo(taskNo);
            motion.setTaskNo(taskNo);
            motion.setUuid(uuid);
            if (!this.save(motion)) {
                throw new CoolException(JSON.toJSONString(motion) + "动作保存失败");
zy-asrs-wcs/src/main/resources/application.yml
@@ -18,9 +18,9 @@
#    url: jdbc:mysql://47.97.1.152:3306/asrs?useUnicode=trKue&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
#    username: root
#    password: zy@123
    url: jdbc:mysql://192.168.2.95:3306/asrs?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
    url: jdbc:mysql://192.168.4.15:3306/asrs?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
    username: root
    password: root
    password: xltys1995
#    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#    url: jdbc:sqlserver://47.97.1.152:51433;databasename=jkasrs
#    username: sa