| | |
| | | |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.core.model.CrnSlave; |
| | | import com.zy.core.properties.SlaveProperties; |
| | | |
| | | import java.text.DecimalFormat; |
| | |
| | | |
| | | } |
| | | |
| | | public static CrnSlave.CrnStn getCrnStnByStaNo(Integer staNo, Boolean pakIn) { |
| | | SlaveProperties slaveProperties = SpringUtils.getBean(SlaveProperties.class); |
| | | for (CrnSlave crn : slaveProperties.getCrn()) { |
| | | List<CrnSlave.CrnStn> crnInStn = null; |
| | | if (pakIn) { |
| | | crnInStn = crn.getCrnInStn(); |
| | | }else { |
| | | crnInStn = crn.getCrnOutStn(); |
| | | } |
| | | |
| | | for (CrnSlave.CrnStn crnStn : crnInStn) { |
| | | if (crnStn.getStaNo().equals(staNo)) { |
| | | return crnStn; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | // SlaveProperties slaveProperties = new SlaveProperties(); |
| | | // slaveProperties.setDoubleDeep(true); |