From 412c5291467a5812af769156912dca6024abc8f1 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期一, 14 三月 2022 16:51:55 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/model/protocol/CrnProtocol.java | 101 ++++++++++++++++++++++++++------------------------ 1 files changed, 52 insertions(+), 49 deletions(-) diff --git a/src/main/java/com/zy/core/model/protocol/CrnProtocol.java b/src/main/java/com/zy/core/model/protocol/CrnProtocol.java index 13c51ed..e1dcbd9 100644 --- a/src/main/java/com/zy/core/model/protocol/CrnProtocol.java +++ b/src/main/java/com/zy/core/model/protocol/CrnProtocol.java @@ -1,5 +1,6 @@ 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; @@ -11,6 +12,11 @@ */ @Data public class CrnProtocol { + + /** + * 鍫嗗灈鏈哄彿 + */ + private Integer crnNo; /** * 1 = 鎵嬪姩妯″紡 @@ -93,19 +99,19 @@ public Short walkPos; /** - * 鍫嗗灈鏈轰换鍔″畬鎴� - */ - public Short taskFinish; - - /** * 杞借揣鍙版湁鐗� */ public Short loaded; - /** - * 寮傚父鐮侊紙鏁板�兼樉绀猴級 - */ - private Short alarm1; + private Short temp1; + + private CrnTemp1 crnTemp1; + + private Short temp2; + + private Short temp3; + + private Short temp4; /** * 寮傚父1 @@ -122,9 +128,32 @@ 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 @@ -201,46 +230,12 @@ this.status = CrnStatusType.get(type).id.shortValue(); } - public void setError1(boolean[] error1){ - this.error1 = error1; - this.crnError1 = new CrnError1(); - this.crnError1.stop = error1[0]; - this.crnError1.xCoverErr = error1[1]; - this.crnError1.yCoverErr = error1[2]; - this.crnError1.zCoverErr = error1[3]; - this.crnError1.rangeErr = error1[4]; - this.crnError1.barcodeErr = error1[5]; - this.crnError1.xFrontLimitErr = error1[6]; - this.crnError1.xBackLimitErr = error1[7]; - this.crnError1.yUpLimitErr = error1[8]; - this.crnError1.yDownLimitErr = error1[9]; - this.crnError1.zLeftLimitErr = error1[10]; - this.crnError1.zRightLimitErr = error1[11]; - this.crnError1.xLocationUpErr = error1[12]; - this.crnError1.xLocationDownErr = error1[13]; - this.crnError1.yLocationUpErr = error1[14]; - this.crnError1.yLocationDownErr = error1[15]; + public Short getTemp1() { + return temp1; } - public void setError2(boolean[] error2){ - this.error2 = error2; - this.crnError2 = new CrnError2(); - this.crnError2.zLocationUpErr = error2[0]; - this.crnError2.zLocationDownErr = error2[1]; - this.crnError2.wcsCommandErr = error2[2]; - this.crnError2.leftWidthLimitErr = error2[3]; - this.crnError2.rightWidthLimitErr = error2[4]; - this.crnError2.leftLengthLimitErr = error2[5]; - this.crnError2.rightLengthLimitErr = error2[6]; - this.crnError2.highLimitErr = error2[7]; - this.crnError2.leftTakeNoneErr = error2[8]; - this.crnError2.rightTakeNoneErr = error2[9]; - this.crnError2.leftPutLoadErr = error2[10]; - this.crnError2.rightPutLoadErr = error2[11]; - this.crnError2.startErr = error2[12]; - this.crnError2.looseRopeErr = error2[13]; - this.crnError2.safeDoorSwitchErr = error2[14]; - this.crnError2.none = error2[15]; + public void setTemp1(Short temp1) { + this.temp1 = temp1; } /** @@ -250,4 +245,12 @@ */ private String lastIo = "I"; + + public BasCrnp toSqlModel(BasCrnp basCrnp){ + if (alarm!=null) { + basCrnp.setCrnErr(alarm.longValue()); + } + basCrnp.setWrkNo(taskNo.intValue()); + return basCrnp; + } } -- Gitblit v1.9.1