|
@@ -739,13 +739,18 @@ public class WmScorePackaeServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
|
|
|
Map<Integer, List<WmPackageTaskTypeQty>> collect = packageTaskTypeQtyList.stream().collect(Collectors.groupingBy(WmPackageTaskTypeQty::getPackageId));
|
|
|
|
|
|
+ Map<String, WmTaskType> collect4 = wmTaskTypeMapper.selectList(Wrappers.<WmTaskType>lambdaQuery().lt(WmTaskType::getId, "100")).stream().collect(Collectors.toMap(WmTaskType::getTaskTypeName, Function.identity()));
|
|
|
+
|
|
|
packageList.forEach(pkg -> {
|
|
|
List<WmPackageTaskTypeQty> relations = collect.get(Integer.parseInt(pkg.getId()));
|
|
|
if (CollUtil.isNotEmpty(relations)) {
|
|
|
- List<Map<String, Object>> collect1 = relations.stream().map( rel -> {
|
|
|
+ List<Map<String, Object>> collect1 = relations.stream().map(rel -> {
|
|
|
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(rel);
|
|
|
List<WmPackageTaskTypeQty> qtyList = collect3.get(rel.getTaskTypeId());
|
|
|
stringObjectMap.put("used", CollUtil.isEmpty(qtyList) ? 0 : qtyList.stream().mapToInt(WmPackageTaskTypeQty::getQty).sum());
|
|
|
+ WmTaskType taskType = collect4.get(rel.getTaskTypeName());
|
|
|
+ stringObjectMap.put("orgTaskTypeId", taskType == null ? "" : taskType.getId());
|
|
|
+ stringObjectMap.put("parent_id", taskType == null ? "" : taskType.getParentId());
|
|
|
return stringObjectMap;
|
|
|
}).collect(Collectors.toList());
|
|
|
pkg.setPkgTaskTypeQtyList(CollUtil.isNotEmpty(relations) ? collect1 : Collections.emptyList());
|
|
@@ -754,9 +759,6 @@ public class WmScorePackaeServiceImpl extends ServiceImpl<WmScorePackageMapper,
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
log.info("查询关联积分包值+拼装参数总耗时:{}ms", System.currentTimeMillis() - start);
|
|
|
|
|
|
return R.ok(packageList);
|