package com.dky.generate; import cn.hutool.json.JSONObject; import com.dky.calculate.OverCollHeatAll; import com.dky.entity.Construction; import com.dky.entity.CoolHeat; import com.dky.modelI.DntdModelI; import com.dky.utils.entity.SysCustomerReceiptPower; public class BuildHeatingSence implements DntdModelI { @Override public JSONObject createReport(JSONObject jsonObject) { //1.运行容量/合同容量折合成kW(x0.9)x85% Double A = 0.0; JSONObject jsonObject1 = (JSONObject) jsonObject.get("receiptPower"); SysCustomerReceiptPower receiptPower = jsonObject1.toBean(SysCustomerReceiptPower.class); if (receiptPower.getContractCapacity()!=null){ A = receiptPower.getContractCapacity()*0.9*0.85; }else if (receiptPower.getRunCapacity()!=null){ A = receiptPower.getRunCapacity()*0.9*0.85; }else { System.out.println("未获取到合同容量或运行容量"); } //2.冗余容量B=A-上年最大需量 Double B = A-receiptPower.getLastYearNeed(); //3.投入供热设备总功率C JSONObject jsonReport = new JSONObject(); CoolHeat coolHeat = jsonObject.toBean(CoolHeat.class); Construction construction = jsonObject.toBean(Construction.class); OverCollHeatAll overCollHeatAll = new OverCollHeatAll(); overCollHeatAll.investment(construction.getFloor(), coolHeat.getHeatArea(), coolHeat.getDevPrice()); // overCollHeatAll.getRunCost(coolHeat.getOriginalDevice().getQuantity(), coolHeat.getNeedPower(), coolHeat.g) return null; } }