| | |
| | | import com.zy.common.model.LocTypeDto; |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.properties.SlaveProperties; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private MatServiceImpl matService; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | |
| | | /** |
| | | * 生成工作号 |
| | |
| | | |
| | | } |
| | | } |
| | | // 低库位向高库位兼容 |
| | | if (locMasts.size() < 5 && locTypeDto.getLocType1() == 1){ |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "LowToHeigh")); |
| | | if (config == null){ |
| | | throw new CoolException("低库位兼容高库位配置参数异常--->不存在"); |
| | | }else if (config.getValue().equals("N")){ |
| | | throw new CoolException("低库位兼容高库位配置参数异常--->参数值为N--->未打开"); |
| | | } else if (config.getValue().equals("Y")) { |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").eq("loc_type1", 5)); |
| | | if (Cools.isEmpty(locMasts) || locMasts.size() <= 5){ |
| | | if (nearRow == 2){ |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1",nearRow + 1).eq("loc_sts", "O").eq("loc_type1", 5)); |
| | | } else if (nearRow == 3) { |
| | | locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1",nearRow - 1).eq("loc_sts", "O").eq("loc_type1", 5)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (locMasts.size() < 5){ |
| | | throw new CoolException("无空库位可用"); |
| | | } |