bobol
6 months ago
11 changed files with 282 additions and 39 deletions
@ -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; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue