| | |
| | | package com.zy.core.model.protocol; |
| | | |
| | | import com.zy.asrs.entity.BasJar; |
| | | import com.zy.core.enums.CrnModeType; |
| | | import com.zy.core.enums.JarModeType; |
| | | import com.zy.core.enums.JarStatusType; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/8/7 |
| | | * Created by vincent on 2024/6/21 |
| | | */ |
| | | @Slf4j |
| | | @Data |
| | |
| | | */ |
| | | public Integer mode; |
| | | |
| | | public JarModeType modeType; |
| | | |
| | | |
| | | /** |
| | | IDLE(0, "空闲"), |
| | | MOVING(1, "作业中"), |
| | | SOS(2, "报警"), |
| | | WAITING(3, "任务完成等待WCS确认"), |
| | | MOVING(1, "入料中"), |
| | | SOS(2, "硫化中"), |
| | | WAITING1(3, "出料中"), |
| | | WAITING2(4, "停止"), |
| | | WAITING3(5, "进料门打开中"), |
| | | WAITING4(6, "出料门打开中"), |
| | | WAITING5(7, "进料门关闭中"), |
| | | OFF_LINE(8, "出料门关闭中"), |
| | | OTHER(100, "其它"), |
| | | */ |
| | | public Short status; |
| | | |
| | |
| | | |
| | | /* |
| | | * 左门状态 |
| | | * 进料门 |
| | | * */ |
| | | private boolean leftDoor; |
| | | |
| | | /* |
| | | * 右门状态 |
| | | * 出料门 |
| | | * */ |
| | | private boolean rightDoor; |
| | | |
| | | /* |
| | | * 左门可开 |
| | | * 进料门 |
| | | * */ |
| | | private boolean leftInEnable; |
| | | |
| | | /* |
| | | * 左门可关 |
| | | * 进料门 |
| | | * */ |
| | | private boolean leftOutEnable; |
| | | |
| | | /* |
| | | * 右门可开 |
| | | * 出料门 |
| | | * */ |
| | | private boolean rightInEnable; |
| | | |
| | | /* |
| | | * 右门可关 |
| | | * 出料门 |
| | | * */ |
| | | private boolean rightOutEnable; |
| | | |
| | |
| | | * 自动 |
| | | * */ |
| | | private boolean autoing; |
| | | |
| | | /* |
| | | * open the left door |
| | | * 进料门 |
| | | * */ |
| | | public Integer leftDoorOpen; |
| | | |
| | | /* |
| | | * close the left door |
| | | * 进料门 |
| | | * */ |
| | | public Integer leftDoorClose; |
| | | |
| | | /* |
| | | * open the right door |
| | | * 出料门 |
| | | * */ |
| | | public Integer rightDoorOpen; |
| | | |
| | | /* |
| | | * close the right door |
| | | * 出料门 |
| | | * */ |
| | | public Integer rightDoorClose; |
| | | |
| | | public Float jarTemperature; |
| | | |
| | | |
| | | /** |
| | |
| | | this.status = JarStatusType.get(type).id.shortValue(); |
| | | } |
| | | |
| | | public void setMode(Integer mode) { |
| | | this.mode = mode; |
| | | this.modeType = JarModeType.get(mode); |
| | | } |
| | | |
| | | public void setMode(JarModeType type) { |
| | | this.modeType = type; |
| | | this.mode = JarModeType.get(type).id; |
| | | } |
| | | |
| | | public BasJar toSqlModel(BasJar basJar){ |
| | | if (jarErr!=null) { |
| | | basJar.setJarErr(jarErr); |
| | | } |
| | | basJar.setJarMode(mode); |
| | | // if (basSte.getPakMk().equals("N")) { |
| | | // if (!Cools.isEmpty(row)) { |
| | | // basSte.setRow(row.intValue()); |
| | | // } |
| | | // if (!Cools.isEmpty(bay)) { |
| | | // basSte.setBay(bay.intValue()); |
| | | // } |
| | | // if (!Cools.isEmpty(lev)) { |
| | | // basSte.setLev(lev.intValue()); |
| | | // } |
| | | // } |
| | | basJar.setJarStatus(status.intValue()); |
| | | basJar.setLeftDoor(leftDoor?"Y":"N"); |
| | | basJar.setRightDoor(rightDoor?"Y":"N"); |
| | | basJar.setLeftInEnable(leftInEnable?"Y":"N"); |
| | | basJar.setLeftOutEnable(leftOutEnable?"Y":"N"); |
| | | basJar.setRightInEnable(rightInEnable?"Y":"N"); |
| | | basJar.setRightOutEnable(rightOutEnable?"Y":"N"); |
| | | basJar.setAutoing(autoing?"Y":"N"); |
| | | |
| | | return basJar; |
| | | } |
| | | |