| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.Arith; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | /** |
| | | * 生成工作号 |
| | |
| | | int eRow = rowLastno.geteRow(); |
| | | int crn_qty = rowLastno.getCrnQty(); |
| | | int rowCount = eRow - sRow + 1; |
| | | |
| | | // 同一天同规格货物靠近摆法规则 todo |
| | | List<String> locNos = locDetlService.getSameDetlToday("X004073XX"); |
| | | for (String locNo : locNos) { |
| | | // 获取排 |
| | | int row = Integer.parseInt(locNo.substring(0, 2)); |
| | | // 判断是否为深库位 |
| | | double remainder = Arith.remainder(row, rowCount / crn_qty); |
| | | if (remainder != 0 && remainder != 1) { |
| | | continue; |
| | | } |
| | | // 得到当前库位的外围库位 |
| | | System.out.println(); |
| | | } |
| | | |
| | | // 获取目标站所在货架排号 |
| | | Shelves shelves = new Shelves(rowCount, crn_qty); |
| | | curRow = shelves.start(curRow); |
| | |
| | | } else { |
| | | throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用"); |
| | | } |
| | | } else { |
| | | throw new CoolException(rowLastno.getWhsType()+"号库位排号分配规则不可用"); |
| | | } |
| | | return startupDto; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | System.out.println(Arith.remainder(1, 4)); |
| | | System.out.println("0200201".substring(0, 2)); |
| | | |
| | | } |
| | | |
| | | } |