|
@@ -374,57 +374,59 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
.filter(StringUtils::isNotBlank)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- // 查询前期手续办理情况表中的数据,获取所有重点项目的前期手续信息
|
|
|
- List<SubInfoFixDetailPreNew> preNewList = Optional.ofNullable(
|
|
|
- subInfoMapper.selectSubPreNewBySubIds(subIdList)
|
|
|
- ).orElse(Collections.emptyList());
|
|
|
-
|
|
|
- //对手续信息按照id进行分组
|
|
|
- Map<String, List<SubInfoFixDetailPreNew>> preNewMap = preNewList.stream().collect(Collectors.groupingBy(SubInfoFixDetailPreNew::getSubId));
|
|
|
-
|
|
|
- // 遍历重点项目信息,找到对应的前期手续信息,然后拼接手续完成情况为字符串,拼接到对应的重点项目信息中
|
|
|
- list.forEach(e->{
|
|
|
- List<SubInfoFixDetailPreNew> subInfoFixDetailPreNewList = preNewMap.get(e.getId());
|
|
|
- StringBuilder sb = new StringBuilder();
|
|
|
- if (com.rtrh.common.util.CollectionUtil.isNotEmpty(subInfoFixDetailPreNewList)){
|
|
|
- //已经完成的手续
|
|
|
- StringBuilder end = new StringBuilder("已完成:");
|
|
|
- //正在办理的手续
|
|
|
- StringBuilder yellow = new StringBuilder("进行中:");
|
|
|
- //判断是否有已完成手续
|
|
|
- boolean endBoolean = subInfoFixDetailPreNewList.stream().anyMatch(f->"2".equals(f.getStatusConf()));
|
|
|
- //判断是否有正在进行手续
|
|
|
- boolean yellowBoolean = subInfoFixDetailPreNewList.stream().anyMatch(f->"1".equals(f.getStatusConf()));
|
|
|
- subInfoFixDetailPreNewList.forEach(f->{
|
|
|
- if ("1".equals(f.getStatusConf())){
|
|
|
- yellow.append(f.getTitle()).append(",");
|
|
|
- }else if ("2".equals(f.getStatusConf())){
|
|
|
- end.append(f.getTitle()).append(",");
|
|
|
+ if (list != null && list.size() > 0){
|
|
|
+ // 查询前期手续办理情况表中的数据,获取所有重点项目的前期手续信息
|
|
|
+ List<SubInfoFixDetailPreNew> preNewList = Optional.ofNullable(
|
|
|
+ subInfoMapper.selectSubPreNewBySubIds(subIdList)
|
|
|
+ ).orElse(Collections.emptyList());
|
|
|
+
|
|
|
+ //对手续信息按照id进行分组
|
|
|
+ Map<String, List<SubInfoFixDetailPreNew>> preNewMap = preNewList.stream().collect(Collectors.groupingBy(SubInfoFixDetailPreNew::getSubId));
|
|
|
+
|
|
|
+ // 遍历重点项目信息,找到对应的前期手续信息,然后拼接手续完成情况为字符串,拼接到对应的重点项目信息中
|
|
|
+ list.forEach(e->{
|
|
|
+ List<SubInfoFixDetailPreNew> subInfoFixDetailPreNewList = preNewMap.get(e.getId());
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ if (com.rtrh.common.util.CollectionUtil.isNotEmpty(subInfoFixDetailPreNewList)){
|
|
|
+ //已经完成的手续
|
|
|
+ StringBuilder end = new StringBuilder("已完成:");
|
|
|
+ //正在办理的手续
|
|
|
+ StringBuilder yellow = new StringBuilder("进行中:");
|
|
|
+ //判断是否有已完成手续
|
|
|
+ boolean endBoolean = subInfoFixDetailPreNewList.stream().anyMatch(f->"2".equals(f.getStatusConf()));
|
|
|
+ //判断是否有正在进行手续
|
|
|
+ boolean yellowBoolean = subInfoFixDetailPreNewList.stream().anyMatch(f->"1".equals(f.getStatusConf()));
|
|
|
+ subInfoFixDetailPreNewList.forEach(f->{
|
|
|
+ if ("1".equals(f.getStatusConf())){
|
|
|
+ yellow.append(f.getTitle()).append(",");
|
|
|
+ }else if ("2".equals(f.getStatusConf())){
|
|
|
+ end.append(f.getTitle()).append(",");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (endBoolean){
|
|
|
+ sb.append(end, 0, end.length()-1).append("。");
|
|
|
+ }
|
|
|
+ if (yellowBoolean){
|
|
|
+ sb.append(yellow, 0, yellow.length()-1).append("。");
|
|
|
+ }
|
|
|
+ if (!endBoolean && !yellowBoolean){
|
|
|
+ sb.append("暂无手续办理情况!");
|
|
|
}
|
|
|
- });
|
|
|
- if (endBoolean){
|
|
|
- sb.append(end, 0, end.length()-1).append("。");
|
|
|
- }
|
|
|
- if (yellowBoolean){
|
|
|
- sb.append(yellow, 0, yellow.length()-1).append("。");
|
|
|
}
|
|
|
- if (!endBoolean && !yellowBoolean){
|
|
|
- sb.append("暂无手续办理情况!");
|
|
|
+ e.setQqsxblqk(sb.toString());
|
|
|
+ if (StringUtils.isNotBlank(e.getSubjectId())){
|
|
|
+ e.setSubjectId(jsddNameMap.getOrDefault(e.getSubjectId(),""));
|
|
|
}
|
|
|
- }
|
|
|
- e.setQqsxblqk(sb.toString());
|
|
|
- if (StringUtils.isNotBlank(e.getSubjectId())){
|
|
|
- e.setSubjectId(jsddNameMap.getOrDefault(e.getSubjectId(),""));
|
|
|
- }
|
|
|
|
|
|
- //遍历subInfoTotalExcel将万元转换为亿元
|
|
|
- e.setAmtTotal(e.getAmtTotal().divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP));
|
|
|
+ //遍历subInfoTotalExcel将万元转换为亿元
|
|
|
+ e.setAmtTotal(e.getAmtTotal().divide(new BigDecimal("10000"), 2, RoundingMode.HALF_UP));
|
|
|
|
|
|
- //由于content字段过长,所以截取长度100字符,避免空指针异常
|
|
|
- // 检查内容是否为空,避免空指针异常,并截取前100个字符
|
|
|
- String content = e.getContent();
|
|
|
- e.setContent(content == null ? "" : StringUtils.substring(content, 0, 100));
|
|
|
- });
|
|
|
+ //由于content字段过长,所以截取长度100字符,避免空指针异常
|
|
|
+ // 检查内容是否为空,避免空指针异常,并截取前100个字符
|
|
|
+ String content = e.getContent();
|
|
|
+ e.setContent(content == null ? "" : StringUtils.substring(content, 0, 100));
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
PageInfo<SubFixListVo> pageInfo = new PageInfo<SubFixListVo>(list);
|
|
|
page.setList(list);
|