| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | LocMast locMast = null; |
| | | |
| | | List<StaDesc> staDescs = staDescService.selectList(new EntityWrapper<StaDesc>().eq("type_no", 1).eq("stn_no", sourceStaNo)); |
| | | |
| | | int num = 0; |
| | | int crn_no = 1; |
| | | for (StaDesc staDesc : staDescs) { |
| | | //单品 |
| | | List<LocMast> locMasts = locMastService.selectAreaEmpty(locTypeDto.getLocType1(), staDesc.getCrnNo());//搜索货物 |
| | | int temp = locMast == null ? 0 : locMasts.size(); |
| | | if (num <= temp) { |
| | | num = temp; |
| | | crn_no = staDesc.getCrnNo(); |
| | | } |
| | | } |
| | | //for (StaDesc staDesc : staDescs) { |
| | | //单品 |
| | | List<LocMast> locMasts = locMastService.selectAreaEmpty(locTypeDto.getLocType1(), crn_no);//搜索货物 |
| | | |
| | | for (LocMast mast : locMasts) { |
| | | LocMast tmp = null; |
| | |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | tmp = mast; |
| | | //预留空库位 |
| | | if (tmp != null && locMastService.checkEmptyCount(mast, 10)) { |
| | | locMast = tmp; |
| | | return locMast; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | // } |
| | | } |
| | | return locMast; |
| | | } |