| | |
| | | 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; |
| | |
| | | * 0 = 脱机模式 |
| | | */ |
| | | public Integer mode; |
| | | |
| | | public JarModeType modeType; |
| | | |
| | | |
| | | /** |
| | | IDLE(0, "空闲"), |
| | |
| | | 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; |
| | | } |
| | | |