Commit fcf62fcd4af4e0e2d64988b33bc56f93107e6df9
1 parent
e7af5df0
超重判断
Showing
1 changed file
with
4 additions
and
2 deletions
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/LocationAllocationServiceImpl.java
... | ... | @@ -238,8 +238,8 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
238 | 238 | } |
239 | 239 | //重量小于50kg,优先放第4层 |
240 | 240 | List<Location> locationss=null; |
241 | + BigDecimal weight_bigdecimal=new BigDecimal(weight); | |
241 | 242 | if(StringUtils.isNotEmpty(weight)){ |
242 | - BigDecimal weight_bigdecimal=new BigDecimal(weight); | |
243 | 243 | if(weight_bigdecimal.compareTo(new BigDecimal(200))>0){ |
244 | 244 | locationss=locationList.stream().filter(t->{ |
245 | 245 | if(t.getILayer()!=4){ |
... | ... | @@ -253,7 +253,9 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
253 | 253 | locationList=locationss; |
254 | 254 | }else{ |
255 | 255 | //第4层超过200斤则不能放 |
256 | - return null; | |
256 | + if(weight_bigdecimal.compareTo(new BigDecimal(200))>0){ | |
257 | + return null; | |
258 | + } | |
257 | 259 | } |
258 | 260 | Location location = locationList.stream().findFirst().orElse(null); |
259 | 261 | String locationCode = location.getCode(); |
... | ... |