| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import lombok.Data; |
| | |
| | | public LocTypeDto() { |
| | | } |
| | | |
| | | public LocTypeDto(BasDevp basDevp) { |
| | | if (basDevp.getLocType2() == null || basDevp.getLocType2() == 0) { |
| | | public LocTypeDto(BasDevp basDevp,String barcode) { |
| | | if (basDevp.getLocType1() == null || basDevp.getLocType1() == 0) { |
| | | throw new CoolException("plc高低检测异常"); |
| | | } |
| | | if (basDevp.getLocType2() == 1) { |
| | | if (basDevp.getLocType1() == 1) { |
| | | this.locType1 = 1; // 低库位 |
| | | } else { |
| | | this.locType1 = 2; // 高库位 |
| | | } |
| | | if (!Cools.isEmpty(barcode)&&barcode.substring(0,1).equals("4")){ |
| | | this.locType2 = 1; |
| | | }else if (!Cools.isEmpty(barcode)&&barcode.substring(0,1).equals("5")){ |
| | | this.locType2 = 2; |
| | | } |
| | | log.info(JSON.toJSONString(this)); |
| | | } |
| | | |