自动化立体仓库 - WMS系统
野心家
2025-03-31 cd358c47735a8f551ab755afed51f3aa2c1bea15
wcs电视机代码移植
19个文件已添加
720 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/domain/dto/WorkChartAxis.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/enums/CrnStatusType.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/enums/WorkNoType.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/param/CrnDemoParam.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/param/CrnOperatorParam.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/param/SystemSwitchParam.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/BarcodeDataVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/CommandLogVo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/CrnDetailVo.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/CrnLatestDataVo.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/CrnMsgTableVo.java 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/CrnStateTableVo.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/LocChartPie.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/PlcErrorTableVo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/ScaleDataVo.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/SiteDetailVo.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/vo/SiteTableVo.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/domain/dto/WorkChartAxis.java
New file
@@ -0,0 +1,31 @@
package com.zy.asrs.domain.dto;
/**
 * 入出库统计曲线图
 * @author admin
 * @date 2018年12月12日
 */
public class WorkChartAxis {
    private String ymd;
    private int inqty;
    private int outqty;
    public String getYmd() {
        return ymd;
    }
    public void setYmd(String ymd) {
        this.ymd = ymd;
    }
    public int getInqty() {
        return inqty;
    }
    public void setInqty(int inqty) {
        this.inqty = inqty;
    }
    public int getOutqty() {
        return outqty;
    }
    public void setOutqty(int outqty) {
        this.outqty = outqty;
    }
}
src/main/java/com/zy/asrs/domain/enums/CrnStatusType.java
New file
@@ -0,0 +1,53 @@
package com.zy.asrs.domain.enums;
/**
 * 堆垛机状态枚举
 */
public enum CrnStatusType {
    // 入库
    MACHINE_PAKIN("入库"),
    // 出库
    MACHINE_PAKOUT("出库"),
    // 库到库
    MACHINE_STOCK_MOVE("库到库"),
    // 站到站
    MACHINE_SITE_MOVE("站到站"),
    // p to p
    MACHINE_P_MOVE("PToP"),
    // 异常
    MACHINE_ERROR("异常"),
    // 自动
    MACHINE_AUTO("自动"),
    // 非自动/手动
    MACHINE_UN_AUTO("非自动"),
    ;
    private String desc;
    CrnStatusType(String desc){
        this.desc = desc;
    }
    public String getDesc() {
        return desc;
    }
    public void setDesc(String desc) {
        this.desc = desc;
    }
    public static CrnStatusType process(Integer ioType){
        if (ioType>100) {
            return MACHINE_PAKOUT;
        } else if (ioType < 100 && ioType!=3 && ioType!=6 && ioType!=11) {
            return MACHINE_PAKIN;
        } else if (ioType == 3) {
            return MACHINE_SITE_MOVE;
        } else if (ioType == 11) {
            return MACHINE_STOCK_MOVE;
        } else {
            return MACHINE_ERROR;
        }
    }
}
src/main/java/com/zy/asrs/domain/enums/SiteStatusType.java
New file
@@ -0,0 +1,46 @@
package com.zy.asrs.domain.enums;
import com.zy.core.model.protocol.StaProtocol;
/**
 * 站点状态枚举
 */
public enum SiteStatusType {
    // 自动
    SITE_AUTO,
    // 非自动
    SITE_UNAUTO,
    // 自动+有物+ID
    SITE_AUTO_RUN_ID,
    // 自动+有物
    SITE_AUTO_RUN,
    // 自动+ID
    SITE_AUTO_ID,
    ;
    public static SiteStatusType process(StaProtocol staProtocol){
        if (staProtocol == null) {
            return null;
        }
        if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0) {
            return SITE_AUTO_RUN_ID;
        }
        if (staProtocol.isAutoing() && staProtocol.isLoading()) {
            return SITE_AUTO_RUN;
        }
        if (staProtocol.isAutoing() && staProtocol.getWorkNo() > 0) {
            return SITE_AUTO_ID;
        }
        if (staProtocol.isAutoing()) {
            return SITE_AUTO;
        }
        if (!staProtocol.isAutoing()) {
            return SITE_UNAUTO;
        }
        return null;
    }
}
src/main/java/com/zy/asrs/domain/enums/WorkNoType.java
New file
@@ -0,0 +1,48 @@
package com.zy.asrs.domain.enums;
import com.core.exception.CoolException;
/**
 * 工作号排序规则
 */
public enum WorkNoType {
    PAKIN(0),
    PICK(1),
    PAKOUT(2),
    OTHER(3),
    ;
    public Integer type;
    WorkNoType(Integer type) {
        this.type = type;
    }
    public static Integer getWorkNoType(Integer ioType) {
        switch (ioType) {
            case 1:
                return PAKIN.type;
            case 10:
                return PAKIN.type;
            case 11:
                return PICK.type;
            case 53:
            case 54:
            case 57:
                return PICK.type;
            case 101:
                return PAKOUT.type;
            case 103:
            case 104:
            case 107:
                return PICK.type;
            case 110:
                return PAKOUT.type;
            default:
                break;
        }
        throw new CoolException(ioType + "的任务类型无法生成工作号");
    }
}
src/main/java/com/zy/asrs/domain/param/CrnDemoParam.java
New file
@@ -0,0 +1,20 @@
package com.zy.asrs.domain.param;
import lombok.Data;
/**
 * 堆垛机演示操作入参
 * Created by vincent on 2020-06-03
 */
@Data
public class CrnDemoParam {
    // 操作类型 1: 打开;  0: 关闭
    private Integer crnId;
    // 密码口令
    private String password;
    private Boolean opt;
}
src/main/java/com/zy/asrs/domain/param/CrnOperatorParam.java
New file
@@ -0,0 +1,38 @@
package com.zy.asrs.domain.param;
import lombok.Data;
/**
 * Created by vincent on 2020-06-02
 */
@Data
public class CrnOperatorParam {
    // 堆垛机号
    private Integer crnNo;
    // 源站
    private Short sourceStaNo;
    // 源库位-排
    private Short sourceRow;
    // 源库位-列
    private Short sourceBay;
    // 源库位-层
    private Short sourceLev;
    // 目标站
    private Short staNo;
    // 目标库位-排
    private Short row;
    // 目标库位-列
    private Short bay;
    // 目标库位-层
    private Short lev;
}
src/main/java/com/zy/asrs/domain/param/SystemSwitchParam.java
New file
@@ -0,0 +1,30 @@
package com.zy.asrs.domain.param;
/**
 * 系统运行状态操作入参
 * Created by vincent on 2020-06-03
 */
public class SystemSwitchParam {
    // 操作类型 1: 打开;  0: 关闭
    private Integer operatorType;
    // 密码口令
    private String password;
    public Integer getOperatorType() {
        return operatorType;
    }
    public void setOperatorType(Integer operatorType) {
        this.operatorType = operatorType;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
}
src/main/java/com/zy/asrs/domain/vo/BarcodeDataVo.java
New file
@@ -0,0 +1,18 @@
package com.zy.asrs.domain.vo;
import lombok.Data;
/**
 * 扫码器实时数据视图对象
 * Created by vincent on 2020-06-03
 */
@Data
public class BarcodeDataVo {
    // 扫码器编号
    private Integer barcodeId;
    // 扫码器内容
    private String codeValue;
}
src/main/java/com/zy/asrs/domain/vo/CommandLogVo.java
New file
@@ -0,0 +1,20 @@
package com.zy.asrs.domain.vo;
import lombok.Data;
/**
 * Created by vincent on 2020-06-02
 */
@Data
public class CommandLogVo {
    // 堆垛机编号
    private Integer crnNo;
    // 状态
    private Integer status;
    // 命令报文
    private String command;
}
src/main/java/com/zy/asrs/domain/vo/CrnDetailVo.java
New file
@@ -0,0 +1,42 @@
package com.zy.asrs.domain.vo;
import lombok.Data;
/**
 * 堆垛机详情视图对象
 * Created by vincent on 2020-06-03
 */
@Data
public class CrnDetailVo {
    // 堆垛机号
    private Integer crnNo;
    // 工作号
    private Short workNo;
    // 源站
    private String sourceStaNo = "";
    // 目标站
    private String staNo = "";
    // 工作状态
    private String wrkSts = "";
    // 出入类型
    private String ioType = "";
    // 源库位
    private String sourceLocNo = "";
    // 目标库位
    private String locNo = "";
    // 堆垛机状态
    private String crnStatus = "";
    // 异常
    private String error = "";
}
src/main/java/com/zy/asrs/domain/vo/CrnLatestDataVo.java
New file
@@ -0,0 +1,28 @@
package com.zy.asrs.domain.vo;
import com.zy.asrs.domain.enums.CrnStatusType;
import lombok.Data;
/**
 * 堆垛机最新数据视图对象
 * Created by vincent on 2020-06-01
 */
@Data
public class CrnLatestDataVo {
    // 堆垛机编号
    private Integer crnId;
    // 偏移量
    private Double offset;
    // 当前列
    private Short bay;
    private CrnStatusType crnStatus;
    public String getCrnStatus(){
        return crnStatus.toString().toLowerCase().replaceAll("_", "-");
    }
}
src/main/java/com/zy/asrs/domain/vo/CrnMsgTableVo.java
New file
@@ -0,0 +1,90 @@
package com.zy.asrs.domain.vo;
import com.zy.asrs.utils.Utils;
import lombok.Data;
/**
 * Created by vincent on 2020-06-02
 */
@Data
public class CrnMsgTableVo {
    // 堆垛机号
    private Integer crnNo;
    // 工作号
    private Short workNo = 0;
    // 状态
    private String status = "-";
    // 源站
    private String sourceStaNo = "-";
    // 目标站
    private String staNo = "-";
    // 源库位
    private String sourceLocNo = "-";
    // 目标库位
    private String locNo = "-";
    // 异常
    private String error = "";
    // 原点
    private String origin = "";
    // 命令
    private String command = "";
    // 走行速度(m/min)
    private Float xspeed = 0.0F;
    // 升降速度(m/min)
    private Float yspeed = 0.0F;
    // 叉牙速度(m/min)
    private Float zspeed = 0.0F;
    // 走行距离(Km)
    private Float xdistance = 0.0F;
    // 升降距离(Km)
    private Float ydistance = 0.0F;
    // 走行时长(H)
    private Float xduration = 0.0F;
    // 升降时长(H)
    private Float yduration = 0.0F;
    public void setXspeed(Float xspeed) {
        this.xspeed = Utils.scale(xspeed);
    }
    public void setYspeed(Float yspeed) {
        this.yspeed = Utils.scale(yspeed);
    }
    public void setZspeed(Float zspeed) {
        this.zspeed = Utils.scale(zspeed);
    }
    public void setXdistance(Float xdistance) {
        this.xdistance = Utils.scale(xdistance);
    }
    public void setYdistance(Float ydistance) {
        this.ydistance = Utils.scale(ydistance);
    }
    public void setXduration(Float xduration) {
        this.xduration = Utils.scale(xduration);
    }
    public void setYduration(Float yduration) {
        this.yduration = Utils.scale(yduration);
    }
}
src/main/java/com/zy/asrs/domain/vo/CrnStateTableVo.java
New file
@@ -0,0 +1,65 @@
package com.zy.asrs.domain.vo;
import lombok.Data;
/**
 * Created by vincent on 2020-06-02
 */
@Data
public class CrnStateTableVo {
    // 堆垛机号
    private Integer crnNo;
    // 模式
    private String statusType = "-";
    // 有物
    private String loading = "-";
    // 列
    private Short bay;
    // 层
    private Short lev;
    // 走行原点
    private String xOrigin = "-";
    // 升降原点
    private String yOrigin = "-";
    // 货叉位置
    private String forkOffset = "-";
    // 载货台位置
    private String liftPos = "-";
    // 走行定位
    private String walkPos = "-";
    // 急停
    private String stop = "-";
    // 列坐标
    private String bayCoor = "-";
    // 层坐标
    private String levCoor = "-";
    // 完成
    private String complete = "-";
    // 任务号
    private Short workNo = 0;
    // 状态
    private String status = "-";
    // 异常码
    private String warnCode = "-";
    // 垂直故障码
    private String alarm = "-";
}
src/main/java/com/zy/asrs/domain/vo/LocChartPie.java
New file
@@ -0,0 +1,37 @@
package com.zy.asrs.domain.vo;
/**
 * 库位占用百分比
 * @author admin
 * @date 2018年12月12日
 */
public class LocChartPie {
    private int fqty;
    private int oqty;
    private int uqty;
    private int xqty;
    public int getFqty() {
        return fqty;
    }
    public void setFqty(int fqty) {
        this.fqty = fqty;
    }
    public int getOqty() {
        return oqty;
    }
    public void setOqty(int oqty) {
        this.oqty = oqty;
    }
    public int getUqty() {
        return uqty;
    }
    public void setUqty(int uqty) {
        this.uqty = uqty;
    }
    public int getXqty() {
        return xqty;
    }
    public void setXqty(int xqty) {
        this.xqty = xqty;
    }
}
src/main/java/com/zy/asrs/domain/vo/PlcErrorTableVo.java
New file
@@ -0,0 +1,20 @@
package com.zy.asrs.domain.vo;
import lombok.Data;
/**
 * Created by vincent on 2020-06-02
 */
@Data
public class PlcErrorTableVo {
    // 序号
    private Integer no;
    // plc异常描述
    private String plcDesc;
    // 异常
    private String error;
}
src/main/java/com/zy/asrs/domain/vo/ScaleDataVo.java
New file
@@ -0,0 +1,18 @@
package com.zy.asrs.domain.vo;
import lombok.Data;
/**
 * 磅秤实时数据视图对象
 * Created by vincent on 2020-06-03
 */
@Data
public class ScaleDataVo {
    // 磅秤编号
    private Integer scaleId;
    // 磅秤内容
    private String value;
}
src/main/java/com/zy/asrs/domain/vo/SiteDetailVo.java
New file
@@ -0,0 +1,47 @@
package com.zy.asrs.domain.vo;
import lombok.Data;
/**
 * 输送设备详情视图对象
 * Created by vincent on 2020-06-03
 */
@Data
public class SiteDetailVo {
    // 站点编号
    private Integer siteId;
    // 工作号
    private Short workNo;
    // 工作状态
    private String wrkSts = "";
    // 自动
    private String autoing;
    // 有物
    private String loading;
    // 能入
    private String canining;
    // 能出
    private String canouting;
    // 出入类型
    private String ioType = "";
    // 源站
    private String sourceStaNo = "";
    // 目标站
    private String staNo = "";
    // 源库位
    private String sourceLocNo = "";
    // 目标库位
    private String locNo = "";
}
src/main/java/com/zy/asrs/domain/vo/SiteLatestDataVo.java
New file
@@ -0,0 +1,29 @@
package com.zy.asrs.domain.vo;
import com.zy.asrs.domain.enums.SiteStatusType;
import lombok.Data;
/**
 * 站点最新数据视图对象
 * Created by vincent on 2020-06-01
 */
@Data
public class SiteLatestDataVo {
    // 站点编号
    private String siteId;
    // 工作号
    private Short workNo;
    // 站点状态
    private SiteStatusType siteStatus;
    // 隔壁站点(台车特性)
    private String nearbySta;
    public String getSiteStatus() {
        return siteStatus.toString().toLowerCase().replaceAll("_", "-");
    }
}
src/main/java/com/zy/asrs/domain/vo/SiteTableVo.java
New file
@@ -0,0 +1,40 @@
package com.zy.asrs.domain.vo;
import lombok.Data;
/**
 * Created by vincent on 2020-06-02
 */
@Data
public class SiteTableVo {
    // 站号
    private Integer devNo;
    // 工作号
    private Short workNo = 0;
    // 自动
    private String autoing = "-";
    // 有物
    private String loading = "-";
    // 可入
    private String inEnable = "-";
    // 可出
    private String outEnable = "-";
    // 需求1
    private String pakMk = "-";
    // 空板信号
    private String emptyMk = "-";
    // 目标站
    private Short staNo = 0;
    //高低库位
    private String locType1 = "-";
}