diff --git a/lzbi-module/src/main/java/com/lzbi/asset/service/ChargeSystemService.java b/lzbi-module/src/main/java/com/lzbi/asset/service/ChargeSystemService.java index c716888..867f9b2 100644 --- a/lzbi-module/src/main/java/com/lzbi/asset/service/ChargeSystemService.java +++ b/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); } diff --git a/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java b/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java index c5f28c9..c8530b4 100644 --- a/lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java +++ b/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)); } /** diff --git a/lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiDataScreenMainMapper.java b/lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiDataScreenMainMapper.java index 2e5f1ab..e507b20 100644 --- a/lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiDataScreenMainMapper.java +++ b/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 { - List selectCoalLostByDate(String qdate); - List selectDataPowerLost(String qdate); - List selectDataWaterLostFirst(String qdate); - List selectDataWaterLostSecond(String qdate); - List selectDataWaterLostStationAll(String qdate); - List selectPowerAll(List reportNames, String assetCode); - List selectSquareRealDetail(String qdate); - List selectSquareSelfDetail(String qdate); - List selectSquareGroup(String qdate); /** * 查询某个组织某天的某个图表数据 diff --git a/lzbi-module/src/main/java/com/lzbi/bi/mapper/ScreenMockDataMapper.java b/lzbi-module/src/main/java/com/lzbi/bi/mapper/ScreenMockDataMapper.java new file mode 100644 index 0000000..31070a9 --- /dev/null +++ b/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 selectChildrenOrgSomedaySomeReportDataList(ReportDataReq reportDataReq) { + ArrayList 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 selectSomeOrgSomedayMultiReportDataList(ReportDataReq reportDataReq) { + List 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 selectSomeTypeChildrenOrgSomedayMultiReportDataList(ReportDataReq reportDataReq) { + List 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 selectSomeOrgSomeReportYearlyDataList(ReportDataReq reportDataReq) { + List 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; + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiDataScreenMainService.java b/lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiDataScreenMainService.java index 3efb3ff..4f84027 100644 --- a/lzbi-module/src/main/java/com/lzbi/bi/service/DcBusiDataScreenMainService.java +++ b/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 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 selectChildrenOrgSomedaySomeReportDataEchartStacking(ReportDataReq reportDataReq) { List result = new ArrayList<>(); - JSONArray head = new JSONArray(); - head.add("product"); - head.add("实际"); - head.add("指标"); - result.add(head); List data = this.selectChildrenOrgSomedaySomeReportDataList(reportDataReq); - if (!CollectionUtils.isEmpty(data)) { + if (!CollectionUtils.isEmpty(data)) {; + JSONArray head = new JSONArray(); + head.add("name"); + result.add(head); + 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 selectChildrenOrgSomedayMultiReportDataBar(ReportDataReq reportDataReq) { List result = new ArrayList<>(); - List reportNames = reportDataReq.getReportNames(); - JSONArray head = new JSONArray(); - head.add("product"); - head.addAll(reportNames); - result.add(head); - this.buildChildrenOrgReportDataReq(reportDataReq); List data = this.selectSomeTypeChildrenOrgSomedayMultiReportDataDTOList(reportDataReq); if (!CollectionUtils.isEmpty(data)) { + List reportNames = reportDataReq.getReportNames(); + JSONArray head = new JSONArray(); + head.add("name"); + result.add(head); + reportNames.forEach(reportName -> { + JSONArray body = new JSONArray(); + body.add(reportName); + result.add(body); + }); Map> orgIdGroupMap = data.stream().collect(groupingBy(SomeTypeChildrenOrgSomedayMultiReportDataDTO::getOrgId)); orgIdGroupMap.forEach((orgId, orgDataList) -> { + Map 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 selectSomeOrgSomeMultiReportYearlyDataMultiEchart(ReportDataReq reportDataReq) { + List result = new ArrayList<>(); + List reportNames = reportDataReq.getReportNames(); + List 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(orgDataList.get(0).getOrgName()); - Map reportValueMap = orgDataList.stream().collect(Collectors.toMap(SomeTypeChildrenOrgSomedayMultiReportDataDTO::getReportName, SomeTypeChildrenOrgSomedayMultiReportDataDTO::getValueResult, (v1, v2) -> v2)); - reportNames.forEach(reportName -> { - body.add(reportValueMap.get(reportName)); - }); + body.add(reportName); result.add(body); }); + List dataYearList = data.stream().map(SomeOrgSomeReportYearlyDataVO::getDateYear).collect(Collectors.toSet()).stream().sorted().collect(Collectors.toList()); + Map> dataYearGroupMap = data.stream().collect(groupingBy(SomeOrgSomeReportYearlyDataVO::getDateYear)); + dataYearList.forEach(dateYear -> { + if (dataYearGroupMap.containsKey(dateYear)) { + List dateYearDataList = dataYearGroupMap.get(dateYear); + Map 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 selectSomeTypeChildrenOrgSomedayMultiReportDataDTOList(ReportDataReq reportDataReq) { + this.buildChildrenOrgReportDataReq(reportDataReq); return baseMapper.selectSomeTypeChildrenOrgSomedayMultiReportDataList(reportDataReq); } @@ -162,7 +210,7 @@ public class DcBusiDataScreenMainService extends ServiceImpl selectSomeOrgSomeReportYearlyDataList(ReportDataReq reportDataReq) { + private List selectSomeOrgSomeReportYearlyDataList(ReportDataReq reportDataReq) { this.buildReportDataReq(reportDataReq); return baseMapper.selectSomeOrgSomeReportYearlyDataList(reportDataReq); } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeOrgSomedayMultiReportDataDTO.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeOrgSomedayMultiReportDataDTO.java index 723a628..6d55bbf 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeOrgSomedayMultiReportDataDTO.java +++ b/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 { /** diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeTypeChildrenOrgSomedayMultiReportDataDTO.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeTypeChildrenOrgSomedayMultiReportDataDTO.java index b8a23ec..61cd7b2 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/dto/SomeTypeChildrenOrgSomedayMultiReportDataDTO.java +++ b/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 { diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/ChildrenOrgSomedaySomeReportDataVO.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/ChildrenOrgSomedaySomeReportDataVO.java index b446703..558909e 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/ChildrenOrgSomedaySomeReportDataVO.java +++ b/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 { diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomeReportYearlyDataVO.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomeReportYearlyDataVO.java index 795d49f..e2bf51e 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomeReportYearlyDataVO.java +++ b/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; /** * 年 */ diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomedaySomeReportDataVO.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomedaySomeReportDataVO.java index 814ccbb..dae8725 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/vo/SomeOrgSomedaySomeReportDataVO.java +++ b/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 { diff --git a/lzbi-module/src/main/resources/mapper/DcBusiDataScreenMainMapper.xml b/lzbi-module/src/main/resources/mapper/DcBusiDataScreenMainMapper.xml index 9d83842..6f10858 100644 --- a/lzbi-module/src/main/resources/mapper/DcBusiDataScreenMainMapper.xml +++ b/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 + + #{reportName} + 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 \ No newline at end of file