Browse Source

加mockMapper

develop
bobol 6 months ago
parent
commit
e2dca0ea5b
  1. 2
      lzbi-module/src/main/java/com/lzbi/asset/service/ChargeSystemService.java
  2. 10
      lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java
  3. 9
      lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiDataScreenMainMapper.java
  4. 172
      lzbi-module/src/main/java/com/lzbi/bi/mapper/ScreenMockDataMapper.java
  5. 90
      lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiDataScreenMainService.java
  6. 4
      lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeOrgSomedayMultiReportDataDTO.java
  7. 4
      lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeTypeChildrenOrgSomedayMultiReportDataDTO.java
  8. 4
      lzbi-module/src/main/java/com/lzbi/draft/domain/vo/ChildrenOrgSomedaySomeReportDataVO.java
  9. 8
      lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomeReportYearlyDataVO.java
  10. 4
      lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomedaySomeReportDataVO.java
  11. 10
      lzbi-module/src/main/resources/mapper/DcBusiDataScreenMainMapper.xml

2
lzbi-module/src/main/java/com/lzbi/asset/service/ChargeSystemService.java

@ -91,7 +91,7 @@ public class ChargeSystemService {
Integer code = jsonObject.getInteger("code");
if (1 == code) {
JSONArray jsonArray = jsonObject.getJSONArray("data");
if (null != jsonArray && !jsonArray.isEmpty()) {
if (!CollectionUtils.isEmpty(jsonArray)) {
log.info("收费系统换热站参数:{}", jsonArray.toJSONString());
this.createParamBill(jsonArray);
}

10
lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java

@ -25,8 +25,8 @@ import java.util.Optional;
/**
* 主数据大屏的页面接口
* @author : zhousq
* @date : 2023-11-16
* @author : lienbo
* @date : 2024-05-30
*/
@Slf4j
@Api(tags = "主数据大屏的页面接口")
@ -105,9 +105,9 @@ public class DcBusiDataScreenMainController extends BaseController{
* @param reportDataReq
* @return
*/
@PostMapping("/getSomeOrgSomeReportYearlyDataList")
public AjaxResult selectSomeOrgSomeReportYearlyDataList(@Validated @RequestBody ReportDataReq reportDataReq) {
return AjaxResult.success(dcBusiDataScreenMainService.selectSomeOrgSomeReportYearlyDataList(reportDataReq));
@PostMapping("/getSomeOrgSomeMultiReportYearlyDataMultiEchart")
public AjaxResult selectSomeOrgSomeMultiReportYearlyDataMultiEchart(@Validated @RequestBody ReportDataReq reportDataReq) {
return AjaxResult.success(dcBusiDataScreenMainService.selectSomeOrgSomeMultiReportYearlyDataMultiEchart(reportDataReq));
}
/**

9
lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiDataScreenMainMapper.java

@ -21,15 +21,6 @@ import java.util.List;
*/
@InterceptorIgnore(tenantLine = "true")
public interface DcBusiDataScreenMainMapper extends BaseMapper<DcBusiDataScreenDto> {
List<DcBusiDataScreenVo> selectCoalLostByDate(String qdate);
List<DcBusiDataScreenVo> selectDataPowerLost(String qdate);
List<DcBusiDataScreenVo> selectDataWaterLostFirst(String qdate);
List<DcBusiDataScreenVo> selectDataWaterLostSecond(String qdate);
List<DcBusiDataScreenVo> selectDataWaterLostStationAll(String qdate);
List<DcBusiDataScreenVo> selectPowerAll(List<String> reportNames, String assetCode);
List<DcBusiDataScreenVo> selectSquareRealDetail(String qdate);
List<DcBusiDataScreenVo> selectSquareSelfDetail(String qdate);
List<DcBusiDataScreenVo> selectSquareGroup(String qdate);
/**
* 查询某个组织某天的某个图表数据

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

@ -0,0 +1,172 @@
package com.lzbi.bi.mapper;
import com.alibaba.fastjson2.JSONObject;
import com.lzbi.common.constant.BizConstants;
import com.lzbi.draft.domain.dto.SomeOrgSomedayMultiReportDataDTO;
import com.lzbi.draft.domain.dto.SomeTypeChildrenOrgSomedayMultiReportDataDTO;
import com.lzbi.draft.domain.req.ReportDataReq;
import com.lzbi.draft.domain.vo.ChildrenOrgSomedaySomeReportDataVO;
import com.lzbi.draft.domain.vo.SomeOrgSomeReportYearlyDataVO;
import com.lzbi.draft.domain.vo.SomeOrgSomedaySomeReportDataVO;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Component
public class ScreenMockDataMapper {
private static JSONObject valueResultData;
private static JSONObject valuePlanData;
static {
valueResultData = new JSONObject();
valuePlanData = new JSONObject();
valueResultData.put("产热量", 977);
valueResultData.put("产汽量", 977);
valueResultData.put("产电量", 977);
valueResultData.put("供热面积", 164979);
valueResultData.put("联网面积", 164979);
valueResultData.put("煤单耗", 977);
valueResultData.put("水单耗", 977);
valueResultData.put("电单耗", 977);
valueResultData.put("煤总耗", 527447);
valueResultData.put("水总耗", 527447);
valueResultData.put("电总耗", 527447);
valueResultData.put("总开栓面积", 574813);
valueResultData.put("总产热量", 0.0083);
valueResultData.put("供热量", 30455);
valueResultData.put("消石灰", 527447);
valueResultData.put("氨水", 527447);
valueResultData.put("氧化镁", 527447);
valueResultData.put("石灰石粉", 527447);
valueResultData.put("纯碱", 527447);
valueResultData.put("液氧", 527447);
valueResultData.put("电石渣", 527447);
valueResultData.put("氧化钙", 527447);
valueResultData.put("安全供热", 2185);
valueResultData.put("热源", 2);
valueResultData.put("换热站", 80);
valueResultData.put("一级网", 116);
valueResultData.put("二级网", 246);
valueResultData.put("总面积", 726);
valueResultData.put("总用户", 5.6);
valuePlanData.put("产热量", 1349);
valuePlanData.put("产汽量", 1349);
valuePlanData.put("产电量", 1349);
valuePlanData.put("供热面积", null);
valuePlanData.put("联网面积", null);
valuePlanData.put("煤单耗", 1349);
valuePlanData.put("水单耗", 1349);
valuePlanData.put("电单耗", 1349);
valuePlanData.put("煤总耗", 2487914);
valuePlanData.put("水总耗", 2487914);
valuePlanData.put("电总耗", 527447);
valuePlanData.put("总开栓面积", null);
valuePlanData.put("总产热量", null);
valuePlanData.put("供热量", null);
valuePlanData.put("消石灰", 2487914);
valuePlanData.put("氨水", 2487914);
valuePlanData.put("氧化镁", 2487914);
valuePlanData.put("石灰石粉", 2487914);
valuePlanData.put("纯碱", 2487914);
valuePlanData.put("液氧", 2487914);
valuePlanData.put("电石渣", 2487914);
valuePlanData.put("氧化钙", 2487914);
valuePlanData.put("安全供热", null);
valuePlanData.put("热源", null);
valuePlanData.put("换热站", null);
valuePlanData.put("一级网", null);
valuePlanData.put("二级网", null);
valuePlanData.put("总面积", null);
valuePlanData.put("总用户", null);
}
public SomeOrgSomedaySomeReportDataVO selectSomeOrgSomedaySomeReportData(ReportDataReq reportDataReq) {
return new SomeOrgSomedaySomeReportDataVO(valueResultData.getBigDecimal(reportDataReq.getReportName()), valuePlanData.getBigDecimal(reportDataReq.getReportName()));
}
public List<ChildrenOrgSomedaySomeReportDataVO> selectChildrenOrgSomedaySomeReportDataList(ReportDataReq reportDataReq) {
ArrayList<ChildrenOrgSomedaySomeReportDataVO> result = new ArrayList<>();
if (BizConstants.DcDeptAttr.COMANY.equals(reportDataReq.getOrgType())) {
result.add(new ChildrenOrgSomedaySomeReportDataVO(103L, "沈阳浑南热力有限责任公司", BigDecimal.valueOf(69491), null));
result.add(new ChildrenOrgSomedaySomeReportDataVO(104L, "沈阳国新环保新能源有限责任公司", BigDecimal.valueOf(69491), null));
result.add(new ChildrenOrgSomedaySomeReportDataVO(107L, "沈阳国润低碳有限责任公司", BigDecimal.valueOf(69491), null));
result.add(new ChildrenOrgSomedaySomeReportDataVO(210L, "沈阳新北热电", BigDecimal.valueOf(69491), null));
result.add(new ChildrenOrgSomedaySomeReportDataVO(214L, "沈阳国惠低碳", BigDecimal.valueOf(69491), null));
} else {
result.add(new ChildrenOrgSomedaySomeReportDataVO(205L, "浑南1号源", BigDecimal.valueOf(10), BigDecimal.valueOf(11)));
result.add(new ChildrenOrgSomedaySomeReportDataVO(206L, "浑南2号源", BigDecimal.valueOf(20), BigDecimal.valueOf(21)));
result.add(new ChildrenOrgSomedaySomeReportDataVO(207L, "浑南3号源", BigDecimal.valueOf(30), BigDecimal.valueOf(31)));
}
return result;
}
public List<SomeOrgSomedayMultiReportDataDTO> selectSomeOrgSomedayMultiReportDataList(ReportDataReq reportDataReq) {
List<SomeOrgSomedayMultiReportDataDTO> result = new ArrayList<>();
result.add(new SomeOrgSomedayMultiReportDataDTO("消石灰", BigDecimal.valueOf(527447), BigDecimal.valueOf(2487914)));
result.add(new SomeOrgSomedayMultiReportDataDTO("氨水", BigDecimal.valueOf(527447), BigDecimal.valueOf(2487914)));
result.add(new SomeOrgSomedayMultiReportDataDTO("氧化镁", BigDecimal.valueOf(527447), BigDecimal.valueOf(2487914)));
result.add(new SomeOrgSomedayMultiReportDataDTO("石灰石粉", BigDecimal.valueOf(527447), BigDecimal.valueOf(2487914)));
result.add(new SomeOrgSomedayMultiReportDataDTO("纯碱", BigDecimal.valueOf(527447), BigDecimal.valueOf(2487914)));
result.add(new SomeOrgSomedayMultiReportDataDTO("液氧", BigDecimal.valueOf(527447), BigDecimal.valueOf(2487914)));
result.add(new SomeOrgSomedayMultiReportDataDTO("电石渣", BigDecimal.valueOf(527447), BigDecimal.valueOf(2487914)));
return result;
}
public List<SomeTypeChildrenOrgSomedayMultiReportDataDTO> selectSomeTypeChildrenOrgSomedayMultiReportDataList(ReportDataReq reportDataReq) {
List<SomeTypeChildrenOrgSomedayMultiReportDataDTO> result = new ArrayList<>();
if (BizConstants.DcDeptAttr.COMANY.equals(reportDataReq.getOrgType())) {
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(103L, "沈阳浑南热力有限责任公司", "煤总耗", BigDecimal.valueOf(20000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(104L, "沈阳国新环保新能源有限责任公司", "煤总耗", BigDecimal.valueOf(20000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(107L, "沈阳国润低碳有限责任公司", "煤总耗", BigDecimal.valueOf(20000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(210L, "沈阳新北热电", "煤总耗", BigDecimal.valueOf(20000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(214L, "沈阳国惠低碳", "煤总耗", BigDecimal.valueOf(20000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(103L, "沈阳浑南热力有限责任公司", "水总耗", BigDecimal.valueOf(30000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(104L, "沈阳国新环保新能源有限责任公司", "水总耗", BigDecimal.valueOf(30000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(107L, "沈阳国润低碳有限责任公司", "水总耗", BigDecimal.valueOf(30000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(210L, "沈阳新北热电", "水总耗", BigDecimal.valueOf(30000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(214L, "沈阳国惠低碳", "水总耗", BigDecimal.valueOf(30000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(103L, "沈阳浑南热力有限责任公司", "电总耗", BigDecimal.valueOf(25000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(104L, "沈阳国新环保新能源有限责任公司", "电总耗", BigDecimal.valueOf(25000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(107L, "沈阳国润低碳有限责任公司", "电总耗", BigDecimal.valueOf(25000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(210L, "沈阳新北热电", "电总耗", BigDecimal.valueOf(25000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(214L, "沈阳国惠低碳", "电总耗", BigDecimal.valueOf(25000), null));
} else {
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(103L, "浑南一号源", "煤总耗", BigDecimal.valueOf(2000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(104L, "浑南二号源", "煤总耗", BigDecimal.valueOf(2000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(107L, "浑南三号源", "煤总耗", BigDecimal.valueOf(2000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(103L, "浑南一号源", "水总耗", BigDecimal.valueOf(3000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(104L, "浑南二号源", "水总耗", BigDecimal.valueOf(3000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(107L, "浑南三号源", "水总耗", BigDecimal.valueOf(3000), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(103L, "浑南一号源", "电总耗", BigDecimal.valueOf(2500), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(104L, "浑南二号源", "电总耗", BigDecimal.valueOf(2500), null));
result.add(new SomeTypeChildrenOrgSomedayMultiReportDataDTO(107L, "浑南三号源", "电总耗", BigDecimal.valueOf(2500), null));
}
return result;
}
public List<SomeOrgSomeReportYearlyDataVO> selectSomeOrgSomeReportYearlyDataList(ReportDataReq reportDataReq) {
List<SomeOrgSomeReportYearlyDataVO> result = new ArrayList<>();
result.add(new SomeOrgSomeReportYearlyDataVO("供热面积", "2018", BigDecimal.valueOf(30)));
result.add(new SomeOrgSomeReportYearlyDataVO("供热面积", "2019", BigDecimal.valueOf(40)));
result.add(new SomeOrgSomeReportYearlyDataVO("供热面积", "2020", BigDecimal.valueOf(35)));
result.add(new SomeOrgSomeReportYearlyDataVO("供热面积", "2021", BigDecimal.valueOf(45)));
result.add(new SomeOrgSomeReportYearlyDataVO("供热面积", "2022", BigDecimal.valueOf(41)));
result.add(new SomeOrgSomeReportYearlyDataVO("供热面积", "2023", BigDecimal.valueOf(50)));
result.add(new SomeOrgSomeReportYearlyDataVO("供热面积", "2024", BigDecimal.valueOf(60)));
result.add(new SomeOrgSomeReportYearlyDataVO("联网面积", "2018", BigDecimal.valueOf(20)));
result.add(new SomeOrgSomeReportYearlyDataVO("联网面积", "2019", BigDecimal.valueOf(30)));
result.add(new SomeOrgSomeReportYearlyDataVO("联网面积", "2020", BigDecimal.valueOf(25)));
result.add(new SomeOrgSomeReportYearlyDataVO("联网面积", "2021", BigDecimal.valueOf(35)));
result.add(new SomeOrgSomeReportYearlyDataVO("联网面积", "2022", BigDecimal.valueOf(31)));
result.add(new SomeOrgSomeReportYearlyDataVO("联网面积", "2023", BigDecimal.valueOf(40)));
result.add(new SomeOrgSomeReportYearlyDataVO("联网面积", "2024", BigDecimal.valueOf(50)));
return result;
}
}

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

@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lzbi.bi.domain.DcBusiDataScreenDto;
import com.lzbi.bi.domain.SysDeptLocation;
import com.lzbi.bi.mapper.DcBusiDataScreenMainMapper;
import com.lzbi.bi.mapper.ScreenMockDataMapper;
import com.lzbi.common.constant.BizConstants;
import com.lzbi.common.core.domain.entity.SysDept;
import com.lzbi.common.enums.ReportNameEnum;
@ -44,6 +45,8 @@ public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMai
private ISysDeptService iSysDeptService;
@Resource
private DcBusiTargetDraftDaynewService dcBusiTargetDraftDaynewService;
@Resource
private ScreenMockDataMapper baseMapper;
/**
* 查询某个组织某天的某个图表数据
@ -70,7 +73,9 @@ public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMai
List<ChildrenOrgSomedaySomeReportDataVO> data = this.selectChildrenOrgSomedaySomeReportDataList(reportDataReq);
if (!CollectionUtils.isEmpty(data)) {
JSONArray head = new JSONArray();
head.add("name");
JSONArray body = new JSONArray();
body.add(reportDataReq.getReportName());
data.forEach(item -> {
head.add(item.getOrgName());
body.add(item.getValueResult());
@ -83,19 +88,21 @@ public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMai
public List<JSONArray> selectChildrenOrgSomedaySomeReportDataEchartStacking(ReportDataReq reportDataReq) {
List<JSONArray> result = new ArrayList<>();
List<ChildrenOrgSomedaySomeReportDataVO> data = this.selectChildrenOrgSomedaySomeReportDataList(reportDataReq);
if (!CollectionUtils.isEmpty(data)) {;
JSONArray head = new JSONArray();
head.add("product");
head.add("实际");
head.add("指标");
head.add("name");
result.add(head);
List<ChildrenOrgSomedaySomeReportDataVO> data = this.selectChildrenOrgSomedaySomeReportDataList(reportDataReq);
if (!CollectionUtils.isEmpty(data)) {
JSONArray body1 = new JSONArray();
body1.add("实际");
result.add(body1);
JSONArray body2 = new JSONArray();
body2.add("指标");
result.add(body2);
data.forEach(item -> {
JSONArray body = new JSONArray();
body.add(item.getOrgName());
body.add(item.getValueResult());
body.add(item.getValuePlan());
result.add(body);
head.add(item.getOrgName());
body1.add(item.getValueResult());
body2.add(item.getValuePlan());
});
}
return result;
@ -116,24 +123,64 @@ public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMai
public List<JSONArray> selectChildrenOrgSomedayMultiReportDataBar(ReportDataReq reportDataReq) {
List<JSONArray> result = new ArrayList<>();
List<SomeTypeChildrenOrgSomedayMultiReportDataDTO> data = this.selectSomeTypeChildrenOrgSomedayMultiReportDataDTOList(reportDataReq);
if (!CollectionUtils.isEmpty(data)) {
List<String> reportNames = reportDataReq.getReportNames();
JSONArray head = new JSONArray();
head.add("product");
head.addAll(reportNames);
head.add("name");
result.add(head);
this.buildChildrenOrgReportDataReq(reportDataReq);
List<SomeTypeChildrenOrgSomedayMultiReportDataDTO> data = this.selectSomeTypeChildrenOrgSomedayMultiReportDataDTOList(reportDataReq);
if (!CollectionUtils.isEmpty(data)) {
reportNames.forEach(reportName -> {
JSONArray body = new JSONArray();
body.add(reportName);
result.add(body);
});
Map<Long, List<SomeTypeChildrenOrgSomedayMultiReportDataDTO>> orgIdGroupMap = data.stream().collect(groupingBy(SomeTypeChildrenOrgSomedayMultiReportDataDTO::getOrgId));
orgIdGroupMap.forEach((orgId, orgDataList) -> {
JSONArray body = new JSONArray();
body.add(orgDataList.get(0).getOrgName());
Map<String, BigDecimal> reportValueMap = orgDataList.stream().collect(Collectors.toMap(SomeTypeChildrenOrgSomedayMultiReportDataDTO::getReportName, SomeTypeChildrenOrgSomedayMultiReportDataDTO::getValueResult, (v1, v2) -> v2));
reportNames.forEach(reportName -> {
body.add(reportValueMap.get(reportName));
Map<String, BigDecimal> reportNameValueMap = orgDataList.stream().collect(Collectors.toMap(SomeTypeChildrenOrgSomedayMultiReportDataDTO::getReportName, SomeTypeChildrenOrgSomedayMultiReportDataDTO::getValueResult, (v1, v2) -> v2));
head.add(orgDataList.get(0).getOrgName());
for (int i = 1; i < result.size(); i++) {
int finalI = i;
reportNameValueMap.forEach((reportName, valueResult) -> {
if (result.get(finalI).get(0).equals(reportName)) {
result.get(finalI).add(valueResult);
}
});
}
});
}
return result;
}
public List<JSONArray> selectSomeOrgSomeMultiReportYearlyDataMultiEchart(ReportDataReq reportDataReq) {
List<JSONArray> result = new ArrayList<>();
List<String> reportNames = reportDataReq.getReportNames();
List<SomeOrgSomeReportYearlyDataVO> data = this.selectSomeOrgSomeReportYearlyDataList(reportDataReq);
if (!CollectionUtils.isEmpty(data)) {
JSONArray head = new JSONArray();
head.add("name");
result.add(head);
reportNames.forEach(reportName -> {
JSONArray body = new JSONArray();
body.add(reportName);
result.add(body);
});
List<String> dataYearList = data.stream().map(SomeOrgSomeReportYearlyDataVO::getDateYear).collect(Collectors.toSet()).stream().sorted().collect(Collectors.toList());
Map<String, List<SomeOrgSomeReportYearlyDataVO>> dataYearGroupMap = data.stream().collect(groupingBy(SomeOrgSomeReportYearlyDataVO::getDateYear));
dataYearList.forEach(dateYear -> {
if (dataYearGroupMap.containsKey(dateYear)) {
List<SomeOrgSomeReportYearlyDataVO> dateYearDataList = dataYearGroupMap.get(dateYear);
Map<String, BigDecimal> reportNameMaxValueResultMap = dateYearDataList.stream().collect(Collectors.toMap(SomeOrgSomeReportYearlyDataVO::getReportName, SomeOrgSomeReportYearlyDataVO::getMaxValueResult, (v1, v2) -> v2));
head.add(dateYear);
for (int i = 1; i < result.size(); i++) {
int finalI = i;
reportNameMaxValueResultMap.forEach((reportName, maxValueResult) -> {
if (result.get(finalI).get(0).equals(reportName)) {
result.get(finalI).add(maxValueResult);
}
});
}
}
});
}
return result;
}
@ -154,6 +201,7 @@ public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMai
* @return
*/
private List<SomeTypeChildrenOrgSomedayMultiReportDataDTO> selectSomeTypeChildrenOrgSomedayMultiReportDataDTOList(ReportDataReq reportDataReq) {
this.buildChildrenOrgReportDataReq(reportDataReq);
return baseMapper.selectSomeTypeChildrenOrgSomedayMultiReportDataList(reportDataReq);
}
@ -162,7 +210,7 @@ public class DcBusiDataScreenMainService extends ServiceImpl<DcBusiDataScreenMai
* @param reportDataReq
* @return
*/
public List<SomeOrgSomeReportYearlyDataVO> selectSomeOrgSomeReportYearlyDataList(ReportDataReq reportDataReq) {
private List<SomeOrgSomeReportYearlyDataVO> selectSomeOrgSomeReportYearlyDataList(ReportDataReq reportDataReq) {
this.buildReportDataReq(reportDataReq);
return baseMapper.selectSomeOrgSomeReportYearlyDataList(reportDataReq);
}

4
lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeOrgSomedayMultiReportDataDTO.java

@ -1,12 +1,16 @@
package com.lzbi.draft.domain.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 某组织某天多图表数据
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SomeOrgSomedayMultiReportDataDTO {
/**

4
lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeTypeChildrenOrgSomedayMultiReportDataDTO.java

@ -1,12 +1,16 @@
package com.lzbi.draft.domain.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 某类型的下级组织某天的多图表数据
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public class SomeTypeChildrenOrgSomedayMultiReportDataDTO {

4
lzbi-module/src/main/java/com/lzbi/draft/domain/vo/ChildrenOrgSomedaySomeReportDataVO.java

@ -1,12 +1,16 @@
package com.lzbi.draft.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 下级组织某日某图表数据
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ChildrenOrgSomedaySomeReportDataVO {

8
lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomeReportYearlyDataVO.java

@ -1,15 +1,23 @@
package com.lzbi.draft.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 某组织某报告某年度数据
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public class SomeOrgSomeReportYearlyDataVO {
/**
* 图表名称
*/
private String reportName;
/**
*
*/

4
lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomedaySomeReportDataVO.java

@ -1,12 +1,16 @@
package com.lzbi.draft.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 某个组织某天某个图表数据
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public class SomeOrgSomedaySomeReportDataVO {

10
lzbi-module/src/main/resources/mapper/DcBusiDataScreenMainMapper.xml

@ -422,18 +422,26 @@
parameterType="com.lzbi.draft.domain.req.ReportDataReq"
resultType="com.lzbi.draft.domain.vo.SomeOrgSomeReportYearlyDataVO">
SELECT
t3.report_name,
t1.date_year,
max( t1.value_result ) as "maxValueResult"
FROM
dc_busi_target_draft_daynew t1
INNER JOIN dc_base_asset_target t2 ON t1.target_code = t2.target_code
INNER JOIN dc_busi_report_target_config t3 ON t2.target_model_code = t3.target_model_code
AND t3.report_name = #{reportName}
AND t3.report_name IN
<foreach collection="reportNames" item="reportName" open="(" separator="," close=")">
#{reportName}
</foreach>
INNER JOIN dc_base_asset_info t4 ON t2.asset_code = t4.asset_code
AND t4.org_id = #{orgId}
AND t4.asset_level = #{assetLevel}
AND t4.asset_type = #{assetType}
GROUP BY
t3.report_name,
t1.date_year
ORDER BY
t3.report_name,
t1.date_year
</select>
</mapper>
Loading…
Cancel
Save