Compare commits

..

No commits in common. 'db95bc948e8b84f5d576a8ce5a414d52a1260e55' and '4c98df7616e6e21c199e021b0500738122b18cd7' have entirely different histories.

  1. 2
      dntd-tool/src/main/java/com/dky/stirtpar/StirparModelCalculate.java
  2. 334
      dntd-tool/src/main/java/com/dky/test/TestMain.java
  3. 4
      dntd-tool/src/main/java/com/dky/tool/ModelTool.java

@ -3,7 +3,9 @@ package com.dky.stirtpar;
import cn.hutool.json.JSONArray; import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import com.dky.modelI.DntdModelI;
import com.dky.utils.CalculateUtils; import com.dky.utils.CalculateUtils;
import com.dky.utils.entity.SysDeviceHeatScene;
import com.dky.utils.entity.SysModelParam; import com.dky.utils.entity.SysModelParam;
import java.io.BufferedReader; import java.io.BufferedReader;

@ -22,173 +22,173 @@ import java.util.Map;
public class TestMain { public class TestMain {
public static void main(String[] args) { public static void main(String[] args) {
//
// //模拟数据库查询,构造出加密解密方式 //模拟数据库查询,构造出加密解密方式
// List<Map> mafwefaefwaefawfapList = new ArrayList<>(); List<Map> mafwefaefwaefawfapList = new ArrayList<>();
// HashMap<String, Object> fawdfweawerwgggawfg = new HashMap<>(); HashMap<String, Object> fawdfweawerwgggawfg = new HashMap<>();
// fawdfweawerwgggawfg.put("CREATE_TIME","2024-02-20 14:46:34"); fawdfweawerwgggawfg.put("CREATE_TIME","2024-02-20 14:46:34");
// mafwefaefwaefawfapList.add(fawdfweawerwgggawfg); mafwefaefwaefawfapList.add(fawdfweawerwgggawfg);
// mafwefaefwaefawfapList.add(fawdfweawerwgggawfg); mafwefaefwaefawfapList.add(fawdfweawerwgggawfg);
//
// JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
// param.put("type", "0201"); param.put("type", "0201");
// param.put("userIndustry", "3240"); param.put("userIndustry", "3240");
// param.put("peopleNum", 88); param.put("peopleNum", 88);
// param.put("distInfo", new JSONObject() param.put("distInfo", new JSONObject()
// .put("runCapacity", 6000.0) .put("runCapacity", 6000.0)
// .put("lastYearNeed", 5382.0)); .put("lastYearNeed", 5382.0));
// /*param.put("heatUseNeedInfo", new JSONObject() /*param.put("heatUseNeedInfo", new JSONObject()
// .put("workArea", 11800) .put("workArea", 11800)
// .put("needTemp", 878.987) .put("needTemp", 878.987)
// .put("yearOutPut", 1000000.0));*/ .put("yearOutPut", 1000000.0));*/
// /*param.put("heatUseNeedInfo", new JSONObject() /*param.put("heatUseNeedInfo", new JSONObject()
// .put("heatingNeedPower", 23) .put("heatingNeedPower", 23)
// .put("thermometerValueOut", 100.85));*/ .put("thermometerValueOut", 100.85));*/
// /*param.put("originalDevInfo", new JSONObject() /*param.put("originalDevInfo", new JSONObject()
// .put("previousYearEnergyUsage", 2409000) .put("previousYearEnergyUsage", 2409000)
// .put("energyCode", 1));*/ .put("energyCode", 1));*/
// param.put("buildInfo", new JSONObject() param.put("buildInfo", new JSONObject()
// .put("days", 185) .put("days", 185)
// .put("energyCode", 1) .put("energyCode", 1)
// .put("heatingArea", 4000) .put("heatingArea", 4000)
// .put("lastYearFee", 6300000)); .put("lastYearFee", 6300000));
// /*param.put("originalDevInfo", new JSONObject() /*param.put("originalDevInfo", new JSONObject()
// .put("energyCode", 1) .put("energyCode", 1)
// .put("energyPrice", 1.04) .put("energyPrice", 1.04)
// .put("lastYearFee", 2100000));*/ .put("lastYearFee", 2100000));*/
// /*param.put("energyInfo", new JSONObject() /*param.put("energyInfo", new JSONObject()
// .put("ut", 1180.0) .put("ut", 1180.0)
// .put("i1", 888.987) .put("i1", 888.987)
// .put("i2", 1000.0) .put("i2", 1000.0)
// .put("peopleNum", 10000000.0) .put("peopleNum", 10000000.0)
// .put("averageGdp", 10000.0)); .put("averageGdp", 10000.0));
// param.put("electricInfo", new JSONObject() param.put("electricInfo", new JSONObject()
// .put("PR", 11800) .put("PR", 11800)
// .put("CT", 12444888.987) .put("CT", 12444888.987)
// .put("T", 1000000.0));*/ .put("T", 1000000.0));*/
// String key = "BPTfj7kSlu6fJHpn/t2IQ1R83MPuA3sjgySntyYRo8GEgUNnTYoxaOX2FTK+X/bPllVx8Ly4/1l2FUb9JwRRbzbMPIdIfal7qO4ftJKJTN1M555BUSyGUOEBHivrarFiliiwnZH5dD4YV+kRUUD70o/1zEysm5M6/FrzXebRcH9EsnLEGta9D+urvisjamjQmunV3razxlsd+SYvbSsYmDRp8QjbJLpkfrlJBL484cB5Nhj8XWx8IZb3lvINkkq+"; String key = "BPTfj7kSlu6fJHpn/t2IQ1R83MPuA3sjgySntyYRo8GEgUNnTYoxaOX2FTK+X/bPllVx8Ly4/1l2FUb9JwRRbzbMPIdIfal7qO4ftJKJTN1M555BUSyGUOEBHivrarFiliiwnZH5dD4YV+kRUUD70o/1zEysm5M6/FrzXebRcH9EsnLEGta9D+urvisjamjQmunV3razxlsd+SYvbSsYmDRp8QjbJLpkfrlJBL484cB5Nhj8XWx8IZb3lvINkkq+";
//
// // 构建JSONObject对象 // 构建JSONObject对象
// JSONObject list = new JSONObject(); JSONObject list = new JSONObject();
// // 将设备列表放入JSONObject对象当中并且键为“devSpecList”(键名必须为“devSpecList”) // 将设备列表放入JSONObject对象当中并且键为“devSpecList”(键名必须为“devSpecList”)
// list.put("devSpecList", createDevList()); list.put("devSpecList", createDevList());
// // 将这个JSONObject对象list作为入参调用ModelTool的create方法实现产品库初始化。 // 将这个JSONObject对象list作为入参调用ModelTool的create方法实现产品库初始化。
// ModelTool modelTool = ModelTool.create(list); ModelTool modelTool = ModelTool.create(list);
// // 调用ModelTool的唯一入口函数exeModel2Report,将场景参数param和密钥key作为入参传进去,得到输出结果电能替代报告。 // 调用ModelTool的唯一入口函数exeModel2Report,将场景参数param和密钥key作为入参传进去,得到输出结果电能替代报告。
// System.out.println(modelTool.exeModel2Report(param, key,mafwefaefwaefawfapList)); System.out.println(modelTool.exeModel2Report(param, key,mafwefaefwaefawfapList));
//
// } }
//
//
// public static List<SysDeviceHeatScene> createDevList() { public static List<SysDeviceHeatScene> createDevList() {
// List<SysDeviceHeatScene> deviceList = new ArrayList<>(); List<SysDeviceHeatScene> deviceList = new ArrayList<>();
//
// // 模拟从数据库中检索数据 // 模拟从数据库中检索数据
// Object[][] data = Object[][] data =
// { {
// {1, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 360.00, 80000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null}, {1, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 360.00, 80000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
// {2, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 720.00, 100000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null}, {2, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 720.00, 100000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
// {3, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 1440.00, 160000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null}, {3, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电阻类)", 0.95, 1440.00, 160000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
// {4, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 360.00, 280000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null}, {4, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 360.00, 280000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
// {5, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 720.00, 460000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null}, {5, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 720.00, 460000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
// {6, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 1440.00, 900000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null}, {6, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电极类)", 0.97, 1440.00, 900000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
// {7, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 360.00, 150000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null}, {7, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 360.00, 150000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
// {8, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 720.00, 180000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null}, {8, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 720.00, 180000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
// {9, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 1440.00, 300000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null}, {9, "电锅炉", "工业供热电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 1440.00, 300000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
// {10, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 360.00, 360000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null}, {10, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 360.00, 360000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
// {11, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 720.00, 720000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null}, {11, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 720.00, 720000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
// {12, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 1440.00, 1440000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null}, {12, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 1440.00, 1440000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
// {13, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 360.00, 120000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null}, {13, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 360.00, 120000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
// {14, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 720.00, 160000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null}, {14, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 720.00, 160000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
// {15, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 1440.00, 280000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null}, {15, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 1440.00, 280000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
// {16, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 360.00, 110000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null}, {16, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 360.00, 110000.00, 60000.00, 180000.00, 3000.00, 15, 4500, null, null,null,null,null,null},
// {17, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 720.00, 150000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null}, {17, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 720.00, 150000.00, 60000.00, 180000.00, 6000.00, 15, 4500, null, null,null,null,null,null},
// {18, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 1440.00, 260000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null}, {18, "电锅炉", "工业供热电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 1440.00, 260000.00, 60000.00, 180000.00, 12000.00, 15, 4500, null, null,null,null,null,null},
// {19, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 360.00, 80000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null}, {19, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 360.00, 80000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
// {20, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 720.00, 100000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null}, {20, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 720.00, 100000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
// {21, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 1440.00, 160000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null}, {21, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电阻类)", 0.95, 1440.00, 160000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
// {22, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 360.00, 280000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null}, {22, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 360.00, 280000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
// {23, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 720.00, 460000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null}, {23, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 720.00, 460000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
// {24, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 1440.00, 900000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null}, {24, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电极类)", 0.97, 1440.00, 900000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
// {25, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 360.00, 150000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null}, {25, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 360.00, 150000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
// {26, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 720.00, 180000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null}, {26, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 720.00, 180000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
// {27, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 1440.00, 300000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null}, {27, "电锅炉", "供冷/暖电锅炉", "直热式电锅炉(电磁涡流类)", 0.98, 1440.00, 300000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
// {28, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 360.00, 360000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null}, {28, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 360.00, 360000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
// {29, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 720.00, 720000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null}, {29, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 720.00, 720000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
// {30, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 1440.00, 1440000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null}, {30, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(固体蓄热)", 0.95, 1440.00, 1440000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
// {31, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 360.00, 120000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null}, {31, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 360.00, 120000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
// {32, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 720.00, 160000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null}, {32, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 720.00, 160000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
// {33, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 1440.00, 280000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null}, {33, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(相变蓄热)", 0.98, 1440.00, 280000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
// {34, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 360.00, 110000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null}, {34, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 360.00, 110000.00, 60000.00, 180000.00, 3000.00, 15, null, null, null,null,null,null,null},
// {35, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 720.00, 150000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null}, {35, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 720.00, 150000.00, 60000.00, 180000.00, 6000.00, 15, null, null, null,null,null,null,null},
// {36, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 1440.00, 260000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null}, {36, "电锅炉", "供冷/暖电锅炉", "蓄热式电锅炉(水蓄)", 0.97, 1440.00, 260000.00, 60000.00, 180000.00, 12000.00, 15, null, null, null,null,null,null,null},
// {37, "热泵", "供冷/暖", "水源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null}, {37, "热泵", "供冷/暖", "水源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null},
// {38, "热泵", "供冷/暖", "水源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null}, {38, "热泵", "供冷/暖", "水源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
// {39, "热泵", "供冷/暖", "水源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null}, {39, "热泵", "供冷/暖", "水源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null},
// {40, "热泵", "供冷/暖", "土壤源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null}, {40, "热泵", "供冷/暖", "土壤源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null},
// {41, "热泵", "供冷/暖", "土壤源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null}, {41, "热泵", "供冷/暖", "土壤源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
// {42, "热泵", "供冷/暖", "土壤源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null}, {42, "热泵", "供冷/暖", "土壤源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null},
// {43, "热泵", "供冷/暖", "空气源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null}, {43, "热泵", "供冷/暖", "空气源热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null},
// {44, "热泵", "供冷/暖", "空气源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null}, {44, "热泵", "供冷/暖", "空气源热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
// {45, "热泵", "供冷/暖", "空气源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null}, {45, "热泵", "供冷/暖", "空气源热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null},
// {46, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null}, {46, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 25.00, 45000.00, 60000.00, 180000.00, 500.00, 15, null, null, null,null,null,null,null},
// {47, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null}, {47, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 45.00, 75000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
// {48, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null}, {48, "热泵", "供冷/暖", "低品位余热源(如电厂低温循环水)热泵", 4.00, 90.00, 140000.00, 60000.00, 180000.00, 2000.00, 15, null, null, null,null,null,null,null},
// {49, "热泵", "供冷/暖", "高温蒸汽热泵", 3.00, 45.00, 380000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null}, {49, "热泵", "供冷/暖", "高温蒸汽热泵", 3.00, 45.00, 380000.00, 60000.00, 180000.00, 1000.00, 15, null, null, null,null,null,null,null},
// {50, "热泵", "供冷/暖", "高温蒸汽热泵", 3.00, 120.00, 550000.00, 60000.00, 180000.00, 2000.00, 15, 1250, null, null,null,null,null,null}, {50, "热泵", "供冷/暖", "高温蒸汽热泵", 3.00, 120.00, 550000.00, 60000.00, 180000.00, 2000.00, 15, 1250, null, null,null,null,null,null},
// {51, "电厨炊", "电厨炊", "电磁灶", null, 12, 3500.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null}, {51, "电厨炊", "电厨炊", "电磁灶", null, 12, 3500.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
// {52, "电厨炊", "电厨炊", "蒸锅", null, 9, 2200.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null}, {52, "电厨炊", "电厨炊", "蒸锅", null, 9, 2200.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
// {53, "电厨炊", "电厨炊", "汤炉", null, 6, 1500.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null}, {53, "电厨炊", "电厨炊", "汤炉", null, 6, 1500.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
// {54, "电厨炊", "电厨炊", "煮炉", null, 8, 2100.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null}, {54, "电厨炊", "电厨炊", "煮炉", null, 8, 2100.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
// {55, "电厨炊", "电厨炊", "饼铛", null, 4, 1600.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null}, {55, "电厨炊", "电厨炊", "饼铛", null, 4, 1600.00, 60000.00, 180000.00, null, 15, 1250, 1, 50,null,null,null,null},
// {56, "电厨炊", "电厨炊", "电磁灶", null, 20, 4500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null}, {56, "电厨炊", "电厨炊", "电磁灶", null, 20, 4500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
// {57, "电厨炊", "电厨炊", "蒸锅", null, 12, 2500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null}, {57, "电厨炊", "电厨炊", "蒸锅", null, 12, 2500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
// {58, "电厨炊", "电厨炊", "汤炉", null, 9, 2500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null}, {58, "电厨炊", "电厨炊", "汤炉", null, 9, 2500.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
// {59, "电厨炊", "电厨炊", "煮炉", null, 12, 2900.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null}, {59, "电厨炊", "电厨炊", "煮炉", null, 12, 2900.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
// {60, "电厨炊", "电厨炊", "饼铛", null, 5, 1700.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null}, {60, "电厨炊", "电厨炊", "饼铛", null, 5, 1700.00, 60000.00, 180000.00, null, 15, 1250, 51, 100,null,null,null,null},
// {61, "电厨炊", "电厨炊", "电磁灶", null, 30, 5900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null}, {61, "电厨炊", "电厨炊", "电磁灶", null, 30, 5900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
// {62, "电厨炊", "电厨炊", "蒸锅", null, 12, 3900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null}, {62, "电厨炊", "电厨炊", "蒸锅", null, 12, 3900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
// {63, "电厨炊", "电厨炊", "汤炉", null, 12, 2900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null}, {63, "电厨炊", "电厨炊", "汤炉", null, 12, 2900.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
// {64, "电厨炊", "电厨炊", "煮炉", null, 18, 3200.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null}, {64, "电厨炊", "电厨炊", "煮炉", null, 18, 3200.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
// {65, "电厨炊", "电厨炊", "饼铛", null, 5, 1700.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null}, {65, "电厨炊", "电厨炊", "饼铛", null, 5, 1700.00, 60000.00, 180000.00, null, 15, 1250, 101, null,null,null,null,null},
// {66, "电窑炉", "建材电窑炉", "建材电窑炉", null, 25, 26000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,2500.00,500.00,4.00}, {66, "电窑炉", "建材电窑炉", "建材电窑炉", null, 25, 26000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,2500.00,500.00,4.00},
// {67, "电窑炉", "建材电窑炉", "建材电窑炉", null, 145, 140000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,2500.00,3750.00,4.00}, {67, "电窑炉", "建材电窑炉", "建材电窑炉", null, 145, 140000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,2500.00,3750.00,4.00},
// {68, "电窑炉", "建材电窑炉", "建材电窑炉", null, 300, 250000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,2500.00,7500.00,4.00}, {68, "电窑炉", "建材电窑炉", "建材电窑炉", null, 300, 250000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,2500.00,7500.00,4.00},
// {69, "电窑炉", "冶金窑炉", "直接加热电阻炉", null, 25, 26000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,7800.00,1560.00,4.00}, {69, "电窑炉", "冶金窑炉", "直接加热电阻炉", null, 25, 26000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,7800.00,1560.00,4.00},
// {70, "电窑炉", "冶金窑炉", "直接加热电阻炉", null, 145, 140000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,7800.00,11700.00,4.00}, {70, "电窑炉", "冶金窑炉", "直接加热电阻炉", null, 145, 140000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,7800.00,11700.00,4.00},
// {71, "电窑炉", "冶金窑炉", "直接加热电阻炉", null, 300, 250000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,7800.00,23400.00,4.00}, {71, "电窑炉", "冶金窑炉", "直接加热电阻炉", null, 300, 250000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,7800.00,23400.00,4.00},
// {72, "电窑炉", "冶金窑炉", "间接加热电阻炉(钟罩式光亮退火炉)", null, 25, 60000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,7800.00,1560.00,4.00}, {72, "电窑炉", "冶金窑炉", "间接加热电阻炉(钟罩式光亮退火炉)", null, 25, 60000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,7800.00,1560.00,4.00},
// {73, "电窑炉", "冶金窑炉", "间接加热电阻炉(钟罩式光亮退火炉)", null, 145, 250000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,7800.00,11700.00,4.00}, {73, "电窑炉", "冶金窑炉", "间接加热电阻炉(钟罩式光亮退火炉)", null, 145, 250000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,7800.00,11700.00,4.00},
// {74, "电窑炉", "冶金窑炉", "间接加热电阻炉(钟罩式光亮退火炉)", null, 300, 450000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,7800.00,23400.00,4.00}, {74, "电窑炉", "冶金窑炉", "间接加热电阻炉(钟罩式光亮退火炉)", null, 300, 450000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,7800.00,23400.00,4.00},
// {75, "电窑炉", "冶金窑炉", "电弧炉(钢包精炼LF炉)", null, 25, 28000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,7800.00,1560.00,4.00}, {75, "电窑炉", "冶金窑炉", "电弧炉(钢包精炼LF炉)", null, 25, 28000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,7800.00,1560.00,4.00},
// {76, "电窑炉", "冶金窑炉", "电弧炉(钢包精炼LF炉)", null, 145, 150000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,7800.00,11700.00,4.00}, {76, "电窑炉", "冶金窑炉", "电弧炉(钢包精炼LF炉)", null, 145, 150000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,7800.00,11700.00,4.00},
// {77, "电窑炉", "冶金窑炉", "电弧炉(钢包精炼LF炉)", null, 300, 260000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,7800.00,23400.00,4.00}, {77, "电窑炉", "冶金窑炉", "电弧炉(钢包精炼LF炉)", null, 300, 260000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,7800.00,23400.00,4.00},
// {78, "电窑炉", "冶金窑炉", "中/高频感应电炉", null, 25, 40000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,7800.00,1560.00,4.00}, {78, "电窑炉", "冶金窑炉", "中/高频感应电炉", null, 25, 40000.00, 60000.00, 180000.00, null, 15, 4500, null, null,0.20,7800.00,1560.00,4.00},
// {79, "电窑炉", "冶金窑炉", "中/高频感应电炉", null, 145, 190000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,7800.00,11700.00,4.00}, {79, "电窑炉", "冶金窑炉", "中/高频感应电炉", null, 145, 190000.00, 60000.00, 180000.00, null, 15, 4500, null, null,1.50,7800.00,11700.00,4.00},
// {80, "电窑炉", "冶金窑炉", "中/高频感应电炉", null, 300, 270000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,7800.00,23400.00,4.00}, {80, "电窑炉", "冶金窑炉", "中/高频感应电炉", null, 300, 270000.00, 60000.00, 180000.00, null, 15, 4500, null, null,3.00,7800.00,23400.00,4.00},
// }; };
//
// // 创建对象并添加到列表 // 创建对象并添加到列表
// for (Object[] row : data) { for (Object[] row : data) {
// int id = (int) row[0]; int id = (int) row[0];
// String devType = (String) row[1]; String devType = (String) row[1];
// String devSubType = (String) row[2]; String devSubType = (String) row[2];
// String devTechType = (String) row[3]; String devTechType = (String) row[3];
// double devPrice = (double) row[6]; double devPrice = (double) row[6];
// double devSubstituteLaborCost = (double) row[7]; double devSubstituteLaborCost = (double) row[7];
// double laborCost = (double) row[8]; double laborCost = (double) row[8];
//
//
// SysDeviceHeatScene device = new SysDeviceHeatScene( SysDeviceHeatScene device = new SysDeviceHeatScene(
// id, devType, devSubType, devTechType, isHave2(row[4]), isHave2(row[5]), devPrice, id, devType, devSubType, devTechType, isHave2(row[4]), isHave2(row[5]), devPrice,
// devSubstituteLaborCost, laborCost, isHave2(row[9]), isHave(row[10]), isHave(row[11]), devSubstituteLaborCost, laborCost, isHave2(row[9]), isHave(row[10]), isHave(row[11]),
// isHave(row[12]), isHave(row[13]), isHave(row[12]), isHave(row[13]),
// isHave2(row[14]), isHave2(row[15]), isHave2(row[14]), isHave2(row[15]),
// isHave2(row[16]), isHave2(row[17]),null); isHave2(row[16]), isHave2(row[17]),null);
//
// deviceList.add(device); deviceList.add(device);
// } }
// return deviceList; return deviceList;
} }
public static Integer isHave(Object args) { public static Integer isHave(Object args) {

@ -127,8 +127,7 @@ public class ModelTool {
if (isAuthorization) { if (isAuthorization) {
// 判断模型使用权限 // 判断模型使用权限
// 根据给定的类名初始化类 加密不需要反实例化new // 根据给定的类名初始化类 加密不需要反实例化new
String type = ConfigReader.getProperty(jsonObject.getStr("type")); String type = decrypt().get(jsonObject.getStr("type"));
// String type = decrypt().get(jsonObject.getStr("type"));
Class<?> buildHeatingScene = Class.forName("com.dky" + "." + type); Class<?> buildHeatingScene = Class.forName("com.dky" + "." + type);
// 实例化这个类 // 实例化这个类
DntdModelI buildHeatingSceneModel = (DntdModelI) buildHeatingScene.newInstance(); DntdModelI buildHeatingSceneModel = (DntdModelI) buildHeatingScene.newInstance();
@ -140,7 +139,6 @@ public class ModelTool {
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | } catch (ClassNotFoundException | InstantiationException | IllegalAccessException |
NoSuchMethodException | SecurityException e) { NoSuchMethodException | SecurityException e) {
// 异常处理 // 异常处理
e.printStackTrace();
System.err.println("反射调用过程中发生异常: " + e.getMessage()); System.err.println("反射调用过程中发生异常: " + e.getMessage());
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
jsonObjectResult = ResponseUtil.createResponse(Code.KEY_CONTEXT_ERROR.getCode(), Code.KEY_CONTEXT_ERROR.getDesc(), null); jsonObjectResult = ResponseUtil.createResponse(Code.KEY_CONTEXT_ERROR.getCode(), Code.KEY_CONTEXT_ERROR.getDesc(), null);

Loading…
Cancel
Save