Browse Source

1、指标日计划加遮罩

2、指标日计划将公司去掉
develop
bobol 6 months ago
parent
commit
b17ca3f8b2
  1. 2
      lzbi-admin/src/main/resources/application.yml
  2. 4
      lzbi-module/src/main/java/com/lzbi/bi/domain/dto/MultiOrgSomeReportEverydayData.java
  3. 7
      lzbi-module/src/main/java/com/lzbi/bi/mapper/ScreenMockDataMapper.java
  4. 20
      lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiDataScreenMainService.java

2
lzbi-admin/src/main/resources/application.yml

@ -60,7 +60,7 @@ spring:
# 国际化资源文件路径 # 国际化资源文件路径
basename: i18n/messages basename: i18n/messages
profiles: profiles:
active: dev active: test
# 文件上传 # 文件上传
servlet: servlet:
multipart: multipart:

4
lzbi-module/src/main/java/com/lzbi/bi/domain/dto/MultiOrgSomeReportEverydayData.java

@ -1,12 +1,16 @@
package com.lzbi.bi.domain.dto; package com.lzbi.bi.domain.dto;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
* 多组织某个图标每一天的数据 * 多组织某个图标每一天的数据
*/ */
@AllArgsConstructor
@NoArgsConstructor
@Data @Data
public class MultiOrgSomeReportEverydayData { public class MultiOrgSomeReportEverydayData {

7
lzbi-module/src/main/java/com/lzbi/bi/mapper/ScreenMockDataMapper.java

@ -1,6 +1,7 @@
package com.lzbi.bi.mapper; package com.lzbi.bi.mapper;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.lzbi.bi.domain.dto.MultiOrgSomeReportEverydayData;
import com.lzbi.bi.domain.req.ParamSummarizingDataReq; import com.lzbi.bi.domain.req.ParamSummarizingDataReq;
import com.lzbi.bi.domain.vo.MapOrgVO; import com.lzbi.bi.domain.vo.MapOrgVO;
import com.lzbi.common.constant.BizConstants; import com.lzbi.common.constant.BizConstants;
@ -189,4 +190,10 @@ public class ScreenMockDataMapper {
public int selectSomeOrgHeatExchangeStationCount(Long orgId) { public int selectSomeOrgHeatExchangeStationCount(Long orgId) {
return 50; return 50;
} }
public List<MultiOrgSomeReportEverydayData> selectChildOrgSomeReportEverydayDataList(ReportDataReq reportDataReq) {
List<MultiOrgSomeReportEverydayData> result = new ArrayList<>();
result.add(new MultiOrgSomeReportEverydayData(103L, "浑南一号源", "2023-11-01", BigDecimal.valueOf(2500)));
return result;
}
} }

20
lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiDataScreenMainService.java

@ -25,6 +25,7 @@ import com.lzbi.common.utils.bean.BeanUtils;
import com.lzbi.draft.domain.vo.*; import com.lzbi.draft.domain.vo.*;
import com.lzbi.draft.service.DcBusiTargetDraftDaynewService; import com.lzbi.draft.service.DcBusiTargetDraftDaynewService;
import com.lzbi.system.service.ISysDeptService; import com.lzbi.system.service.ISysDeptService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
@ -45,6 +46,7 @@ import static java.util.stream.Collectors.groupingBy;
* @author : zhousq * @author : zhousq
* @date : 2023-11-16 * @date : 2023-11-16
*/ */
@Slf4j
@Service @Service
public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMainMapper, DcBusiDataScreenDto> implements IService<DcBusiDataScreenDto> { public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMainMapper, DcBusiDataScreenDto> implements IService<DcBusiDataScreenDto> {
@ -56,6 +58,7 @@ public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMai
private DcBusiTargetDraftDaynewService dcBusiTargetDraftDaynewService; private DcBusiTargetDraftDaynewService dcBusiTargetDraftDaynewService;
// @Resource // @Resource
// private ScreenMockDataMapper baseMapper; // private ScreenMockDataMapper baseMapper;
private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
/** /**
* 供暖起始日期--月日 * 供暖起始日期--月日
@ -310,21 +313,22 @@ public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMai
List<SomeReportDataRankingVO> result = new ArrayList<>(); List<SomeReportDataRankingVO> result = new ArrayList<>();
this.buildChildrenOrgReportDataReq(reportDataReq); this.buildChildrenOrgReportDataReq(reportDataReq);
this.buildHeatingDate(reportDataReq); this.buildHeatingDate(reportDataReq);
List<MultiOrgSomeReportEverydayData> multiOrgSomeReportEverydayDataList = baseMapper.selectChildOrgSomeReportEverydayDataList(reportDataReq); List<MultiOrgSomeReportEverydayData> data = baseMapper.selectChildOrgSomeReportEverydayDataList(reportDataReq);
if (!CollectionUtils.isEmpty(multiOrgSomeReportEverydayDataList)) { log.info("排名数据:{}", JSONArray.toJSONString(data));
if (!CollectionUtils.isEmpty(data)) {
// 排序后的日期列表 // 排序后的日期列表
List<String> dateSoredList = multiOrgSomeReportEverydayDataList.stream().map(MultiOrgSomeReportEverydayData::getDate).collect(Collectors.toSet()).stream().sorted().collect(Collectors.toList()); List<String> dateSoredList = data.stream().map(MultiOrgSomeReportEverydayData::getDate).collect(Collectors.toSet()).stream().sorted().collect(Collectors.toList());
// 排序后的组织id列表 // 排序后的组织id列表
List<Long> orgIdSoredList = multiOrgSomeReportEverydayDataList.stream().map(MultiOrgSomeReportEverydayData::getOrgId).collect(Collectors.toSet()).stream().sorted().collect(Collectors.toList()); List<Long> orgIdSoredList = data.stream().map(MultiOrgSomeReportEverydayData::getOrgId).collect(Collectors.toSet()).stream().sorted().collect(Collectors.toList());
// 组织map // 组织map
Map<Long, String> orgMap = multiOrgSomeReportEverydayDataList.stream().collect(Collectors.toMap(MultiOrgSomeReportEverydayData::getOrgId, MultiOrgSomeReportEverydayData::getOrgName, (v1, v2) -> v2)); Map<Long, String> orgMap = data.stream().collect(Collectors.toMap(MultiOrgSomeReportEverydayData::getOrgId, MultiOrgSomeReportEverydayData::getOrgName, (v1, v2) -> v2));
// 按日期分组的map // 按日期分组的map
Map<String, List<MultiOrgSomeReportEverydayData>> groupDateMap = multiOrgSomeReportEverydayDataList.stream().collect(groupingBy(MultiOrgSomeReportEverydayData::getDate)); Map<String, List<MultiOrgSomeReportEverydayData>> groupDateMap = data.stream().collect(groupingBy(MultiOrgSomeReportEverydayData::getDate));
dateSoredList.forEach(date -> { dateSoredList.forEach(date -> {
SomeReportDataRankingVO someReportDataRankingVO = new SomeReportDataRankingVO(); SomeReportDataRankingVO someReportDataRankingVO = new SomeReportDataRankingVO();
someReportDataRankingVO.setCdate(date); someReportDataRankingVO.setCdate(date);
List<MultiOrgSomeReportEverydayData> data = groupDateMap.get(date); List<MultiOrgSomeReportEverydayData> dateData = groupDateMap.get(date);
Map<Long, MultiOrgSomeReportEverydayData> orgIdMap = data.stream().collect(Collectors.toMap(MultiOrgSomeReportEverydayData::getOrgId, item -> item, (v1, v2) -> v1)); Map<Long, MultiOrgSomeReportEverydayData> orgIdMap = dateData.stream().collect(Collectors.toMap(MultiOrgSomeReportEverydayData::getOrgId, item -> item, (v1, v2) -> v1));
List<String> orgNameList = new ArrayList<>(); List<String> orgNameList = new ArrayList<>();
List<BigDecimal> valueList = new ArrayList<>(); List<BigDecimal> valueList = new ArrayList<>();
orgIdSoredList.forEach(orgId -> { orgIdSoredList.forEach(orgId -> {

Loading…
Cancel
Save