| | |
| | | package com.zy.core.model.protocol; |
| | | |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.core.enums.CrnForkPosType; |
| | | import com.zy.core.enums.CrnLiftPosType; |
| | | import com.zy.core.enums.CrnModeType; |
| | |
| | | */ |
| | | public Short forkPos; |
| | | |
| | | private CrnForkPosType forkPosType; |
| | | public CrnForkPosType forkPosType; |
| | | |
| | | /** |
| | | * 当前载货台位置 |
| | |
| | | */ |
| | | private Short alarm1; |
| | | |
| | | private boolean[] temp1; |
| | | |
| | | private CrnTemp1 crnTemp1; |
| | | |
| | | private Short temp2; |
| | | |
| | | private Short temp3; |
| | | |
| | | private Short temp4; |
| | | |
| | | /** |
| | | * 异常1 |
| | | */ |
| | | private Short error1; |
| | | private boolean[] error1; |
| | | |
| | | private CrnError1 crnError1; |
| | | |
| | | /** |
| | | * 异常2 |
| | | */ |
| | | private Short error2; |
| | | private boolean[] error2; |
| | | |
| | | private CrnError2 crnError2; |
| | | |
| | | /** |
| | | * 保留 |
| | | * 异常3 |
| | | */ |
| | | private Short temp1; |
| | | private boolean[] error3; |
| | | |
| | | private CrnError3 crnError3; |
| | | |
| | | /** |
| | | * 异常4 |
| | | */ |
| | | private boolean[] error4; |
| | | |
| | | private CrnError4 crnError4; |
| | | |
| | | /** |
| | | * 异常5 |
| | | */ |
| | | private boolean[] error5; |
| | | |
| | | private CrnError5 crnError5; |
| | | |
| | | /** |
| | | * 异常6 |
| | | */ |
| | | private boolean[] error6; |
| | | |
| | | private CrnError6 crnError6; |
| | | |
| | | /** |
| | | * X行走线速度m/min |
| | | */ |
| | | private Short xSpeed; |
| | | private Float xSpeed; |
| | | |
| | | /** |
| | | * Y行走线速度m/min |
| | | */ |
| | | private Short ySpeed; |
| | | private Float ySpeed; |
| | | |
| | | /** |
| | | * Z行走线速度m/min |
| | | */ |
| | | private Short zSpeed; |
| | | private Float zSpeed; |
| | | |
| | | /** |
| | | * 堆垛机累计走行距离km |
| | | */ |
| | | public Integer xDistance; |
| | | public Float xDistance; |
| | | |
| | | /** |
| | | * 堆垛机累计升降距离km |
| | | */ |
| | | public Integer yDistance; |
| | | public Float yDistance; |
| | | |
| | | /** |
| | | * 堆垛机累计运行时长h |
| | | * 堆垛机累计走行时长h |
| | | */ |
| | | public Integer duration; |
| | | public Float xDuration; |
| | | |
| | | /** |
| | | * 堆垛机累计升降时长h |
| | | */ |
| | | public Float yDuration; |
| | | |
| | | public void setMode(Short mode) { |
| | | this.mode = mode; |
| | |
| | | this.status = CrnStatusType.get(type).id.shortValue(); |
| | | } |
| | | |
| | | public void setError1(boolean[] error1){ |
| | | this.error1 = error1; |
| | | this.crnError1 = new CrnError1(); |
| | | this.crnError1.walkOverspeedErr = error1[1]; |
| | | this.crnError1.walkOverspeedRangeErr = error1[2]; |
| | | this.crnError1.walkSpeedOffsetErr = error1[3]; |
| | | this.crnError1.walkLocationOffsetErr = error1[4]; |
| | | this.crnError1.walkDiastimeterErr = error1[5]; |
| | | this.crnError1.walkOutsideErr = error1[6]; |
| | | this.crnError1.walkLimitSwitchErr = error1[7]; |
| | | this.crnError1.walkBrakeErr = error1[8]; |
| | | this.crnError1.walkDiastimeterFau = error1[9]; |
| | | this.crnError1.liftOverSpeedErr = error1[10]; |
| | | this.crnError1.liftOverspeedRangeErr = error1[11]; |
| | | this.crnError1.liftSpeedOffsetErr = error1[12]; |
| | | this.crnError1.liftLocationOffsetErr = error1[13]; |
| | | this.crnError1.liftDiastimeterErr = error1[14]; |
| | | this.crnError1.liftOutsideErr = error1[15]; |
| | | } |
| | | |
| | | |
| | | public void setTemp1(boolean[] temp1) { |
| | | this.temp1 = temp1; |
| | | this.crnTemp1 = new CrnTemp1(); |
| | | this.crnTemp1.liftLimitSwitchErr = temp1[0]; |
| | | this.crnTemp1.liftBrakeErr = temp1[1]; |
| | | this.crnTemp1.liftDiastimeterFau = temp1[2]; |
| | | this.crnTemp1.stop = temp1[3]; |
| | | this.crnTemp1.warn = temp1[4]; |
| | | this.crnTemp1.overHighErr = temp1[5]; |
| | | this.crnTemp1.leftOverWidthErr = temp1[6]; |
| | | this.crnTemp1.rightOverWidthErr = temp1[7]; |
| | | this.crnTemp1.leftOverLenErr = temp1[8]; |
| | | this.crnTemp1.rightOverLenErr = temp1[9]; |
| | | this.crnTemp1.pakinThenLoadedErr = temp1[10]; |
| | | this.crnTemp1.pakOutThenNoneErr = temp1[11]; |
| | | } |
| | | |
| | | /** |
| | | * 最近一次入出库类型 |
| | | * I:入库 |
| | |
| | | */ |
| | | private String lastIo = "I"; |
| | | |
| | | |
| | | public BasCrnp toSqlModel(BasCrnp basCrnp){ |
| | | if (alarm!=null) { |
| | | basCrnp.setCrnErr(alarm.longValue()); |
| | | } |
| | | basCrnp.setWrkNo(taskNo.intValue()); |
| | | return basCrnp; |
| | | } |
| | | } |