|  |  | 
 |  |  |         // 如果没有相近物料,则按规则轮询货架 | 
 |  |  |         if (null == locMast) { | 
 |  |  |             Shelves shelves = new Shelves(rowCount, crn_qty); | 
 |  |  |             if (whsType == 1) { | 
 |  |  |                 for (int i = 0; i < shelves.group; i ++) { | 
 |  |  |                     curRow = shelves.start(curRow); | 
 |  |  |                     if (curRow < 0) { | 
 |  |  |                         throw new CoolException("检索库位失败,请联系管理员"); | 
 |  |  |                     } | 
 |  |  |                     Integer crnNo1 = shelves.get(curRow); | 
 |  |  |                     if (basCrnpService.checkSiteError(crnNo1, true)) { | 
 |  |  |                         crnNo = crnNo1; | 
 |  |  |                         break; | 
 |  |  |                     } | 
 |  |  |             for (int i = 0; i < shelves.group; i ++) { | 
 |  |  |                 curRow = shelves.start(curRow); | 
 |  |  |                 if (curRow < 0) { | 
 |  |  |                     throw new CoolException("检索库位失败,请联系管理员"); | 
 |  |  |                 } | 
 |  |  |                 Integer crnNo1 = shelves.get(curRow); | 
 |  |  |                 if (basCrnpService.checkSiteError(crnNo1, true)) { | 
 |  |  |                     crnNo = crnNo1; | 
 |  |  |                     break; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  | 
 |  |  |      * 根据入库站获取库位排号分配 | 
 |  |  |      */ | 
 |  |  |     private Integer getWhsType(Integer sourceStaNo, int times) { | 
 |  |  |         if (true) { | 
 |  |  |             return 4; | 
 |  |  |         } | 
 |  |  |         if (times >= 16) { | 
 |  |  |             return 4; | 
 |  |  |         } | 
 |  |  | 
 |  |  |             case 202: | 
 |  |  |                 return 2; | 
 |  |  |             case 206: | 
 |  |  |             case 211: | 
 |  |  |             case 215: | 
 |  |  |             case 219: | 
 |  |  |             case 223: | 
 |  |  |             case 226: | 
 |  |  | //            case 211: | 
 |  |  | //            case 215: | 
 |  |  | //            case 219: | 
 |  |  | //            case 223: | 
 |  |  |             case 227: | 
 |  |  |                 return 3; | 
 |  |  |             case 305: | 
 |  |  |             case 303: | 
 |  |  |             case 301: | 
 |  |  |                 return 4; | 
 |  |  |             default: | 
 |  |  |                 throw new CoolException("根据入库站获取库位排号分配失败,入库站:" + sourceStaNo); | 
 |  |  |         } |