|  |  | 
 |  |  |         if (!locService.update(new LambdaUpdateWrapper<Loc>().set(Loc::getUseStatus, LocStsType.LOC_STS_TYPE_F.type).in(Loc::getCode, locCodes))) { | 
 |  |  |             throw new CoolException("库位状态修改失败!!"); | 
 |  |  |         } | 
 |  |  |         if (!this.update(new LambdaUpdateWrapper<Task>().set(Task::getTaskStatus, TaskStsType.UPDATED_IN.id))) { | 
 |  |  |         if (!this.update(new LambdaUpdateWrapper<Task>().in(Task::getId, list).set(Task::getTaskStatus, TaskStsType.UPDATED_IN.id))) { | 
 |  |  |             throw new CoolException("任务状态修改失败!!"); | 
 |  |  |         } | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |             Double[] doubles = locItems.stream().map(LocItem::getAnfme).toArray(Double[]::new); | 
 |  |  |             List<Double> result = OptimalAlgorithmUtil.findBestCombination(doubles, waveItem.getAnfme()); | 
 |  |  |              | 
 |  |  |  | 
 |  |  |             String locs = JSONArray.toJSONString(new ArrayList<>()); | 
 |  |  |  | 
 |  |  |             if (!locItems.isEmpty()) { | 
 |  |  |                 List<String> codes = locItems.stream().map(LocItem::getLocCode).collect(Collectors.toList()); | 
 |  |  |                 locs = JSONArray.toJSONString(codes); |