package com.zy.asrs.wcs.rcs.model.protocol; import com.zy.asrs.wcs.core.entity.BasConveyorSta; import lombok.Data; /** * 输送线plc单个站点详细信息 */ @Data public class StaProtocol implements Cloneable { // 站点编号 private Integer siteId; // ---------------------------------------------------------------- // 工作号 private Short workNo = 0; // ---------------------------------------------------------------- // 目标站 private Short staNo; // ---------------------------------------------------------------- // 自动 private boolean autoing; // 有物 private boolean loading; // 可入 private boolean inEnable; // 可出 private boolean outEnable; // 空板信号 private boolean emptyMk; // 满托盘 private boolean fullPlt; // 高 private boolean high; // 低 private boolean low; // 锁定标记 private boolean pakMk = true; // 外形检测 ------------------------------------------------------------------------ // 前超限 private boolean frontErr; // 后超限 private boolean backErr; // 高超限 private boolean highErr; // 左超限 private boolean leftErr; // 右超限 private boolean rightErr; // 超重 private boolean weightErr; // 扫码失败 private boolean barcodeErr; // 工作模式 private Integer workMode; @Override public StaProtocol clone() { try { return (StaProtocol) super.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } return null; } public BasConveyorSta toSqlModel(BasConveyorSta station){ station.setSiteNo(siteId); station.setTaskNo(workNo.intValue()); station.setAutoing(autoing?"Y":"N"); station.setLoading(loading?"Y":"N"); station.setInEnable(inEnable?"Y":"N"); station.setOutEnable(outEnable?"Y":"N"); station.setWorkMode(workMode); station.setStaNo((int) staNo); station.setLocType1(0); // 高低类型{0:未知,1:低库位,2:高库位} station.setLocType2(0); // 宽窄类型{0:未知,1:窄库位,2:宽库位} station.setLocType3(0); // 轻重类型{0:未知,1:轻库位,2:重库位} return station; } public Integer getLocType1() { if (this.low) { return 1;//低 }else { return 2;//高 } } }