diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index b154c59..2b052fb 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -9,9 +9,9 @@ spring: datasource: # 主库数据源 MASTER: - url: jdbc:mysql://127.0.0.1/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://192.168.3.19/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: 123456 + password: 4877017Ldy # MASTER: # url: jdbc:postgresql://127.0.0.1/ry # username: postgres diff --git a/ruoyi-geek-app b/ruoyi-geek-app new file mode 160000 index 0000000..3489a06 --- /dev/null +++ b/ruoyi-geek-app @@ -0,0 +1 @@ +Subproject commit 3489a065a6c361142c08e70b910ba87b30dd01e4 diff --git a/ruoyi-geek-vue3 b/ruoyi-geek-vue3 new file mode 160000 index 0000000..1f9d80c --- /dev/null +++ b/ruoyi-geek-vue3 @@ -0,0 +1 @@ +Subproject commit 1f9d80c33fb09c7d1c5b848419772f92fc090b63 diff --git a/ruoyi-models/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm b/ruoyi-models/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm index cc5ead7..f7866f4 100644 --- a/ruoyi-models/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm +++ b/ruoyi-models/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm @@ -87,7 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #if($table.haveSubColumn == '1') where ${pkColumn.columnName} = #{${pkColumn.javaField}} #else - where ${tableName}.${pkColumn.columnName} = #{${pkColumn.javaField}} +#set($tableAlias=$table.tableAlias) + where ${tableAlias}.${pkColumn.columnName} = #{${pkColumn.javaField}} #end #elseif($table.sub) select#foreach($column in $columns) a.$column.columnName#if($foreach.count != $columns.size()),#end#end, diff --git a/ruoyi-ngtools/pom.xml b/ruoyi-ngtools/pom.xml new file mode 100644 index 0000000..d92ddb9 --- /dev/null +++ b/ruoyi-ngtools/pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + com.ruoyi + ruoyi + 3.8.9 + + + ruoyi-ngtools + + + 8 + 8 + UTF-8 + + + + com.ruoyi + ruoyi-common + ${ruoyi.version} + + + org.projectlombok + lombok + provided + + + com.ruoyi + ruoyi-system + + + + \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/Main.java b/ruoyi-ngtools/src/main/java/com/ruoyi/Main.java new file mode 100644 index 0000000..3bf017d --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/Main.java @@ -0,0 +1,7 @@ +package com.ruoyi; + +public class Main { + public static void main(String[] args) { + System.out.println("Hello world!"); + } +} \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/controller/FlowController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/controller/FlowController.java new file mode 100644 index 0000000..f94207d --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/controller/FlowController.java @@ -0,0 +1,1157 @@ +package com.ruoyi.ngCalTools.controller; + +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.ngCalTools.model.FlowProps; +import com.ruoyi.ngCalTools.model.GasProps; +import com.ruoyi.ngCalTools.service.DetailService; +import com.ruoyi.ngCalTools.service.GBT11062Service; +import com.ruoyi.ngCalTools.service.ThermService; +import com.ruoyi.system.controller.UnitConvert; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.swing.*; + +@RestController +@RequestMapping("/flowCalcTools") +public class FlowController { + + private final UnitConvert unitConvert; + public ThermService thermService; + public DetailService detailService; + public GBT11062Service gbt11062Service; + public GasController gasController; + public FlowController(UnitConvert unitConvert,GasController gasController) { + this.unitConvert = unitConvert; + this.gasController=gasController; + } + @PostMapping("/flowCalc") + public AjaxResult flowCalc(@RequestBody FlowProps flowProps) { + GasProps gasProps = new GasProps(); + thermService = new ThermService(); + detailService = new DetailService(); + gbt11062Service = new GBT11062Service(); + + //大气压力转换成Pa + double tempPatm = unitConvert.ConvertUniter("pressure", flowProps.getdPatm(), flowProps.getdPatmUnit(), 0); + //压力转换成Pa + double tempPf = unitConvert.ConvertUniter("pressure", flowProps.getdPf(), flowProps.getdPfUnit(), 0); + + //压力转换成Pa + double tempDP = unitConvert.ConvertUniter("pressure", flowProps.getdDp(), flowProps.getdDpUnit(), 0); + //温度转换成K + double tempTf = unitConvert.ConvertUniter("temperature", flowProps.getdTf(), flowProps.getdTfUnit(), 2); + if (flowProps.getdPfType() == 0) //0是表压 + { + gasProps.dPf = tempPatm + tempPf; + flowProps.setdPf(tempPatm + tempPf); + } else { + gasProps.dPf = tempPf; + flowProps.setdPf(tempPf); + } + gasProps.dTf = tempTf; + flowProps.setdDp(tempDP); + flowProps.setdTf(tempTf); + + gasProps.dCbtj = flowProps.getdCbtj(); + String[] stringArray = flowProps.getdngComponents().split("_"); + double[] doubleArray = new double[stringArray.length]; // 遍历字符串数组,将每个元素转换为 double 类型 + for (int i = 0; i < stringArray.length; i++) { + try { + doubleArray[i] = Double.parseDouble(stringArray[i]) / 100; + } catch (NumberFormatException e) { + // 处理转换异常 + System.err.println("无法将字符串 " + stringArray[i] + " 转换为 double 类型: " + e.getMessage()); + } + } + gasProps.adMixture = doubleArray; + gasController.ngCalcVoid(flowProps, gasProps); //计算临界流函数所有参数都计算了 + + //计算流量 + switch (flowProps.getdMeterType()) { + case 0: //差压式流量计 + OFlowCal(gasProps, flowProps); + break; + case 1:// 速度式流量计 + SdFlowCal(gasProps, flowProps); + break; + case 2: //容积式流量计 + SdFlowCal(gasProps, flowProps); + break; + case 3:// 临界流函数流量计 + NozellFLowCal(gasProps, flowProps); + break; + } + Object[] resultArray = {flowProps, gasProps}; + return AjaxResult.success(resultArray); + } + /** + 速度式流量计算 + */ + public final void SdFlowCal(GasProps gasProps,FlowProps flowProps) + { + //工况体积流量 m³、s + flowProps.setdVFlowf(flowProps.getdPulseNum() / flowProps.getdMeterFactor()); + //标况体积流量 m³、s + flowProps.setdVFlowb(FlowConvert_WorkToBase(flowProps, gasProps)); + //标况质量流量 + flowProps.setdMFlowb(flowProps.getdVFlowb() * gasProps.dRhob); + //标况能量流量 + flowProps.setdEFlowb(flowProps.getdVFlowb() * gasProps.dHhvm); + + } + /** + 标准孔板流量计算 + */ + public void OFlowCal(GasProps gasProps,FlowProps flowProps){ + + flowProps.setdOrificeD(flowProps.getdOrificeD() * (1 + 0.000001 * (flowProps.getdOrificeMaterial()) * (flowProps.getdTf() - 293.15))); + flowProps.setdPipeD(flowProps.getdPipeD() * (1 + 0.000001 * (flowProps.getdPipeMaterial()) * (flowProps.getdTf() - 293.15))); + flowProps.setdBeta(flowProps.getdOrificeD() / flowProps.getdPipeD()); +// flowProps.setdBeta(0.5972); + + //求渐近速度系数 E + flowProps.setdE(1 / Math.pow((1 - Math.pow(flowProps.getdBeta(), 4)), 0.5)); +// flowProps.setdE(1.0615); + + //求相对密度系数 FG + // LiuTiType = 1 + flowProps.setdFG(Math.pow((1 / gasProps.dRD_Real), 0.5)); +// flowProps.setdFG(1.2531); + //求流动温度系数 'FT + flowProps.setdFT(Math.pow((293.15 / flowProps.getdTf()), 0.5)); +// flowProps.setdFT(1.0086); + //求等熵指数????????????????????????????????? + + flowProps.setdKappa(gasProps.dKappa); +// flowProps.setdKappa(1.357); + + //求动力粘度 dlnd + flowProps.setdDViscosity(Dlndjs(flowProps.getdPf(), flowProps.getdTf(), 2, 1)); +// flowProps.setdDViscosity(0.01096); + + //求可膨胀系数 + flowProps.setdDExpCoefficient(KePenZhang_JiSuan(flowProps.getdPf() , flowProps.getdDp(), flowProps.getdBeta(), gasProps.getdKappa(), flowProps.getdCoreType(), 0)); +// flowProps.setdDExpCoefficient(0.9977); + +// gasProps.dFpv=1.0195; +// gasProps.dHhvv=39.944; +// gasProps.dRD_Real=0.6368; + + //迭代计算流量和流出系数 + + double conQvA = 0; + conQvA = 0.0000031795 * (1530000.0D * gasProps.dRD_Real / (flowProps.getdDViscosity() * flowProps.getdOrificeD())) * flowProps.getdE() * Math.pow(flowProps.getdOrificeD(), 2) * gasProps.dFpv * flowProps.getdFG() * flowProps.getdDExpCoefficient() * flowProps.getdFT() * Math.sqrt(flowProps.getdPf() * flowProps.getdDp() / 1e6); + double[] XQv = new double[4]; + double[] CQv = new double[4]; + double[] dQv = new double[4]; + double Qn = 0; + int n = 0; + XQv[0] = 1000000.0F; + boolean xhFlag=true; + _100000: + + while(xhFlag) { + for (n = 1; n <= 2; n++) { + CQv[n] = C_JiSuan(flowProps.getdOrificeD(), flowProps.getdBeta(), XQv[n - 1], conQvA, flowProps.getdPtmode(), flowProps.getdCoreType(), 0); + XQv[n] = conQvA * CQv[n]; + dQv[n] = XQv[n] - XQv[n - 1]; + } + if (XQv[2] == XQv[1] || dQv[2] == dQv[1]) { + Qn = conQvA * flowProps.getdDViscosity() * flowProps.getdOrificeD() * CQv[2] / (1530000.0D * gasProps.dRD_Real); + //管道雷诺数 + flowProps.setdRnPipe(XQv[2]); + //流出系数 + flowProps.setdCd(CQv[2]); + + } + if (Math.abs((conQvA - XQv[2] / CQv[1]) / conQvA) > 0.00000000000000005) { + XQv[0] = XQv[n - 1] - dQv[n - 1] * ((XQv[n - 1] - XQv[n - 2]) / (dQv[n - 1] - dQv[n - 2])); +//C# TO JAVA CONVERTER TODO TASK: There is no 'goto' in Java: + continue _100000; + } + else + { + xhFlag=false; + } + } + + //孔板锐利度系数Bk + flowProps.setdOrificeSharpness(1); + if (flowProps.getdCoreType() == 0) + { + flowProps.setdBk((flowProps.getdOrificeSharpness() == 0) ? (BkTable(flowProps.getdOrificeRk(), flowProps.getdOrificeD(), 1)) : (flowProps.getdOrificeSharpness())); + } + else + { + flowProps.setdBk(1); + } + + + //管道粗糙度系数 Gme + flowProps.setdRoughNessPipe(CcdXsjs(flowProps.getdPipeType(), flowProps.getdPipeD(), flowProps.getdBeta(), flowProps.getdRnPipe())); + //修正后的流出系数 + flowProps.setdCd(flowProps.getdCd() * flowProps.getdBk() * flowProps.getdRoughNessPipe()); +// flowProps.setdCd(0.6039); + //标况体积流量 m³、s + flowProps.setdVFlowb(Qn * flowProps.getdBk() * flowProps.getdRoughNessPipe()); + //工况体积流量 + flowProps.setdVFlowf(FlowConvert_BaseToWork(flowProps, gasProps)); + //标况质量流量 + flowProps.setdMFlowb(flowProps.getdVFlowb() * gasProps.dRhob); + //标况能量流量 + flowProps.setdEFlowb(flowProps.getdVFlowb() * gasProps.dHhvv); + //管道内天然气流速 + flowProps.setdVelocityFlow(flowProps.getdVFlowf() / (3.1415926 * Math.pow((flowProps.getdPipeD() / 2000), 2))); + //压力损失 + flowProps.setdPressLost(YaLiSunShi(flowProps.getdCd(), flowProps.getdBeta(), flowProps.getdDp(), flowProps.getdCoreType())); + } + + /** + 天然气音速喷嘴流量计算 + */ + public final void NozellFLowCal( GasProps gasProps,FlowProps flowProps) + { + double dAnt; // 喷嘴喉部面积 + //double dCR;//临界流系数 + double dP1Z; //滞止压力 + double dT1Z; //滞止温度 + //double dPbeta;//上下游压力比 + double dDcorrect; // 考虑膨胀系数后的管道直径 + double ddcorrect; // 考虑膨胀系数后的喉部直径 + double dBeta; //直径比 + double dQm; + try + { + ddcorrect = flowProps.getdOrificeD() * (1 + 0.000001 * (flowProps.getdOrificeMaterial()) * (flowProps.getdTf() - 293.15)); + dDcorrect = flowProps.getdPipeD() * (1 + 0.000001 * (flowProps.getdOrificeMaterial()) * (flowProps.getdTf() - 293.15)); + dBeta = ddcorrect / dDcorrect; + dAnt = 3.1415926 * (ddcorrect / 2) * (ddcorrect / 2); + //ptNGcal.SOS(ref gasProps); + + //dCR = gasProps.dCstar * Math.Sqrt(gasProps.dZf); + dP1Z = flowProps.getdPf() * (1 + gasProps.dKappa / 2 * Math.pow((2 / (gasProps.dKappa + 1)), ((gasProps.dKappa + 1) / (gasProps.dKappa - 1))) * Math.pow(dBeta, 4)); + dT1Z = flowProps.getdTf() * (1 + (gasProps.dKappa - 1) / 2 * (2 / Math.pow((gasProps.dKappa + 1), ((gasProps.dKappa + 1) / (gasProps.dKappa - 1)))) * Math.pow(dBeta, 4)); + // dQm = dAnt * flowProps.dCd * gasProps.dCstar * dP1Z / Math.Sqrt(8314.51 * dT1Z / gasProps.dMrx); + dQm = dAnt * flowProps.getdCd() * gasProps.dCstar * Math.sqrt(gasProps.dZf * dP1Z * gasProps.dRhof); + + if (dBeta > 0.25) + { + dQm = dQm * BetaG25(dP1Z, dT1Z, dBeta, gasProps); + } + flowProps.setdMFlowb(dQm); + flowProps.setdVFlowb(flowProps.getdMFlowb() / gasProps.dRhob); + //标况能量流量 + flowProps.setdEFlowb(flowProps.getdVFlowb() * gasProps.dHhvm); + flowProps.setdVFlowf(FlowConvert_BaseToWork(flowProps, gasProps)); + } + catch (RuntimeException ex) + { + + } + } + + private double BetaG25(double P0, double T0, double BetaB, GasProps gasProps) + { + double[] nik0 = new double[9]; + double[] Sik0 = new double[9]; + double[] Tik0 = new double[9]; + double[] nik1 = new double[9]; + double[] Sik1 = new double[9]; + double[] Tik1 = new double[9]; + double C0 = 0; + double C1 = 0; + double Pai = 0; + double Tuo = 0; + double b = 0; + double F0 = 0; + double F1 = 0; + double Rf = 0.65; + // 直径比大于0.25的修正因子 + nik0[0] = 1.068826e-3; + nik0[1] = 1.199593e-2; + nik0[2] = -1.48292e-3; + nik0[3] = 2.764799e-4; + nik0[4] = 7.920711e-5; + nik0[5] = 1.11278e-3; + nik0[6] = -6.815626e-5; + nik0[7] = 3.86249e-8; + + nik1[0] = -3.46148e-3; + nik1[1] = 5.28029e-3; + nik1[2] = 1.195016e-2; + nik1[3] = 1.664232e-3; + nik1[4] = 1.159371e-3; + nik1[5] = 7.260461e-3; + nik1[6] = -7.541933e-4; + nik1[7] = 2.613967e-7; + + Sik0[0] = 0; + Sik0[1] = 0; + Sik0[2] = 0.5; + Sik0[3] = 1; + Sik0[4] = 2; + Sik0[5] = 3; + Sik0[6] = 5; + Sik0[7] = 10; + + Sik1[0] = 0; + Sik1[1] = 0; + Sik1[2] = 0; + Sik1[3] = 1; + Sik1[4] = 1.5; + Sik1[5] = 3; + Sik1[6] = 5; + Sik1[7] = 10; + + Tik0[0] = -1; + Tik0[1] = 0; + Tik0[2] = -6; + Tik0[3] = -1; + Tik0[4] = -2; + Tik0[5] = -8; + Tik0[6] = -10; + Tik0[7] = -18; + + Tik1[0] = -3; + Tik1[1] = -1; + Tik1[2] = 0; + Tik1[3] = -2; + Tik1[4] = -4; + Tik1[5] = -10; + Tik1[6] = -12; + Tik1[7] = -15; + + Pai = P0 / (gasProps.dPc * 1000000); + Tuo = T0 / gasProps.dTC; + for (int i = 0; i <= 7; i += 1) + { + C0 = C0 + nik0[i] * Math.pow(Pai, Sik0[i]) * Math.pow(Tuo, Tik0[i]); + C1 = C1 + nik1[i] * Math.pow(Pai, Sik1[i]) * Math.pow(Tuo, Tik1[i]); + } + b = 25.879 * Math.pow(BetaB, 6) - 32.693 * Math.pow(BetaB, 5) + 34.276 * Math.pow(BetaB, 4) - 6.0199 * Math.pow(BetaB, 3) - 1.1156 * Math.pow(BetaB, 2) - 0.1122 * BetaB + 0.0047; + F0 = 1 + b * C0; + F1 = 1 + b * C1; + return (1 - Rf) * F0 + Rf * F1; + } + + //压力损失计算 + public final double YaLiSunShi(double tempLiuChuXiShu, double tempZjb, double tempDp, int JieLiuZhuangZhi) + { + double ylss = 0; + switch (JieLiuZhuangZhi) + { + case 0: + ylss = (tempDp * (Math.sqrt(1 - tempZjb) - tempLiuChuXiShu * Math.pow(tempZjb, 2)) / (Math.sqrt(1 - tempZjb) + tempLiuChuXiShu * Math.pow(tempZjb, 2))); + break; + case 1: + ylss = (tempDp * (Math.sqrt(1 - tempZjb) - tempLiuChuXiShu * Math.pow(tempZjb, 2)) / (Math.sqrt(1 - tempZjb) + tempLiuChuXiShu * Math.pow(tempZjb, 2))); + break; + case 2: + ylss = (tempDp * (Math.sqrt(1 - tempZjb) - tempLiuChuXiShu * Math.pow(tempZjb, 2)) / (Math.sqrt(1 - tempZjb) + tempLiuChuXiShu * Math.pow(tempZjb, 2))); + break; + } + return ylss; + } + //查表计算粘度μ + // VBConversions Note: Former VB static variables moved to class level because they aren't supported in C#. + private final double[][] Dlndjs_Dlnd_Data = new double[8][11]; + private final double[] Dlndjs_Dlnd_T = new double[8]; + private final double[] Dlndjs_Dlnd_P = new double[11]; + + public final double Dlndjs(double tempP_jy, double tempT, int PU, int TU) + { + double s1 = 0; + double s2 = 0; + double ky = 0; + double kx = 0; + int i = 0; + int m = 0; + int n = 0; + //On Error Resume Next VBConversions Warning: On Error Resume Next not supported in C# + Dlndjs_Dlnd_T[0] = -15 + 273.15; + Dlndjs_Dlnd_T[1] = 0 + 273.15; + Dlndjs_Dlnd_T[2] = 15 + 273.15; + Dlndjs_Dlnd_T[3] = 30 + 273.15; + Dlndjs_Dlnd_T[4] = 45 + 273.15; + Dlndjs_Dlnd_T[5] = 60 + 273.15; + Dlndjs_Dlnd_T[6] = 75 + 273.15; + Dlndjs_Dlnd_T[7] = 90 + 273.15; + + Dlndjs_Dlnd_P[0] = 0.1F; + Dlndjs_Dlnd_P[1] = 1; + Dlndjs_Dlnd_P[2] = 2; + Dlndjs_Dlnd_P[3] = 3; + Dlndjs_Dlnd_P[4] = 4; + Dlndjs_Dlnd_P[5] = 5; + Dlndjs_Dlnd_P[6] = 6; + Dlndjs_Dlnd_P[7] = 7; + Dlndjs_Dlnd_P[8] = 8; + Dlndjs_Dlnd_P[9] = 9; + Dlndjs_Dlnd_P[10] = 10; + Dlndjs_Dlnd_Data[0][0] = 976; + Dlndjs_Dlnd_Data[1][0] = 1027; + Dlndjs_Dlnd_Data[2][0] = 1071; + Dlndjs_Dlnd_Data[3][0] = 1123; + Dlndjs_Dlnd_Data[4][0] = 1167; + Dlndjs_Dlnd_Data[5][0] = 1213; + Dlndjs_Dlnd_Data[6][0] = 1260; + Dlndjs_Dlnd_Data[7][0] = 1303; + Dlndjs_Dlnd_Data[0][1] = 991; + Dlndjs_Dlnd_Data[1][1] = 1040; + Dlndjs_Dlnd_Data[2][1] = 1082; + Dlndjs_Dlnd_Data[3][1] = 1135; + Dlndjs_Dlnd_Data[4][1] = 1178; + Dlndjs_Dlnd_Data[5][1] = 1224; + Dlndjs_Dlnd_Data[6][1] = 1270; + Dlndjs_Dlnd_Data[7][1] = 1312; + Dlndjs_Dlnd_Data[0][2] = 1014; + Dlndjs_Dlnd_Data[1][2] = 1063; + Dlndjs_Dlnd_Data[2][2] = 1106; + Dlndjs_Dlnd_Data[3][2] = 1153; + Dlndjs_Dlnd_Data[4][2] = 1196; + Dlndjs_Dlnd_Data[5][2] = 1239; + Dlndjs_Dlnd_Data[6][2] = 1281; + Dlndjs_Dlnd_Data[7][2] = 1323; + Dlndjs_Dlnd_Data[0][3] = 1044; + Dlndjs_Dlnd_Data[1][3] = 1091; + Dlndjs_Dlnd_Data[2][3] = 1127; + Dlndjs_Dlnd_Data[3][3] = 1174; + Dlndjs_Dlnd_Data[4][3] = 1216; + Dlndjs_Dlnd_Data[5][3] = 1257; + Dlndjs_Dlnd_Data[6][3] = 1297; + Dlndjs_Dlnd_Data[7][3] = 1338; + Dlndjs_Dlnd_Data[0][4] = 1073; + Dlndjs_Dlnd_Data[1][4] = 1118; + Dlndjs_Dlnd_Data[2][4] = 1149; + Dlndjs_Dlnd_Data[3][4] = 1195; + Dlndjs_Dlnd_Data[4][4] = 1236; + Dlndjs_Dlnd_Data[5][4] = 1275; + Dlndjs_Dlnd_Data[6][4] = 1313; + Dlndjs_Dlnd_Data[7][4] = 1352; + Dlndjs_Dlnd_Data[0][5] = 1114; + Dlndjs_Dlnd_Data[1][5] = 1151; + Dlndjs_Dlnd_Data[2][5] = 1180; + Dlndjs_Dlnd_Data[3][5] = 1224; + Dlndjs_Dlnd_Data[4][5] = 1261; + Dlndjs_Dlnd_Data[5][5] = 1297; + Dlndjs_Dlnd_Data[6][5] = 1333; + Dlndjs_Dlnd_Data[7][5] = 1372; + Dlndjs_Dlnd_Data[0][6] = 1156; + Dlndjs_Dlnd_Data[1][6] = 1185; + Dlndjs_Dlnd_Data[2][6] = 1211; + Dlndjs_Dlnd_Data[3][6] = 1253; + Dlndjs_Dlnd_Data[4][6] = 1287; + Dlndjs_Dlnd_Data[5][6] = 1320; + Dlndjs_Dlnd_Data[6][6] = 1352; + Dlndjs_Dlnd_Data[7][6] = 1391; + Dlndjs_Dlnd_Data[0][7] = 1207; + Dlndjs_Dlnd_Data[1][7] = 1230; + Dlndjs_Dlnd_Data[2][7] = 1250; + Dlndjs_Dlnd_Data[3][7] = 1289; + Dlndjs_Dlnd_Data[4][7] = 1318; + Dlndjs_Dlnd_Data[5][7] = 1346; + Dlndjs_Dlnd_Data[6][7] = 1374; + Dlndjs_Dlnd_Data[7][7] = 1412; + Dlndjs_Dlnd_Data[0][8] = 1261; + Dlndjs_Dlnd_Data[1][8] = 1276; + Dlndjs_Dlnd_Data[2][8] = 1289; + Dlndjs_Dlnd_Data[3][8] = 1324; + Dlndjs_Dlnd_Data[4][8] = 1350; + Dlndjs_Dlnd_Data[5][8] = 1373; + Dlndjs_Dlnd_Data[6][8] = 1396; + Dlndjs_Dlnd_Data[7][8] = 1432; + Dlndjs_Dlnd_Data[0][9] = 1331; + Dlndjs_Dlnd_Data[1][9] = 1331; + Dlndjs_Dlnd_Data[2][9] = 1335; + Dlndjs_Dlnd_Data[3][9] = 1366; + Dlndjs_Dlnd_Data[4][9] = 1385; + Dlndjs_Dlnd_Data[5][9] = 1403; + Dlndjs_Dlnd_Data[6][9] = 1424; + Dlndjs_Dlnd_Data[7][9] = 1456; + Dlndjs_Dlnd_Data[0][10] = 1405; + Dlndjs_Dlnd_Data[1][10] = 1389; + Dlndjs_Dlnd_Data[2][10] = 1383; + Dlndjs_Dlnd_Data[3][10] = 1409; + Dlndjs_Dlnd_Data[4][10] = 1421; + Dlndjs_Dlnd_Data[5][10] = 1435; + Dlndjs_Dlnd_Data[6][10] = 1451; + Dlndjs_Dlnd_Data[7][10] = 1482; + + if (tempT < Dlndjs_Dlnd_T[0]) + { + tempT = Dlndjs_Dlnd_T[0]; + } + if (tempT > Dlndjs_Dlnd_T[7]) + { + tempT = Dlndjs_Dlnd_T[7]; + } + if (tempP_jy < Dlndjs_Dlnd_P[0]) + { + tempP_jy = Dlndjs_Dlnd_P[0]; + } + if (tempP_jy > Dlndjs_Dlnd_P[10]) + { + tempP_jy = Dlndjs_Dlnd_P[10]; + } + + for ( i = 0; i <= 6; i++) + { + if (tempT >= Dlndjs_Dlnd_T[i] && tempT <= Dlndjs_Dlnd_T[i + 1]) + { + m = i; + break; + } + } + + for (i = 0; i <= 9; i++) + { + if (tempP_jy >= Dlndjs_Dlnd_P[i] && tempP_jy <= Dlndjs_Dlnd_P[i + 1]) + { + n = i; + break; + } + } + + if (Dlndjs_Dlnd_P[n + 1] - Dlndjs_Dlnd_P[n] != 0) + { + ky = (tempP_jy - Dlndjs_Dlnd_P[n]) / (Dlndjs_Dlnd_P[n + 1] - Dlndjs_Dlnd_P[n]); + } + else + { + ky = 0; + } + if (Dlndjs_Dlnd_T[m + 1] - Dlndjs_Dlnd_T[m] != 0) + { + kx = (tempT - Dlndjs_Dlnd_T[m]) / (Dlndjs_Dlnd_T[m + 1] - Dlndjs_Dlnd_T[m]); + } + else + { + kx = 0; + } + s1 = Dlndjs_Dlnd_Data[m][n] + (Dlndjs_Dlnd_Data[m][n + 1] - Dlndjs_Dlnd_Data[m][n]) * ky; + s2 = Dlndjs_Dlnd_Data[m + 1][n] + (Dlndjs_Dlnd_Data[m + 1][n + 1] - Dlndjs_Dlnd_Data[m + 1][n]) * ky; + return (s1 + (s2 - s1) * kx) / 100000.0D; + } + //可膨胀系数计算 + private double KePenZhang_JiSuan(double tempP_jy, double tempDp_Pa, double tempZjb, double tempDszs, int JIeliuType, int JiSuanBiaoZhun) // 求可膨胀系数 + { + double returnValue = 0; + //0标准孔板 + //1ISA1932喷嘴 + //2长径喷嘴 + //3文丘里喷嘴 + //4粗铸收缩段经典文丘里管 + //5机械加工收缩段经典文丘里管 + //6粗焊铁板收缩段经典文丘里管 + //7 1/4圆孔板 + + double tuo = 0; + switch (JIeliuType) + { + case 0: //孔板流量计算 + switch (JiSuanBiaoZhun) + { + case 0: //6143-2004 + tuo = (tempP_jy - tempDp_Pa) / (tempP_jy ); + returnValue = 1 - (0.351 + 0.256 * Math.pow(tempZjb, 4) + 0.93 * Math.pow(tempZjb, 8)) * (1 - Math.pow(tuo, (1 / tempDszs))); + break; + case 1: //6143-1996 + returnValue = 1 - (0.41 + 0.35 * Math.pow(tempZjb, 4)) * tempDp_Pa / ( tempP_jy * tempDszs); + break; + + } + break; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + switch (JiSuanBiaoZhun) + { + case 0: + + //标准喷嘴 iso5167-2002 + tuo = (tempP_jy - tempDp_Pa) / (tempP_jy ); + returnValue = Math.pow((((tempDszs * Math.pow(tuo, (2 / tempDszs))) / (tempDszs - 1)) * ((1 - Math.pow(tempZjb, 4)) / (1 - Math.pow(tempZjb, 4) * Math.pow(tuo, (2 / tempDszs)))) * ((1 - Math.pow(tuo, ((tempDszs - 1) / tempDszs))) / (1 - tuo))), 0.5); + break; + + case 1: //iso5167-93 + returnValue = 1 - (0.41 + 0.35 * Math.pow(tempZjb, 4)) * tempDp_Pa / ( tempP_jy * tempDszs); + break; + } + break; + case 7: //1/4圆孔板 + returnValue = 1 - (0.41 + 0.35 * Math.pow(tempZjb, 4)) * tempDp_Pa / ( tempP_jy * tempDszs); + break; + case 8: //锥形入口孔板 + tuo = (tempP_jy - tempDp_Pa) / (tempP_jy ); + returnValue = 1 - (0.351 + 0.256 * Math.pow(tempZjb, 4) + 0.93 * Math.pow(tempZjb, 8)) * (1 - Math.pow(tuo, (1 / tempDszs))); + + tuo = (tempP_jy - tempDp_Pa) / (tempP_jy ); + + returnValue = 0.5 * (returnValue + Math.pow((((tempDszs * Math.pow(tuo, (2 / tempDszs))) / (tempDszs - 1)) * ((1 - Math.pow(tempZjb, 4)) / (1 - Math.pow(tempZjb, 4) * Math.pow(tuo, (2 / tempDszs)))) * ((1 - Math.pow(tuo, ((tempDszs - 1) / tempDszs))) / (1 - tuo))), 0.5)); + break; + case 9: //偏心孔板 + returnValue = 1 - (0.41 + 0.35 * Math.pow(tempZjb, 4)) * tempDp_Pa / ( tempP_jy * tempDszs); + break; + + } + return returnValue; + } + //流出系数计算 + public final double C_JiSuan(double tempGj, double tempZjb, double tempReD, double tempconQvA, int tempQyfs, int JieLiuType, int JiSuanBiaoZhun) + { + double returnValue = 0; + //流出系数计算函数 + //输入:直径比,雷诺数,取压方式,节流装置类型,计算采用标准 + //输出:流出系数 + + //jieliutype + + //0标准孔板 + //1ISA1932喷嘴 + //2长径喷嘴 + //3文丘里喷嘴 + //4粗铸收缩段经典文丘里管 + //5机械加工收缩段经典文丘里管 + //6粗焊铁板收缩段经典文丘里管 + + double L1 = 0; + double L2 = 0; + switch (JieLiuType) + { + case 0: //孔板 + switch (tempQyfs) + { + case 0: + L1 = 25.4 / tempGj; + L2 = L1; + break; + case 1: + L1 = 0; + L2 = 0; + break; + case 2: + L1 = 1; + L2 = 0.47F; + break; + } + + switch (JiSuanBiaoZhun) + { + case 0: //6143-2004 + if (tempGj >= 71.12) + { + returnValue = 0.5961 + 0.0261 * Math.pow(tempZjb, 2) - 0.216 * Math.pow(tempZjb, 8) + 0.000521 * Math.pow((1000000.0D * tempZjb / tempReD), 0.7) + (0.0188 + 0.0063 * Math.pow((19000 * tempZjb / tempReD), 0.8)) * Math.pow(tempZjb, 3.5) * Math.pow((1000000.0D / tempReD), 0.3) + (0.043 + 0.08 * Math.exp(-10 * L1) - 0.123 * Math.exp(-7 * L1)) * (1 - 0.11 * Math.pow((19000 * tempZjb / tempReD), 0.8)) * (Math.pow(tempZjb, 4) * Math.pow((1 - Math.pow(tempZjb, 4)), (-1))) - 0.031 * (2 * L2 / (1 - tempZjb) - 0.8 * Math.pow((2 * L2 / (1 - tempZjb)), 1.1)) * Math.pow(tempZjb, 1.3); + + } + else if (tempGj < 71.12) + { + returnValue = (0.5961 + 0.0261 * Math.pow(tempZjb, 2) - 0.216 * Math.pow(tempZjb, 8) + 0.000521 * Math.pow((1000000.0D * tempZjb / tempReD), 0.7) + (0.0188 + 0.0063 * Math.pow((19000 * tempZjb / tempReD), 0.8)) * Math.pow(tempZjb, 3.5) * Math.pow((1000000.0D / tempReD), 0.3) + (0.043 + 0.08 * Math.exp(-10 * L1) - 0.123 * Math.exp(-7 * L1)) * (1 - 0.11 * Math.pow((19000 * tempZjb / tempReD), 0.8)) * Math.pow(tempZjb, 4) * Math.pow((1 - Math.pow(tempZjb, 4)), (-1)) - 0.031 * (2 * L2 / (1 - tempZjb) - 0.8 * Math.pow((2 * L2 * (1 - tempZjb)), 1.1)) * Math.pow(tempZjb, 1.3) + 0.011 * (0.75 - tempZjb) * (2.8 - tempGj / 25.4)); + } + break; + case 1: //6143-1996 + if (0.09 * L1 >= 0.039) + { + returnValue = 0.5959 + 0.0312 * Math.pow(tempZjb, (2.1)) - 0.184 * Math.pow(tempZjb, 8) + 0.0029 * Math.pow(tempZjb, 2.5) * Math.pow((1000000.0D / tempReD), 0.75) + 0.039 * Math.pow(tempZjb, 4) * Math.pow((1 - Math.pow(tempZjb, 4)), (-1)) - 0.0337 * L1 * Math.pow(tempZjb, 3); + } + else if (0.09 * L1 < 0.039) + { + returnValue = (0.5959 + 0.0312 * Math.pow(tempZjb, (2.1)) - 0.184 * Math.pow(tempZjb, 8) + 0.0029 * Math.pow(tempZjb, 2.5) * Math.pow((1000000.0D / tempReD), 0.75) + 0.09 * L1 * Math.pow(tempZjb, 4) * Math.pow((1 - Math.pow(tempZjb, 4)), (-1)) - 0.0337 * L1 * Math.pow(tempZjb, 3)); + } + break; + } + break; + + + + case 1: //ISA1932喷嘴 + returnValue = (0.99 - 0.2262 * Math.pow(tempZjb, 4.1) - (0.00175 * Math.pow(tempZjb, 2) - 0.0033 * Math.pow(tempZjb, 4.15)) * (1000000.0D / Math.pow(tempReD, 1.15))); + break; + + case 2: //长径喷嘴 + returnValue = (0.9965 - 0.00653 * Math.pow(tempZjb, 0.5) * Math.pow((1000000.0D / tempReD), 0.5)); + break; + case 3: //文丘里喷嘴 + returnValue = (0.9858 - 0.196 * Math.pow(tempZjb, 4.5)); + break; + case 4: //粗铸收缩段经典文丘里管 + returnValue = (0.984F); + break; + case 5: //机械加工收缩段经典文丘里管 + returnValue = (0.995F); + break; + case 6: //粗焊铁板收缩段经典文丘里管 + returnValue = (0.985F); + break; + case 7: //1/4圆孔板 + returnValue = 0.73823 - 0.3309 * tempZjb - 1.1615 * Math.pow(tempZjb, 2) + 1.5084 * Math.pow(tempZjb, 3); + break; + case 8: //锥形入口孔板 + returnValue = (0.734F); + break; + case 9: //偏心孔板 + returnValue = 0.9355 - 1.6889 * tempZjb + 3.0428 * Math.pow(tempZjb, 2) - 1.7989 * Math.pow(tempZjb, 3); + + + break; + } + double tempRed1 = 0; + switch (JieLiuType) + { + case 0: //孔板流量计算 + tempRed1 = tempconQvA * returnValue; + switch (JieLiuType) + { + case 0: + if (tempRed1 < (170 * Math.pow(tempZjb, 2) * tempGj)) + { + JOptionPane.showMessageDialog(null, "雷诺数超过标准孔板的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + return returnValue; + } + break; + case 1: + if (tempZjb >= 0.1 & tempZjb <= 0.56) + { + if (tempRed1 < 5000) + { + JOptionPane.showMessageDialog(null, "雷诺数超过标准喷嘴的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + return returnValue; + } + } + if (tempZjb > 0.56) + { + if (tempRed1 < (16000 * Math.pow(tempZjb, 2) * tempGj)) + { + JOptionPane.showMessageDialog(null, "雷诺数超过标准喷嘴的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + return returnValue; + } + } + break; + } + break; + + case 1: //标准喷嘴 + tempRed1 = tempconQvA * returnValue; + if (tempZjb >= 0.3 & tempZjb < 0.44) + { + if (tempRed1 < 70000 | tempRed1 > 10000000.0D) + { + JOptionPane.showMessageDialog(null, "雷诺数超过标准喷嘴的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + } + } + if (tempZjb >= 0.44 & tempZjb < 0.8) + { + if (tempRed1 < 20000 | tempRed1 > 10000000.0D) + { + JOptionPane.showMessageDialog(null, "雷诺数超过标准喷嘴的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + } + } + break; + + + case 2: //长径喷嘴 + tempRed1 = tempconQvA * returnValue; + if (tempRed1 < 10000.0D | tempRed1 > 10000000.0D) + { + JOptionPane.showMessageDialog(null, "雷诺数超过长径喷嘴的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + } + break; + case 3: //文丘里喷嘴 + tempRed1 = tempconQvA * returnValue; + if (tempRed1 < 150000.0D | tempRed1 > 2000000.0D) + { + JOptionPane.showMessageDialog(null, "雷诺数超过文丘里喷嘴的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + } + break; + case 4: //粗铸收缩段经典文丘里管 + tempRed1 = tempconQvA * returnValue; + if (tempRed1 < 200000.0D | tempRed1 > 2000000.0D) + { + JOptionPane.showMessageDialog(null, "雷诺数超过粗铸收缩段经典文丘里管的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + return returnValue; + } + break; + case 5: //机械加工收缩段经典文丘里管 + tempRed1 = tempconQvA * returnValue; + if (tempRed1 < 200000.0D | tempRed1 > 1000000.0D) + { + JOptionPane.showMessageDialog(null, "雷诺数超过机械加工收缩段经典文丘里管的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + } + break; + case 6: //粗焊铁板收缩段经典文丘里管 + tempRed1 = tempconQvA * returnValue; + if (tempRed1 < 200000.0D | tempRed1 > 2000000.0D) + { + JOptionPane.showMessageDialog(null, "雷诺数超过粗焊铁板收缩段经典文丘里管的使用范围!停止计算!", "提示", JOptionPane.PLAIN_MESSAGE); + } + break; + + //标准孔板 + //ISA1932喷嘴 + //长径喷嘴 + //文丘里喷嘴 + //粗铸收缩段经典文丘里管 + //机械加工收缩段经典文丘里管 + //粗焊铁板收缩段经典文丘里管 + + + + + } + return returnValue; + } + + private double BkTable(double temPrk, double tempKj, int tempBkjsff) + { + + double[] BkTable_x = new double[10]; + double[] BkTable_Y = new double[10]; + + + //On Error Resume Next VBConversions Warning: On Error Resume Next not supported in C# + + if (tempBkjsff == 1) + { + + double tempRkBiKj = 0; + tempRkBiKj = temPrk / tempKj; + + // static double[] x = new double[10]; //VBConversions Note: Static variable moved to class level and renamed BkTable_x. Local static variables are not supported in C#. + // static double[] Y = new double[10]; //VBConversions Note: Static variable moved to class level and renamed BkTable_Y. Local static variables are not supported in C#. + int i = 0; + int xIndex = 0; + //If x(0) = 0 Then + BkTable_x[0] = 0.0004F; + BkTable_x[1] = 0.001F; + BkTable_x[2] = 0.002F; + BkTable_x[3] = 0.004F; + BkTable_x[4] = 0.006F; + BkTable_x[5] = 0.008F; + BkTable_x[6] = 0.01F; + BkTable_x[7] = 0.012F; + BkTable_x[8] = 0.014F; + BkTable_x[9] = 0.015F; + + BkTable_Y[0] = 1; + BkTable_Y[1] = 1.005F; + BkTable_Y[2] = 1.012F; + BkTable_Y[3] = 1.022F; + BkTable_Y[4] = 1.032F; + BkTable_Y[5] = 1.04F; + BkTable_Y[6] = 1.048F; + BkTable_Y[7] = 1.055F; + BkTable_Y[8] = 1.062F; + BkTable_Y[9] = 1.065F; + //End If + + if (tempRkBiKj <= 0.0004) + { + return 1; + + } + if (tempRkBiKj > 0.015) + { + return 1.065F; + + } + + for (i = 0; i <= 8; i++) + { + if (tempRkBiKj >= BkTable_x[i] && tempRkBiKj <= BkTable_x[i + 1]) + { + xIndex = i; + break; + } + } + return BkTable_Y[xIndex] + (tempRkBiKj - BkTable_x[xIndex]) * (BkTable_Y[xIndex + 1] - BkTable_Y[xIndex]) / (BkTable_x[xIndex + 1] - BkTable_x[xIndex]); + } + return 0; + } + //管道粗糙度计算 + private double CcdXsjs(double tempPipeType, double tempGj, double tempZjb, double TempRed) + { + double returnValue = 0; + //粗糙度系数计算 + double Jdccd = 0; //绝对粗糙度 + double Xdccd = 0; //相对粗糙度 + //Dim CcdXs As single + double s1 = 0; + double s2 = 0; + double ky = 0; + double kx = 0; + int i = 0; + int m = 0; + int n = 0; + if (tempPipeType == 0) + { + Jdccd = 0.029F; + + Jdccd = 0.075F; + } + else if (tempPipeType == 2) + { + Jdccd = 0.075F; + + Jdccd = 0.075F; + } + else if (tempPipeType == 4) + { + Jdccd = 0.1F; + + Jdccd = 0.15F; + } + else if (tempPipeType == 6) + { + Jdccd = 1; + + Jdccd = 2.1F; + } + else if (tempPipeType == 8) + { + Jdccd = 0.04F; + + Jdccd = 0.15F; + } + else if (tempPipeType == 10) + { + Jdccd = 0.13F; + + Jdccd = 0.25F; + } + Xdccd = tempGj / Jdccd; + if (Xdccd < 400) + { + JOptionPane.showMessageDialog(null, "粗糙度取得太高,粗略计算", "提示", JOptionPane.PLAIN_MESSAGE); + Xdccd = 400; + } + if (Xdccd >= 3400) + { + Xdccd = 3400; + } + + if (Xdccd < 3200 & Math.pow(tempZjb, 2) > 0.1 & Math.pow(tempZjb, 2) < 0.64) + { + + int[] Xdccdb = new int[10]; + double[] Btf = new double[8]; + double[][] CcdXsb = new double[10][8]; + + Xdccdb[0] = 400; + Xdccdb[1] = 800; + Xdccdb[2] = 1200; + Xdccdb[3] = 1600; + Xdccdb[4] = 2000; + Xdccdb[5] = 2400; + Xdccdb[6] = 2800; + Xdccdb[7] = 3200; + Xdccdb[8] = 3400; + + Btf[0] = 0.1F; + Btf[1] = 0.2F; + Btf[2] = 0.3F; + Btf[3] = 0.4F; + Btf[4] = 0.5F; + Btf[5] = 0.6F; + Btf[6] = 0.64F; + + CcdXsb[0][0] = 1.002; + CcdXsb[1][0] = 1; + CcdXsb[2][0] = 1; + CcdXsb[3][0] = 1; + CcdXsb[4][0] = 1; + CcdXsb[5][0] = 1; + CcdXsb[6][0] = 1; + CcdXsb[7][0] = 1; + CcdXsb[8][0] = 1; + CcdXsb[0][1] = 1.003; + CcdXsb[1][1] = 1.002; + CcdXsb[2][1] = 1.001; + CcdXsb[3][1] = 1; + CcdXsb[4][1] = 1; + CcdXsb[5][1] = 1; + CcdXsb[6][1] = 1; + CcdXsb[7][1] = 1; + CcdXsb[8][0] = 1; + CcdXsb[0][2] = 1.006; + CcdXsb[1][2] = 1.004; + CcdXsb[2][2] = 1.002; + CcdXsb[3][2] = 1.001; + CcdXsb[4][2] = 1; + CcdXsb[5][2] = 1; + CcdXsb[6][2] = 1; + CcdXsb[7][2] = 1; + CcdXsb[8][0] = 1; + CcdXsb[0][3] = 1.009; + CcdXsb[1][3] = 1.006; + CcdXsb[2][3] = 1.004; + CcdXsb[3][3] = 1.002; + CcdXsb[4][3] = 1.001; + CcdXsb[5][3] = 1; + CcdXsb[6][3] = 1; + CcdXsb[7][3] = 1; + CcdXsb[8][0] = 1; + CcdXsb[0][4] = 1.014; + CcdXsb[1][4] = 1.009; + CcdXsb[2][4] = 1.006; + CcdXsb[3][4] = 1.004; + CcdXsb[4][4] = 1.002; + CcdXsb[5][4] = 1.001; + CcdXsb[6][4] = 1; + CcdXsb[7][4] = 1; + CcdXsb[8][0] = 1; + CcdXsb[0][5] = 1.02; + CcdXsb[1][5] = 1.013; + CcdXsb[2][5] = 1.009; + CcdXsb[3][5] = 1.006; + CcdXsb[4][5] = 1.003; + CcdXsb[5][5] = 1.002; + CcdXsb[6][5] = 1; + CcdXsb[7][5] = 1; + CcdXsb[8][0] = 1; + CcdXsb[0][6] = 1.024; + CcdXsb[1][6] = 1.016; + CcdXsb[2][6] = 1.011; + CcdXsb[3][6] = 1.007; + CcdXsb[4][6] = 1.004; + CcdXsb[5][6] = 1.002; + CcdXsb[6][6] = 1.002; + CcdXsb[7][6] = 1; + CcdXsb[8][0] = 1; + + for (i = 0; i <= 8; i++) + { + if (Xdccd >= Xdccdb[i] && Xdccd <= Xdccdb[i + 1]) + { + m = i; + break; + } + } + for (i = 0; i <= 6; i++) + { + if (Math.pow(tempZjb, 2) >= Btf[i] && Math.pow(tempZjb, 2) <= Btf[i + 1]) + { + n = i; + break; + } + } + + ky = (Btf[n + 1] - Btf[n] != 0) ? ((Math.pow(tempZjb, 2) - Btf[n]) / (Btf[n + 1] - Btf[n])) : 0; + + kx = (Xdccdb[m + 1] - Xdccdb[m] != 0) ? ((Xdccd - Xdccdb[m]) / (Xdccdb[m + 1] - Xdccdb[m])) : 0; + + s1 = CcdXsb[m][n] + (CcdXsb[m][n + 1] - CcdXsb[m][n]) * ky; + s2 = CcdXsb[m + 1][n] + (CcdXsb[m + 1][n + 1] - CcdXsb[m + 1][n]) * ky; + returnValue = s1 + (s2 - s1) * kx; + + returnValue = TempRed > 1000000.0 ? returnValue : ((returnValue - 1) * Math.pow((Math.log10(TempRed) / 2), 2) + 1); + + } + else + { + returnValue = 1; + } + return returnValue; + } + + // ######################################################################### + // ######################'流量转换 标况转工况############################## + // ######################################################################## + public static double FlowConvert_BaseToWork(FlowProps flowProps, GasProps gasProps) + { + double tempPn = 0; + double tempTn = 0; + + try + { + + if (gasProps.dZf == 0 || gasProps.dZb == 0) + { + return 0.0; + } + + + switch (gasProps.dCbtj) + { + case 2: + tempPn = 101325; + tempTn = 273.15; + break; + + case 1: + tempPn = 101325; + tempTn = 288.15; + break; + + case 0: + tempPn = 101325; + tempTn = 293.15; + break; + + case 3: + tempPn = 10155981; + tempTn = 288.7055555; + break; + } + + + flowProps.setdVFlowf(flowProps.getdVFlowb() * (tempPn * flowProps.getdTf() * gasProps.dZf) / (flowProps.getdPf() * tempTn * gasProps.dZb)); + return flowProps.getdVFlowf(); + // WARNING: ErrDo: is not supported + } + catch (RuntimeException exc) + { + return 0.0; + + } + } + + // ######################################################################### + // ######################流量转换工况转标况############################## + // ######################################################################## + public static double FlowConvert_WorkToBase(FlowProps flowProps, GasProps gasProps) + { + double tempPn = 0; + double tempTn = 0; + + // WARNING: On Error GOTO ErrDo is not supported + try + { + + switch (gasProps.dCbtj) + { + case 2: + tempPn = 101325; + tempTn = 273.15; + break; + + case 1: + tempPn = 101325; + tempTn = 288.15; + break; + + case 0: + tempPn = 101325; + tempTn = 293.15; + break; + + case 3: + tempPn = 0.10155981; + tempTn = 288.7055555; + break; + } + flowProps.setdVFlowb(flowProps.getdVFlowf() * (flowProps.getdPf() * tempTn * gasProps.dZb) / (tempPn * flowProps.getdTf() * gasProps.dZf)); + return flowProps.getdVFlowb(); + // WARNING: ErrDo: is not supported + } + catch (RuntimeException exc) + { + return 0.0; + } + + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/controller/GasController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/controller/GasController.java new file mode 100644 index 0000000..08f64ab --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/controller/GasController.java @@ -0,0 +1,176 @@ +package com.ruoyi.ngCalTools.controller; + +// GasController.java + +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.ngCalTools.model.GasProps; +import com.ruoyi.ngCalTools.model.FlowProps; +import com.ruoyi.ngCalTools.service.DetailService; +import com.ruoyi.ngCalTools.service.GBT11062Service; +import com.ruoyi.ngCalTools.service.ThermService; +import com.ruoyi.ngCalTools.utils.GasConstants; +import com.ruoyi.system.controller.SysUnitConvertController; +import com.ruoyi.system.controller.UnitConvert; +import org.springframework.web.bind.annotation.*; + +@RestController +@RequestMapping("/NGCalcTools") +public class GasController { + + + private final UnitConvert unitConvert; + public ThermService thermService; + public DetailService detailService; + public GBT11062Service gbt11062Service; + + public GasController(UnitConvert unitConvert) { + this.unitConvert = unitConvert; + } + @PostMapping ("/ngCalc") + public AjaxResult ngCalc(@RequestBody FlowProps flowProps) { + thermService = new ThermService(); + detailService = new DetailService(); + gbt11062Service = new GBT11062Service(); + GasProps gasProps = new GasProps(); + //大气压力转换成Pa + double tempPatm = unitConvert.ConvertUniter("pressure", flowProps.getdPatm(), flowProps.getdPatmUnit(), 0); + //压力转换成Pa + double tempPf = unitConvert.ConvertUniter("pressure", flowProps.getdPf(), flowProps.getdPfUnit(), 0); + //温度转换成K + double tempTf = unitConvert.ConvertUniter("temperature", flowProps.getdTf(), flowProps.getdTfUnit(), 2); + if (flowProps.getdPfType() == 0) //0是表压 + { + gasProps.dPf = tempPatm + tempPf; + } else { + gasProps.dPf = tempPf; + } + gasProps.dTf = tempTf; + gasProps.dCbtj = flowProps.getdCbtj(); + String[] stringArray = flowProps.getdngComponents().split("_"); + double[] doubleArray = new double[stringArray.length]; // 遍历字符串数组,将每个元素转换为 double 类型 + for (int i = 0; i < stringArray.length; i++) { + try { + doubleArray[i] = Double.parseDouble(stringArray[i]) / 100; + } catch (NumberFormatException e) { + // 处理转换异常 + System.err.println("无法将字符串 " + stringArray[i] + " 转换为 double 类型: " + e.getMessage()); + } + } + gasProps.adMixture = doubleArray; + Crit(gasProps, 0); //计算临界流函数所有参数都计算了 + return AjaxResult.success(gasProps); + } + + + + public void ngCalcVoid( FlowProps flowProps,GasProps gasProps) { + thermService = new ThermService(); + detailService = new DetailService(); + gbt11062Service = new GBT11062Service(); + + Crit(gasProps, 0); //计算临界流函数所有参数都计算了 + + } + + public int NG_Cal_Init() { + //create object for calculating density + if (null == (detailService=new DetailService())) { + return GasConstants.MEMORY_ALLOCATION_ERROR; + } + + //create object for calculating thermodynamic properties + if (null == (thermService=new ThermService())) { + return GasConstants.MEMORY_ALLOCATION_ERROR; + } + + return GasConstants.NG_Cal_INITIALIZED; + + }// NG_Cal_Init + public int NG_Cal_UnInit() { + // delete the objects (if they exist) + detailService = null; + thermService = null; + return 0; + + } + + public double Crit(GasProps gasProps, double dPlenumVelocity) + { + //variables local to function + double DH, DDH, S, H; + double tolerance = 1.0; + double R, P, T, Z; + + int i; + + //check objects for readiness; try to initialize if not + if (null == detailService || null == thermService) + { + NG_Cal_UnInit(); + + if (GasConstants.NG_Cal_INITIALIZED != NG_Cal_Init()) + { + + gasProps.lStatus =GasConstants. MEMORY_ALLOCATION_ERROR; return 0.0; + + } + } + switch (gasProps.dCbtj) + { + case 2: + gasProps.dPb = 101325; + gasProps.dTb = 273.15; + break; + case 1: + gasProps.dPb = 101325; + gasProps.dTb = 288.15; + break; + case 0: + gasProps.dPb = 101325; + gasProps.dTb = 293.15; + break; + + + } + //begin by calculating densities and thermodynamic properties + thermService.Run(gasProps, detailService); + + //DH is enthalpy change from plenum to throat; this is our initial guess + + DH = (gasProps.dSOS * gasProps.dSOS - dPlenumVelocity * dPlenumVelocity) / 2.0; + + //trap plenum conditions before we alter the data stucture's contents + S = gasProps.dS; + + H = gasProps.dH; + + R = gasProps.dRhof; + P = gasProps.dPf; + Z = gasProps.dZf; + T = gasProps.dTf; + + DDH = 10.0; + + for (i = 1; i < GasConstants.MAX_NUM_OF_ITERATIONS; i++) + { + thermService.HS_Mode( gasProps, detailService, H - DH, S, true); + thermService.Run( gasProps, detailService); + DDH = DH; + DH = (gasProps.dSOS * gasProps.dSOS - dPlenumVelocity * dPlenumVelocity) / 2.0; + if (Math.abs(DDH - DH) < tolerance) break; + } + gasProps.dCstar = (gasProps.dRhof * gasProps.dSOS) / Math.sqrt(R * P * Z); + gasProps.dPf = P; + gasProps.dTf = T; + thermService.Run(gasProps, detailService); + gbt11062Service.Run(gasProps ); + return gasProps.dCstar; + + } + +} + + + + + diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/enums/GasComponent.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/enums/GasComponent.java new file mode 100644 index 0000000..8ee76b4 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/enums/GasComponent.java @@ -0,0 +1,7 @@ +package com.ruoyi.ngCalTools.enums; + +public enum GasComponent { + XiC1, XiN2, XiCO2, XiC2, XiC3, + XiH2O, XiH2S, XiH2, XiCO, XiO2, XiIC4, XiNC4, + XiIC5, XiNC5, XiNC6, XiNC7, XiNC8, XiNC9, XiNC10, XiHe, XiAr +} \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/model/FlowProps.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/model/FlowProps.java new file mode 100644 index 0000000..f2e6022 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/model/FlowProps.java @@ -0,0 +1,592 @@ +package com.ruoyi.ngCalTools.model; + +public class FlowProps { + // 流量计算输入参数信息 + private int dFlowCalbz; // 流量计算标准 + + public int getdZcalbz() { + return dZcalbz; + } + + public void setdZcalbz(int dZcalbz) { + this.dZcalbz = dZcalbz; + } + + public int getdFlowCalbz() { + return dFlowCalbz; + } + + public void setdFlowCalbz(int dFlowCalbz) { + this.dFlowCalbz = dFlowCalbz; + } + + public int getdCbtj() { + return dCbtj; + } + + public void setdCbtj(int dCbtj) { + this.dCbtj = dCbtj; + } + + public double getdPb_M() { + return dPb_M; + } + + public void setdPb_M(double dPb_M) { + this.dPb_M = dPb_M; + } + + public double getdTb_M() { + return dTb_M; + } + + public void setdTb_M(double dTb_M) { + this.dTb_M = dTb_M; + } + + public double getdPb_E() { + return dPb_E; + } + + public void setdPb_E(double dPb_E) { + this.dPb_E = dPb_E; + } + + public double getdTb_E() { + return dTb_E; + } + + public void setdTb_E(double dTb_E) { + this.dTb_E = dTb_E; + } + + public double getdPatm() { + return dPatm; + } + + public void setdPatm(double dPatm) { + this.dPatm = dPatm; + } + + public int getdPatmUnit() { + return dPatmUnit; + } + + public void setdPatmUnit(int dPatmUnit) { + this.dPatmUnit = dPatmUnit; + } + + public String getdngComponents() { + return dngComponents; + } + + public void setdngComponents(String dngComponents) { + this.dngComponents = dngComponents; + } + + public int getdMeterType() { + return dMeterType; + } + + public void setdMeterType(int dMeterType) { + this.dMeterType = dMeterType; + } + + public int getdCoreType() { + return dCoreType; + } + + public void setdCoreType(int dCoreType) { + this.dCoreType = dCoreType; + } + + public int getdPtmode() { + return dPtmode; + } + + public void setdPtmode(int dPtmode) { + this.dPtmode = dPtmode; + } + + public int getdPipeType() { + return dPipeType; + } + + public void setdPipeType(int dPipeType) { + this.dPipeType = dPipeType; + } + + public double getdPipeD() { + return dPipeD; + } + + public void setdPipeD(double dPipeD) { + this.dPipeD = dPipeD; + } + + public int getdLenUnit() { + return dLenUnit; + } + + public void setdLenUnit(int dLenUnit) { + this.dLenUnit = dLenUnit; + } + + public double getdPipeDtemp() { + return dPipeDtemp; + } + + public void setdPipeDtemp(double dPipeDtemp) { + this.dPipeDtemp = dPipeDtemp; + } + + public int getdPileDtempUint() { + return dPileDtempUint; + } + + public void setdPileDtempUint(int dPileDtempUint) { + this.dPileDtempUint = dPileDtempUint; + } + + public double getdPipeMaterial() { + return dPipeMaterial; + } + + public void setdPipeMaterial(double dPipeMaterial) { + this.dPipeMaterial = dPipeMaterial; + } + + public double getdOrificeD() { + return dOrificeD; + } + + public void setdOrificeD(double dOrificeD) { + this.dOrificeD = dOrificeD; + } + + public int getdOrificeUnit() { + return dOrificeUnit; + } + + public void setdOrificeUnit(int dOrificeUnit) { + this.dOrificeUnit = dOrificeUnit; + } + + public double getdOrificeDtemp() { + return dOrificeDtemp; + } + + public void setdOrificeDtemp(double dOrificeDtemp) { + this.dOrificeDtemp = dOrificeDtemp; + } + + public int getdOrificeDtempUnit() { + return dOrificeDtempUnit; + } + + public void setdOrificeDtempUnit(int dOrificeDtempUnit) { + this.dOrificeDtempUnit = dOrificeDtempUnit; + } + + public double getdOrificeMaterial() { + return dOrificeMaterial; + } + + public void setdOrificeMaterial(double dOrificeMaterial) { + this.dOrificeMaterial = dOrificeMaterial; + } + + public int getdOrificeSharpness() { + return dOrificeSharpness; + } + + public void setdOrificeSharpness(int dOrificeSharpness) { + this.dOrificeSharpness = dOrificeSharpness; + } + + public double getdOrificeRk() { + return dOrificeRk; + } + + public void setdOrificeRk(double dOrificeRk) { + this.dOrificeRk = dOrificeRk; + } + + public int getdOrificeRkLenUint() { + return dOrificeRkLenUint; + } + + public void setdOrificeRkLenUint(int dOrificeRkLenUint) { + this.dOrificeRkLenUint = dOrificeRkLenUint; + } + + public double getdPf() { + return dPf; + } + + public void setdPf(double dPf) { + this.dPf = dPf; + } + + public int getdPfUnit() { + return dPfUnit; + } + + public void setdPfUnit(int dPfUnit) { + this.dPfUnit = dPfUnit; + } + + public int getdPfType() { + return dPfType; + } + + public void setdPfType(int dPfType) { + this.dPfType = dPfType; + } + + public double getdTf() { + return dTf; + } + + public void setdTf(double dTf) { + this.dTf = dTf; + } + + public int getdTfUnit() { + return dTfUnit; + } + + public void setdTfUnit(int dTfUnit) { + this.dTfUnit = dTfUnit; + } + + public double getdDp() { + return dDp; + } + + public void setdDp(double dDp) { + this.dDp = dDp; + } + + public int getdDpUnit() { + return dDpUnit; + } + + public void setdDpUnit(int dDpUnit) { + this.dDpUnit = dDpUnit; + } + + public int getdVFlowUnit() { + return dVFlowUnit; + } + + public void setdVFlowUnit(int dVFlowUnit) { + this.dVFlowUnit = dVFlowUnit; + } + + public int getdMFlowUnit() { + return dMFlowUnit; + } + + public void setdMFlowUnit(int dMFlowUnit) { + this.dMFlowUnit = dMFlowUnit; + } + + public int getdEFlowUnit() { + return dEFlowUnit; + } + + public void setdEFlowUnit(int dEFlowUnit) { + this.dEFlowUnit = dEFlowUnit; + } + + public double getdCd() { + return dCd; + } + + public void setdCd(double dCd) { + this.dCd = dCd; + } + + public double getdMeterFactor() { + return dMeterFactor; + } + + public void setdMeterFactor(double dMeterFactor) { + this.dMeterFactor = dMeterFactor; + } + + public double getdPulseNum() { + return dPulseNum; + } + + public void setdPulseNum(double dPulseNum) { + this.dPulseNum = dPulseNum; + } + + public double getdVFlowMax() { + return dVFlowMax; + } + + public void setdVFlowMax(double dVFlowMax) { + this.dVFlowMax = dVFlowMax; + } + + public double getdVFlowMin() { + return dVFlowMin; + } + + public void setdVFlowMin(double dVFlowMin) { + this.dVFlowMin = dVFlowMin; + } + + public double getdVFlowCon() { + return dVFlowCon; + } + + public void setdVFlowCon(double dVFlowCon) { + this.dVFlowCon = dVFlowCon; + } + + public double getdPfRange() { + return dPfRange; + } + + public void setdPfRange(double dPfRange) { + this.dPfRange = dPfRange; + } + + public double getdDpRange() { + return dDpRange; + } + + public void setdDpRange(double dDpRange) { + this.dDpRange = dDpRange; + } + + public double getdTfRange() { + return dTfRange; + } + + public void setdTfRange(double dTfRange) { + this.dTfRange = dTfRange; + } + + public double getdE() { + return dE; + } + + public void setdE(double dE) { + this.dE = dE; + } + + public double getdFG() { + return dFG; + } + + public void setdFG(double dFG) { + this.dFG = dFG; + } + + public double getdFT() { + return dFT; + } + + public void setdFT(double dFT) { + this.dFT = dFT; + } + + public double getdDViscosity() { + return dDViscosity; + } + + public void setdDViscosity(double dDViscosity) { + this.dDViscosity = dDViscosity; + } + + public double getdDExpCoefficient() { + return dDExpCoefficient; + } + + public void setdDExpCoefficient(double dDExpCoefficient) { + this.dDExpCoefficient = dDExpCoefficient; + } + + public double getdRnPipe() { + return dRnPipe; + } + + public void setdRnPipe(double dRnPipe) { + this.dRnPipe = dRnPipe; + } + + public double getdBk() { + return dBk; + } + + public void setdBk(double dBk) { + this.dBk = dBk; + } + + public double getdRoughNessPipe() { + return dRoughNessPipe; + } + + public void setdRoughNessPipe(double dRoughNessPipe) { + this.dRoughNessPipe = dRoughNessPipe; + } + + public double getdCdCorrect() { + return dCdCorrect; + } + + public void setdCdCorrect(double dCdCorrect) { + this.dCdCorrect = dCdCorrect; + } + + public double getdCdNozell() { + return dCdNozell; + } + + public void setdCdNozell(double dCdNozell) { + this.dCdNozell = dCdNozell; + } + + public double getdVFlowb() { + return dVFlowb; + } + + public void setdVFlowb(double dVFlowb) { + this.dVFlowb = dVFlowb; + } + + public double getdVFlowf() { + return dVFlowf; + } + + public void setdVFlowf(double dVFlowf) { + this.dVFlowf = dVFlowf; + } + + public double getdMFlowb() { + return dMFlowb; + } + + public void setdMFlowb(double dMFlowb) { + this.dMFlowb = dMFlowb; + } + + public double getdEFlowb() { + return dEFlowb; + } + + public void setdEFlowb(double dEFlowb) { + this.dEFlowb = dEFlowb; + } + + public double getdVelocityFlow() { + return dVelocityFlow; + } + + public void setdVelocityFlow(double dVelocityFlow) { + this.dVelocityFlow = dVelocityFlow; + } + + public double getdPressLost() { + return dPressLost; + } + + public void setdPressLost(double dPressLost) { + this.dPressLost = dPressLost; + } + + public double getdBeta() { + return dBeta; + } + + public void setdBeta(double dBeta) { + this.dBeta = dBeta; + } + + public double getdKappa() { + return dKappa; + } + + public void setdKappa(double dKappa) { + this.dKappa = dKappa; + } + + private int dZcalbz; // 压缩因子计算标准 + private int dCbtj; // 计量参比条件压力 + private double dPb_M; // 计量参比条件压力 + private double dTb_M; // 计量参比条件温度 + private double dPb_E; // 燃烧参比条件压力 + private double dTb_E; // 燃烧参比条件温度 + private double dPatm; // 当地大气压 + private int dPatmUnit; // 当地大气压单位 + private String dngComponents; // 天然气组分 + + private int dMeterType; // 流量计类别 + private int dCoreType; // 节流装置类型 + private int dPtmode; // 取压方式 + private int dPipeType; // 管道类型 + private double dPipeD; // 管道内径 + private int dLenUnit; // 长度单位 + private double dPipeDtemp; // 管道内径参考温度 + private int dPileDtempUint; // 温度单位 + private double dPipeMaterial; // 管道材料 + + private double dOrificeD; // 孔板孔径 + private int dOrificeUnit; // 长度单位 + private double dOrificeDtemp; // 孔板内径参考温度 + private int dOrificeDtempUnit; // 温度单位 + private double dOrificeMaterial; // 孔板材料 + private int dOrificeSharpness; // 锐利度系数计算方法 + private double dOrificeRk; // 孔板入口圆弧半径 + private int dOrificeRkLenUint; // 长度单位 + private double dPf; // 输入压力 + private int dPfUnit; // 压力单位 + private int dPfType; // 压力类型 + private double dTf; // 输入温度 + private int dTfUnit; // 温度单位 + private double dDp; // 输入差压 + private int dDpUnit; // 压力单位 + private int dVFlowUnit; // 体积流量单位 + private int dMFlowUnit; // 质量流量单位 + private int dEFlowUnit; // 能量流量单位 + private double dCd; // 流出系数 + private double dMeterFactor; // 仪表系数 + private double dPulseNum; // 脉冲数 + private double dVFlowMax; // 最大体积流量 + private double dVFlowMin; // 最小体积流量 + private double dVFlowCon; // 常用流量 + private double dPfRange; // 压力量程 + private double dDpRange; // 差压量程 + private double dTfRange; // 温度计量程 + + // 流量计算输出参数 + private double dE; // 求渐近速度系数 E + private double dFG; // 求相对密度系数 FG + private double dFT; // 求流动温度系数 FT + private double dDViscosity; // 求动力粘度 dlnd + private double dDExpCoefficient; // 求可膨胀系数 + private double dRnPipe; // 管道雷诺数 + private double dBk; // 孔板锐利度系数Bk + private double dRoughNessPipe; // 管道粗糙度系数 Gme + private double dCdCorrect; // 修正后的流出系数 + private double dCdNozell; // 喷嘴的流出系数 + private double dVFlowb; // 标况体积流量 m³、s + private double dVFlowf; // 工况体积流量 + private double dMFlowb; // 标况质量流量 + private double dEFlowb; // 标况能量流量 + private double dVelocityFlow; // 管道内天然气流速 + private double dPressLost; // 压力损失 + private double dBeta; // 直径比 + private double dKappa; // 等熵指数 + + + // Getters and Setters + + + +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/model/GasProps.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/model/GasProps.java new file mode 100644 index 0000000..6eb9149 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/model/GasProps.java @@ -0,0 +1,513 @@ +package com.ruoyi.ngCalTools.model; + +public class GasProps { + // corresponds to the control group in meter classes + public int lStatus; // calculation status 计算状态 + public boolean bForceUpdate; // 执行全部计算的标志 signal to perform full calculation + + + + public double[] adMixture; // 气体摩尔组成 Composition in mole fraction + public double[] adMixtureV; // 气体体积组成 Composition in mole fraction + + public double[] getAdMixtureD() { + return adMixtureD; + } + + public void setAdMixtureD(double[] adMixtureD) { + this.adMixtureD = adMixtureD; + } + + public int getlStatus() { + return lStatus; + } + + public void setlStatus(int lStatus) { + this.lStatus = lStatus; + } + + public boolean isbForceUpdate() { + return bForceUpdate; + } + + public void setbForceUpdate(boolean bForceUpdate) { + this.bForceUpdate = bForceUpdate; + } + + public double[] getAdMixture() { + return adMixture; + } + + public void setAdMixture(double[] adMixture) { + this.adMixture = adMixture; + } + + public double[] getAdMixtureV() { + return adMixtureV; + } + + public void setAdMixtureV(double[] adMixtureV) { + this.adMixtureV = adMixtureV; + } + + public int getdCbtj() { + return dCbtj; + } + + public void setdCbtj(int dCbtj) { + this.dCbtj = dCbtj; + } + + public double getdPb() { + return dPb; + } + + public void setdPb(double dPb) { + this.dPb = dPb; + } + + public double getdTb() { + return dTb; + } + + public void setdTb(double dTb) { + this.dTb = dTb; + } + + public double getdPf() { + return dPf; + } + + public void setdPf(double dPf) { + this.dPf = dPf; + } + + public double getdTf() { + return dTf; + } + + public void setdTf(double dTf) { + this.dTf = dTf; + } + + public double getdMrx() { + return dMrx; + } + + public void setdMrx(double dMrx) { + this.dMrx = dMrx; + } + + public double getdZb() { + return dZb; + } + + public void setdZb(double dZb) { + this.dZb = dZb; + } + + public double getdZf() { + return dZf; + } + + public void setdZf(double dZf) { + this.dZf = dZf; + } + + public double getdFpv() { + return dFpv; + } + + public void setdFpv(double dFpv) { + this.dFpv = dFpv; + } + + public double getdDb() { + return dDb; + } + + public void setdDb(double dDb) { + this.dDb = dDb; + } + + public double getdDf() { + return dDf; + } + + public void setdDf(double dDf) { + this.dDf = dDf; + } + + public double getdRhob() { + return dRhob; + } + + public void setdRhob(double dRhob) { + this.dRhob = dRhob; + } + + public double getdRhof() { + return dRhof; + } + + public void setdRhof(double dRhof) { + this.dRhof = dRhof; + } + + public double getdRD_Ideal() { + return dRD_Ideal; + } + + public void setdRD_Ideal(double dRD_Ideal) { + this.dRD_Ideal = dRD_Ideal; + } + + public double getdRD_Real() { + return dRD_Real; + } + + public void setdRD_Real(double dRD_Real) { + this.dRD_Real = dRD_Real; + } + + public double getdHo() { + return dHo; + } + + public void setdHo(double dHo) { + this.dHo = dHo; + } + + public double getdH() { + return dH; + } + + public void setdH(double dH) { + this.dH = dH; + } + + public double getdS() { + return dS; + } + + public void setdS(double dS) { + this.dS = dS; + } + + public double getdCpi() { + return dCpi; + } + + public void setdCpi(double dCpi) { + this.dCpi = dCpi; + } + + public double getdCp() { + return dCp; + } + + public void setdCp(double dCp) { + this.dCp = dCp; + } + + public double getdCv() { + return dCv; + } + + public void setdCv(double dCv) { + this.dCv = dCv; + } + + public double getDk() { + return dk; + } + + public void setDk(double dk) { + this.dk = dk; + } + + public double getdKappa() { + return dKappa; + } + + public void setdKappa(double dKappa) { + this.dKappa = dKappa; + } + + public double getdSOS() { + return dSOS; + } + + public void setdSOS(double dSOS) { + this.dSOS = dSOS; + } + + public double getdCstar() { + return dCstar; + } + + public void setdCstar(double dCstar) { + this.dCstar = dCstar; + } + + public double getdHhvMol() { + return dHhvMol; + } + + public void setdHhvMol(double dHhvMol) { + this.dHhvMol = dHhvMol; + } + + public double getdLhvMol() { + return dLhvMol; + } + + public void setdLhvMol(double dLhvMol) { + this.dLhvMol = dLhvMol; + } + + public double getdHhvv() { + return dHhvv; + } + + public void setdHhvv(double dHhvv) { + this.dHhvv = dHhvv; + } + + public double getdLhvv() { + return dLhvv; + } + + public void setdLhvv(double dLhvv) { + this.dLhvv = dLhvv; + } + + public double getdHhvm() { + return dHhvm; + } + + public void setdHhvm(double dHhvm) { + this.dHhvm = dHhvm; + } + + public double getdLhvm() { + return dLhvm; + } + + public void setdLhvm(double dLhvm) { + this.dLhvm = dLhvm; + } + + public double getdZb11062() { + return dZb11062; + } + + public void setdZb11062(double dZb11062) { + this.dZb11062 = dZb11062; + } + + public double getdRhob11062() { + return dRhob11062; + } + + public void setdRhob11062(double dRhob11062) { + this.dRhob11062 = dRhob11062; + } + + public double getdRhof11062() { + return dRhof11062; + } + + public void setdRhof11062(double dRhof11062) { + this.dRhof11062 = dRhof11062; + } + + public double getdRD_Ideal11062() { + return dRD_Ideal11062; + } + + public void setdRD_Ideal11062(double dRD_Ideal11062) { + this.dRD_Ideal11062 = dRD_Ideal11062; + } + + public double getdRD_Real11062() { + return dRD_Real11062; + } + + public void setdRD_Real11062(double dRD_Real11062) { + this.dRD_Real11062 = dRD_Real11062; + } + + public double getdWobbeIndex() { + return dWobbeIndex; + } + + public void setdWobbeIndex(double dWobbeIndex) { + this.dWobbeIndex = dWobbeIndex; + } + + public double getdPc() { + return dPc; + } + + public void setdPc(double dPc) { + this.dPc = dPc; + } + + public double getdTC() { + return dTC; + } + + public void setdTC(double dTC) { + this.dTC = dTC; + } + + public double getdBzsx() { + return dBzsx; + } + + public void setdBzsx(double dBzsx) { + this.dBzsx = dBzsx; + } + + public double getdBzxx() { + return dBzxx; + } + + public void setdBzxx(double dBzxx) { + this.dBzxx = dBzxx; + } + + public double getdTotalC() { + return dTotalC; + } + + public void setdTotalC(double dTotalC) { + this.dTotalC = dTotalC; + } + + public double getdC2() { + return dC2; + } + + public void setdC2(double dC2) { + this.dC2 = dC2; + } + + public double getdC2j() { + return dC2j; + } + + public void setdC2j(double dC2j) { + this.dC2j = dC2j; + } + + public double getdC3j() { + return dC3j; + } + + public void setdC3j(double dC3j) { + this.dC3j = dC3j; + } + + public double getdC4j() { + return dC4j; + } + + public void setdC4j(double dC4j) { + this.dC4j = dC4j; + } + + public double getdC5j() { + return dC5j; + } + + public void setdC5j(double dC5j) { + this.dC5j = dC5j; + } + + public double getdC6j() { + return dC6j; + } + + public void setdC6j(double dC6j) { + this.dC6j = dC6j; + } + + public double getdC3C4() { + return dC3C4; + } + + public void setdC3C4(double dC3C4) { + this.dC3C4 = dC3C4; + } + + public String getDngComponents() { + return dngComponents; + } + + public void setDngComponents(String dngComponents) { + this.dngComponents = dngComponents; + } + + public double[] adMixtureD; // 气体质量组成 Composition in mole fraction + public int dCbtj; // 参比条件 101325 0,15,20 + public double dPb; // 参比压力 Contract base Pressure (Pa) + public double dTb; // 参比温度Contract base temperature (K) + public double dPf; // 绝对压力 Absolute Pressure (Pa) + public double dTf; // 工况温度 Flowing temperature (K) + // basic output from AGA 8 Detail method + public double dMrx; // 分子量 mixture molar mass + public double dZb; // 标况压缩因子compressibility at contract base condition + public double dZf; // 工况压缩因子compressibility at flowing condition + public double dFpv; // 超压缩系数 supercompressibility + public double dDb; // 标况摩尔密度molar density at contract base conditions (moles/dm3) + public double dDf; // 工况摩尔密度 molar density at flowing conditions (moles/dm3) + public double dRhob; // 标况质量密度mass density at contract base conditions (kg/m3) + public double dRhof; // 工况质量密度 mass density at flowing conditions (kg/m3) + public double dRD_Ideal; // 理想气体的相对密度ideal gas relative density + public double dRD_Real; // 真实气体的相对密度real gas relative density + // additional output + public double dHo; // 理想气体的比焓 ideal gas specific enthalpy + public double dH; // 真实气体的焓 real gas specific enthalpy (J/kg) + public double dS; // 真实气体的熵real gas specific entropy (J/kg-mol.K) + public double dCpi; // 理想气体定压热容 ideal gas constant pressure heat capacity (J/kg-mol.K) + public double dCp; // 定压热容real gas constant pressure heat capacity (J/kg-mol.K) + public double dCv; // 定容积热容 real gas constant volume heat capacity (J/kg-mol.K) + public double dk; // 比热比ratio of specific heats + public double dKappa; // 等熵指数 isentropic exponent, denoted with Greek letter kappa + public double dSOS; // 声速speed of sound (m/s) + public double dCstar; // 临界流函数 critical flow factor C* + + // 11062 输出 + public double dHhvMol; // 摩尔高位发热量 + public double dLhvMol; // 摩尔低位发热量 + public double dHhvv; // 体积高位发热量 + public double dLhvv; // 体积低位发热量 + public double dHhvm; // 质量高位发热量 + public double dLhvm; // 质量地位发热量 + + public double dZb11062; // 标况压缩因子 + public double dRhob11062; // 标况质量密度mass density at contract base conditions (kg/m3) + public double dRhof11062; // 工况质量密度 mass density at flowing conditions (kg/m3) + public double dRD_Ideal11062; // 理想气体的相对密度ideal gas relative density + public double dRD_Real11062; // 真实气体的相对密度real gas relative density + public double dWobbeIndex; // 真实气体的沃泊指数 + + public double dPc; // 临界压力 + public double dTC; // 临界温度 + public double dBzsx; // 爆炸上限 + public double dBzxx; // 爆炸下限 + public double dTotalC; // 总炭含量 (kg/m3) + public double dC2; // C2组分含量 (kg/m3) + public double dC2j; // C2以上组分含量 (kg/m3) + public double dC3j; // C3以上组分含量 (kg/m3) + public double dC4j; // C4以上组分含量 (kg/m3) + public double dC5j; // C5以上组分含量 (kg/m3) + public double dC6j; // C6以上组分含量 (kg/m3) + public double dC3C4; // C3C4组分含量 (kg/m3) + public String dngComponents; //组分的组合字符串 从前端传过来 + + + +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/DetailService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/DetailService.java new file mode 100644 index 0000000..b549bdc --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/DetailService.java @@ -0,0 +1,1388 @@ +package com.ruoyi.ngCalTools.service; + +import com.ruoyi.ngCalTools.model.GasProps; +import com.ruoyi.ngCalTools.utils.GasConstants; +import org.springframework.stereotype.Service; + +@Service +public class DetailService { + + private static final double RGASKJ = 8.314510e-3; + + // 成员变量转换 + // 组件数量 + private int iNCC; + // 组件ID数组,长度为21 + private int[] aiCID = new int[21]; + + // 五个历史变量,用于在重复计算时提高效率 +// 上一次计算的混合物ID + double dOldMixID; + // 上一次计算的Pb值 + double dOldPb; + // 上一次计算的Tb值 + double dOldTb; + // 上一次计算的Pf值 + double dOldPf; + // 上一次计算的Tf值 + double dOldTf; + + // 来自表4第1列的EOS参数 +// 长度为58的数组adAn + double[] adAn = new double[58]; + // 长度为58的数组adUn + double[] adUn = new double[58]; + + // 来自表5的特征参数 +// 第i个组件的分子量 + double[] dMri = new double[21]; + // 第i个组件的特征能量参数 + double[] dEi = new double[21]; + // 第i个组件的尺寸参数 - m^3/kg-mol ^1/3 + double[] dKi = new double[21]; + // 取向参数 + double[] dGi = new double[21]; + // 四极矩参数 + double[] dQi = new double[21]; + // 高温参数 + double[] dFi = new double[21]; + // 偶极矩参数 + double[] dSi = new double[21]; + // 关联参数 + double[] dWi = new double[21]; + // 维里系数能量二元相互作用参数 + double[][] dEij = new double[21][21]; + // 共形能量的二元相互作用参数 + double[][] dUij = new double[21][21]; + // 尺寸的二元相互作用参数 + double[][] dKij = new double[21][21]; + // 取向的二元相互作用参数 + double[][] dGij = new double[21][21]; + // 表6常量 + double[][] adTable6Eij = new double[21][21]; + // 表6常量 + double[][] adTable6Uij = new double[21][21]; + // 表6常量 + double[][] adTable6Kij = new double[21][21]; + // 表6常量 + double[][] adTable6Gij = new double[21][21]; + double[] adTable5Qi = new double[21]; // table 5 constants + double[] adTable5Fi = new double[21]; // table 5 constants + double[] adTable5Si = new double[21]; // table 5 constants + double[] adTable5Wi = new double[21]; // table 5 constants + // 组件i的摩尔分数数组,长度为21 + double[] dXi = new double[21]; + // 由pdetail()方法计算得到的压力 + double dPCalc; + // 当前温度 + double dT; + // 当前压力 + double dP; + // 在温度T和压力P下的摩尔密度 + double dRhoTP; + // 第二维里系数B + double dB; + // 用于计算B的18个系数的数组 + double[] adBcoef = new double[18]; + // 密度系数的函数数组,长度为58 + double[] adFn = new double[58]; + // 用于3个导数的修正系数数组,长度为58 + double[] fx = new double[58]; + // 混合能量参数 + double dU; + // 混合尺寸参数的三次方 + double dKp3; + // 混合取向参数 + double dW; + // 混合四极矩参数的平方 + double dQp2; + // 高温参数 + double dF; + // 摩尔密度 + double dRho; + // 在braket函数中使用的低密度 + double dRhoL; + // 在braket函数中使用的高密度 + double dRhoH; + // 在braket函数中使用的低压 + double dPRhoL; + // 在braket函数中使用的高压 + double dPRhoH; + + // 也用于高级流体性质计算的公共变量 +// 当前压缩因子 + public double dZ; + // Z对T的一阶偏导数 + public double ddZdT; + // Z对T的二阶偏导数 + public double dd2ZdT2; + // Z对摩尔密度的一阶偏导数 + public double ddZdD; + // B对T的一阶偏导数 + public double ddBdT; + // B对T的二阶偏导数 + public double dd2BdT2; + + + // 构造函数 + public DetailService() + { + //initialize history-sensitive variables + dOldMixID = 0.0; // mixture ID from previous calc + dOldPb = 0.0; // base pressure from previous calc + dOldTb = 0.0; // base temperature from previous calc + dOldPf = 0.0; // flowing pressure from previous calc + dOldTf = 0.0; // flowing temperature from previous calc + + //initialize gas component array used within this class + for (int i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) dXi[i] = 0; + // function table() populates tables of static constants + table(); + + } + + public void run(GasProps gasProps) { + // 实现转换后的逻辑 + + + int i; + // Check for gas composition change + gasProps.bForceUpdate = (gasProps.bForceUpdate || compositionChange(gasProps)); + + // assign component IDs and values + if (gasProps.bForceUpdate) { + iNCC = -1; + for (i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) { + if (gasProps.adMixture[i] > 0.0) { + iNCC = iNCC + 1; + aiCID[iNCC] = i; + dXi[iNCC] = gasProps.adMixture[i]; + } + } + iNCC = iNCC + 1; + //calculate composition dependent quantities; ported from original + //FORTRAN functions paramdl() and chardl() + paramdl(); + chardl(gasProps); + } + + //evaluate T & P dependent parms at base pressure and temperature, + //but only if necessary + if (Math.abs(gasProps.dPb - dOldPb) > GasConstants.P_CHG_TOL || Math.abs(gasProps.dTb - dOldTb) > GasConstants.T_CHG_TOL || gasProps.bForceUpdate) { + dP = gasProps.dPb * 1.0e-6; // AGA 8 uses MPa internally + dT = gasProps.dTb; + //calculate temperature dependent parms + temp(); + //determine molar density + ddetail(gasProps); + gasProps.dDb = dRho; + //determine compressibility + gasProps.dZb = zdetail(dRho); + // calculate mass density + dRhoTP = (dP * gasProps.dMrx) / (gasProps.dZb * GasConstants.RGASKJ * dT); + //calculate relative density + relativedensity(gasProps); + //copy density to data structure member + gasProps.dRhob = dRhoTP; + //update history and clear the ForceUpdate flag + dOldTb = gasProps.dTb; + dOldPb = gasProps.dPb; + gasProps.bForceUpdate = true; + } + + //repeat the process using flowing conditions + //begin by loading P & T from data structure + //AGA 8 uses MPa internally; converted from Pa here + dP = gasProps.dPf * 1.0e-6; + dT = gasProps.dTf; + + //check whether to calculate temperature dependent parms + if (Math.abs(gasProps.dTf - dOldTf) > GasConstants.T_CHG_TOL || gasProps.bForceUpdate) { + //if temperature has changed, we must follow through + temp(); + //force ForceUpdate flag to true + gasProps.bForceUpdate = true; + } + + // check whether to calculate other parms + if (Math.abs(gasProps.dPf - dOldPf) > GasConstants.P_CHG_TOL || gasProps.bForceUpdate) { + //determine molar density + ddetail(gasProps); + gasProps.dDf = dRho; + //determine compressibility + gasProps.dZf = zdetail(dRho); + //calculate mass density + dRhoTP = (dP * gasProps.dMrx) / (gasProps.dZf * GasConstants.RGASKJ * dT); + //copy density to data structure member + gasProps.dRhof = dRhoTP; + //update history + dOldTf = gasProps.dTf; + dOldPf = gasProps.dPf; + } + + //calculate legacy factor Fpv + //NOTE: as implemented here, Fpv is not constrained to 14.73 psi and 60F + if (gasProps.dZb > 0.0 && gasProps.dZf > 0.0) { + gasProps.dFpv = Math.sqrt(gasProps.dZb / gasProps.dZf); + } else { + //if either Zb or Zf is zero at this point, we have a serious unexpected problem + gasProps.dFpv = gasProps.dZb = gasProps.dZf = 0.0; + gasProps.lStatus = GasConstants.GENERAL_CALCULATION_FAILURE; + } + + //we are now up to date; toggle off the update flag + gasProps.bForceUpdate = false; + + + // 其他计算逻辑... + } + + private boolean compositionChange(GasProps gasProps) { + double dMixID = 0.0; + for (int i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) { + dMixID += ((i + 2) * gasProps.adMixture[i]); + }if (dMixID != dOldMixID) { + dOldMixID = dMixID; + return true; + } + return false; + } + + public void paramdl() { + + int j, k; + // table 5 parameters; declared locally to this function + double[] adTable5Mri; + double[] adTable5Ei; + double[] adTable5Ki; + double[] adTable5Gi; + + // 初始化adTable5Mri数组 + adTable5Mri = new double[]{16.0430, 28.0135, 44.0100, 30.0700, 44.0970, 18.0153, 34.0820, 2.0159, 28.0100, 31.9988, 58.1230, 58.1230, 72.1500, 72.1500, 86.1770, 100.2040, 114.2310, 128.2580, 142.2850, 4.0026, 39.9480}; + + // 初始化adTable5Ei数组 + adTable5Ei = new double[]{151.318300, 99.737780, 241.960600, 244.166700, 298.118300, 514.015600, 296.355000, 26.957940, 105.534800, 122.766700, 324.068900, 337.638900, 365.599900, 370.682300, 402.636293, 427.722630, 450.325022, 470.840891, 489.558373, 2.610111, 119.629900}; + + // 初始化adTable5Ki数组 + adTable5Ki = new double[]{0.4619255, 0.4479153, 0.4557489, 0.5279209, 0.5837490, 0.3825868, 0.4618263, 0.3514916, 0.4533894, 0.4186954, 0.6406937, 0.6341423, 0.6738577, 0.6798307, 0.7175118, 0.7525189, 0.7849550, 0.8152731, 0.8437826, 0.3589888, 0.4216551}; + + // 初始化adTable5Gi数组 + adTable5Gi = new double[]{0.000000, 0.027815, 0.189065, 0.079300, 0.141239, 0.332500, 0.088500, 0.034369, 0.038953, 0.021000, 0.256692, 0.281835, 0.332267, 0.366911, 0.289731, 0.337542, 0.383381, 0.427354, 0.469659, 0.000000, 0.000000}; + //most of the table 5 parameters are zero + for (j = 0; j < GasConstants.NUMBEROFCOMPONENTS; j++) { + adTable5Qi[j] = 0.0; + adTable5Fi[j] = 0.0; + adTable5Si[j] = 0.0; + adTable5Wi[j] = 0.0; + } + //a small number of exceptions + adTable5Qi[2] = 0.690000; + adTable5Qi[5] = 1.067750; + adTable5Qi[6] = 0.633276; + adTable5Fi[7] = 1.0000; + adTable5Si[5] = 1.5822; + adTable5Si[6] = 0.3900; + adTable5Wi[5] = 1.0000; + // setup characterization parameters for non-zero components + for (j = iNCC - 1; j >= 0; j--) { + dMri[j] = adTable5Mri[aiCID[j]]; + dKi[j] = adTable5Ki[aiCID[j]]; + } + for (j = 0; j < iNCC; j++) { + dGi[j] = adTable5Gi[aiCID[j]]; + dEi[j] = adTable5Ei[aiCID[j]]; + } + for (j = 0; j < iNCC; j++) { + dQi[j] = adTable5Qi[aiCID[j]]; + dFi[j] = 0.0; + if (aiCID[j] == 7) dFi[j] = adTable5Fi[7]; + dSi[j] = adTable5Si[aiCID[j]]; + dWi[j] = adTable5Wi[aiCID[j]]; + } + + // Binary interaction parameters for arrays: eij, kij, wij, uij + for (j = 0; j < iNCC; j++) { + for (k = j; k < iNCC; k++) { + dUij[j][k] = adTable6Uij[aiCID[j]][aiCID[k]]; + dKij[j][k] = adTable6Kij[aiCID[j]][aiCID[k]]; + dEij[j][k] = adTable6Eij[aiCID[j]][aiCID[k]]; + dGij[j][k] = adTable6Gij[aiCID[j]][aiCID[k]]; + } + } + } + + public void chardl(GasProps gasProps) { + //variables local to function + int i, j; + double tmfrac, k5p0, k2p5, u5p0, u2p5, q1p0; + double Xij, Eij, Gij, e0p5, e2p0, e3p0, e3p5, e4p5, e6p0; + double e7p5, e9p5, e12p0, e12p5; + double e11p0, s3; + //normalize mole fractions and calculate molar mass + tmfrac = 0.0; + for (j = 0; j < iNCC; j++) { + tmfrac = tmfrac + dXi[j]; + } + for (j = 0; j < iNCC; j++) { + dXi[j] = dXi[j] / tmfrac; + } + // reset virial coefficients + for (j = 0; j < 18; j++) { + adBcoef[j] = 0.0; + } + // initialize a key subset of the local variables + k5p0 = 0.0; + k2p5 = 0.0; + u5p0 = 0.0; + u2p5 = 0.0; + dW = 0.0; + q1p0 = 0.0; + dF = 0.0; + // calculate gas molecular weight + gasProps.dMrx = 0.0; + for (j = 0; j < iNCC; j++) { + gasProps.dMrx = gasProps.dMrx + dXi[j] * dMri[j]; + } + // calculate the composition-dependent quantities, applying a nested loop + for (i = 0; i < iNCC; i++) { + k2p5 = k2p5 + dXi[i] * dKi[i] * dKi[i] * Math.sqrt(dKi[i]); + u2p5 = u2p5 + dXi[i] * dEi[i] * dEi[i] * Math.sqrt(dEi[i]); + dW = dW + dXi[i] * dGi[i]; + q1p0 = q1p0 + dXi[i] * dQi[i]; + dF = dF + dXi[i] * dXi[i] * dFi[i]; + for (j = i; j < iNCC; j++) { + if (i != j) Xij = 2.0 * dXi[i] * dXi[j]; + else Xij = dXi[i] * dXi[j]; + // proceed while skipping interaction terms which equal 1.0 + if (dKij[i][j] != 1.0) + k5p0 += Xij * (Math.pow(dKij[i][j], 5.0) - 1.0) * Math.pow((Math.pow(dKi[i], 5.0) * Math.pow(dKi[j], 5.0)), 0.5); + if (dUij[i][j] != 1.0) + u5p0 += Xij * (Math.pow(dUij[i][j], 5.0) - 1.0) * Math.pow((Math.pow(dEi[i], 5.0) * Math.pow(dEi[j], 5.0)), 0.5); + if (dGij[i][j] != 1.0) + dW += Xij * (dGij[i][j] - 1.0) * ((dGi[i] + dGi[j]) / 2.0); + // calculate terms required for second virial coefficient, B + Eij = dEij[i][j] * Math.sqrt(dEi[i] * dEi[j]); + Gij = dGij[i][j] * (dGi[i] + dGi[j]) / 2.0; + e0p5 = Math.sqrt(Eij); + e2p0 = Eij * Eij; + e3p0 = Eij * e2p0; + e3p5 = e3p0 * e0p5; + e4p5 = Eij * e3p5; + e6p0 = e3p0 * e3p0; + e11p0 = e4p5 * e4p5 * e2p0; + e7p5 = e4p5 * Eij * e2p0; + e9p5 = e7p5 * e2p0; + e12p0 = e11p0 * Eij; + e12p5 = e12p0 * e0p5; + s3 = Xij * Math.pow((Math.pow(dKi[i], 3.0) * Math.pow(dKi[j], 3)), 0.5); + adBcoef[0] = adBcoef[0] + s3; + adBcoef[1] = adBcoef[1] + s3 * e0p5; + adBcoef[2] = adBcoef[2] + s3 * Eij; + adBcoef[3] = adBcoef[3] + s3 * e3p5; + adBcoef[4] = adBcoef[4] + s3 * Gij / e0p5; + adBcoef[5] = adBcoef[5] + s3 * Gij * e4p5; + adBcoef[6] = adBcoef[6] + s3 * dQi[i] * dQi[j] * e0p5; + adBcoef[7] = adBcoef[7] + s3 * dSi[i] * dSi[j] * e7p5; + adBcoef[8] = adBcoef[8] + s3 * dSi[i] * dSi[j] * e9p5; + adBcoef[9] = adBcoef[9] + s3 * dWi[i] * dWi[j] * e6p0; + adBcoef[10] = adBcoef[10] + s3 * dWi[i] * dWi[j] * e12p0; + adBcoef[11] = adBcoef[11] + s3 * dWi[i] * dWi[j] * e12p5; + adBcoef[12] = adBcoef[12] + s3 * dFi[i] * dFi[j] / e6p0; + adBcoef[13] = adBcoef[13] + s3 * e2p0; + adBcoef[14] = adBcoef[14] + s3 * e3p0; + adBcoef[15] = adBcoef[15] + s3 * dQi[i] * dQi[j] * e2p0; + adBcoef[16] = adBcoef[16] + s3 * e2p0; + adBcoef[17] = adBcoef[17] + s3 * e11p0; + } + } + + //grab the first 18 constants from table 4, completing Bnij + for (i = 0; i < 18; i++) adBcoef[i] *= adAn[i]; + //final products of chardl are mixture size parameter K, energy parameter U, + //and quadrupole parameter Q + dKp3 = Math.pow((k5p0 + k2p5 * k2p5), 0.6); + dU = Math.pow((u5p0 + u2p5 * u2p5), 0.2); + dQp2 = q1p0 * q1p0; + } + // 其他方法转换... + + public void table() { + int j, k; + GasProps gasProps; + // 58 constants from table 4 - column A(n) + adAn[0] = 0.153832600; + adAn[1] = 1.341953000; + adAn[2] = -2.998583000; + adAn[3] = -0.048312280; + adAn[4] = 0.375796500; + adAn[5] = -1.589575000; + adAn[6] = -0.053588470; + adAn[7] = 0.886594630; + adAn[8] = -0.710237040; + adAn[9] = -1.471722000; + adAn[10] = 1.321850350; + adAn[11] = -0.786659250; + adAn[12] = 2.29129E-09; + adAn[13] = 0.157672400; + adAn[14] = -0.436386400; + adAn[15] = -0.044081590; + adAn[16] = -0.003433888; + adAn[17] = 0.032059050; + adAn[18] = 0.024873550; + adAn[19] = 0.073322790; + adAn[20] = -0.001600573; + adAn[21] = 0.642470600; + adAn[22] = -0.416260100; + adAn[23] = -0.066899570; + adAn[24] = 0.279179500; + adAn[25] = -0.696605100; + adAn[26] = -0.002860589; + adAn[27] = -0.008098836; + adAn[28] = 3.150547000; + adAn[29] = 0.007224479; + adAn[30] = -0.705752900; + adAn[31] = 0.534979200; + adAn[32] = -0.079314910; + adAn[33] = -1.418465000; + adAn[34] = -5.99905E-17; + adAn[35] = 0.105840200; + adAn[36] = 0.034317290; + adAn[37] = -0.007022847; + adAn[38] = 0.024955870; + adAn[39] = 0.042968180; + adAn[40] = 0.746545300; + adAn[41] = -0.291961300; + adAn[42] = 7.294616000; + adAn[43] = -9.936757000; + adAn[44] = -0.005399808; + adAn[45] = -0.243256700; + adAn[46] = 0.049870160; + adAn[47] = 0.003733797; + adAn[48] = 1.874951000; + adAn[49] = 0.002168144; + adAn[50] = -0.658716400; + adAn[51] = 0.000205518; + adAn[52] = 0.009776195; + adAn[53] = -0.020487080; + adAn[54] = 0.015573220; + adAn[55] = 0.006862415; + adAn[56] = -0.001226752; + adAn[57] = 0.002850908; + + // 58 constants from table 4 - column Un + adUn[0] = 0.0; + adUn[1] = 0.5; + adUn[2] = 1.0; + adUn[3] = 3.5; + adUn[4] = -0.5; + adUn[5] = 4.5; + adUn[6] = 0.5; + adUn[7] = 7.5; + adUn[8] = 9.5; + adUn[9] = 6.0; + adUn[10] = 12.0; + adUn[11] = 12.5; + adUn[12] = -6.0; + adUn[13] = 2.0; + adUn[14] = 3.0; + adUn[15] = 2.0; + adUn[16] = 2.0; + adUn[17] = 11.0; + adUn[18] = -0.5; + adUn[19] = 0.5; + adUn[20] = 0.0; + adUn[21] = 4.0; + adUn[22] = 6.0; + adUn[23] = 21.0; + adUn[24] = 23.0; + adUn[25] = 22.0; + adUn[26] = -1.0; + adUn[27] = -0.5; + adUn[28] = 7.0; + adUn[29] = -1.0; + adUn[30] = 6.0; + adUn[31] = 4.0; + adUn[32] = 1.0; + adUn[33] = 9.0; + adUn[34] = -13.0; + adUn[35] = 21.0; + adUn[36] = 8.0; + adUn[37] = -0.5; + adUn[38] = 0.0; + adUn[39] = 2.0; + adUn[40] = 7.0; + adUn[41] = 9.0; + adUn[42] = 22.0; + adUn[43] = 23.0; + adUn[44] = 1.0; + adUn[45] = 9.0; + adUn[46] = 3.0; + adUn[47] = 8.0; + adUn[48] = 23.0; + adUn[49] = 1.5; + adUn[50] = 5.0; + adUn[51] = -0.5; + adUn[52] = 4.0; + adUn[53] = 7.0; + adUn[54] = 3.0; + adUn[55] = 0.0; + adUn[56] = 1.0; + adUn[57] = 0.0; + //Most of the tables are filled with 1.0 or 0.0 + //It is up to us to set non-zero values + for (j = 0; j < GasConstants.NUMBEROFCOMPONENTS; j++) { + for (k = j; k < GasConstants.NUMBEROFCOMPONENTS; k++) { + adTable6Eij[j][k] = 1.0; + adTable6Uij[j][k] = 1.0; + adTable6Kij[j][k] = 1.0; + adTable6Gij[j][k] = 1.0; + } + } + //Lnsert the 132 items of non-zero and non-1.0 data + //This looks more cumbersome than it is, considering table 6 has 1764 members + adTable6Eij[0][1] = 0.971640; + adTable6Eij[0][2] = 0.960644; + adTable6Eij[0][4] = 0.994635; + adTable6Eij[0][5] = 0.708218; + adTable6Eij[0][6] = 0.931484; + adTable6Eij[0][7] = 1.170520; + adTable6Eij[0][8] = 0.990126; + adTable6Eij[0][10] = 1.019530; + adTable6Eij[0][11] = 0.989844; + adTable6Eij[0][12] = 1.002350; + adTable6Eij[0][13] = 0.999268; + adTable6Eij[0][14] = 1.107274; + adTable6Eij[0][15] = 0.880880; + adTable6Eij[0][16] = 0.880973; + adTable6Eij[0][17] = 0.881067; + adTable6Eij[0][18] = 0.881161; + adTable6Eij[1][2] = 1.022740; + adTable6Eij[1][3] = 0.970120; + adTable6Eij[1][4] = 0.945939; + adTable6Eij[1][5] = 0.746954; + adTable6Eij[1][6] = 0.902271; + adTable6Eij[1][7] = 1.086320; + adTable6Eij[1][8] = 1.005710; + adTable6Eij[1][9] = 1.021000; + adTable6Eij[1][10] = 0.946914; + adTable6Eij[1][11] = 0.973384; + adTable6Eij[1][12] = 0.959340; + adTable6Eij[1][13] = 0.945520; + adTable6Eij[2][3] = 0.925053; + adTable6Eij[2][4] = 0.960237; + adTable6Eij[2][5] = 0.849408; + adTable6Eij[2][6] = 0.955052; + adTable6Eij[2][7] = 1.281790; + adTable6Eij[2][8] = 1.500000; + adTable6Eij[2][10] = 0.906849; + adTable6Eij[2][11] = 0.897362; + adTable6Eij[2][12] = 0.726255; + adTable6Eij[2][13] = 0.859764; + adTable6Eij[2][14] = 0.855134; + adTable6Eij[2][15] = 0.831229; + adTable6Eij[2][16] = 0.808310; + adTable6Eij[2][17] = 0.786323; + adTable6Eij[2][18] = 0.765171; + adTable6Eij[3][4] = 1.022560; + adTable6Eij[3][5] = 0.693168; + adTable6Eij[3][6] = 0.946871; + adTable6Eij[3][7] = 1.164460; + adTable6Eij[3][11] = 1.013060; + adTable6Eij[3][13] = 1.005320; + adTable6Eij[4][7] = 1.034787; + adTable6Eij[4][11] = 1.004900; + adTable6Eij[6][14] = 1.008692; + adTable6Eij[6][15] = 1.010126; + adTable6Eij[6][16] = 1.011501; + adTable6Eij[6][17] = 1.012821; + adTable6Eij[6][18] = 1.014089; + adTable6Eij[7][8] = 1.100000; + adTable6Eij[7][10] = 1.300000; + adTable6Eij[7][11] = 1.300000; + adTable6Uij[0][1] = 0.886106; + adTable6Uij[0][2] = 0.963827; + adTable6Uij[0][4] = 0.990877; + adTable6Uij[0][6] = 0.736833; + adTable6Uij[0][7] = 1.156390; + adTable6Uij[0][11] = 0.992291; + adTable6Uij[0][13] = 1.003670; + adTable6Uij[0][14] = 1.302576; + adTable6Uij[0][15] = 1.191904; + adTable6Uij[0][16] = 1.205769; + adTable6Uij[0][17] = 1.219634; + adTable6Uij[0][18] = 1.233498; + adTable6Uij[1][2] = 0.835058; + adTable6Uij[1][3] = 0.816431; + adTable6Uij[1][4] = 0.915502; + adTable6Uij[1][6] = 0.993476; + adTable6Uij[1][7] = 0.408838; + adTable6Uij[1][11] = 0.993556; + adTable6Uij[2][3] = 0.969870; + adTable6Uij[2][6] = 1.045290; + adTable6Uij[2][8] = 0.900000; + adTable6Uij[2][14] = 1.066638; + adTable6Uij[2][15] = 1.077634; + adTable6Uij[2][16] = 1.088178; + adTable6Uij[2][17] = 1.098291; + adTable6Uij[2][18] = 1.108021; + adTable6Uij[3][4] = 1.065173; + adTable6Uij[3][6] = 0.971926; + adTable6Uij[3][7] = 1.616660; + adTable6Uij[3][10] = 1.250000; + adTable6Uij[3][11] = 1.250000; + adTable6Uij[3][12] = 1.250000; + adTable6Uij[3][13] = 1.250000; + adTable6Uij[6][14] = 1.028973; + adTable6Uij[6][15] = 1.033754; + adTable6Uij[6][16] = 1.038338; + adTable6Uij[6][17] = 1.042735; + adTable6Uij[6][18] = 1.046966; + adTable6Kij[0][1] = 1.003630; + adTable6Kij[0][2] = 0.995933; + adTable6Kij[0][4] = 1.007619; + adTable6Kij[0][6] = 1.000080; + adTable6Kij[0][7] = 1.023260; + adTable6Kij[0][11] = 0.997596; + adTable6Kij[0][13] = 1.002529; + adTable6Kij[0][14] = 0.982962; + adTable6Kij[0][15] = 0.983565; + adTable6Kij[0][16] = 0.982707; + adTable6Kij[0][17] = 0.981849; + adTable6Kij[0][18] = 0.980991; + adTable6Kij[1][2] = 0.982361; + adTable6Kij[1][3] = 1.007960; + adTable6Kij[1][6] = 0.942596; + adTable6Kij[1][7] = 1.032270; + adTable6Kij[2][3] = 1.008510; + adTable6Kij[2][6] = 1.007790; + adTable6Kij[2][14] = 0.910183; + adTable6Kij[2][15] = 0.895362; + adTable6Kij[2][16] = 0.881152; + adTable6Kij[2][17] = 0.867520; + adTable6Kij[2][18] = 0.854406; + adTable6Kij[3][4] = 0.986893; + adTable6Kij[3][6] = 0.999969; + adTable6Kij[3][7] = 1.020340; + adTable6Kij[6][14] = 0.968130; + adTable6Kij[6][15] = 0.962870; + adTable6Kij[6][16] = 0.957828; + adTable6Kij[6][17] = 0.952441; + adTable6Kij[6][18] = 0.948338; + adTable6Gij[0][2] = 0.807653; + adTable6Gij[0][7] = 1.957310; + adTable6Gij[1][2] = 0.982746; + adTable6Gij[2][3] = 0.370296; + adTable6Gij[2][5] = 1.673090; + } + + public void bvir() { + //variables local to function + double t0p5, t2p0, t3p0, t3p5, t4p5, t6p0, t11p0; + double t7p5, t9p5, t12p0, t12p5; + double t1p5, t4p0; + double[] Bx = new double[18]; + int i; + //reset B and partial devivatives to 0.0 + dB = ddBdT = dd2BdT2 = 0.0; + //pre-calculate Math .Powers of T + t0p5 = Math.sqrt(dT); + t2p0 = dT * dT; + t3p0 = dT * t2p0; + t3p5 = t3p0 * t0p5; + t4p5 = dT * t3p5; + t6p0 = t3p0 * t3p0; + t11p0 = t4p5 * t4p5 * t2p0; + t7p5 = t6p0 * dT * t0p5; + t9p5 = t7p5 * t2p0; + t12p0 = t9p5 * t0p5 * t2p0; + t12p5 = t12p0 * t0p5; + t1p5 = dT * t0p5; + t4p0 = t2p0 * t2p0; + //coefficients for B + Bx[0] = adBcoef[0]; + Bx[1] = adBcoef[1] / t0p5; + Bx[2] = adBcoef[2] / dT; + Bx[3] = adBcoef[3] / t3p5; + Bx[4] = adBcoef[4] * t0p5; + Bx[5] = adBcoef[5] / t4p5; + Bx[6] = adBcoef[6] / t0p5; + Bx[7] = adBcoef[7] / t7p5; + Bx[8] = adBcoef[8] / t9p5; + Bx[9] = adBcoef[9] / t6p0; + Bx[10] = adBcoef[10] / t12p0; + Bx[11] = adBcoef[11] / t12p5; + Bx[12] = adBcoef[12] * t6p0; + Bx[13] = adBcoef[13] / t2p0; + Bx[14] = adBcoef[14] / t3p0; + Bx[15] = adBcoef[15] / t2p0; + Bx[16] = adBcoef[16] / t2p0; + Bx[17] = adBcoef[17] / t11p0; + //sum up the pieces for second virial coefficient, B + for (i = 0; i < 18; i++) { + dB += Bx[i]; + } + //calculate terms for first derivative of B, wrt T + for (i = 0; i < 18; i++) { + if (adUn[i] != 0) + Bx[i] *= adUn[i]; + } + //sum up the pieces of first derivative of B + //note div by dT; changes exponent of T + for (i = 0; i < 18; i++) { + if (adUn[i] != 0) + ddBdT += Bx[i] / dT; + } + //sign change here + ddBdT = -ddBdT; + //calculate terms for second derivative of B, wrt T + for (i = 0; i < 18; i++) { + if (adUn[i] != 0 && adUn[i] != -1.0) Bx[i] *= (adUn[i] + 1.0); + } + //sum up the pieces of second derivative of B + //note division by dT, thereby changing the exponent of T + //loop will ignore Bx[0] which is = 0.0 + for (i = 0; i < 18; i++) { + if (adUn[i] != 0 && adUn[i] != -1.0) dd2BdT2 += Bx[i] / t2p0; + } + } + + public void temp() { + // Note: this function was ported from the AGA Report No.8 FORTRAN listing, + // retaining as much of the original content as possible + // variables local to function + double tr0p5, tr1p5, tr2p0, tr3p0, tr4p0, tr5p0, tr6p0; + double tr7p0, tr8p0, tr9p0, tr11p0, tr13p0, tr21p0; + double tr22p0, tr23p0, tr; + + /*calculate second virial coefficient B*/ + bvir(); + + // calculate adFn(12) through adFn(57) + // adFn(0)-adFn(11) do not contribute to csm terms + tr = dT / dU; + tr0p5 = Math.sqrt(tr); + tr1p5 = tr * tr0p5; + tr2p0 = tr * tr; + tr3p0 = tr * tr2p0; + tr4p0 = tr * tr3p0; + tr5p0 = tr * tr4p0; + tr6p0 = tr * tr5p0; + tr7p0 = tr * tr6p0; + tr8p0 = tr * tr7p0; + tr9p0 = tr * tr8p0; + tr11p0 = tr6p0 * tr5p0; + tr13p0 = tr6p0 * tr7p0; + tr21p0 = tr9p0 * tr9p0 * tr3p0; + tr22p0 = tr * tr21p0; + tr23p0 = tr * tr22p0; + + adFn[12] = adAn[12] * dF * tr6p0; + adFn[13] = adAn[13] / tr2p0; + adFn[14] = adAn[14] / tr3p0; + adFn[15] = adAn[15] * dQp2 / tr2p0; + adFn[16] = adAn[16] / tr2p0; + adFn[17] = adAn[17] / tr11p0; + adFn[18] = adAn[18] * tr0p5; + adFn[19] = adAn[19] / tr0p5; + adFn[20] = adAn[20]; + + adFn[21] = adAn[21] / tr4p0; + adFn[22] = adAn[22] / tr6p0; + adFn[23] = adAn[23] / tr21p0; + adFn[24] = adAn[24] * dW / tr23p0; + adFn[25] = adAn[25] * dQp2 / tr22p0; + adFn[26] = adAn[26] * dF * tr; + adFn[27] = adAn[27] * dQp2 * tr0p5; + adFn[28] = adAn[28] * dW / tr7p0; + adFn[29] = adAn[29] * dF * tr; + adFn[30] = adAn[30] / tr6p0; + adFn[31] = adAn[31] * dW / tr4p0; + adFn[32] = adAn[32] * dW / tr; + adFn[33] = adAn[33] * dW / tr9p0; + adFn[34] = adAn[34] * dF * tr13p0; + adFn[35] = adAn[35] / tr21p0; + adFn[36] = adAn[36] * dQp2 / tr8p0; + adFn[37] = adAn[37] * tr0p5; + adFn[38] = adAn[38]; + adFn[39] = adAn[39] / tr2p0; + adFn[40] = adAn[40] / tr7p0; + adFn[41] = adAn[41] * dQp2 / tr9p0; + adFn[42] = adAn[42] / tr22p0; + adFn[43] = adAn[43] / tr23p0; + adFn[44] = adAn[44] / tr; + adFn[45] = adAn[45] / tr9p0; + adFn[46] = adAn[46] * dQp2 / tr3p0; + adFn[47] = adAn[47] / tr8p0; + adFn[48] = adAn[48] * dQp2 / tr23p0; + adFn[49] = adAn[49] / tr1p5; + adFn[50] = adAn[50] * dW / tr5p0; + adFn[51] = adAn[51] * dQp2 * tr0p5; + adFn[52] = adAn[52] / tr4p0; + adFn[53] = adAn[53] * dW / tr7p0; + adFn[54] = adAn[54] / tr3p0; + adFn[55] = adAn[55] * dW; + adFn[56] = adAn[56] / tr; + adFn[57] = adAn[57] * dQp2; + } + + public void ddetail(GasProps gasProps) { + int imax, i; + double epsp, epsr, epsmin; + double x1, x2, x3, y1, y2, y3; + double delx, delprv, delmin, delbis, xnumer, xdenom, sgndel; + double y2my3, y3my1, y1my2, boundn; + //initialize convergence tolerances + imax = 150; + epsp = 1.0e-6; + epsr = 1.0e-6; + epsmin = 1.0e-7; + dRho = 0.0; + //call subroutine braket to bracket density solution + braket(gasProps); + //check value of "lStatus" returned from subroutine braket + if (gasProps.lStatus == GasConstants.MAX_NUM_OF_ITERATIONS_EXCEEDED || gasProps.lStatus == GasConstants.NEGATIVE_DENSITY_DERIVATIVE) { + return; + } + //set up to start Brent's method + //x is the independent variable, y the dependent variable + //delx is the current iteration change in x + //delprv is the previous iteration change in x + x1 = dRhoL; + x2 = dRhoH; + y1 = dPRhoL - dP; + y2 = dPRhoH - dP; + delx = x1 - x2; + delprv = delx; + //solution is bracketed between x1 and x2 + //a third point x3 is introduced for quadratic interpolation + x3 = x1; + y3 = y1; + for (i = 0; i < imax; i++) { + //y3 must be opposite in sign from y2 so solution between x2,x3 + if (y2 * y3 > 0.0) { + x3 = x1; + y3 = y1; + delx = x1 - x2; + delprv = delx; + } + + //y2 must be value of y closest to y=0.0, then x2new=x2old+delx + + if (Math.abs(y3) < Math.abs(y2)) { + x1 = x2; + x2 = x3; + x3 = x1; + y1 = y2; + y2 = y3; + y3 = y1; + } + + //delmin is minimum allowed step size for unconverged iteration + delmin = epsmin * Math.abs(x2); + //if procedure is not converging or if delprv is less than delmin + //use bisection instead + //delbis = 0.5d0*(x3 - x2) is the bisection delx + delbis = 0.5 * (x3 - x2); + // tests to select numerical method for current iteration + + if (Math.abs(delprv) < delmin || Math.abs(y1) < Math.abs(y2)) { + // use bisection + delx = delbis; + delprv = delbis; + } else { + if (x3 != x1) { + // use inverse quadratic interpolation + y2my3 = y2 - y3; + y3my1 = y3 - y1; + y1my2 = y1 - y2; + xdenom = -(y1my2) * (y2my3) * (y3my1); + xnumer = x1 * y2 * y3 * (y2my3) + + x2 * y3 * y1 * (y3my1) + + x3 * y1 * y2 * (y1my2) - x2 * xdenom; + } else { + // use inverse linear interpolation + xnumer = (x2 - x1) * y2; + xdenom = y1 - y2; + } + // before calculating delx check delx=xnumer/xdenom is not out of bounds + if (2.0 * Math.abs(xnumer) < Math.abs(delprv * xdenom)) { + // procedure converging, use interpolation + delprv = delx; + delx = xnumer / xdenom; + } else { + // procedure diverging, use bisection + delx = delbis; + delprv = delbis; + } + } + + // check for convergence + if ((Math.abs(y2) < epsp * dP) && (Math.abs(delx) < epsr * Math.abs(x2))) { + dRho = x2 + delx; + return; + } + + //when unconverged, abs(delx) must be greater than delmin + //minimum allowed magnitude of change in x2 is 1.0000009*delmin + //sgndel, the sign of change in x2 is sign of delbis + + if (Math.abs(delx) < delmin) { + sgndel = delbis / Math.abs(delbis); + delx = 1.0000009 * sgndel * delmin; + delprv = delx; + } + + //final check to insure that new x2 is in range of old x2 and x3 + //boundn is negative if new x2 is in range of old x2 and x3 + boundn = delx * (x2 + delx - x3); + if (boundn > 0.0) { + + // procedure stepping out of bounds, use bisection + delx = delbis; + delprv = delbis; + } + //relable variables for next iteration + //x1new = x2old, y1new=y2old + x1 = x2; + y1 = y2; + // next iteration values for x2, y2 + x2 = x2 + delx; + pdetail(x2); + y2 = dPCalc - dP; + } + // ddetail: maximum number of iterations exceeded + gasProps.lStatus = GasConstants.MAX_NUM_OF_ITERATIONS_EXCEEDED; + dRho = x2; + }// ddetail() + + + public void braket(GasProps gasProps) { + //variables local to function + int imax, it; + double del, rhomax, videal; + double rho1, rho2, p1, p2; + //initialize + imax = 200; + rho1 = 0.0; + p1 = 0.0; + rhomax = 1.0 / dKp3; + if (dT > 1.2593 * dU) rhomax = 20.0 * rhomax; + videal = GasConstants.RGASKJ * dT / dP; + if (Math.abs(dB) < (0.167 * videal)) { + rho2 = 0.95 / (videal + dB); + } else { + rho2 = 1.15 / videal; + } + del = rho2 / 20.0; + // start iterative density search loop + for (it = 0; it < imax; it++) { + if (rho2 > rhomax && gasProps.lStatus != GasConstants.MAX_DENSITY_IN_BRAKET_EXCEEDED) { + // density in braket exceeds maximum allowable density + gasProps.lStatus = GasConstants.MAX_DENSITY_IN_BRAKET_EXCEEDED; + del = 0.01 * (rhomax - rho1) + (dP / (GasConstants.RGASKJ * dT)) / 20.0; + rho2 = rho1 + del; + continue; + } + //calculate pressure p2 at density rho2 + pdetail(rho2); + p2 = dPCalc; + //test value of p2 relative to p and relative to p1 + if (p2 > dP) { + //the density root is bracketed (p1

p) + dRhoL = rho1; + dPRhoL = p1; + dRhoH = rho2; + dPRhoH = p2; + gasProps.lStatus = GasConstants.NORMAL; + return; + + } else if (p2 > p1) { + if (gasProps.lStatus == GasConstants.MAX_DENSITY_IN_BRAKET_EXCEEDED) del *= 2.0; + rho1 = rho2; + p1 = p2; + rho2 = rho1 + del; + continue; + } else { + + //lStatus= NEGATIVE_DENSITY_DERIVATIVEindicates that + //pressure has a negative density derivative, since p2 is less than + //some previous pressure + + gasProps.lStatus = GasConstants.NEGATIVE_DENSITY_DERIVATIVE; + dRho = rho1; + return; + } + } + // maximum number of iterations exceeded if we fall through the bottom + gasProps.lStatus = GasConstants.MAX_NUM_OF_ITERATIONS_EXCEEDED; + dRho = rho2; + return; + }// braket() + + public void pdetail(double dD) { + dPCalc = zdetail(dD) * dD * GasConstants.RGASKJ * dT; + }// pdetail() + + + public double zdetail(double d) { + // variables local to function + double D1, D2, D3, D4, D5, D6, D7, D8, D9, exp1, exp2, exp3, exp4; + // Math .Powers of reduced density + D1 = dKp3 * d; + D2 = D1 * D1; + D3 = D2 * D1; + D4 = D3 * D1; + D5 = D4 * D1; + D6 = D5 * D1; + D7 = D6 * D1; + D8 = D7 * D1; + D9 = D8 * D1; + + exp1 = Math.exp(-D1); + exp2 = Math.exp(-D2); + exp3 = Math.exp(-D3); + exp4 = Math.exp(-D4); + + // the following expression for Z was adopted from FORTRAN example in AGA8 + dZ = 1.0 + dB * d + + adFn[12] * D1 * (exp3 - 1.0 - 3.0 * D3 * exp3) + + (adFn[13] + adFn[14] + adFn[15]) * D1 * (exp2 - 1.0 - 2.0 * D2 * exp2) + + (adFn[16] + adFn[17]) * D1 * (exp4 - 1.0 - 4.0 * D4 * exp4) + + (adFn[18] + adFn[19]) * D2 * 2.0 + + (adFn[20] + adFn[21] + adFn[22]) * D2 * (2.0 - 2.0 * D2) * exp2 + + (adFn[23] + adFn[24] + adFn[25]) * D2 * (2.0 - 4.0 * D4) * exp4 + + adFn[26] * D2 * (2.0 - 4.0 * D4) * exp4 + + adFn[27] * D3 * 3.0 + + (adFn[28] + adFn[29]) * D3 * (3.0 - D1) * exp1 + + (adFn[30] + adFn[31]) * D3 * (3.0 - 2.0 * D2) * exp2 + + (adFn[32] + adFn[33]) * D3 * (3.0 - 3.0 * D3) * exp3 + + (adFn[34] + adFn[35] + adFn[36]) * D3 * (3.0 - 4.0 * D4) * exp4 + + (adFn[37] + adFn[38]) * D4 * 4.0 + + (adFn[39] + adFn[40] + adFn[41]) * D4 * (4.0 - 2.0 * D2) * exp2 + + (adFn[42] + adFn[43]) * D4 * (4.0 - 4.0 * D4) * exp4 + + adFn[44] * D5 * 5.0 + + (adFn[45] + adFn[46]) * D5 * (5.0 - 2.0 * D2) * exp2 + + (adFn[47] + adFn[48]) * D5 * (5.0 - 4.0 * D4) * exp4 + + adFn[49] * D6 * 6.0 + + adFn[50] * D6 * (6.0 - 2.0 * D2) * exp2 + + adFn[51] * D7 * 7.0 + + adFn[52] * D7 * (7.0 - 2.0 * D2) * exp2 + + adFn[53] * D8 * (8.0 - D1) * exp1 + + (adFn[54] + adFn[55]) * D8 * (8.0 - 2.0 * D2) * exp2 + + (adFn[56] + adFn[57]) * D9 * (9.0 - 2.0 * D2) * exp2; + return dZ; + + }// zdetail() + + + public double dZdT(double d) { + //variables local to function + double tmp; + int i; + double D1, D2, D3, D4, D5, D6, D7, D8, D9, exp1, exp2, exp3, exp4; + //set up Math .Powers of reduced density + D1 = dKp3 * d; + D2 = D1 * D1; + D3 = D2 * D1; + D4 = D3 * D1; + D5 = D4 * D1; + D6 = D5 * D1; + D7 = D6 * D1; + D8 = D7 * D1; + D9 = D8 * D1; + exp1 = Math.exp(-D1); + exp2 = Math.exp(-D2); + exp3 = Math.exp(-D3); + exp4 = Math.exp(-D4); + // create terms uC*T^-(un+1) from coefficients we've already computed (An[n]) + for (i = 12; i < 58; i++) { + if (adUn[i] != 0 && adFn[i] != 0) { + fx[i] = (adFn[i] * adUn[i] * D1) / dT; + } else { + fx[i] = 0.0; + } + } + //initial part of equation + ddZdT = d * ddBdT; + //n=13 evaluates to zero except for hydrogen, for whom fn = 1 + if (dF != 0) ddZdT += fx[12] - (fx[12] * (1.0 - 3.0 * D3) * exp3); + tmp = (1.0 - 2.0 * D2) * exp2; + ddZdT += (fx[13] - (fx[13] * tmp)); + ddZdT += fx[14] - (fx[14] * tmp); + ddZdT += fx[15] - (fx[15] * tmp); + tmp = (1.0 - 4.0 * D4) * exp4; + ddZdT += fx[16] - (fx[16] * tmp); + ddZdT += fx[17] - (fx[17] * tmp); + ddZdT = ddZdT - (fx[18] + fx[19]) * D1 * 2.0 + - (fx[21] + fx[22]) * D1 * (2.0 - 2.0 * D2) * exp2 + - (fx[23] + fx[24] + fx[25]) * D1 * (2.0 - 4.0 * D4) * exp4 + - fx[26] * D1 * (2.0 - 4.0 * D4) * exp4 + - fx[27] * D2 * 3.0 + - (fx[28] + fx[29]) * D2 * (3.0 - D1) * exp1 + - (fx[30] + fx[31]) * D2 * (3.0 - 2.0 * D2) * exp2 + - (fx[32] + fx[33]) * D2 * (3.0 - 3.0 * D3) * exp3 + - (fx[34] + fx[35] + fx[36]) * D2 * (3.0 - 4.0 * D4) * exp4 + - fx[37] * D3 * 4.0 + - (fx[39] + fx[40] + fx[41]) * D3 * (4.0 - 2.0 * D2) * exp2 + - (fx[42] + fx[43]) * D3 * (4.0 - 4.0 * D4) * exp4 + - fx[44] * D4 * 5.0 + - (fx[45] + fx[46]) * D4 * (5.0 - 2.0 * D2) * exp2 + - (fx[47] + fx[48]) * D4 * (5.0 - 4.0 * D4) * exp4 + - fx[49] * D5 * 6.0 + - fx[50] * D5 * (6.0 - 2.0 * D2) * exp2 + - fx[51] * D6 * 7.0 + - fx[52] * D6 * (7.0 - 2.0 * D2) * exp2 + - fx[53] * D7 * (8.0 - D1) * exp1 + - fx[54] * D7 * (8.0 - 2.0 * D2) * exp2 + - fx[56] * D8 * (9.0 - 2.0 * D2) * exp2; + return ddZdT; + } + + + public double d2ZdT2(double d) { + //variables local to function + double tmp; + int i; + double D1, D2, D3, D4, D5, D6, D7, D8, D9, exp1, exp2, exp3, exp4; + //set up Math .Powers of reduced density + D1 = dKp3 * d; + D2 = D1 * D1; + D3 = D2 * D1; + D4 = D3 * D1; + D5 = D4 * D1; + D6 = D5 * D1; + D7 = D6 * D1; + D8 = D7 * D1; + D9 = D8 * D1; + exp1 = Math.exp(-D1); + exp2 = Math.exp(-D2); + exp3 = Math.exp(-D3); + exp4 = Math.exp(-D4); + // create terms uC*T^-(un+1) from coefficients we've already computed (An[n]) + for (i = 12; i < 58; i++) { + if (adUn[i] != 0 && adFn[i] != 0) { + + fx[i] = (adFn[i] * D1 * adUn[i] * (adUn[i] + 1.0)) / (dT * dT); + } else { + + fx[i] = 0.0; + + } + + } + //initial part of equation + dd2ZdT2 = d * dd2BdT2; + + //n=13 evaluates to zero except for hydrogen, for whom fn = 1 + if (dF != 0) dd2ZdT2 += fx[12] - (fx[12] * (1.0 - 3.0 * D3) * exp3); + tmp = (1.0 - 2.0 * D2) * exp2; + dd2ZdT2 += -fx[13] + (fx[13] * tmp); + dd2ZdT2 += -fx[14] + (fx[14] * tmp); + dd2ZdT2 += -fx[15] + (fx[15] * tmp); + tmp = (1.0 - 4.0 * D4) * exp4; + dd2ZdT2 += -fx[16] + (fx[16] * tmp); + dd2ZdT2 += -fx[17] + (fx[17] * tmp); + dd2ZdT2 = dd2ZdT2 + (fx[18] + fx[19]) * D1 * 2.0 + + (fx[21] + fx[22]) * D1 * (2.0 - 2.0 * D2) * exp2 + + (fx[23] + fx[24] + fx[25]) * D1 * (2.0 - 4.0 * D4) * exp4 + + fx[26] * D1 * (2.0 - 4.0 * D4) * exp4 + + fx[27] * D2 * 3.0 + + (fx[28] + fx[29]) * D2 * (3.0 - D1) * exp1 + + (fx[30] + fx[31]) * D2 * (3.0 - 2.0 * D2) * exp2 + + (fx[32] + fx[33]) * D2 * (3.0 - 3.0 * D3) * exp3 + + (fx[34] + fx[35] + fx[36]) * D2 * (3.0 - 4.0 * D4) * exp4 + + fx[37] * D3 * 4.0 + + (fx[39] + fx[40] + fx[41]) * D3 * (4.0 - 2.0 * D2) * exp2 + + (fx[42] + fx[43]) * D3 * (4.0 - 4.0 * D4) * exp4 + + fx[44] * D4 * 5.0 + + (fx[45] + fx[46]) * D4 * (5.0 - 2.0 * D2) * exp2 + + (fx[47] + fx[48]) * D4 * (5.0 - 4.0 * D4) * exp4 + + fx[49] * D5 * 6.0 + + fx[50] * D5 * (6.0 - 2.0 * D2) * exp2 + + fx[51] * D6 * 7.0 + + fx[52] * D6 * (7.0 - 2.0 * D2) * exp2 + + fx[53] * D7 * (8.0 - D1) * exp1 + + fx[54] * D7 * (8.0 - 2.0 * D2) * exp2 + + fx[56] * D8 * (9.0 - 2.0 * D2) * exp2; + + return dd2ZdT2; + + }// d2ZdT2() + + + public double dZdD(double d) { + double temp, temp1, temp2, temp3; + int i; + double D1, D2, D3, D4, D5, D6, D7, D8, D9, exp1, exp2, exp3, exp4; + // set up Math .Powers of reduced density + D1 = dKp3 * d; + D2 = D1 * D1; + D3 = D2 * D1; + D4 = D3 * D1; + D5 = D4 * D1; + D6 = D5 * D1; + D7 = D6 * D1; + D8 = D7 * D1; + D9 = D8 * D1; + exp1 = Math.exp(-D1); + exp2 = Math.exp(-D2); + exp3 = Math.exp(-D3); + exp4 = Math.exp(-D4); + //create terms uC*T^-(un+1) from coefficients we've already computed (An[n]) + for (i = 12; i < 58; i++) { + fx[i] = adFn[i]; + } + //initial part of equation + ddZdD = dB / dKp3; + //evaluate all remaining terms, simplifying where possible + + //n=13 evaluates to zero except for hydrogen, for whom fn = 1 + if (dF != 0) { + temp1 = -9.0 * D3 * exp3; + temp2 = (1.0 - 3.0 * D3) * exp3; + temp3 = -temp2 * 3.0 * D6; + temp = temp1 + temp2 + temp3; + ddZdD += -fx[12] + fx[12] * temp; + } + //n = 14..16 + temp1 = -4.0 * D2 * exp2; + temp2 = (1.0 - 2.0 * D2) * exp2; + temp3 = -temp2 * 2.0 * D2; + temp = temp1 + temp2 + temp3; + ddZdD += -fx[13] + fx[13] * temp; + ddZdD += -fx[14] + fx[14] * temp; + ddZdD += -fx[15] + fx[15] * temp; + // n =17..18 + temp1 = -16.0 * D4 * exp4; + temp2 = (1.0 - 4.0 * D4) * exp4; + temp3 = -temp2 * 4.0 * D4; + temp = temp1 + temp2 + temp3; + ddZdD += -fx[16] + fx[16] * temp; + ddZdD += -fx[17] + fx[17] * temp; + // n = 19..20 + temp = 4.0 * D1; + ddZdD += fx[18] * temp; + ddZdD += fx[19] * temp; + // n =21..23 + temp1 = -4.0 * D3 * exp2; + temp2 = (2.0 - 2.0 * D2) * 2.0 * D1 * exp2; + temp3 = -temp2 * D2; + temp = temp1 + temp2 + temp3; + ddZdD += fx[20] * temp; + ddZdD += fx[21] * temp; + ddZdD += fx[22] * temp; + // n =24..27 + temp1 = -16.0 * D5 * exp4; + temp2 = (2.0 - 4.0 * D4) * 2.0 * D1 * exp4; + temp3 = -temp2 * 2.0 * D4; + temp = temp1 + temp2 + temp3; + ddZdD += fx[23] * temp; + ddZdD += fx[24] * temp; + ddZdD += fx[25] * temp; + ddZdD += fx[26] * temp; + // n =28 + temp = 9.0 * D2; + ddZdD += fx[27] * temp; + // n =29..30 + temp = -D3 * exp1 + (3.0 - D1) * 3.0 * D2 * exp1; + temp -= (3.0 - D1) * D3 * exp1; + ddZdD += fx[28] * temp; + ddZdD += fx[29] * temp; + // n =31..32 + temp1 = -4.0 * D4 * exp2; + temp2 = (3.0 - 2.0 * D2) * 3.0 * D2 * exp2; + temp3 = -(3.0 - 2.0 * D2) * 2.0 * D4 * exp2; + temp = temp1 + temp2 + temp3; + ddZdD += fx[30] * temp; + ddZdD += fx[31] * temp; + // n =33..34 + temp1 = -9.0 * D5 * exp3; + temp2 = (3.0 - 3.0 * D3) * 3.0 * D2 * exp3; + temp3 = -(3.0 - 3.0 * D3) * 3.0 * D5 * exp3; + temp = temp1 + temp2 + temp3; + ddZdD += fx[32] * temp; + ddZdD += fx[33] * temp; + // n =35..37 + temp1 = -16.0 * D6 * exp4; + temp2 = (3.0 - 4.0 * D4) * 3.0 * D2 * exp4; + temp3 = -(3.0 - 4.0 * D4) * D6 * 4.0 * exp4; + temp = temp1 + temp2 + temp3; + ddZdD += fx[34] * temp; + ddZdD += fx[35] * temp; + ddZdD += fx[36] * temp; + //n = 38..39 + temp = 16.0 * D3; + ddZdD += fx[37] * temp; + ddZdD += fx[38] * temp; + //n = 40..42 + temp1 = -4.0 * D5 * exp2; + temp2 = (4.0 - 2.0 * D2) * 4.0 * D3 * exp2; + temp3 = -(4.0 - 2.0 * D2) * 2.0 * D5 * exp2; + temp = temp1 + temp2 + temp3; + ddZdD += fx[39] * temp; + ddZdD += fx[40] * temp; + ddZdD += fx[41] * temp; + // n =43..44 + temp = -16.0 * D7 * exp4 + (4.0 - 4.0 * D4) * 4.0 * D3 * exp4; + temp -= (4.0 - 4.0 * D4) * D7 * 4.0 * exp4; + ddZdD += fx[42] * temp; + ddZdD += fx[43] * temp; + // n =45 + temp = 25.0 * D4; + ddZdD += fx[44] * temp; + // n =46..47 + temp = -4.0 * D6 * exp2 + (5.0 - 2.0 * D2) * 5.0 * D4 * exp2; + temp -= (5.0 - 2.0 * D2) * D6 * 2.0 * exp2; + ddZdD += fx[45] * temp; + ddZdD += fx[46] * temp; + // n =48..49 + temp = -16.0 * D8 * exp4 + (5.0 - 4.0 * D4) * 5.0 * D4 * exp4; + temp -= (5.0 - 4.0 * D4) * D8 * 4.0 * exp4; + ddZdD += fx[47] * temp; + ddZdD += fx[48] * temp; + // n =50 + temp = 36.0 * D5; + ddZdD += fx[49] * temp; + // n =51 + temp = -4.0 * D7 * exp2 + (6.0 - 2.0 * D2) * 6.0 * D5 * exp2; + temp -= (6.0 - 2.0 * D2) * D7 * 2.0 * exp2; + ddZdD += fx[50] * temp; + // n =52 + temp = 49.0 * D6; + ddZdD += fx[51] * temp; + // n =53 + temp = -4.0 * D8 * exp2 + (7.0 - 2.0 * D2) * 7.0 * D6 * exp2; + temp -= (7.0 - 2.0 * D2) * D8 * 2.0 * exp2; + ddZdD += fx[52] * temp; + // n =54 + temp = -1.0 * D8 * exp1 + (8.0 - D1) * 8.0 * D7 * exp1; + temp -= (8.0 - D1) * D8 * exp1; + ddZdD += fx[53] * temp; + // n =55..56 + temp = -4.0 * D1 * D8 * exp2 + (8.0 - 2.0 * D2) * 8.0 * D7 * exp2; + temp -= (8.0 - 2.0 * D2) * D8 * 2.0 * D1 * exp2; + ddZdD += fx[54] * temp; + ddZdD += fx[55] * temp; + // n =57..58 + temp = -4.0 * D2 * D8 * exp2 + (9.0 - 2.0 * D2) * 9.0 * D8 * exp2; + temp -= (9.0 - 2.0 * D2) * D2 * D8 * 2.0 * exp2; + ddZdD += fx[56] * temp; + ddZdD += fx[57] * temp; + ddZdD *= dKp3; + return ddZdD; + } + + public void relativedensity(GasProps gasProps) { + double dBX, dZa; + double dMWair = 28.96256; + + dBX = -0.12527 + 5.91e-4 * gasProps.dTb - 6.62e-7 * gasProps.dTb * gasProps.dTb; + // calculate compressibility of air + dZa = 1.0 + (dBX * dP) / (GasConstants.RGASKJ * gasProps.dTb); + // calculate ideal gas and real gas relative densities + gasProps.dRD_Ideal = gasProps.dMrx / dMWair; + gasProps.dRD_Real = gasProps.dRD_Ideal * (dZa / gasProps.dZb); + } + + +} \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/GBT11062Service.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/GBT11062Service.java new file mode 100644 index 0000000..9afe7f4 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/GBT11062Service.java @@ -0,0 +1,139 @@ +package com.ruoyi.ngCalTools.service; + +import com.ruoyi.ngCalTools.model.GasProps; +import com.ruoyi.ngCalTools.utils.GasConstants; +import org.springframework.stereotype.Service; +@Service +public class GBT11062Service { + + int iNCC;// number of components + int[] aiCID = new int[21];// component IDs + double[] dXi = new double[21];// mole fraction of component i + // 初始化 adTableMri 数组 + double[] adTableMri = { 16.0430, 28.0135, 44.0100, 30.0700, 44.0970, 18.0153, 34.0820, 2.0159, 28.0100, 31.9988, 58.1230, 58.1230, 72.1500, 72.1500, 86.1770, 100.2040, 114.2310, 128.2580, 142.2850, 4.0026, 39.9480 }; + // 初始化 adTablePc 数组 + double[] adTablePc = { 4.604, 3.399, 7.382, 4.88, 4.249, 22.118, 9.005, 1.297, 3.499, 5.081, 3.648, 3.797, 3.381, 3.369, 3.012, 2.736, 2.486, 0, 0, 0.2275, 4.876 }; + // 初始化 adTableTc 数组 + double[] adTableTc = { 190.55, 126.1, 304.19, 305.43, 369.82, 647.3, 373.5, 33.2, 132.92, 154.7, 408.13, 425.16, 460.39, 469.6, 507.4, 540.2, 568.76, 0, 0, 5.2, 150.82 }; + // 初始化 adTableBzsx 数组 + double[] adTableBzsx = { 15, 0, 0, 13, 9.5, 0, 45.5, 74.2, 74.2, 0, 8.4, 8.4, 8.3, 8.3, 7.7, 7.0, 0, 0, 0, 0, 0 }; + // 初始化 adTableBzxx 数组 + double[] adTableBzxx = { 5.0, 0, 0, 2.9, 2.1, 0, 4.3, 4.0, 12.5, 0, 1.8, 1.8, 1.4, 1.4, 1.2, 1.0, 0.96, 0, 0, 0, 0 }; + + + double[][] adTableZn = { + {0.9976, 0.9995, 0.9933, 0.99, 0.9789, 0.93, 0.99, 1.0006, 0.9993, 0.999, 0.958, 0.9572, 0.9377, 0.918, 0.892, 0.83, 0.742, 0.613, 0.434, 1.0005, 0.999}, + {0.998, 0.9997, 0.9944, 0.9915, 0.9821, 0.945, 0.99, 1.0006, 0.9995, 0.9992, 0.968, 0.965, 0.948, 0.937, 0.913, 0.866, 0.802, 0.71, 0.584, 1.0005, 0.9992}, + {0.9981, 0.9997, 0.9944, 0.992, 0.9834, 0.952, 0.99, 1.0006, 0.9996, 0.9993, 0.971, 0.9682, 0.953, 0.945, 0.919, 0.876, 0.817, 0.735, 0.623, 1.0005, 0.9993} + }; + + double[][] adTableSqrtbj = { + {0.049, 0.0224, 0.0819, 0.1, 0.1453, 0.2646, 0.1, -0.004, 0.0265, 0.0316, 0.2049, 0.2069, 0.251, 0.2864, 0.3286, 0.4123, 0.5079, 0.6221, 0.7523, 0.0006, 0.0316}, + {0.0447, 0.0173, 0.0748, 0.0922, 0.1338, 0.2345, 0.1, -0.0048, 0.0224, 0.0283, 0.1789, 0.1871, 0.228, 0.251, 0.295, 0.3661, 0.445, 0.5385, 0.645, 0.0002, 0.0283}, + {0.0436, 0.0173, 0.0728, 0.0894, 0.1288, 0.2191, 0.1, -0.0051, 0.02, 0.0265, 0.1703, 0.1783, 0.2168, 0.2345, 0.2846, 0.3521, 0.4278, 0.5148, 0.614, 0, 0.0265} + }; + + double[][] adTableHhvMol = { + {892.97, 0, 0, 1564.34, 2224.01, 45.074, 562.94, 286.63, 282.8, 0, 2874.2, 2883.82, 3535.98, 3542.89, 4203.23, 4862.87, 5522.4, 6182.91, 6842.69, 0, 0}, + {891.56, 0, 0, 1562.14, 2221.1, 44.433, 562.38, 286.15, 282.91, 0, 2870.58, 2879.76, 3531.68, 3538.6, 4198.24, 4857.18, 5516.01, 6175.82, 6834.9, 0, 0}, + {891.09, 0, 0, 1561.41, 2220.13, 44.224, 562.19, 285.99, 282.95, 0, 2869.38, 2878.57, 3530.24, 3537.17, 4196.58, 4855.29, 5513.88, 6173.46, 6832.31, 0, 0}, + {890.63, 0, 0, 1560.69, 2219.17, 44.016, 562.01, 285.83, 282.98, 0, 2868.2, 2877.4, 3528.83, 3535.77, 4194.95, 4853.43, 5511.8, 6171.15, 6829.77, 0, 0} + }; + + double[][] adTableLhvMol = { + {802.82, 0, 0, 1429.12, 2043.71, 0, 517.87, 241.56, 282.8, 0, 2648.83, 2658.45, 3265.54, 3272.45, 3887.71, 4502.28, 5116.73, 5732.17, 6346.88, 0, 0}, + {802.69, 0, 0, 1428.84, 2043.37, 0, 517.95, 241.72, 282.91, 0, 2648.42, 2657.6, 3265.08, 3272, 3887.21, 4501.72, 5116.11, 5731.49, 6346.14, 0, 0}, + {802.65, 0, 0, 1428.74, 2043.23, 0, 517.97, 241.76, 282.95, 0, 2648.26, 2657.45, 3264.89, 3271.83, 3887.01, 4501.49, 5115.87, 5731.22, 6345.85, 0, 0}, + {802.6, 0, 0, 1428.64, 2043.11, 0, 517.99, 241.81, 282.98, 0, 2648.12, 2657.32, 3264.73, 3271.67, 3886.84, 4501.3, 5115.66, 5730.99, 6345.59, 0, 0} + }; + int i; + + double dMair = 28.9626; + double dZair = 0; + + public void Run(GasProps gasProps) { + for (int i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) dXi[i] = 0; + iNCC = -1; + for (i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) { + if (gasProps.adMixture[i] > 0.0) { + iNCC = iNCC + 1; + aiCID[iNCC] = i; + dXi[iNCC] = gasProps.adMixture[i]; + } + } + iNCC = iNCC + 1; + + for (i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) { + if (gasProps.adMixture[i] != 0) { + gasProps.dPc += adTablePc[i] * gasProps.adMixture[i]; + gasProps.dTC += adTableTc[i] * gasProps.adMixture[i]; + if (adTableBzsx[i] != 0) { + gasProps.dBzsx += gasProps.adMixture[i] / adTableBzsx[i]; + gasProps.dBzxx += gasProps.adMixture[i] / adTableBzxx[i]; + } + + if (i >= 10 & i <= 18) { + gasProps.dC4j += gasProps.adMixture[i] * adTableMri[i]; + } + if (i >= 12 & i <= 18) { + gasProps.dC5j += gasProps.adMixture[i] * adTableMri[i]; + } + if (i >= 14 & i <= 18) { + gasProps.dC6j += gasProps.adMixture[i] * adTableMri[i]; + } + if (i == 3) { + gasProps.dC2 += gasProps.adMixture[i] * adTableMri[i]; + } + + switch (gasProps.dCbtj) { + case 2: + gasProps.dZb11062 += adTableSqrtbj[0][i] * gasProps.adMixture[i]; + gasProps.dHhvMol += adTableHhvMol[0][i] * gasProps.adMixture[i]; + gasProps.dLhvMol += adTableLhvMol[0][i] * gasProps.adMixture[i]; + dZair = 0.99941; + break; + case 1: + gasProps.dZb11062 += adTableSqrtbj[1][i] * gasProps.adMixture[i]; + gasProps.dHhvMol += adTableHhvMol[1][i] * gasProps.adMixture[i]; + gasProps.dLhvMol += adTableLhvMol[1][i] * gasProps.adMixture[i]; + dZair = 0.99958; + break; + case 0: + gasProps.dZb11062 += adTableSqrtbj[2][i] * gasProps.adMixture[i]; + gasProps.dHhvMol += adTableHhvMol[2][i] * gasProps.adMixture[i]; + gasProps.dLhvMol += adTableLhvMol[2][i] * gasProps.adMixture[i]; + dZair = 0.99963; + break; + } + } + } + gasProps.dBzsx = 1 / gasProps.dBzsx; + gasProps.dBzxx = 1 / gasProps.dBzxx; + gasProps.dZb11062 = 1 - gasProps.dZb11062 * gasProps.dZb11062; + gasProps.dHhvm = gasProps.dHhvMol / gasProps.dMrx; + gasProps.dLhvm = gasProps.dLhvMol / gasProps.dMrx; + gasProps.dHhvv = gasProps.dHhvMol * gasProps.dPb / gasProps.dTb / 8314.510 / gasProps.dZb11062; + gasProps.dLhvv = gasProps.dLhvMol * gasProps.dPb / gasProps.dTb / 8314.510 / gasProps.dZb11062; + gasProps.dRD_Ideal11062 = gasProps.dMrx / dMair; + gasProps.dRD_Real11062 = gasProps.dRD_Ideal11062 * dZair / gasProps.dZb11062; + + gasProps.dRhob11062 = gasProps.dMrx * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + gasProps.dRhof11062 = gasProps.dMrx * gasProps.dPf / 8314.51 / gasProps.dTf / gasProps.dZf; + gasProps.dWobbeIndex = gasProps.dHhvv / Math.sqrt(gasProps.dRD_Real11062); + gasProps.dC3j = gasProps.dC4j + gasProps.adMixture[4] * adTableMri[4]; + gasProps.dC2j = gasProps.dC3j + gasProps.adMixture[3] * adTableMri[3]; + gasProps.dC3C4 = gasProps.adMixture[4] * adTableMri[4] + gasProps.adMixture[10] * adTableMri[10] + gasProps.adMixture[11] * adTableMri[11]; + gasProps.dTotalC = gasProps.dC2j + gasProps.adMixture[0] * adTableMri[0]; + + gasProps.dTotalC = gasProps.dTotalC * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + gasProps.dC2 = gasProps.dC2 * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + gasProps.dC3C4 = gasProps.dC3C4 * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + gasProps.dC2j = gasProps.dC2j * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + gasProps.dC3j = gasProps.dC3j * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + gasProps.dC4j = gasProps.dC4j * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + gasProps.dC5j = gasProps.dC5j * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + gasProps.dC6j = gasProps.dC6j * gasProps.dPb / 8314.51 / gasProps.dTb / gasProps.dZb11062; + + } + +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/ThermService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/ThermService.java new file mode 100644 index 0000000..c5a6831 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngCalTools/service/ThermService.java @@ -0,0 +1,430 @@ +package com.ruoyi.ngCalTools.service; + +import com.ruoyi.ngCalTools.model.GasProps; +import com.ruoyi.ngCalTools.utils.GasConstants; +import org.springframework.stereotype.Service; + +@Service +public class ThermService { + private static final double CAL_TH = 4.1840; + public int coefA = 0; + public int coefB = 1; + public int coefC = 2; + public int coefD = 3; + public int coefE = 4; + public int coefF = 5; + public int coefG = 6; + public int coefH = 7; + public int coefI = 8; + public int coefJ = 9; + public int coefK = 10; + + double dPdD;// partial deriv of P wrt D + double dPdT;// partial deriv of P wrt T + double dSi;// ideal gas specific entropy, kJ/kg.K + double dTold;// temperature previously used + double dMrxold;// mixture molar mass previously used + //set the number of points for quadrature + int GK_points = 5; + // 初始化 GK_root 数组 + double[] GK_root = { 0.14887433898163121088, 0.43339539412924719080, 0.67940956829902440263, 0.86506336668898451073, 0.97390652851717172008 }; + // 初始化 GK_weight 数组 + double[] GK_weight = { 0.29552422471475286217, 0.26926671930999634918, 0.21908636251598204295, 0.14945134915058059038, 0.066671344308688137179 }; + + private final double[][] ThermConstants = { + {-29776.4, 7.95454, 43.9417, 1037.09, 1.56373, 813.205, -24.9027, 1019.98, -10.1601, 1070.14, -20.0615}, + {-3495.34, 6.95587, 0.272892, 662.738, -0.291318, -680.562, 1.78980, 1740.06, 0.0, 100.0, 4.49823}, + {20.7307, 6.96237, 2.68645, 500.371, -2.56429, -530.443, 3.91921, 500.198, 2.13290, 2197.22, 5.81381}, + {-37524.4, 7.98139, 24.3668, 752.320, 3.53990, 272.846, 8.44724, 1020.13, -13.2732, 869.510, -22.4010}, + {-56072.1, 8.14319, 37.0629, 735.402, 9.38159, 247.190, 13.4556, 1454.78, -11.7342, 984.518, -24.0426}, + {-13773.1, 7.97183, 6.27078, 2572.63, 2.05010, 1156.72, 0.0, 100.0, 0.0, 100.0, -3.24989}, + {-10085.4, 7.94680, -0.08380, 433.801, 2.85539, 843.792, 6.31595, 1481.43, -2.88457, 1102.23, -0.51551}, + {-5565.60, 6.66789, 2.33458, 2584.98, 0.749019, 559.656, 0.0, 100.0, 0.0, 100.0, -7.94821}, + {-2753.49, 6.95854, 2.02441, 1541.22, 0.096774, 3674.81, 0.0, 100.0, 0.0, 100.0, 6.23387}, + {-3497.45, 6.96302, 2.40013, 2522.05, 2.21752, 1154.15, 0.0, 100.0, 0.0, 100.0, 9.19749}, + {-72387.0, 17.8143, 58.2062, 1787.39, 40.7621, 808.645, 0.0, 100.0, 0.0, 100.0, -44.1341}, + {-72674.8, 18.6383, 57.4178, 1792.73, 38.6599, 814.151, 0.0, 100.0, 0.0, 100.0, -46.1938}, + {-91505.5, 21.3861, 74.3410, 1701.58, 47.0587, 775.899, 0.0, 100.0, 0.0, 100.0, -60.2474}, + {-83845.2, 22.5012, 69.5789, 1719.58, 46.2164, 802.174, 0.0, 100.0, 0.0, 100.0, -62.2197}, + {-94982.5, 26.6225, 80.3819, 1718.49, 55.6598, 802.069, 0.0, 100.0, 0.0, 100.0, -77.5366}, + {-103353.0, 30.4029, 90.6941, 1669.32, 63.2028, 786.001, 0.0, 100.0, 0.0, 100.0, -92.0164}, + {-109674.0, 34.0847, 100.253, 1611.55, 69.7675, 768.847, 0.0, 100.0, 0.0, 100.0, -106.149}, + {-122599.0, 38.5014, 111.446, 1646.48, 80.5015, 781.588, 0.0, 100.0, 0.0, 100.0, -122.444}, + {-133564.0, 42.7143, 122.173, 1654.85, 90.2255, 785.564, 0.0, 100.0, 0.0, 100.0, -138.006}, + {0.0, 4.9680, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0}, + {0.0, 4.9680, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0, 100.0, 0.0} + }; + public ThermService() + { + // initialize 3 history-sensitive variables + dSi = 0.0; + dTold = 0.0; + dMrxold = 0.0; + } + + public void Run(GasProps gasProps, DetailService detailService) + { + //local variables + double c, x, y, z; + //first run basic set of functions within AGA 8 (1994) Detail Method + detailService.run(gasProps); + //find first partial derivative of Z wrt D + detailService.dZdD(gasProps.dDf); + //find real gas cv, cp, specific enthalpy and entropy + CprCvrHS(gasProps, detailService); + //ratio of real gas specific heats + gasProps.dk = gasProps.dCp / gasProps.dCv; + //solve c in three steps, for clarity and ease of debugging + x = gasProps.dk * GasConstants.RGAS * 1000.0 * gasProps.dTf; + y = gasProps.dMrx; + z = gasProps.dZf + gasProps.dDf * detailService.ddZdD; + //calculate c, which is SOS^2 + c = (x / y) * z; + //speed of sound + gasProps.dSOS = Math.sqrt(c); + //calculate the real gas isentropic exponent + //using expression functionally equivalent to Equation 3.2 + gasProps.dKappa = (c * gasProps.dRhof) / gasProps.dPf; + return; + } + private double CpiMolar(GasProps gasProps) { + double cp = 0.0; + double Cpx; + double DT, FT, HT, JT; + double Dx, Fx, Hx, Jx; + double T; + T = gasProps.dTf; + for (int i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) { + if (gasProps.getAdMixture()[i] > 0) { + // 计算每个组分的贡献 + Cpx = 0.0; + // calculate species intermediate terms + DT = ThermConstants[i][ coefD] / T; + FT = ThermConstants[i][ coefF] / T; + HT = ThermConstants[i][ coefH] / T; + JT = ThermConstants[i][ coefJ] / T; + // use intermediate terms to avoid redundant calcs + Dx = DT / Math.sinh(DT); + Fx = FT / Math.cosh(FT); + Hx = HT / Math.sinh(HT); + Jx = JT / Math.cosh(JT); + Cpx += ThermConstants[i][ coefB]; + Cpx += ThermConstants[i][ coefC] * Dx * Dx; + Cpx += ThermConstants[i][ coefE] * Fx * Fx; + Cpx += ThermConstants[i][ coefG] * Hx * Hx; + Cpx += ThermConstants[i][ coefI] * Jx * Jx; + //use current mole fraction to weight the contribution + Cpx *= gasProps.adMixture[i]; + //add this contribution to the sum + cp += Cpx; + } + } + return cp * CAL_TH; + } + // coth 函数实现 + private static double coth(double x) { + return 1.0 / Math.tanh(x); + } + // Ho 函数 + public double Ho(GasProps gasProps) { + double H = 0.0; + double Hx; + double DT, FT, HT, JT; + double cothDT, tanhFT, cothHT, tanhJT; + double T = gasProps.dTf; + + for (int i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) { + if (gasProps.adMixture[i] <= 0.0) continue; + Hx = 0.0; + + DT = ThermConstants[i][coefD] / T; + FT = ThermConstants[i][coefF] / T; + HT = ThermConstants[i][coefH] / T; + JT = ThermConstants[i][coefJ] / T; + + cothDT = coth(DT); + tanhFT = Math.tanh(FT); + cothHT = coth(HT); + tanhJT = Math.tanh(JT); + + Hx += ThermConstants[i][coefA]; + Hx += ThermConstants[i][coefB] * T; + Hx += ThermConstants[i][coefC] * ThermConstants[i][coefD] * cothDT; + Hx -= ThermConstants[i][coefE] * ThermConstants[i][coefF] * tanhFT; + Hx += ThermConstants[i][coefG] * ThermConstants[i][coefH] * cothHT; + Hx -= ThermConstants[i][coefI] * ThermConstants[i][coefJ] * tanhJT; + + Hx *= gasProps.adMixture[i]; + H += Hx; + } + + H *= CAL_TH; + H /= gasProps.dMrx; + return H * 1000.0; + } + + // So 函数 + public double So(GasProps gasProps) { + double S = 0.0; + double Sx; + double DT, FT, HT, JT; + double cothDT, tanhFT, cothHT, tanhJT; + double sinhDT, coshFT, sinhHT, coshJT; + double T = gasProps.dTf; + + for (int i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) { + if (gasProps.adMixture[i] <= 0.0) continue; + Sx = 0.0; + + DT = ThermConstants[i][coefD] / T; + FT = ThermConstants[i][coefF] / T; + HT = ThermConstants[i][coefH] / T; + JT = ThermConstants[i][coefJ] / T; + + cothDT = coth(DT); + tanhFT = Math.tanh(FT); + cothHT = coth(HT); + tanhJT = Math.tanh(JT); + + sinhDT = Math.sinh(DT); + coshFT = Math.cosh(FT); + sinhHT = Math.sinh(HT); + coshJT = Math.cosh(JT); + + Sx += ThermConstants[i][coefK]; + Sx += ThermConstants[i][coefB] * Math.log(T); + Sx += ThermConstants[i][coefC] * (DT * cothDT - Math.log(sinhDT)); + Sx -= ThermConstants[i][coefE] * (FT * tanhFT - Math.log(coshFT)); + Sx += ThermConstants[i][coefG] * (HT * cothHT - Math.log(sinhHT)); + Sx -= ThermConstants[i][coefI] * (JT * tanhJT - Math.log(coshJT)); + + Sx *= gasProps.adMixture[i]; + S += Sx; + } + + S *= CAL_TH; + S /= gasProps.dMrx; + return S * 1000.0; + } + + // CprCvrHS 函数 + public void CprCvrHS(GasProps gasProps, DetailService detailService) { + double Cvinc = 0.0; + double Cvr, Cpr; + double Hinc = 0.0; + double Sinc = 0.0; + double Smixing = 0.0; + double Cp = CpiMolar(gasProps); + double Si; + + gasProps.dHo = Ho(gasProps); + Si = So(gasProps); + + gasProps.dCpi = (Cp * 1000.0) / gasProps.dMrx; + + for (int i = 0; i < GK_points; i++) { + double x = gasProps.dDf * (1.0 + GK_root[i]) / 2.0; + detailService.zdetail(x); + detailService.dZdT(x); + detailService.d2ZdT2(x); + + Hinc += GK_weight[i] * detailService.ddZdT / x; + Cvinc += GK_weight[i] * (2.0 * detailService.ddZdT + gasProps.dTf * detailService.dd2ZdT2) / x; + Sinc += GK_weight[i] * (detailService.dZ + gasProps.dTf * detailService.ddZdT - 1.0) / x; + + x = gasProps.dDf * (1.0 - GK_root[i]) / 2.0; + detailService.zdetail(x); + detailService.dZdT(x); + detailService.d2ZdT2(x); + + Hinc += GK_weight[i] * detailService.ddZdT / x; + Cvinc += GK_weight[i] * (2.0 * detailService.ddZdT + gasProps.dTf * detailService.dd2ZdT2) / x; + Sinc += GK_weight[i] * (detailService.dZ + gasProps.dTf * detailService.ddZdT - 1.0) / x; + } + + detailService.zdetail(gasProps.dDf); + detailService.dZdT(gasProps.dDf); + detailService.d2ZdT2(gasProps.dDf); + + Cvr = Cp - GasConstants.RGAS * (1.0 + gasProps.dTf * Cvinc * 0.5 * gasProps.dDf); + + double a = (gasProps.dZf + gasProps.dTf * detailService.ddZdT); + double b = (gasProps.dZf + gasProps.dDf * detailService.ddZdD); + + double dPdT =GasConstants. RGAS * gasProps.dDf * a; + double dPdD = GasConstants.RGAS * gasProps.dTf * b; + + Cpr = Cvr + GasConstants.RGAS * ((a * a) / b); + + Cpr /= gasProps.dMrx; + Cvr /= gasProps.dMrx; + + gasProps.dCv = Cvr * 1000.0; + gasProps.dCp = Cpr * 1000.0; + + gasProps.dH = gasProps.dHo + 1000.0 * GasConstants.RGAS * gasProps.dTf * (gasProps.dZf - 1.0 - gasProps.dTf * Hinc * 0.5 * gasProps.dDf) / gasProps.dMrx; + + for (int i = 0; i < GasConstants.NUMBEROFCOMPONENTS; i++) { + if (gasProps.adMixture[i] != 0) Smixing += gasProps.adMixture[i] * Math.log(gasProps.adMixture[i]); + } + Smixing *= GasConstants.RGAS; + + gasProps.dS = Si - Smixing - 1000.0 * GasConstants.RGAS * (Math.log(gasProps.dPf / 101325.0) - Math.log(gasProps.dZf) + Sinc * 0.5 * gasProps.dDf) / gasProps.dMrx; + } + + // HS_Mode 函数 + public void HS_Mode( GasProps gasProps, DetailService detailService, double H, double S, boolean bGuess) { + double s0 = S; + double h0 = H; + double t1, t2, tmin, tmax; + double p1, p2, px, pmin, pmax; + double delta1, delta2; + double tolerance = 0.001; + if (bGuess) { + t1 = gasProps.dTf; + px = gasProps.dPf; + pmax = px * 2.0; + pmin = px * 0.1; + tmax = t1 * 1.5; + tmin = t1 * 0.67; + } else { + t1 = 273.15; + px = 1013250.0; + pmax = GasConstants.P_MAX; + pmin = 10000.0; + tmax = GasConstants.T_MAX; + tmin = GasConstants.T_MIN; + } + + t2 = t1 + 10.0; + + detailService.run(gasProps); + double h1 = H(gasProps, detailService) - h0; + + for (int i = 0; i < GasConstants.MAX_NUM_OF_ITERATIONS; i++) { + gasProps.dTf = t2; + p1 = px; + p2 = px * 0.1; + gasProps.dPf = p1; + detailService.run(gasProps); + double s1 = S(gasProps, detailService) - s0; + + for (int j = 0; j < GasConstants.MAX_NUM_OF_ITERATIONS; j++) { + gasProps.dPf = p2; + detailService.run(gasProps); + double s2 = S(gasProps, detailService) - s0; + + delta2 = Math.abs(s1 - s2) / s0; + if (delta2 < tolerance) break; + + double p0 = p2; + p2 = (p1 * s2 - p2 * s1) / (s2 - s1); + + if (p2 <= pmin) p2 = pmin; + if (p2 >= pmax) p2 = pmax; + + p1 = p0; + s1 = s2; + } + + if (gasProps.lStatus == GasConstants.MAX_NUM_OF_ITERATIONS_EXCEEDED) break; + + double h2 = H(gasProps, detailService) - h0; + delta1 = Math.abs(h1 - h2) / h0; + + if (delta1 < tolerance && i > 0) break; + + double t0 = t2; + t2 = (t1 * h2 - t2 * h1) / (h2 - h1); + + if (t2 >= tmax) t2 = tmax; + if (t2 <= tmin) { + t2 = t0 + 10.0; + gasProps.dTf = t2; + detailService.run(gasProps); + h2 = H(gasProps, detailService) - h0; + } + + t1 = t0; + h1 = h2; + } + + if (gasProps.lStatus == GasConstants.MAX_NUM_OF_ITERATIONS_EXCEEDED) { + gasProps.lStatus = GasConstants.MAX_NUM_OF_ITERATIONS_EXCEEDED; + } + } + + // H 函数 + public double H(GasProps gasProps, DetailService detailService) { + double Hinc = 0.0; + gasProps.dHo = Ho(gasProps); + + for (int i = 0; i < GK_points; i++) { + double x = gasProps.dDf * (1.0 + GK_root[i]) / 2.0; + detailService.zdetail(x); + detailService.dZdT(x); + detailService.d2ZdT2(x); + + Hinc += GK_weight[i] * detailService.ddZdT / x; + if (i == 10) break; + + x = gasProps.dDf * (1.0 - GK_root[i]) / 2.0; + detailService.zdetail(x); + detailService.dZdT(x); + detailService.d2ZdT2(x); + + Hinc += GK_weight[i] * detailService.ddZdT / x; + } + + detailService.zdetail(gasProps.dDf); + detailService.dZdT(gasProps.dDf); + detailService.d2ZdT2(gasProps.dDf); + + gasProps.dH = gasProps.dHo + 1000.0 * GasConstants.RGAS * gasProps.dTf * (gasProps.dZf - 1.0 - gasProps.dTf * Hinc * 0.5 * gasProps.dDf) / gasProps.dMrx; + return gasProps.dH; + } + + + + double S(GasProps gasProps, DetailService detailService) + { + double Sinc; double Smixing; double x; + int i; + //initialize integral + Sinc = 0.0; + //initialize entropy of mixing + Smixing = 0.0; + //integrate partial derivatives from D=0 to D=D, applying Gauss-Kronrod quadrature + for (i = 0; i list = ngComponentsService.selectNgComponentsList(ngComponents); + return getDataTable(list); + } + + /** + * 导出天然气组分列表 + */ + @PreAuthorize("@ss.hasPermi('ngtools:components:export')") + @Log(title = "天然气组分", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NgComponents ngComponents) + { + List list = ngComponentsService.selectNgComponentsList(ngComponents); + ExcelUtil util = new ExcelUtil(NgComponents.class); + util.exportExcel(response, list, "天然气组分数据"); + } + + /** + * 获取天然气组分详细信息 + */ + @PreAuthorize("@ss.hasPermi('ngtools:components:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(ngComponentsService.selectNgComponentsById(id)); + } + + /** + * 新增天然气组分 + */ + @PreAuthorize("@ss.hasPermi('ngtools:components:add')") + @Log(title = "天然气组分", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NgComponents ngComponents) + { + return toAjax(ngComponentsService.insertNgComponents(ngComponents)); + } + + /** + * 修改天然气组分 + */ + @PreAuthorize("@ss.hasPermi('ngtools:components:edit')") + @Log(title = "天然气组分", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NgComponents ngComponents) + { + return toAjax(ngComponentsService.updateNgComponents(ngComponents)); + } + + /** + * 删除天然气组分 + */ + @PreAuthorize("@ss.hasPermi('ngtools:components:remove')") + @Log(title = "天然气组分", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(ngComponentsService.deleteNgComponentsByIds(ids)); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgMeterparController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgMeterparController.java new file mode 100644 index 0000000..c871413 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgMeterparController.java @@ -0,0 +1,104 @@ +package com.ruoyi.ngtools.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.ngtools.domain.NgMeterpar; +import com.ruoyi.ngtools.service.INgMeterparService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 流量计参数Controller + * + * @author ruoyi + * @date 2025-02-09 + */ +@RestController +@RequestMapping("/ngtools/meterpar") +public class NgMeterparController extends BaseController +{ + @Autowired + private INgMeterparService ngMeterparService; + + /** + * 查询流量计参数列表 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterpar:list')") + @GetMapping("/list") + public TableDataInfo list(NgMeterpar ngMeterpar) + { + startPage(); + List list = ngMeterparService.selectNgMeterparList(ngMeterpar); + return getDataTable(list); + } + + /** + * 导出流量计参数列表 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterpar:export')") + @Log(title = "流量计参数", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NgMeterpar ngMeterpar) + { + List list = ngMeterparService.selectNgMeterparList(ngMeterpar); + ExcelUtil util = new ExcelUtil(NgMeterpar.class); + util.exportExcel(response, list, "流量计参数数据"); + } + + /** + * 获取流量计参数详细信息 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterpar:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(ngMeterparService.selectNgMeterparById(id)); + } + + /** + * 新增流量计参数 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterpar:add')") + @Log(title = "流量计参数", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NgMeterpar ngMeterpar) + { + return toAjax(ngMeterparService.insertNgMeterpar(ngMeterpar)); + } + + /** + * 修改流量计参数 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterpar:edit')") + @Log(title = "流量计参数", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NgMeterpar ngMeterpar) + { + return toAjax(ngMeterparService.updateNgMeterpar(ngMeterpar)); + } + + /** + * 删除流量计参数 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterpar:remove')") + @Log(title = "流量计参数", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(ngMeterparService.deleteNgMeterparByIds(ids)); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgMeterresultController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgMeterresultController.java new file mode 100644 index 0000000..f58adcc --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgMeterresultController.java @@ -0,0 +1,104 @@ +package com.ruoyi.ngtools.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.ngtools.domain.NgMeterresult; +import com.ruoyi.ngtools.service.INgMeterresultService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 流量计算结果Controller + * + * @author ruoyi + * @date 2025-02-09 + */ +@RestController +@RequestMapping("/ngtools/meterresult") +public class NgMeterresultController extends BaseController +{ + @Autowired + private INgMeterresultService ngMeterresultService; + + /** + * 查询流量计算结果列表 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterresult:list')") + @GetMapping("/list") + public TableDataInfo list(NgMeterresult ngMeterresult) + { + startPage(); + List list = ngMeterresultService.selectNgMeterresultList(ngMeterresult); + return getDataTable(list); + } + + /** + * 导出流量计算结果列表 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterresult:export')") + @Log(title = "流量计算结果", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NgMeterresult ngMeterresult) + { + List list = ngMeterresultService.selectNgMeterresultList(ngMeterresult); + ExcelUtil util = new ExcelUtil(NgMeterresult.class); + util.exportExcel(response, list, "流量计算结果数据"); + } + + /** + * 获取流量计算结果详细信息 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterresult:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(ngMeterresultService.selectNgMeterresultById(id)); + } + + /** + * 新增流量计算结果 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterresult:add')") + @Log(title = "流量计算结果", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NgMeterresult ngMeterresult) + { + return toAjax(ngMeterresultService.insertNgMeterresult(ngMeterresult)); + } + + /** + * 修改流量计算结果 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterresult:edit')") + @Log(title = "流量计算结果", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NgMeterresult ngMeterresult) + { + return toAjax(ngMeterresultService.updateNgMeterresult(ngMeterresult)); + } + + /** + * 删除流量计算结果 + */ + @PreAuthorize("@ss.hasPermi('ngtools:meterresult:remove')") + @Log(title = "流量计算结果", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(ngMeterresultService.deleteNgMeterresultByIds(ids)); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgNgparController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgNgparController.java new file mode 100644 index 0000000..df13888 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/controller/NgNgparController.java @@ -0,0 +1,104 @@ +package com.ruoyi.ngtools.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.ngtools.domain.NgNgpar; +import com.ruoyi.ngtools.service.INgNgparService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 天然气物性参数Controller + * + * @author ruoyi + * @date 2025-02-09 + */ +@RestController +@RequestMapping("/ngtools/ngpar") +public class NgNgparController extends BaseController +{ + @Autowired + private INgNgparService ngNgparService; + + /** + * 查询天然气物性参数列表 + */ + @PreAuthorize("@ss.hasPermi('ngtools:ngpar:list')") + @GetMapping("/list") + public TableDataInfo list(NgNgpar ngNgpar) + { + startPage(); + List list = ngNgparService.selectNgNgparList(ngNgpar); + return getDataTable(list); + } + + /** + * 导出天然气物性参数列表 + */ + @PreAuthorize("@ss.hasPermi('ngtools:ngpar:export')") + @Log(title = "天然气物性参数", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NgNgpar ngNgpar) + { + List list = ngNgparService.selectNgNgparList(ngNgpar); + ExcelUtil util = new ExcelUtil(NgNgpar.class); + util.exportExcel(response, list, "天然气物性参数数据"); + } + + /** + * 获取天然气物性参数详细信息 + */ + @PreAuthorize("@ss.hasPermi('ngtools:ngpar:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(ngNgparService.selectNgNgparById(id)); + } + + /** + * 新增天然气物性参数 + */ + @PreAuthorize("@ss.hasPermi('ngtools:ngpar:add')") + @Log(title = "天然气物性参数", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NgNgpar ngNgpar) + { + return toAjax(ngNgparService.insertNgNgpar(ngNgpar)); + } + + /** + * 修改天然气物性参数 + */ + @PreAuthorize("@ss.hasPermi('ngtools:ngpar:edit')") + @Log(title = "天然气物性参数", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NgNgpar ngNgpar) + { + return toAjax(ngNgparService.updateNgNgpar(ngNgpar)); + } + + /** + * 删除天然气物性参数 + */ + @PreAuthorize("@ss.hasPermi('ngtools:ngpar:remove')") + @Log(title = "天然气物性参数", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(ngNgparService.deleteNgNgparByIds(ids)); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgComponents.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgComponents.java new file mode 100644 index 0000000..6b5e33b --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgComponents.java @@ -0,0 +1,419 @@ +package com.ruoyi.ngtools.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 天然气组分对象 ng_components + * + * @author ruoyi + * @date 2025-02-09 + */ +public class NgComponents extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private String id; + + /** 创建人名称 */ + @Excel(name = " 创建人名称 ") + private String createName; + + /** 更新人名称 */ + @Excel(name = " 更新人名称 ") + private String updateName; + + /** 甲烷C1 */ + @Excel(name = " 甲烷C1 ") + private String ngC1; + + /** 氮气N2 */ + @Excel(name = " 氮气N2 ") + private String ngN2; + + /** 二氧化碳CO2 */ + @Excel(name = " 二氧化碳CO2 ") + private String ngCo2; + + /** 乙烷C2 */ + @Excel(name = " 乙烷C2 ") + private String ngC2; + + /** 丙烷C3 */ + @Excel(name = " 丙烷C3 ") + private String ngC3; + + /** 水H2O */ + @Excel(name = " 水H2O ") + private String ngH2o; + + /** 硫化氢H2S */ + @Excel(name = " 硫化氢H2S ") + private String ngH2s; + + /** 氢气H2 */ + @Excel(name = " 氢气H2 ") + private String ngH2; + + /** 一氧化碳CO */ + @Excel(name = " 一氧化碳CO ") + private String ngCo; + + /** 氧气O2 */ + @Excel(name = " 氧气O2 ") + private String ngO2; + + /** 异丁烷iC4 */ + @Excel(name = " 异丁烷iC4 ") + private String ngIc4; + + /** 正丁烷nC4 */ + @Excel(name = " 正丁烷nC4 ") + private String ngNc4; + + /** 异戊烷iC5 */ + @Excel(name = " 异戊烷iC5 ") + private String ngIc5; + + /** 正戊烷nC5 */ + @Excel(name = " 正戊烷nC5 ") + private String ngNc5; + + /** 己烷C6 */ + @Excel(name = " 己烷C6 ") + private String ngC6; + + /** 庚烷C7 */ + @Excel(name = " 庚烷C7 ") + private String ngC7; + + /** 辛烷C8 */ + @Excel(name = " 辛烷C8 ") + private String ngC8; + + /** 壬烷C9 */ + @Excel(name = " 壬烷C9 ") + private String ngC9; + + /** 癸烷C10 */ + @Excel(name = " 癸烷C10 ") + private String ngC10; + + /** 氦气He */ + @Excel(name = " 氦气He ") + private String ngHe; + + /** 氩气Ar */ + @Excel(name = " 氩气Ar ") + private String ngAr; + + /** 合计 */ + @Excel(name = "合计") + private String sum; + + /** 取样编号 */ + @Excel(name = "取样编号") + private String sampleno; + + /** 仪表编号 */ + @Excel(name = "仪表编号") + private String meterno; + + /** 常用组分 */ + @Excel(name = "常用组分") + private String cyzf; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setCreateName(String createName) + { + this.createName = createName; + } + + public String getCreateName() + { + return createName; + } + public void setUpdateName(String updateName) + { + this.updateName = updateName; + } + + public String getUpdateName() + { + return updateName; + } + public void setNgC1(String ngC1) + { + this.ngC1 = ngC1; + } + + public String getNgC1() + { + return ngC1; + } + public void setNgN2(String ngN2) + { + this.ngN2 = ngN2; + } + + public String getNgN2() + { + return ngN2; + } + public void setNgCo2(String ngCo2) + { + this.ngCo2 = ngCo2; + } + + public String getNgCo2() + { + return ngCo2; + } + public void setNgC2(String ngC2) + { + this.ngC2 = ngC2; + } + + public String getNgC2() + { + return ngC2; + } + public void setNgC3(String ngC3) + { + this.ngC3 = ngC3; + } + + public String getNgC3() + { + return ngC3; + } + public void setNgH2o(String ngH2o) + { + this.ngH2o = ngH2o; + } + + public String getNgH2o() + { + return ngH2o; + } + public void setNgH2s(String ngH2s) + { + this.ngH2s = ngH2s; + } + + public String getNgH2s() + { + return ngH2s; + } + public void setNgH2(String ngH2) + { + this.ngH2 = ngH2; + } + + public String getNgH2() + { + return ngH2; + } + public void setNgCo(String ngCo) + { + this.ngCo = ngCo; + } + + public String getNgCo() + { + return ngCo; + } + public void setNgO2(String ngO2) + { + this.ngO2 = ngO2; + } + + public String getNgO2() + { + return ngO2; + } + public void setNgIc4(String ngIc4) + { + this.ngIc4 = ngIc4; + } + + public String getNgIc4() + { + return ngIc4; + } + public void setNgNc4(String ngNc4) + { + this.ngNc4 = ngNc4; + } + + public String getNgNc4() + { + return ngNc4; + } + public void setNgIc5(String ngIc5) + { + this.ngIc5 = ngIc5; + } + + public String getNgIc5() + { + return ngIc5; + } + public void setNgNc5(String ngNc5) + { + this.ngNc5 = ngNc5; + } + + public String getNgNc5() + { + return ngNc5; + } + public void setNgC6(String ngC6) + { + this.ngC6 = ngC6; + } + + public String getNgC6() + { + return ngC6; + } + public void setNgC7(String ngC7) + { + this.ngC7 = ngC7; + } + + public String getNgC7() + { + return ngC7; + } + public void setNgC8(String ngC8) + { + this.ngC8 = ngC8; + } + + public String getNgC8() + { + return ngC8; + } + public void setNgC9(String ngC9) + { + this.ngC9 = ngC9; + } + + public String getNgC9() + { + return ngC9; + } + public void setNgC10(String ngC10) + { + this.ngC10 = ngC10; + } + + public String getNgC10() + { + return ngC10; + } + public void setNgHe(String ngHe) + { + this.ngHe = ngHe; + } + + public String getNgHe() + { + return ngHe; + } + public void setNgAr(String ngAr) + { + this.ngAr = ngAr; + } + + public String getNgAr() + { + return ngAr; + } + public void setSum(String sum) + { + this.sum = sum; + } + + public String getSum() + { + return sum; + } + public void setSampleno(String sampleno) + { + this.sampleno = sampleno; + } + + public String getSampleno() + { + return sampleno; + } + public void setMeterno(String meterno) + { + this.meterno = meterno; + } + + public String getMeterno() + { + return meterno; + } + public void setCyzf(String cyzf) + { + this.cyzf = cyzf; + } + + public String getCyzf() + { + return cyzf; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createName", getCreateName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateName", getUpdateName()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("ngC1", getNgC1()) + .append("ngN2", getNgN2()) + .append("ngCo2", getNgCo2()) + .append("ngC2", getNgC2()) + .append("ngC3", getNgC3()) + .append("ngH2o", getNgH2o()) + .append("ngH2s", getNgH2s()) + .append("ngH2", getNgH2()) + .append("ngCo", getNgCo()) + .append("ngO2", getNgO2()) + .append("ngIc4", getNgIc4()) + .append("ngNc4", getNgNc4()) + .append("ngIc5", getNgIc5()) + .append("ngNc5", getNgNc5()) + .append("ngC6", getNgC6()) + .append("ngC7", getNgC7()) + .append("ngC8", getNgC8()) + .append("ngC9", getNgC9()) + .append("ngC10", getNgC10()) + .append("ngHe", getNgHe()) + .append("ngAr", getNgAr()) + .append("sum", getSum()) + .append("sampleno", getSampleno()) + .append("meterno", getMeterno()) + .append("cyzf", getCyzf()) + .toString(); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgMeterpar.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgMeterpar.java new file mode 100644 index 0000000..5f3effc --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgMeterpar.java @@ -0,0 +1,811 @@ +package com.ruoyi.ngtools.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 流量计参数对象 ng_meterpar + * + * @author ruoyi + * @date 2025-02-09 + */ +public class NgMeterpar extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private String id; + + /** 创建人名称 */ + @Excel(name = "创建人名称 ") + private String createName; + + /** 更新人名称 */ + @Excel(name = "更新人名称 ") + private String updateName; + + /** 流量计算标准 */ + @Excel(name = "流量计算标准 ") + private String dFlowCalbz; + + /** 压缩因子计算标准 */ + @Excel(name = "压缩因子计算标准 ") + private String dZcalbz; + + /** 计量参比条件压力 */ + @Excel(name = "计量参比条件压力 ") + private String dCbtj; + + /** 计量参比条件压力 */ + @Excel(name = "计量参比条件压力 ") + private String dpbM; + + /** 计量参比条件温度 */ + @Excel(name = "计量参比条件温度 ") + private String dtbM; + + /** 燃烧参比条件压力 */ + @Excel(name = "燃烧参比条件压力 ") + private String dpbE; + + /** 燃烧参比条件温度 */ + @Excel(name = "燃烧参比条件温度 ") + private String dtbE; + + /** 当地大气压 */ + @Excel(name = "当地大气压 ") + private String dPatm; + + /** 当地大气压单位 */ + @Excel(name = "当地大气压单位 ") + private String dPatmUnit; + + /** 天然气组分 */ + @Excel(name = "天然气组分 ") + private String dngCompents; + + /** 流量计类别 */ + @Excel(name = "流量计类别 ") + private String dMeterType; + + /** 节流装置类型 */ + @Excel(name = "节流装置类型 ") + private String dCoreType; + + /** 取压方式 */ + @Excel(name = "取压方式 ") + private String dPtmode; + + /** 管道类型 */ + @Excel(name = "管道类型 ") + private String dPipeType; + + /** 管道内径 */ + @Excel(name = "管道内径 ") + private String dPipeD; + + /** 长度单位 */ + @Excel(name = "长度单位 ") + private String dLenUnit; + + /** 管道内径参考温度 */ + @Excel(name = "管道内径参考温度 ") + private String dPipeDtemp; + + /** 温度单位 */ + @Excel(name = "温度单位 ") + private String dPileDtempU; + + /** 管道材料 */ + @Excel(name = "管道材料 ") + private String dPipeMaterial; + + /** 孔板孔径 */ + @Excel(name = "孔板孔径 ") + private String dOrificeD; + + /** 长度单位 */ + @Excel(name = "长度单位 ") + private String dOrificeUnit; + + /** 孔板内径参考温度 */ + @Excel(name = "孔板内径参考温度 ") + private String dOrificeDtemp; + + /** 温度单位 */ + @Excel(name = "温度单位 ") + private String dOrificeDtempUnit; + + /** 孔板材料 */ + @Excel(name = "孔板材料 ") + private String dOrificeMaterial; + + /** 锐利度系数计算方法 */ + @Excel(name = "锐利度系数计算方法 ") + private String dOrificeSharpness; + + /** 孔板入口圆弧半径 */ + @Excel(name = "孔板入口圆弧半径 ") + private String dOrificeRk; + + /** 长度单位 */ + @Excel(name = "长度单位 ") + private String dOrificeRkLenU; + + /** 输入压力 */ + @Excel(name = "输入压力 ") + private String dPf; + + /** 压力单位 */ + @Excel(name = "压力单位 ") + private String dPfUnit; + + /** 压力类型 */ + @Excel(name = "压力类型 ") + private String dPfType; + + /** 输入温度 */ + @Excel(name = "输入温度 ") + private String dTf; + + /** 温度单位 */ + @Excel(name = "温度单位 ") + private String dTfUnit; + + /** 输入差压 */ + @Excel(name = "输入差压 ") + private String dDp; + + /** 压力单位 */ + @Excel(name = "压力单位 ") + private String dDpUnit; + + /** 体积流量单位 */ + @Excel(name = "体积流量单位 ") + private String dVFlowUnit; + + /** 质量流量单位 */ + @Excel(name = "质量流量单位 ") + private String dMFlowUnit; + + /** 能量流量单位 */ + @Excel(name = "能量流量单位 ") + private String dEFlowUnit; + + /** 流出系数 */ + @Excel(name = "流出系数 ") + private String dCd; + + /** 流出系数计算方法 */ + @Excel(name = "流出系数计算方法 ") + private String dCdCalMethod; + + /** 仪表系数 */ + @Excel(name = "仪表系数 ") + private String dMeterFactor; + + /** 脉冲数 */ + @Excel(name = "脉冲数 ") + private String dPulseNum; + + /** 最大体积流量 */ + @Excel(name = "最大体积流量 ") + private String dVFlowMax; + + /** 最小体积流量 */ + @Excel(name = "最小体积流量 ") + private String dVFlowMin; + + /** 常用流量 */ + @Excel(name = "常用流量 ") + private String dVFlowCon; + + /** 压力量程下限 */ + @Excel(name = "压力量程下限 ") + private String dPfRangeMin; + + /** 压力量程上限 */ + @Excel(name = "压力量程上限 ") + private String dPfRangeMax; + + /** 差压量程下限 */ + @Excel(name = "差压量程下限 ") + private String dDpRangeMin; + + /** 差压量程上限 */ + @Excel(name = "差压量程上限 ") + private String dDpRangeMax; + + /** 温度计量程下限 */ + @Excel(name = "温度计量程下限 ") + private String dTfRangeMin; + + /** 温度计量程上限 */ + @Excel(name = "温度计量程上限 ") + private String dTfRangeMax; + + /** 管束车容积 */ + @Excel(name = "管束车容积 ") + private String dVGsc; + + /** 取样编号 */ + @Excel(name = "取样编号") + private String sampleno; + + /** 仪表编号 */ + @Excel(name = "仪表编号") + private String meterno; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setCreateName(String createName) + { + this.createName = createName; + } + + public String getCreateName() + { + return createName; + } + public void setUpdateName(String updateName) + { + this.updateName = updateName; + } + + public String getUpdateName() + { + return updateName; + } + public void setdFlowCalbz(String dFlowCalbz) + { + this.dFlowCalbz = dFlowCalbz; + } + + public String getdFlowCalbz() + { + return dFlowCalbz; + } + public void setdZcalbz(String dZcalbz) + { + this.dZcalbz = dZcalbz; + } + + public String getdZcalbz() + { + return dZcalbz; + } + public void setdCbtj(String dCbtj) + { + this.dCbtj = dCbtj; + } + + public String getdCbtj() + { + return dCbtj; + } + public void setDpbM(String dpbM) + { + this.dpbM = dpbM; + } + + public String getDpbM() + { + return dpbM; + } + public void setDtbM(String dtbM) + { + this.dtbM = dtbM; + } + + public String getDtbM() + { + return dtbM; + } + public void setDpbE(String dpbE) + { + this.dpbE = dpbE; + } + + public String getDpbE() + { + return dpbE; + } + public void setDtbE(String dtbE) + { + this.dtbE = dtbE; + } + + public String getDtbE() + { + return dtbE; + } + public void setdPatm(String dPatm) + { + this.dPatm = dPatm; + } + + public String getdPatm() + { + return dPatm; + } + public void setdPatmUnit(String dPatmUnit) + { + this.dPatmUnit = dPatmUnit; + } + + public String getdPatmUnit() + { + return dPatmUnit; + } + public void setDngCompents(String dngCompents) + { + this.dngCompents = dngCompents; + } + + public String getDngCompents() + { + return dngCompents; + } + public void setdMeterType(String dMeterType) + { + this.dMeterType = dMeterType; + } + + public String getdMeterType() + { + return dMeterType; + } + public void setdCoreType(String dCoreType) + { + this.dCoreType = dCoreType; + } + + public String getdCoreType() + { + return dCoreType; + } + public void setdPtmode(String dPtmode) + { + this.dPtmode = dPtmode; + } + + public String getdPtmode() + { + return dPtmode; + } + public void setdPipeType(String dPipeType) + { + this.dPipeType = dPipeType; + } + + public String getdPipeType() + { + return dPipeType; + } + public void setdPipeD(String dPipeD) + { + this.dPipeD = dPipeD; + } + + public String getdPipeD() + { + return dPipeD; + } + public void setdLenUnit(String dLenUnit) + { + this.dLenUnit = dLenUnit; + } + + public String getdLenUnit() + { + return dLenUnit; + } + public void setdPipeDtemp(String dPipeDtemp) + { + this.dPipeDtemp = dPipeDtemp; + } + + public String getdPipeDtemp() + { + return dPipeDtemp; + } + public void setdPileDtempU(String dPileDtempU) + { + this.dPileDtempU = dPileDtempU; + } + + public String getdPileDtempU() + { + return dPileDtempU; + } + public void setdPipeMaterial(String dPipeMaterial) + { + this.dPipeMaterial = dPipeMaterial; + } + + public String getdPipeMaterial() + { + return dPipeMaterial; + } + public void setdOrificeD(String dOrificeD) + { + this.dOrificeD = dOrificeD; + } + + public String getdOrificeD() + { + return dOrificeD; + } + public void setdOrificeUnit(String dOrificeUnit) + { + this.dOrificeUnit = dOrificeUnit; + } + + public String getdOrificeUnit() + { + return dOrificeUnit; + } + public void setdOrificeDtemp(String dOrificeDtemp) + { + this.dOrificeDtemp = dOrificeDtemp; + } + + public String getdOrificeDtemp() + { + return dOrificeDtemp; + } + public void setdOrificeDtempUnit(String dOrificeDtempUnit) + { + this.dOrificeDtempUnit = dOrificeDtempUnit; + } + + public String getdOrificeDtempUnit() + { + return dOrificeDtempUnit; + } + public void setdOrificeMaterial(String dOrificeMaterial) + { + this.dOrificeMaterial = dOrificeMaterial; + } + + public String getdOrificeMaterial() + { + return dOrificeMaterial; + } + public void setdOrificeSharpness(String dOrificeSharpness) + { + this.dOrificeSharpness = dOrificeSharpness; + } + + public String getdOrificeSharpness() + { + return dOrificeSharpness; + } + public void setdOrificeRk(String dOrificeRk) + { + this.dOrificeRk = dOrificeRk; + } + + public String getdOrificeRk() + { + return dOrificeRk; + } + public void setdOrificeRkLenU(String dOrificeRkLenU) + { + this.dOrificeRkLenU = dOrificeRkLenU; + } + + public String getdOrificeRkLenU() + { + return dOrificeRkLenU; + } + public void setdPf(String dPf) + { + this.dPf = dPf; + } + + public String getdPf() + { + return dPf; + } + public void setdPfUnit(String dPfUnit) + { + this.dPfUnit = dPfUnit; + } + + public String getdPfUnit() + { + return dPfUnit; + } + public void setdPfType(String dPfType) + { + this.dPfType = dPfType; + } + + public String getdPfType() + { + return dPfType; + } + public void setdTf(String dTf) + { + this.dTf = dTf; + } + + public String getdTf() + { + return dTf; + } + public void setdTfUnit(String dTfUnit) + { + this.dTfUnit = dTfUnit; + } + + public String getdTfUnit() + { + return dTfUnit; + } + public void setdDp(String dDp) + { + this.dDp = dDp; + } + + public String getdDp() + { + return dDp; + } + public void setdDpUnit(String dDpUnit) + { + this.dDpUnit = dDpUnit; + } + + public String getdDpUnit() + { + return dDpUnit; + } + public void setdVFlowUnit(String dVFlowUnit) + { + this.dVFlowUnit = dVFlowUnit; + } + + public String getdVFlowUnit() + { + return dVFlowUnit; + } + public void setdMFlowUnit(String dMFlowUnit) + { + this.dMFlowUnit = dMFlowUnit; + } + + public String getdMFlowUnit() + { + return dMFlowUnit; + } + public void setdEFlowUnit(String dEFlowUnit) + { + this.dEFlowUnit = dEFlowUnit; + } + + public String getdEFlowUnit() + { + return dEFlowUnit; + } + public void setdCd(String dCd) + { + this.dCd = dCd; + } + + public String getdCd() + { + return dCd; + } + public void setdCdCalMethod(String dCdCalMethod) + { + this.dCdCalMethod = dCdCalMethod; + } + + public String getdCdCalMethod() + { + return dCdCalMethod; + } + public void setdMeterFactor(String dMeterFactor) + { + this.dMeterFactor = dMeterFactor; + } + + public String getdMeterFactor() + { + return dMeterFactor; + } + public void setdPulseNum(String dPulseNum) + { + this.dPulseNum = dPulseNum; + } + + public String getdPulseNum() + { + return dPulseNum; + } + public void setdVFlowMax(String dVFlowMax) + { + this.dVFlowMax = dVFlowMax; + } + + public String getdVFlowMax() + { + return dVFlowMax; + } + public void setdVFlowMin(String dVFlowMin) + { + this.dVFlowMin = dVFlowMin; + } + + public String getdVFlowMin() + { + return dVFlowMin; + } + public void setdVFlowCon(String dVFlowCon) + { + this.dVFlowCon = dVFlowCon; + } + + public String getdVFlowCon() + { + return dVFlowCon; + } + public void setdPfRangeMin(String dPfRangeMin) + { + this.dPfRangeMin = dPfRangeMin; + } + + public String getdPfRangeMin() + { + return dPfRangeMin; + } + public void setdPfRangeMax(String dPfRangeMax) + { + this.dPfRangeMax = dPfRangeMax; + } + + public String getdPfRangeMax() + { + return dPfRangeMax; + } + public void setdDpRangeMin(String dDpRangeMin) + { + this.dDpRangeMin = dDpRangeMin; + } + + public String getdDpRangeMin() + { + return dDpRangeMin; + } + public void setdDpRangeMax(String dDpRangeMax) + { + this.dDpRangeMax = dDpRangeMax; + } + + public String getdDpRangeMax() + { + return dDpRangeMax; + } + public void setdTfRangeMin(String dTfRangeMin) + { + this.dTfRangeMin = dTfRangeMin; + } + + public String getdTfRangeMin() + { + return dTfRangeMin; + } + public void setdTfRangeMax(String dTfRangeMax) + { + this.dTfRangeMax = dTfRangeMax; + } + + public String getdTfRangeMax() + { + return dTfRangeMax; + } + public void setdVGsc(String dVGsc) + { + this.dVGsc = dVGsc; + } + + public String getdVGsc() + { + return dVGsc; + } + public void setSampleno(String sampleno) + { + this.sampleno = sampleno; + } + + public String getSampleno() + { + return sampleno; + } + public void setMeterno(String meterno) + { + this.meterno = meterno; + } + + public String getMeterno() + { + return meterno; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createName", getCreateName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateName", getUpdateName()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("dFlowCalbz", getdFlowCalbz()) + .append("dZcalbz", getdZcalbz()) + .append("dCbtj", getdCbtj()) + .append("dpbM", getDpbM()) + .append("dtbM", getDtbM()) + .append("dpbE", getDpbE()) + .append("dtbE", getDtbE()) + .append("dPatm", getdPatm()) + .append("dPatmUnit", getdPatmUnit()) + .append("dngCompents", getDngCompents()) + .append("dMeterType", getdMeterType()) + .append("dCoreType", getdCoreType()) + .append("dPtmode", getdPtmode()) + .append("dPipeType", getdPipeType()) + .append("dPipeD", getdPipeD()) + .append("dLenUnit", getdLenUnit()) + .append("dPipeDtemp", getdPipeDtemp()) + .append("dPileDtempU", getdPileDtempU()) + .append("dPipeMaterial", getdPipeMaterial()) + .append("dOrificeD", getdOrificeD()) + .append("dOrificeUnit", getdOrificeUnit()) + .append("dOrificeDtemp", getdOrificeDtemp()) + .append("dOrificeDtempUnit", getdOrificeDtempUnit()) + .append("dOrificeMaterial", getdOrificeMaterial()) + .append("dOrificeSharpness", getdOrificeSharpness()) + .append("dOrificeRk", getdOrificeRk()) + .append("dOrificeRkLenU", getdOrificeRkLenU()) + .append("dPf", getdPf()) + .append("dPfUnit", getdPfUnit()) + .append("dPfType", getdPfType()) + .append("dTf", getdTf()) + .append("dTfUnit", getdTfUnit()) + .append("dDp", getdDp()) + .append("dDpUnit", getdDpUnit()) + .append("dVFlowUnit", getdVFlowUnit()) + .append("dMFlowUnit", getdMFlowUnit()) + .append("dEFlowUnit", getdEFlowUnit()) + .append("dCd", getdCd()) + .append("dCdCalMethod", getdCdCalMethod()) + .append("dMeterFactor", getdMeterFactor()) + .append("dPulseNum", getdPulseNum()) + .append("dVFlowMax", getdVFlowMax()) + .append("dVFlowMin", getdVFlowMin()) + .append("dVFlowCon", getdVFlowCon()) + .append("dPfRangeMin", getdPfRangeMin()) + .append("dPfRangeMax", getdPfRangeMax()) + .append("dDpRangeMin", getdDpRangeMin()) + .append("dDpRangeMax", getdDpRangeMax()) + .append("dTfRangeMin", getdTfRangeMin()) + .append("dTfRangeMax", getdTfRangeMax()) + .append("dVGsc", getdVGsc()) + .append("sampleno", getSampleno()) + .append("meterno", getMeterno()) + .toString(); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgMeterresult.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgMeterresult.java new file mode 100644 index 0000000..a88055d --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgMeterresult.java @@ -0,0 +1,363 @@ +package com.ruoyi.ngtools.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 流量计算结果对象 ng_meterresult + * + * @author ruoyi + * @date 2025-02-09 + */ +public class NgMeterresult extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private String id; + + /** 创建人名称 */ + @Excel(name = "创建人名称") + private String createName; + + /** 更新人名称 */ + @Excel(name = "更新人名称") + private String updateName; + + /** 流量计编号 */ + @Excel(name = "流量计编号") + private String ybbh; + + /** 求渐近速度系数 E */ + @Excel(name = "求渐近速度系数 E") + private String dE; + + /** 求相对密度系数 FG */ + @Excel(name = "求相对密度系数 FG") + private String dFG; + + /** 求流动温度系数 FT */ + @Excel(name = "求流动温度系数 FT") + private String dFT; + + /** 求动力粘度dlnd */ + @Excel(name = "求动力粘度dlnd") + private String dDViscosity; + + /** 求可膨胀系数 */ + @Excel(name = "求可膨胀系数") + private String dDExpCoefficient; + + /** 管道雷诺数 */ + @Excel(name = "管道雷诺数") + private String dRnPipe; + + /** 孔板锐利度系数Bk */ + @Excel(name = "孔板锐利度系数Bk") + private String dBk; + + /** 管道粗糙度系数 Gme */ + @Excel(name = "管道粗糙度系数 Gme") + private String dRoughNessPipe; + + /** 修正后的流出系数 */ + @Excel(name = "修正后的流出系数") + private String dCdCorrect; + + /** 喷嘴的流出系数 */ + @Excel(name = "喷嘴的流出系数") + private String dCdNozell; + + /** 标况体积流量m³/s */ + @Excel(name = "标况体积流量m³/s") + private String dVFlowb; + + /** 工况体积流量 */ + @Excel(name = "工况体积流量") + private String dVFlowf; + + /** 标况质量流量 */ + @Excel(name = "标况质量流量") + private String dMFlowb; + + /** 标况能量流量 */ + @Excel(name = "标况能量流量") + private String dEFlowb; + + /** 管道内天然气流速 */ + @Excel(name = "管道内天然气流速") + private String dVelocityFlow; + + /** 压力损失 */ + @Excel(name = "压力损失") + private String dPressLost; + + /** 直径比 */ + @Excel(name = "直径比") + private String dBeta; + + /** 等熵指数 */ + @Excel(name = "等熵指数") + private String dKappa; + + /** 取样编号 */ + @Excel(name = "取样编号") + private String sampleno; + + /** 仪表编号 */ + @Excel(name = "仪表编号") + private String meterno; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setCreateName(String createName) + { + this.createName = createName; + } + + public String getCreateName() + { + return createName; + } + public void setUpdateName(String updateName) + { + this.updateName = updateName; + } + + public String getUpdateName() + { + return updateName; + } + public void setYbbh(String ybbh) + { + this.ybbh = ybbh; + } + + public String getYbbh() + { + return ybbh; + } + public void setDE(String dE) + { + this.dE = dE; + } + + public String getDE() + { + return dE; + } + public void setdFG(String dFG) + { + this.dFG = dFG; + } + + public String getdFG() + { + return dFG; + } + public void setdFT(String dFT) + { + this.dFT = dFT; + } + + public String getdFT() + { + return dFT; + } + public void setdDViscosity(String dDViscosity) + { + this.dDViscosity = dDViscosity; + } + + public String getdDViscosity() + { + return dDViscosity; + } + public void setdDExpCoefficient(String dDExpCoefficient) + { + this.dDExpCoefficient = dDExpCoefficient; + } + + public String getdDExpCoefficient() + { + return dDExpCoefficient; + } + public void setdRnPipe(String dRnPipe) + { + this.dRnPipe = dRnPipe; + } + + public String getdRnPipe() + { + return dRnPipe; + } + public void setdBk(String dBk) + { + this.dBk = dBk; + } + + public String getdBk() + { + return dBk; + } + public void setdRoughNessPipe(String dRoughNessPipe) + { + this.dRoughNessPipe = dRoughNessPipe; + } + + public String getdRoughNessPipe() + { + return dRoughNessPipe; + } + public void setdCdCorrect(String dCdCorrect) + { + this.dCdCorrect = dCdCorrect; + } + + public String getdCdCorrect() + { + return dCdCorrect; + } + public void setdCdNozell(String dCdNozell) + { + this.dCdNozell = dCdNozell; + } + + public String getdCdNozell() + { + return dCdNozell; + } + public void setdVFlowb(String dVFlowb) + { + this.dVFlowb = dVFlowb; + } + + public String getdVFlowb() + { + return dVFlowb; + } + public void setdVFlowf(String dVFlowf) + { + this.dVFlowf = dVFlowf; + } + + public String getdVFlowf() + { + return dVFlowf; + } + public void setdMFlowb(String dMFlowb) + { + this.dMFlowb = dMFlowb; + } + + public String getdMFlowb() + { + return dMFlowb; + } + public void setdEFlowb(String dEFlowb) + { + this.dEFlowb = dEFlowb; + } + + public String getdEFlowb() + { + return dEFlowb; + } + public void setdVelocityFlow(String dVelocityFlow) + { + this.dVelocityFlow = dVelocityFlow; + } + + public String getdVelocityFlow() + { + return dVelocityFlow; + } + public void setdPressLost(String dPressLost) + { + this.dPressLost = dPressLost; + } + + public String getdPressLost() + { + return dPressLost; + } + public void setdBeta(String dBeta) + { + this.dBeta = dBeta; + } + + public String getdBeta() + { + return dBeta; + } + public void setdKappa(String dKappa) + { + this.dKappa = dKappa; + } + + public String getdKappa() + { + return dKappa; + } + public void setSampleno(String sampleno) + { + this.sampleno = sampleno; + } + + public String getSampleno() + { + return sampleno; + } + public void setMeterno(String meterno) + { + this.meterno = meterno; + } + + public String getMeterno() + { + return meterno; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createName", getCreateName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateName", getUpdateName()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("ybbh", getYbbh()) + .append("dE", getDE()) + .append("dFG", getdFG()) + .append("dFT", getdFT()) + .append("dDViscosity", getdDViscosity()) + .append("dDExpCoefficient", getdDExpCoefficient()) + .append("dRnPipe", getdRnPipe()) + .append("dBk", getdBk()) + .append("dRoughNessPipe", getdRoughNessPipe()) + .append("dCdCorrect", getdCdCorrect()) + .append("dCdNozell", getdCdNozell()) + .append("dVFlowb", getdVFlowb()) + .append("dVFlowf", getdVFlowf()) + .append("dMFlowb", getdMFlowb()) + .append("dEFlowb", getdEFlowb()) + .append("dVelocityFlow", getdVelocityFlow()) + .append("dPressLost", getdPressLost()) + .append("dBeta", getdBeta()) + .append("dKappa", getdKappa()) + .append("sampleno", getSampleno()) + .append("meterno", getMeterno()) + .toString(); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgNgpar.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgNgpar.java new file mode 100644 index 0000000..42a436f --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/domain/NgNgpar.java @@ -0,0 +1,825 @@ +package com.ruoyi.ngtools.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 天然气物性参数对象 ng_ngpar + * + * @author ruoyi + * @date 2025-02-09 + */ +public class NgNgpar extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** ID */ + private String id; + + /** 创建人名称 */ + @Excel(name = "创建人名称") + private String createName; + + /** 更新人名称 */ + @Excel(name = "更新人名称") + private String updateName; + + /** 气体摩尔组成 */ + @Excel(name = "气体摩尔组成") + private String adMixture; + + /** 气体体积组成 */ + @Excel(name = "气体体积组成") + private String adMixtureV; + + /** 气体质量组成 */ + @Excel(name = "气体质量组成") + private String adMixtureD; + + /** 参比条件 */ + @Excel(name = "参比条件") + private String dCbtj; + + /** 参比压力 */ + @Excel(name = "参比压力") + private String dPb; + + /** 参比温度 */ + @Excel(name = "参比温度") + private String dTb; + + /** 绝对压力 */ + @Excel(name = "绝对压力") + private String dPf; + + /** 工况温度 */ + @Excel(name = "工况温度") + private String dTf; + + /** 分子量 */ + @Excel(name = "分子量") + private String dMrx; + + /** 标况压缩因子 */ + @Excel(name = "标况压缩因子") + private String dZb; + + /** 工况压缩因子 */ + @Excel(name = "工况压缩因子") + private String dZf; + + /** 超压缩系数 */ + @Excel(name = "超压缩系数") + private String dFpv; + + /** 标况摩尔密度 */ + @Excel(name = "标况摩尔密度") + private String dDb; + + /** 工况摩尔密度 */ + @Excel(name = "工况摩尔密度") + private String dDf; + + /** 标况质量密度 */ + @Excel(name = "标况质量密度") + private String dRhob; + + /** 工况质量密度 */ + @Excel(name = "工况质量密度") + private String dRhof; + + /** 理想气体的相对密度 */ + @Excel(name = "理想气体的相对密度") + private String drdIdeal; + + /** 真实气体的相对密度 */ + @Excel(name = "真实气体的相对密度") + private String drdReal; + + /** 理想气体的比焓 */ + @Excel(name = "理想气体的比焓") + private String dHo; + + /** 真实气体的焓 */ + @Excel(name = "真实气体的焓") + private String dH; + + /** 真实气体的熵 */ + @Excel(name = "真实气体的熵") + private String dS; + + /** 理想气体定压热容 */ + @Excel(name = "理想气体定压热容") + private String dCpi; + + /** 定压热容 */ + @Excel(name = "定压热容") + private String dCp; + + /** 定容积热容 */ + @Excel(name = "定容积热容") + private String dCv; + + /** 比热比 */ + @Excel(name = "比热比") + private String dk; + + /** 等熵指数 */ + @Excel(name = "等熵指数") + private String dKappa; + + /** 声速 */ + @Excel(name = "声速") + private String dSOS; + + /** 临界流函数 */ + @Excel(name = "临界流函数") + private String dCstar; + + /** 摩尔高位发热量 */ + @Excel(name = "摩尔高位发热量") + private String dHhvMol; + + /** 摩尔低位发热量 */ + @Excel(name = "摩尔低位发热量") + private String dLhvMol; + + /** 体积高位发热量 */ + @Excel(name = "体积高位发热量") + private String dHhvv; + + /** 体积低位发热量 */ + @Excel(name = "体积低位发热量") + private String dLhvv; + + /** 质量高位发热量 */ + @Excel(name = "质量高位发热量") + private String dHhvm; + + /** 质量地位发热量 */ + @Excel(name = "质量地位发热量") + private String dLhvm; + + /** 标况压缩因子 */ + @Excel(name = "标况压缩因子") + private String dZb11062; + + /** 标况质量密度 */ + @Excel(name = "标况质量密度") + private String dRhob11062; + + /** 工况质量密度 */ + @Excel(name = "工况质量密度") + private String dRhof11062; + + /** 理想气体的相对密度 */ + @Excel(name = "理想气体的相对密度") + private String drdIdeal11062; + + /** 真实气体的相对密度 */ + @Excel(name = "真实气体的相对密度") + private String drdReal11062; + + /** 真实气体的沃泊指数 */ + @Excel(name = "真实气体的沃泊指数") + private String dWobbeIndex; + + /** 临界压力 */ + @Excel(name = "临界压力") + private String dPc; + + /** 临界温度 */ + @Excel(name = "临界温度") + private String dTC; + + /** 爆炸上限 */ + @Excel(name = "爆炸上限") + private String dBzsx; + + /** 爆炸下限 */ + @Excel(name = "爆炸下限") + private String dBzxx; + + /** 总炭含量(kg/m3) */ + @Excel(name = "总炭含量(kg/m3)") + private String dTotalC; + + /** C2组分含量(kg/m3) */ + @Excel(name = "C2组分含量(kg/m3)") + private String dC2; + + /** C2以上组分含量(kg/m3) */ + @Excel(name = "C2以上组分含量(kg/m3)") + private String dC2j; + + /** C3以上组分含量(kg/m3) */ + @Excel(name = "C3以上组分含量(kg/m3)") + private String dC3j; + + /** C4以上组分含量(kg/m3) */ + @Excel(name = "C4以上组分含量(kg/m3)") + private String dC4j; + + /** C5以上组分含量(kg/m3) */ + @Excel(name = "C5以上组分含量(kg/m3)") + private String dC5j; + + /** C6以上组分含量(kg/m3) */ + @Excel(name = "C6以上组分含量(kg/m3)") + private String dC6j; + + /** C3C4组分含量(kg/m3) */ + @Excel(name = "C3C4组分含量(kg/m3)") + private String dC3C4; + + /** 取样编号 */ + @Excel(name = "取样编号") + private String sampleno; + + /** 仪表编号 */ + @Excel(name = "仪表编号") + private String meterno; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setCreateName(String createName) + { + this.createName = createName; + } + + public String getCreateName() + { + return createName; + } + public void setUpdateName(String updateName) + { + this.updateName = updateName; + } + + public String getUpdateName() + { + return updateName; + } + public void setAdMixture(String adMixture) + { + this.adMixture = adMixture; + } + + public String getAdMixture() + { + return adMixture; + } + public void setAdMixtureV(String adMixtureV) + { + this.adMixtureV = adMixtureV; + } + + public String getAdMixtureV() + { + return adMixtureV; + } + public void setAdMixtureD(String adMixtureD) + { + this.adMixtureD = adMixtureD; + } + + public String getAdMixtureD() + { + return adMixtureD; + } + public void setdCbtj(String dCbtj) + { + this.dCbtj = dCbtj; + } + + public String getdCbtj() + { + return dCbtj; + } + public void setdPb(String dPb) + { + this.dPb = dPb; + } + + public String getdPb() + { + return dPb; + } + public void setdTb(String dTb) + { + this.dTb = dTb; + } + + public String getdTb() + { + return dTb; + } + public void setdPf(String dPf) + { + this.dPf = dPf; + } + + public String getdPf() + { + return dPf; + } + public void setdTf(String dTf) + { + this.dTf = dTf; + } + + public String getdTf() + { + return dTf; + } + public void setdMrx(String dMrx) + { + this.dMrx = dMrx; + } + + public String getdMrx() + { + return dMrx; + } + public void setdZb(String dZb) + { + this.dZb = dZb; + } + + public String getdZb() + { + return dZb; + } + public void setdZf(String dZf) + { + this.dZf = dZf; + } + + public String getdZf() + { + return dZf; + } + public void setdFpv(String dFpv) + { + this.dFpv = dFpv; + } + + public String getdFpv() + { + return dFpv; + } + public void setdDb(String dDb) + { + this.dDb = dDb; + } + + public String getdDb() + { + return dDb; + } + public void setdDf(String dDf) + { + this.dDf = dDf; + } + + public String getdDf() + { + return dDf; + } + public void setdRhob(String dRhob) + { + this.dRhob = dRhob; + } + + public String getdRhob() + { + return dRhob; + } + public void setdRhof(String dRhof) + { + this.dRhof = dRhof; + } + + public String getdRhof() + { + return dRhof; + } + public void setDrdIdeal(String drdIdeal) + { + this.drdIdeal = drdIdeal; + } + + public String getDrdIdeal() + { + return drdIdeal; + } + public void setDrdReal(String drdReal) + { + this.drdReal = drdReal; + } + + public String getDrdReal() + { + return drdReal; + } + public void setdHo(String dHo) + { + this.dHo = dHo; + } + + public String getdHo() + { + return dHo; + } + public void setDH(String dH) + { + this.dH = dH; + } + + public String getDH() + { + return dH; + } + public void setDS(String dS) + { + this.dS = dS; + } + + public String getDS() + { + return dS; + } + public void setdCpi(String dCpi) + { + this.dCpi = dCpi; + } + + public String getdCpi() + { + return dCpi; + } + public void setdCp(String dCp) + { + this.dCp = dCp; + } + + public String getdCp() + { + return dCp; + } + public void setdCv(String dCv) + { + this.dCv = dCv; + } + + public String getdCv() + { + return dCv; + } + public void setDk(String dk) + { + this.dk = dk; + } + + public String getDk() + { + return dk; + } + public void setdKappa(String dKappa) + { + this.dKappa = dKappa; + } + + public String getdKappa() + { + return dKappa; + } + public void setdSOS(String dSOS) + { + this.dSOS = dSOS; + } + + public String getdSOS() + { + return dSOS; + } + public void setdCstar(String dCstar) + { + this.dCstar = dCstar; + } + + public String getdCstar() + { + return dCstar; + } + public void setdHhvMol(String dHhvMol) + { + this.dHhvMol = dHhvMol; + } + + public String getdHhvMol() + { + return dHhvMol; + } + public void setdLhvMol(String dLhvMol) + { + this.dLhvMol = dLhvMol; + } + + public String getdLhvMol() + { + return dLhvMol; + } + public void setdHhvv(String dHhvv) + { + this.dHhvv = dHhvv; + } + + public String getdHhvv() + { + return dHhvv; + } + public void setdLhvv(String dLhvv) + { + this.dLhvv = dLhvv; + } + + public String getdLhvv() + { + return dLhvv; + } + public void setdHhvm(String dHhvm) + { + this.dHhvm = dHhvm; + } + + public String getdHhvm() + { + return dHhvm; + } + public void setdLhvm(String dLhvm) + { + this.dLhvm = dLhvm; + } + + public String getdLhvm() + { + return dLhvm; + } + public void setdZb11062(String dZb11062) + { + this.dZb11062 = dZb11062; + } + + public String getdZb11062() + { + return dZb11062; + } + public void setdRhob11062(String dRhob11062) + { + this.dRhob11062 = dRhob11062; + } + + public String getdRhob11062() + { + return dRhob11062; + } + public void setdRhof11062(String dRhof11062) + { + this.dRhof11062 = dRhof11062; + } + + public String getdRhof11062() + { + return dRhof11062; + } + public void setDrdIdeal11062(String drdIdeal11062) + { + this.drdIdeal11062 = drdIdeal11062; + } + + public String getDrdIdeal11062() + { + return drdIdeal11062; + } + public void setDrdReal11062(String drdReal11062) + { + this.drdReal11062 = drdReal11062; + } + + public String getDrdReal11062() + { + return drdReal11062; + } + public void setdWobbeIndex(String dWobbeIndex) + { + this.dWobbeIndex = dWobbeIndex; + } + + public String getdWobbeIndex() + { + return dWobbeIndex; + } + public void setdPc(String dPc) + { + this.dPc = dPc; + } + + public String getdPc() + { + return dPc; + } + public void setdTC(String dTC) + { + this.dTC = dTC; + } + + public String getdTC() + { + return dTC; + } + public void setdBzsx(String dBzsx) + { + this.dBzsx = dBzsx; + } + + public String getdBzsx() + { + return dBzsx; + } + public void setdBzxx(String dBzxx) + { + this.dBzxx = dBzxx; + } + + public String getdBzxx() + { + return dBzxx; + } + public void setdTotalC(String dTotalC) + { + this.dTotalC = dTotalC; + } + + public String getdTotalC() + { + return dTotalC; + } + public void setdC2(String dC2) + { + this.dC2 = dC2; + } + + public String getdC2() + { + return dC2; + } + public void setdC2j(String dC2j) + { + this.dC2j = dC2j; + } + + public String getdC2j() + { + return dC2j; + } + public void setdC3j(String dC3j) + { + this.dC3j = dC3j; + } + + public String getdC3j() + { + return dC3j; + } + public void setdC4j(String dC4j) + { + this.dC4j = dC4j; + } + + public String getdC4j() + { + return dC4j; + } + public void setdC5j(String dC5j) + { + this.dC5j = dC5j; + } + + public String getdC5j() + { + return dC5j; + } + public void setdC6j(String dC6j) + { + this.dC6j = dC6j; + } + + public String getdC6j() + { + return dC6j; + } + public void setdC3C4(String dC3C4) + { + this.dC3C4 = dC3C4; + } + + public String getdC3C4() + { + return dC3C4; + } + public void setSampleno(String sampleno) + { + this.sampleno = sampleno; + } + + public String getSampleno() + { + return sampleno; + } + public void setMeterno(String meterno) + { + this.meterno = meterno; + } + + public String getMeterno() + { + return meterno; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createName", getCreateName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateName", getUpdateName()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("adMixture", getAdMixture()) + .append("adMixtureV", getAdMixtureV()) + .append("adMixtureD", getAdMixtureD()) + .append("dCbtj", getdCbtj()) + .append("dPb", getdPb()) + .append("dTb", getdTb()) + .append("dPf", getdPf()) + .append("dTf", getdTf()) + .append("dMrx", getdMrx()) + .append("dZb", getdZb()) + .append("dZf", getdZf()) + .append("dFpv", getdFpv()) + .append("dDb", getdDb()) + .append("dDf", getdDf()) + .append("dRhob", getdRhob()) + .append("dRhof", getdRhof()) + .append("drdIdeal", getDrdIdeal()) + .append("drdReal", getDrdReal()) + .append("dHo", getdHo()) + .append("dH", getDH()) + .append("dS", getDS()) + .append("dCpi", getdCpi()) + .append("dCp", getdCp()) + .append("dCv", getdCv()) + .append("dk", getDk()) + .append("dKappa", getdKappa()) + .append("dSOS", getdSOS()) + .append("dCstar", getdCstar()) + .append("dHhvMol", getdHhvMol()) + .append("dLhvMol", getdLhvMol()) + .append("dHhvv", getdHhvv()) + .append("dLhvv", getdLhvv()) + .append("dHhvm", getdHhvm()) + .append("dLhvm", getdLhvm()) + .append("dZb11062", getdZb11062()) + .append("dRhob11062", getdRhob11062()) + .append("dRhof11062", getdRhof11062()) + .append("drdIdeal11062", getDrdIdeal11062()) + .append("drdReal11062", getDrdReal11062()) + .append("dWobbeIndex", getdWobbeIndex()) + .append("dPc", getdPc()) + .append("dTC", getdTC()) + .append("dBzsx", getdBzsx()) + .append("dBzxx", getdBzxx()) + .append("dTotalC", getdTotalC()) + .append("dC2", getdC2()) + .append("dC2j", getdC2j()) + .append("dC3j", getdC3j()) + .append("dC4j", getdC4j()) + .append("dC5j", getdC5j()) + .append("dC6j", getdC6j()) + .append("dC3C4", getdC3C4()) + .append("sampleno", getSampleno()) + .append("meterno", getMeterno()) + .toString(); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgComponentsMapper.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgComponentsMapper.java new file mode 100644 index 0000000..55351d0 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgComponentsMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.ngtools.mapper; + +import java.util.List; +import com.ruoyi.ngtools.domain.NgComponents; + +/** + * 天然气组分Mapper接口 + * + * @author ruoyi + * @date 2025-02-09 + */ +public interface NgComponentsMapper +{ + /** + * 查询天然气组分 + * + * @param id 天然气组分主键 + * @return 天然气组分 + */ + public NgComponents selectNgComponentsById(String id); + + /** + * 查询天然气组分列表 + * + * @param ngComponents 天然气组分 + * @return 天然气组分集合 + */ + public List selectNgComponentsList(NgComponents ngComponents); + + /** + * 新增天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + public int insertNgComponents(NgComponents ngComponents); + + /** + * 修改天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + public int updateNgComponents(NgComponents ngComponents); + + /** + * 删除天然气组分 + * + * @param id 天然气组分主键 + * @return 结果 + */ + public int deleteNgComponentsById(String id); + + /** + * 批量删除天然气组分 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgComponentsByIds(String[] ids); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgMeterparMapper.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgMeterparMapper.java new file mode 100644 index 0000000..b29b570 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgMeterparMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.ngtools.mapper; + +import java.util.List; +import com.ruoyi.ngtools.domain.NgMeterpar; + +/** + * 流量计参数Mapper接口 + * + * @author ruoyi + * @date 2025-02-09 + */ +public interface NgMeterparMapper +{ + /** + * 查询流量计参数 + * + * @param id 流量计参数主键 + * @return 流量计参数 + */ + public NgMeterpar selectNgMeterparById(String id); + + /** + * 查询流量计参数列表 + * + * @param ngMeterpar 流量计参数 + * @return 流量计参数集合 + */ + public List selectNgMeterparList(NgMeterpar ngMeterpar); + + /** + * 新增流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + public int insertNgMeterpar(NgMeterpar ngMeterpar); + + /** + * 修改流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + public int updateNgMeterpar(NgMeterpar ngMeterpar); + + /** + * 删除流量计参数 + * + * @param id 流量计参数主键 + * @return 结果 + */ + public int deleteNgMeterparById(String id); + + /** + * 批量删除流量计参数 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgMeterparByIds(String[] ids); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgMeterresultMapper.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgMeterresultMapper.java new file mode 100644 index 0000000..9d72c66 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgMeterresultMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.ngtools.mapper; + +import java.util.List; +import com.ruoyi.ngtools.domain.NgMeterresult; + +/** + * 流量计算结果Mapper接口 + * + * @author ruoyi + * @date 2025-02-09 + */ +public interface NgMeterresultMapper +{ + /** + * 查询流量计算结果 + * + * @param id 流量计算结果主键 + * @return 流量计算结果 + */ + public NgMeterresult selectNgMeterresultById(String id); + + /** + * 查询流量计算结果列表 + * + * @param ngMeterresult 流量计算结果 + * @return 流量计算结果集合 + */ + public List selectNgMeterresultList(NgMeterresult ngMeterresult); + + /** + * 新增流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + public int insertNgMeterresult(NgMeterresult ngMeterresult); + + /** + * 修改流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + public int updateNgMeterresult(NgMeterresult ngMeterresult); + + /** + * 删除流量计算结果 + * + * @param id 流量计算结果主键 + * @return 结果 + */ + public int deleteNgMeterresultById(String id); + + /** + * 批量删除流量计算结果 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgMeterresultByIds(String[] ids); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgNgparMapper.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgNgparMapper.java new file mode 100644 index 0000000..13ccf40 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/mapper/NgNgparMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.ngtools.mapper; + +import java.util.List; +import com.ruoyi.ngtools.domain.NgNgpar; + +/** + * 天然气物性参数Mapper接口 + * + * @author ruoyi + * @date 2025-02-09 + */ +public interface NgNgparMapper +{ + /** + * 查询天然气物性参数 + * + * @param id 天然气物性参数主键 + * @return 天然气物性参数 + */ + public NgNgpar selectNgNgparById(String id); + + /** + * 查询天然气物性参数列表 + * + * @param ngNgpar 天然气物性参数 + * @return 天然气物性参数集合 + */ + public List selectNgNgparList(NgNgpar ngNgpar); + + /** + * 新增天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + public int insertNgNgpar(NgNgpar ngNgpar); + + /** + * 修改天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + public int updateNgNgpar(NgNgpar ngNgpar); + + /** + * 删除天然气物性参数 + * + * @param id 天然气物性参数主键 + * @return 结果 + */ + public int deleteNgNgparById(String id); + + /** + * 批量删除天然气物性参数 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgNgparByIds(String[] ids); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgComponentsService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgComponentsService.java new file mode 100644 index 0000000..513b744 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgComponentsService.java @@ -0,0 +1,61 @@ +package com.ruoyi.ngtools.service; + +import java.util.List; +import com.ruoyi.ngtools.domain.NgComponents; + +/** + * 天然气组分Service接口 + * + * @author ruoyi + * @date 2025-02-09 + */ +public interface INgComponentsService +{ + /** + * 查询天然气组分 + * + * @param id 天然气组分主键 + * @return 天然气组分 + */ + public NgComponents selectNgComponentsById(String id); + + /** + * 查询天然气组分列表 + * + * @param ngComponents 天然气组分 + * @return 天然气组分集合 + */ + public List selectNgComponentsList(NgComponents ngComponents); + + /** + * 新增天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + public int insertNgComponents(NgComponents ngComponents); + + /** + * 修改天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + public int updateNgComponents(NgComponents ngComponents); + + /** + * 批量删除天然气组分 + * + * @param ids 需要删除的天然气组分主键集合 + * @return 结果 + */ + public int deleteNgComponentsByIds(String[] ids); + + /** + * 删除天然气组分信息 + * + * @param id 天然气组分主键 + * @return 结果 + */ + public int deleteNgComponentsById(String id); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgMeterparService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgMeterparService.java new file mode 100644 index 0000000..473ec1f --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgMeterparService.java @@ -0,0 +1,61 @@ +package com.ruoyi.ngtools.service; + +import java.util.List; +import com.ruoyi.ngtools.domain.NgMeterpar; + +/** + * 流量计参数Service接口 + * + * @author ruoyi + * @date 2025-02-09 + */ +public interface INgMeterparService +{ + /** + * 查询流量计参数 + * + * @param id 流量计参数主键 + * @return 流量计参数 + */ + public NgMeterpar selectNgMeterparById(String id); + + /** + * 查询流量计参数列表 + * + * @param ngMeterpar 流量计参数 + * @return 流量计参数集合 + */ + public List selectNgMeterparList(NgMeterpar ngMeterpar); + + /** + * 新增流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + public int insertNgMeterpar(NgMeterpar ngMeterpar); + + /** + * 修改流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + public int updateNgMeterpar(NgMeterpar ngMeterpar); + + /** + * 批量删除流量计参数 + * + * @param ids 需要删除的流量计参数主键集合 + * @return 结果 + */ + public int deleteNgMeterparByIds(String[] ids); + + /** + * 删除流量计参数信息 + * + * @param id 流量计参数主键 + * @return 结果 + */ + public int deleteNgMeterparById(String id); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgMeterresultService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgMeterresultService.java new file mode 100644 index 0000000..291bc43 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgMeterresultService.java @@ -0,0 +1,61 @@ +package com.ruoyi.ngtools.service; + +import java.util.List; +import com.ruoyi.ngtools.domain.NgMeterresult; + +/** + * 流量计算结果Service接口 + * + * @author ruoyi + * @date 2025-02-09 + */ +public interface INgMeterresultService +{ + /** + * 查询流量计算结果 + * + * @param id 流量计算结果主键 + * @return 流量计算结果 + */ + public NgMeterresult selectNgMeterresultById(String id); + + /** + * 查询流量计算结果列表 + * + * @param ngMeterresult 流量计算结果 + * @return 流量计算结果集合 + */ + public List selectNgMeterresultList(NgMeterresult ngMeterresult); + + /** + * 新增流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + public int insertNgMeterresult(NgMeterresult ngMeterresult); + + /** + * 修改流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + public int updateNgMeterresult(NgMeterresult ngMeterresult); + + /** + * 批量删除流量计算结果 + * + * @param ids 需要删除的流量计算结果主键集合 + * @return 结果 + */ + public int deleteNgMeterresultByIds(String[] ids); + + /** + * 删除流量计算结果信息 + * + * @param id 流量计算结果主键 + * @return 结果 + */ + public int deleteNgMeterresultById(String id); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgNgparService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgNgparService.java new file mode 100644 index 0000000..4906ddf --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/INgNgparService.java @@ -0,0 +1,61 @@ +package com.ruoyi.ngtools.service; + +import java.util.List; +import com.ruoyi.ngtools.domain.NgNgpar; + +/** + * 天然气物性参数Service接口 + * + * @author ruoyi + * @date 2025-02-09 + */ +public interface INgNgparService +{ + /** + * 查询天然气物性参数 + * + * @param id 天然气物性参数主键 + * @return 天然气物性参数 + */ + public NgNgpar selectNgNgparById(String id); + + /** + * 查询天然气物性参数列表 + * + * @param ngNgpar 天然气物性参数 + * @return 天然气物性参数集合 + */ + public List selectNgNgparList(NgNgpar ngNgpar); + + /** + * 新增天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + public int insertNgNgpar(NgNgpar ngNgpar); + + /** + * 修改天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + public int updateNgNgpar(NgNgpar ngNgpar); + + /** + * 批量删除天然气物性参数 + * + * @param ids 需要删除的天然气物性参数主键集合 + * @return 结果 + */ + public int deleteNgNgparByIds(String[] ids); + + /** + * 删除天然气物性参数信息 + * + * @param id 天然气物性参数主键 + * @return 结果 + */ + public int deleteNgNgparById(String id); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgComponentsServiceImpl.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgComponentsServiceImpl.java new file mode 100644 index 0000000..0986714 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgComponentsServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.ngtools.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.ngtools.mapper.NgComponentsMapper; +import com.ruoyi.ngtools.domain.NgComponents; +import com.ruoyi.ngtools.service.INgComponentsService; + +/** + * 天然气组分Service业务层处理 + * + * @author ruoyi + * @date 2025-02-09 + */ +@Service +public class NgComponentsServiceImpl implements INgComponentsService +{ + @Autowired + private NgComponentsMapper ngComponentsMapper; + + /** + * 查询天然气组分 + * + * @param id 天然气组分主键 + * @return 天然气组分 + */ + @Override + public NgComponents selectNgComponentsById(String id) + { + return ngComponentsMapper.selectNgComponentsById(id); + } + + /** + * 查询天然气组分列表 + * + * @param ngComponents 天然气组分 + * @return 天然气组分 + */ + @Override + public List selectNgComponentsList(NgComponents ngComponents) + { + return ngComponentsMapper.selectNgComponentsList(ngComponents); + } + + /** + * 新增天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + @Override + public int insertNgComponents(NgComponents ngComponents) + { + ngComponents.setCreateTime(DateUtils.getNowDate()); + return ngComponentsMapper.insertNgComponents(ngComponents); + } + + /** + * 修改天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + @Override + public int updateNgComponents(NgComponents ngComponents) + { + ngComponents.setUpdateTime(DateUtils.getNowDate()); + return ngComponentsMapper.updateNgComponents(ngComponents); + } + + /** + * 批量删除天然气组分 + * + * @param ids 需要删除的天然气组分主键 + * @return 结果 + */ + @Override + public int deleteNgComponentsByIds(String[] ids) + { + return ngComponentsMapper.deleteNgComponentsByIds(ids); + } + + /** + * 删除天然气组分信息 + * + * @param id 天然气组分主键 + * @return 结果 + */ + @Override + public int deleteNgComponentsById(String id) + { + return ngComponentsMapper.deleteNgComponentsById(id); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgMeterparServiceImpl.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgMeterparServiceImpl.java new file mode 100644 index 0000000..e1cec2b --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgMeterparServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.ngtools.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.ngtools.mapper.NgMeterparMapper; +import com.ruoyi.ngtools.domain.NgMeterpar; +import com.ruoyi.ngtools.service.INgMeterparService; + +/** + * 流量计参数Service业务层处理 + * + * @author ruoyi + * @date 2025-02-09 + */ +@Service +public class NgMeterparServiceImpl implements INgMeterparService +{ + @Autowired + private NgMeterparMapper ngMeterparMapper; + + /** + * 查询流量计参数 + * + * @param id 流量计参数主键 + * @return 流量计参数 + */ + @Override + public NgMeterpar selectNgMeterparById(String id) + { + return ngMeterparMapper.selectNgMeterparById(id); + } + + /** + * 查询流量计参数列表 + * + * @param ngMeterpar 流量计参数 + * @return 流量计参数 + */ + @Override + public List selectNgMeterparList(NgMeterpar ngMeterpar) + { + return ngMeterparMapper.selectNgMeterparList(ngMeterpar); + } + + /** + * 新增流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + @Override + public int insertNgMeterpar(NgMeterpar ngMeterpar) + { + ngMeterpar.setCreateTime(DateUtils.getNowDate()); + return ngMeterparMapper.insertNgMeterpar(ngMeterpar); + } + + /** + * 修改流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + @Override + public int updateNgMeterpar(NgMeterpar ngMeterpar) + { + ngMeterpar.setUpdateTime(DateUtils.getNowDate()); + return ngMeterparMapper.updateNgMeterpar(ngMeterpar); + } + + /** + * 批量删除流量计参数 + * + * @param ids 需要删除的流量计参数主键 + * @return 结果 + */ + @Override + public int deleteNgMeterparByIds(String[] ids) + { + return ngMeterparMapper.deleteNgMeterparByIds(ids); + } + + /** + * 删除流量计参数信息 + * + * @param id 流量计参数主键 + * @return 结果 + */ + @Override + public int deleteNgMeterparById(String id) + { + return ngMeterparMapper.deleteNgMeterparById(id); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgMeterresultServiceImpl.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgMeterresultServiceImpl.java new file mode 100644 index 0000000..4e6a6ea --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgMeterresultServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.ngtools.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.ngtools.mapper.NgMeterresultMapper; +import com.ruoyi.ngtools.domain.NgMeterresult; +import com.ruoyi.ngtools.service.INgMeterresultService; + +/** + * 流量计算结果Service业务层处理 + * + * @author ruoyi + * @date 2025-02-09 + */ +@Service +public class NgMeterresultServiceImpl implements INgMeterresultService +{ + @Autowired + private NgMeterresultMapper ngMeterresultMapper; + + /** + * 查询流量计算结果 + * + * @param id 流量计算结果主键 + * @return 流量计算结果 + */ + @Override + public NgMeterresult selectNgMeterresultById(String id) + { + return ngMeterresultMapper.selectNgMeterresultById(id); + } + + /** + * 查询流量计算结果列表 + * + * @param ngMeterresult 流量计算结果 + * @return 流量计算结果 + */ + @Override + public List selectNgMeterresultList(NgMeterresult ngMeterresult) + { + return ngMeterresultMapper.selectNgMeterresultList(ngMeterresult); + } + + /** + * 新增流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + @Override + public int insertNgMeterresult(NgMeterresult ngMeterresult) + { + ngMeterresult.setCreateTime(DateUtils.getNowDate()); + return ngMeterresultMapper.insertNgMeterresult(ngMeterresult); + } + + /** + * 修改流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + @Override + public int updateNgMeterresult(NgMeterresult ngMeterresult) + { + ngMeterresult.setUpdateTime(DateUtils.getNowDate()); + return ngMeterresultMapper.updateNgMeterresult(ngMeterresult); + } + + /** + * 批量删除流量计算结果 + * + * @param ids 需要删除的流量计算结果主键 + * @return 结果 + */ + @Override + public int deleteNgMeterresultByIds(String[] ids) + { + return ngMeterresultMapper.deleteNgMeterresultByIds(ids); + } + + /** + * 删除流量计算结果信息 + * + * @param id 流量计算结果主键 + * @return 结果 + */ + @Override + public int deleteNgMeterresultById(String id) + { + return ngMeterresultMapper.deleteNgMeterresultById(id); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgNgparServiceImpl.java b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgNgparServiceImpl.java new file mode 100644 index 0000000..e213fb9 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/ngtools/service/impl/NgNgparServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.ngtools.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.ngtools.mapper.NgNgparMapper; +import com.ruoyi.ngtools.domain.NgNgpar; +import com.ruoyi.ngtools.service.INgNgparService; + +/** + * 天然气物性参数Service业务层处理 + * + * @author ruoyi + * @date 2025-02-09 + */ +@Service +public class NgNgparServiceImpl implements INgNgparService +{ + @Autowired + private NgNgparMapper ngNgparMapper; + + /** + * 查询天然气物性参数 + * + * @param id 天然气物性参数主键 + * @return 天然气物性参数 + */ + @Override + public NgNgpar selectNgNgparById(String id) + { + return ngNgparMapper.selectNgNgparById(id); + } + + /** + * 查询天然气物性参数列表 + * + * @param ngNgpar 天然气物性参数 + * @return 天然气物性参数 + */ + @Override + public List selectNgNgparList(NgNgpar ngNgpar) + { + return ngNgparMapper.selectNgNgparList(ngNgpar); + } + + /** + * 新增天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + @Override + public int insertNgNgpar(NgNgpar ngNgpar) + { + ngNgpar.setCreateTime(DateUtils.getNowDate()); + return ngNgparMapper.insertNgNgpar(ngNgpar); + } + + /** + * 修改天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + @Override + public int updateNgNgpar(NgNgpar ngNgpar) + { + ngNgpar.setUpdateTime(DateUtils.getNowDate()); + return ngNgparMapper.updateNgNgpar(ngNgpar); + } + + /** + * 批量删除天然气物性参数 + * + * @param ids 需要删除的天然气物性参数主键 + * @return 结果 + */ + @Override + public int deleteNgNgparByIds(String[] ids) + { + return ngNgparMapper.deleteNgNgparByIds(ids); + } + + /** + * 删除天然气物性参数信息 + * + * @param id 天然气物性参数主键 + * @return 结果 + */ + @Override + public int deleteNgNgparById(String id) + { + return ngNgparMapper.deleteNgNgparById(id); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgComponentsController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgComponentsController.java new file mode 100644 index 0000000..0886124 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgComponentsController.java @@ -0,0 +1,113 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.NgComponents; +import com.ruoyi.system.service.INgComponentsService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; + +/** + * 天然气组分Controller + * + * @author ruoyi + * @date 2025-03-21 + */ +@RestController +@RequestMapping("/system/components") +@Tag(name = "【天然气组分】管理") +public class NgComponentsController extends BaseController +{ + @Autowired + private INgComponentsService ngComponentsService; + + /** + * 查询天然气组分列表 + */ + @Operation(summary = "查询天然气组分列表") + @PreAuthorize("@ss.hasPermi('system:components:list')") + @GetMapping("/list") + public TableDataInfo list(NgComponents ngComponents) + { + startPage(); + List list = ngComponentsService.selectNgComponentsList(ngComponents); + return getDataTable(list); + } + + /** + * 导出天然气组分列表 + */ + @Operation(summary = "导出天然气组分列表") + @PreAuthorize("@ss.hasPermi('system:components:export')") + @Log(title = "天然气组分", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NgComponents ngComponents) + { + List list = ngComponentsService.selectNgComponentsList(ngComponents); + ExcelUtil util = new ExcelUtil(NgComponents.class); + util.exportExcel(response, list, "天然气组分数据"); + } + + /** + * 获取天然气组分详细信息 + */ + @Operation(summary = "获取天然气组分详细信息") + @PreAuthorize("@ss.hasPermi('system:components:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(ngComponentsService.selectNgComponentsById(id)); + } + + /** + * 新增天然气组分 + */ + @Operation(summary = "新增天然气组分") + @PreAuthorize("@ss.hasPermi('system:components:add')") + @Log(title = "天然气组分", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NgComponents ngComponents) + { + return toAjax(ngComponentsService.insertNgComponents(ngComponents)); + } + + /** + * 修改天然气组分 + */ + @Operation(summary = "修改天然气组分") + @PreAuthorize("@ss.hasPermi('system:components:edit')") + @Log(title = "天然气组分", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NgComponents ngComponents) + { + return toAjax(ngComponentsService.updateNgComponents(ngComponents)); + } + + /** + * 删除天然气组分 + */ + @Operation(summary = "删除天然气组分") + @PreAuthorize("@ss.hasPermi('system:components:remove')") + @Log(title = "天然气组分", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable( name = "ids" ) String[] ids) + { + return toAjax(ngComponentsService.deleteNgComponentsByIds(ids)); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgMeterparController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgMeterparController.java new file mode 100644 index 0000000..f8ecccf --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgMeterparController.java @@ -0,0 +1,113 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.NgMeterpar; +import com.ruoyi.system.service.INgMeterparService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; + +/** + * 流量计参数Controller + * + * @author ruoyi + * @date 2025-03-21 + */ +@RestController +@RequestMapping("/system/meterpar") +@Tag(name = "【流量计参数】管理") +public class NgMeterparController extends BaseController +{ + @Autowired + private INgMeterparService ngMeterparService; + + /** + * 查询流量计参数列表 + */ + @Operation(summary = "查询流量计参数列表") + @PreAuthorize("@ss.hasPermi('system:meterpar:list')") + @GetMapping("/list") + public TableDataInfo list(NgMeterpar ngMeterpar) + { + startPage(); + List list = ngMeterparService.selectNgMeterparList(ngMeterpar); + return getDataTable(list); + } + + /** + * 导出流量计参数列表 + */ + @Operation(summary = "导出流量计参数列表") + @PreAuthorize("@ss.hasPermi('system:meterpar:export')") + @Log(title = "流量计参数", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NgMeterpar ngMeterpar) + { + List list = ngMeterparService.selectNgMeterparList(ngMeterpar); + ExcelUtil util = new ExcelUtil(NgMeterpar.class); + util.exportExcel(response, list, "流量计参数数据"); + } + + /** + * 获取流量计参数详细信息 + */ + @Operation(summary = "获取流量计参数详细信息") + @PreAuthorize("@ss.hasPermi('system:meterpar:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(ngMeterparService.selectNgMeterparById(id)); + } + + /** + * 新增流量计参数 + */ + @Operation(summary = "新增流量计参数") + @PreAuthorize("@ss.hasPermi('system:meterpar:add')") + @Log(title = "流量计参数", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NgMeterpar ngMeterpar) + { + return toAjax(ngMeterparService.insertNgMeterpar(ngMeterpar)); + } + + /** + * 修改流量计参数 + */ + @Operation(summary = "修改流量计参数") + @PreAuthorize("@ss.hasPermi('system:meterpar:edit')") + @Log(title = "流量计参数", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NgMeterpar ngMeterpar) + { + return toAjax(ngMeterparService.updateNgMeterpar(ngMeterpar)); + } + + /** + * 删除流量计参数 + */ + @Operation(summary = "删除流量计参数") + @PreAuthorize("@ss.hasPermi('system:meterpar:remove')") + @Log(title = "流量计参数", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable( name = "ids" ) String[] ids) + { + return toAjax(ngMeterparService.deleteNgMeterparByIds(ids)); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgMeterresultController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgMeterresultController.java new file mode 100644 index 0000000..955d275 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgMeterresultController.java @@ -0,0 +1,113 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.NgMeterresult; +import com.ruoyi.system.service.INgMeterresultService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; + +/** + * 流量计算结果Controller + * + * @author ruoyi + * @date 2025-03-21 + */ +@RestController +@RequestMapping("/system/meterresult") +@Tag(name = "【流量计算结果】管理") +public class NgMeterresultController extends BaseController +{ + @Autowired + private INgMeterresultService ngMeterresultService; + + /** + * 查询流量计算结果列表 + */ + @Operation(summary = "查询流量计算结果列表") + @PreAuthorize("@ss.hasPermi('system:meterresult:list')") + @GetMapping("/list") + public TableDataInfo list(NgMeterresult ngMeterresult) + { + startPage(); + List list = ngMeterresultService.selectNgMeterresultList(ngMeterresult); + return getDataTable(list); + } + + /** + * 导出流量计算结果列表 + */ + @Operation(summary = "导出流量计算结果列表") + @PreAuthorize("@ss.hasPermi('system:meterresult:export')") + @Log(title = "流量计算结果", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NgMeterresult ngMeterresult) + { + List list = ngMeterresultService.selectNgMeterresultList(ngMeterresult); + ExcelUtil util = new ExcelUtil(NgMeterresult.class); + util.exportExcel(response, list, "流量计算结果数据"); + } + + /** + * 获取流量计算结果详细信息 + */ + @Operation(summary = "获取流量计算结果详细信息") + @PreAuthorize("@ss.hasPermi('system:meterresult:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(ngMeterresultService.selectNgMeterresultById(id)); + } + + /** + * 新增流量计算结果 + */ + @Operation(summary = "新增流量计算结果") + @PreAuthorize("@ss.hasPermi('system:meterresult:add')") + @Log(title = "流量计算结果", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NgMeterresult ngMeterresult) + { + return toAjax(ngMeterresultService.insertNgMeterresult(ngMeterresult)); + } + + /** + * 修改流量计算结果 + */ + @Operation(summary = "修改流量计算结果") + @PreAuthorize("@ss.hasPermi('system:meterresult:edit')") + @Log(title = "流量计算结果", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NgMeterresult ngMeterresult) + { + return toAjax(ngMeterresultService.updateNgMeterresult(ngMeterresult)); + } + + /** + * 删除流量计算结果 + */ + @Operation(summary = "删除流量计算结果") + @PreAuthorize("@ss.hasPermi('system:meterresult:remove')") + @Log(title = "流量计算结果", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable( name = "ids" ) String[] ids) + { + return toAjax(ngMeterresultService.deleteNgMeterresultByIds(ids)); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgNgparController.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgNgparController.java new file mode 100644 index 0000000..01ded2d --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/controller/NgNgparController.java @@ -0,0 +1,113 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.NgNgpar; +import com.ruoyi.system.service.INgNgparService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; + +/** + * 天然气物性参数Controller + * + * @author ruoyi + * @date 2025-03-21 + */ +@RestController +@RequestMapping("/system/ngpar") +@Tag(name = "【天然气物性参数】管理") +public class NgNgparController extends BaseController +{ + @Autowired + private INgNgparService ngNgparService; + + /** + * 查询天然气物性参数列表 + */ + @Operation(summary = "查询天然气物性参数列表") + @PreAuthorize("@ss.hasPermi('system:ngpar:list')") + @GetMapping("/list") + public TableDataInfo list(NgNgpar ngNgpar) + { + startPage(); + List list = ngNgparService.selectNgNgparList(ngNgpar); + return getDataTable(list); + } + + /** + * 导出天然气物性参数列表 + */ + @Operation(summary = "导出天然气物性参数列表") + @PreAuthorize("@ss.hasPermi('system:ngpar:export')") + @Log(title = "天然气物性参数", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NgNgpar ngNgpar) + { + List list = ngNgparService.selectNgNgparList(ngNgpar); + ExcelUtil util = new ExcelUtil(NgNgpar.class); + util.exportExcel(response, list, "天然气物性参数数据"); + } + + /** + * 获取天然气物性参数详细信息 + */ + @Operation(summary = "获取天然气物性参数详细信息") + @PreAuthorize("@ss.hasPermi('system:ngpar:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(ngNgparService.selectNgNgparById(id)); + } + + /** + * 新增天然气物性参数 + */ + @Operation(summary = "新增天然气物性参数") + @PreAuthorize("@ss.hasPermi('system:ngpar:add')") + @Log(title = "天然气物性参数", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody NgNgpar ngNgpar) + { + return toAjax(ngNgparService.insertNgNgpar(ngNgpar)); + } + + /** + * 修改天然气物性参数 + */ + @Operation(summary = "修改天然气物性参数") + @PreAuthorize("@ss.hasPermi('system:ngpar:edit')") + @Log(title = "天然气物性参数", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody NgNgpar ngNgpar) + { + return toAjax(ngNgparService.updateNgNgpar(ngNgpar)); + } + + /** + * 删除天然气物性参数 + */ + @Operation(summary = "删除天然气物性参数") + @PreAuthorize("@ss.hasPermi('system:ngpar:remove')") + @Log(title = "天然气物性参数", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable( name = "ids" ) String[] ids) + { + return toAjax(ngNgparService.deleteNgNgparByIds(ids)); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgComponents.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgComponents.java new file mode 100644 index 0000000..4795da7 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgComponents.java @@ -0,0 +1,522 @@ +package com.ruoyi.system.domain; + +import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 天然气组分对象 ng_components + * + * @author ruoyi + * @date 2025-03-21 + */ +@Schema(description = "天然气组分对象") +public class NgComponents extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + + /** ID */ + @Schema(title = " ID ") + private String id; + + /** 创建人名称 */ + @Schema(title = " 创建人名称 ") + @Excel(name = " 创建人名称 ") + private String createName; + + /** 更新人名称 */ + @Schema(title = " 更新人名称 ") + @Excel(name = " 更新人名称 ") + private String updateName; + + /** 甲烷C1 */ + @Schema(title = " 甲烷C1 ") + @Excel(name = " 甲烷C1 ") + private String ngC1; + + /** 氮气N2 */ + @Schema(title = " 氮气N2 ") + @Excel(name = " 氮气N2 ") + private String ngN2; + + /** 二氧化碳CO2 */ + @Schema(title = " 二氧化碳CO2 ") + @Excel(name = " 二氧化碳CO2 ") + private String ngCo2; + + /** 乙烷C2 */ + @Schema(title = " 乙烷C2 ") + @Excel(name = " 乙烷C2 ") + private String ngC2; + + /** 丙烷C3 */ + @Schema(title = " 丙烷C3 ") + @Excel(name = " 丙烷C3 ") + private String ngC3; + + /** 水H2O */ + @Schema(title = " 水H2O ") + @Excel(name = " 水H2O ") + private String ngH2o; + + /** 硫化氢H2S */ + @Schema(title = " 硫化氢H2S ") + @Excel(name = " 硫化氢H2S ") + private String ngH2s; + + /** 氢气H2 */ + @Schema(title = " 氢气H2 ") + @Excel(name = " 氢气H2 ") + private String ngH2; + + /** 一氧化碳CO */ + @Schema(title = " 一氧化碳CO ") + @Excel(name = " 一氧化碳CO ") + private String ngCo; + + /** 氧气O2 */ + @Schema(title = " 氧气O2 ") + @Excel(name = " 氧气O2 ") + private String ngO2; + + /** 异丁烷iC4 */ + @Schema(title = " 异丁烷iC4 ") + @Excel(name = " 异丁烷iC4 ") + private String ngIc4; + + /** 正丁烷nC4 */ + @Schema(title = " 正丁烷nC4 ") + @Excel(name = " 正丁烷nC4 ") + private String ngNc4; + + /** 异戊烷iC5 */ + @Schema(title = " 异戊烷iC5 ") + @Excel(name = " 异戊烷iC5 ") + private String ngIc5; + + /** 正戊烷nC5 */ + @Schema(title = " 正戊烷nC5 ") + @Excel(name = " 正戊烷nC5 ") + private String ngNc5; + + /** 己烷C6 */ + @Schema(title = " 己烷C6 ") + @Excel(name = " 己烷C6 ") + private String ngC6; + + /** 庚烷C7 */ + @Schema(title = " 庚烷C7 ") + @Excel(name = " 庚烷C7 ") + private String ngC7; + + /** 辛烷C8 */ + @Schema(title = " 辛烷C8 ") + @Excel(name = " 辛烷C8 ") + private String ngC8; + + /** 壬烷C9 */ + @Schema(title = " 壬烷C9 ") + @Excel(name = " 壬烷C9 ") + private String ngC9; + + /** 癸烷C10 */ + @Schema(title = " 癸烷C10 ") + @Excel(name = " 癸烷C10 ") + private String ngC10; + + /** 氦气He */ + @Schema(title = " 氦气He ") + @Excel(name = " 氦气He ") + private String ngHe; + + /** 氩气Ar */ + @Schema(title = " 氩气Ar ") + @Excel(name = " 氩气Ar ") + private String ngAr; + + /** 合计 */ + @Schema(title = "合计") + @Excel(name = "合计") + private String sum; + + /** 取样编号 */ + @Schema(title = "取样编号") + @Excel(name = "取样编号") + private String sampleno; + + /** 仪表编号 */ + @Schema(title = "仪表编号") + @Excel(name = "仪表编号") + private String meterno; + + /** 常用组分 */ + @Schema(title = "常用组分") + @Excel(name = "常用组分") + private String cyzf; + + /** 租户ID */ + @Schema(title = "租户ID") + @Excel(name = "租户ID") + private Long tenantId; + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + + public void setCreateName(String createName) + { + this.createName = createName; + } + + public String getCreateName() + { + return createName; + } + + + public void setUpdateName(String updateName) + { + this.updateName = updateName; + } + + public String getUpdateName() + { + return updateName; + } + + + public void setNgC1(String ngC1) + { + this.ngC1 = ngC1; + } + + public String getNgC1() + { + return ngC1; + } + + + public void setNgN2(String ngN2) + { + this.ngN2 = ngN2; + } + + public String getNgN2() + { + return ngN2; + } + + + public void setNgCo2(String ngCo2) + { + this.ngCo2 = ngCo2; + } + + public String getNgCo2() + { + return ngCo2; + } + + + public void setNgC2(String ngC2) + { + this.ngC2 = ngC2; + } + + public String getNgC2() + { + return ngC2; + } + + + public void setNgC3(String ngC3) + { + this.ngC3 = ngC3; + } + + public String getNgC3() + { + return ngC3; + } + + + public void setNgH2o(String ngH2o) + { + this.ngH2o = ngH2o; + } + + public String getNgH2o() + { + return ngH2o; + } + + + public void setNgH2s(String ngH2s) + { + this.ngH2s = ngH2s; + } + + public String getNgH2s() + { + return ngH2s; + } + + + public void setNgH2(String ngH2) + { + this.ngH2 = ngH2; + } + + public String getNgH2() + { + return ngH2; + } + + + public void setNgCo(String ngCo) + { + this.ngCo = ngCo; + } + + public String getNgCo() + { + return ngCo; + } + + + public void setNgO2(String ngO2) + { + this.ngO2 = ngO2; + } + + public String getNgO2() + { + return ngO2; + } + + + public void setNgIc4(String ngIc4) + { + this.ngIc4 = ngIc4; + } + + public String getNgIc4() + { + return ngIc4; + } + + + public void setNgNc4(String ngNc4) + { + this.ngNc4 = ngNc4; + } + + public String getNgNc4() + { + return ngNc4; + } + + + public void setNgIc5(String ngIc5) + { + this.ngIc5 = ngIc5; + } + + public String getNgIc5() + { + return ngIc5; + } + + + public void setNgNc5(String ngNc5) + { + this.ngNc5 = ngNc5; + } + + public String getNgNc5() + { + return ngNc5; + } + + + public void setNgC6(String ngC6) + { + this.ngC6 = ngC6; + } + + public String getNgC6() + { + return ngC6; + } + + + public void setNgC7(String ngC7) + { + this.ngC7 = ngC7; + } + + public String getNgC7() + { + return ngC7; + } + + + public void setNgC8(String ngC8) + { + this.ngC8 = ngC8; + } + + public String getNgC8() + { + return ngC8; + } + + + public void setNgC9(String ngC9) + { + this.ngC9 = ngC9; + } + + public String getNgC9() + { + return ngC9; + } + + + public void setNgC10(String ngC10) + { + this.ngC10 = ngC10; + } + + public String getNgC10() + { + return ngC10; + } + + + public void setNgHe(String ngHe) + { + this.ngHe = ngHe; + } + + public String getNgHe() + { + return ngHe; + } + + + public void setNgAr(String ngAr) + { + this.ngAr = ngAr; + } + + public String getNgAr() + { + return ngAr; + } + + + public void setSum(String sum) + { + this.sum = sum; + } + + public String getSum() + { + return sum; + } + + + public void setSampleno(String sampleno) + { + this.sampleno = sampleno; + } + + public String getSampleno() + { + return sampleno; + } + + + public void setMeterno(String meterno) + { + this.meterno = meterno; + } + + public String getMeterno() + { + return meterno; + } + + + public void setCyzf(String cyzf) + { + this.cyzf = cyzf; + } + + public String getCyzf() + { + return cyzf; + } + + + public void setTenantId(Long tenantId) + { + this.tenantId = tenantId; + } + + public Long getTenantId() + { + return tenantId; + } + + + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createName", getCreateName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateName", getUpdateName()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("ngC1", getNgC1()) + .append("ngN2", getNgN2()) + .append("ngCo2", getNgCo2()) + .append("ngC2", getNgC2()) + .append("ngC3", getNgC3()) + .append("ngH2o", getNgH2o()) + .append("ngH2s", getNgH2s()) + .append("ngH2", getNgH2()) + .append("ngCo", getNgCo()) + .append("ngO2", getNgO2()) + .append("ngIc4", getNgIc4()) + .append("ngNc4", getNgNc4()) + .append("ngIc5", getNgIc5()) + .append("ngNc5", getNgNc5()) + .append("ngC6", getNgC6()) + .append("ngC7", getNgC7()) + .append("ngC8", getNgC8()) + .append("ngC9", getNgC9()) + .append("ngC10", getNgC10()) + .append("ngHe", getNgHe()) + .append("ngAr", getNgAr()) + .append("sum", getSum()) + .append("sampleno", getSampleno()) + .append("meterno", getMeterno()) + .append("cyzf", getCyzf()) + .append("tenantId", getTenantId()) + .toString(); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgMeterpar.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgMeterpar.java new file mode 100644 index 0000000..ec910d6 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgMeterpar.java @@ -0,0 +1,998 @@ +package com.ruoyi.system.domain; + +import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 流量计参数对象 ng_meterpar + * + * @author ruoyi + * @date 2025-03-21 + */ +@Schema(description = "流量计参数对象") +public class NgMeterpar extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + + /** ID */ + @Schema(title = "ID ") + private String id; + + /** 创建人名称 */ + @Schema(title = "创建人名称 ") + @Excel(name = "创建人名称 ") + private String createName; + + /** 更新人名称 */ + @Schema(title = "更新人名称 ") + @Excel(name = "更新人名称 ") + private String updateName; + + /** 流量计算标准 */ + @Schema(title = "流量计算标准 ") + @Excel(name = "流量计算标准 ") + private String dFlowCalbz; + + /** 压缩因子计算标准 */ + @Schema(title = "压缩因子计算标准 ") + @Excel(name = "压缩因子计算标准 ") + private String dZcalbz; + + /** 计量参比条件压力 */ + @Schema(title = "计量参比条件压力 ") + @Excel(name = "计量参比条件压力 ") + private String dCbtj; + + /** 计量参比条件压力 */ + @Schema(title = "计量参比条件压力 ") + @Excel(name = "计量参比条件压力 ") + private String dpbM; + + /** 计量参比条件温度 */ + @Schema(title = "计量参比条件温度 ") + @Excel(name = "计量参比条件温度 ") + private String dtbM; + + /** 燃烧参比条件压力 */ + @Schema(title = "燃烧参比条件压力 ") + @Excel(name = "燃烧参比条件压力 ") + private String dpbE; + + /** 燃烧参比条件温度 */ + @Schema(title = "燃烧参比条件温度 ") + @Excel(name = "燃烧参比条件温度 ") + private String dtbE; + + /** 当地大气压 */ + @Schema(title = "当地大气压 ") + @Excel(name = "当地大气压 ") + private String dPatm; + + /** 当地大气压单位 */ + @Schema(title = "当地大气压单位 ") + @Excel(name = "当地大气压单位 ") + private String dPatmUnit; + + /** 天然气组分 */ + @Schema(title = "天然气组分 ") + @Excel(name = "天然气组分 ") + private String dngCompents; + + /** 流量计类别 */ + @Schema(title = "流量计类别 ") + @Excel(name = "流量计类别 ") + private String dMeterType; + + /** 节流装置类型 */ + @Schema(title = "节流装置类型 ") + @Excel(name = "节流装置类型 ") + private String dCoreType; + + /** 取压方式 */ + @Schema(title = "取压方式 ") + @Excel(name = "取压方式 ") + private String dPtmode; + + /** 管道类型 */ + @Schema(title = "管道类型 ") + @Excel(name = "管道类型 ") + private String dPipeType; + + /** 管道内径 */ + @Schema(title = "管道内径 ") + @Excel(name = "管道内径 ") + private String dPipeD; + + /** 长度单位 */ + @Schema(title = "长度单位 ") + @Excel(name = "长度单位 ") + private String dLenUnit; + + /** 管道内径参考温度 */ + @Schema(title = "管道内径参考温度 ") + @Excel(name = "管道内径参考温度 ") + private String dPipeDtemp; + + /** 温度单位 */ + @Schema(title = "温度单位 ") + @Excel(name = "温度单位 ") + private String dPileDtempU; + + /** 管道材料 */ + @Schema(title = "管道材料 ") + @Excel(name = "管道材料 ") + private String dPipeMaterial; + + /** 孔板孔径 */ + @Schema(title = "孔板孔径 ") + @Excel(name = "孔板孔径 ") + private String dOrificeD; + + /** 长度单位 */ + @Schema(title = "长度单位 ") + @Excel(name = "长度单位 ") + private String dOrificeUnit; + + /** 孔板内径参考温度 */ + @Schema(title = "孔板内径参考温度 ") + @Excel(name = "孔板内径参考温度 ") + private String dOrificeDtemp; + + /** 温度单位 */ + @Schema(title = "温度单位 ") + @Excel(name = "温度单位 ") + private String dOrificeDtempUnit; + + /** 孔板材料 */ + @Schema(title = "孔板材料 ") + @Excel(name = "孔板材料 ") + private String dOrificeMaterial; + + /** 锐利度系数计算方法 */ + @Schema(title = "锐利度系数计算方法 ") + @Excel(name = "锐利度系数计算方法 ") + private String dOrificeSharpness; + + /** 孔板入口圆弧半径 */ + @Schema(title = "孔板入口圆弧半径 ") + @Excel(name = "孔板入口圆弧半径 ") + private String dOrificeRk; + + /** 长度单位 */ + @Schema(title = "长度单位 ") + @Excel(name = "长度单位 ") + private String dOrificeRkLenU; + + /** 输入压力 */ + @Schema(title = "输入压力 ") + @Excel(name = "输入压力 ") + private String dPf; + + /** 压力单位 */ + @Schema(title = "压力单位 ") + @Excel(name = "压力单位 ") + private String dPfUnit; + + /** 压力类型 */ + @Schema(title = "压力类型 ") + @Excel(name = "压力类型 ") + private String dPfType; + + /** 输入温度 */ + @Schema(title = "输入温度 ") + @Excel(name = "输入温度 ") + private String dTf; + + /** 温度单位 */ + @Schema(title = "温度单位 ") + @Excel(name = "温度单位 ") + private String dTfUnit; + + /** 输入差压 */ + @Schema(title = "输入差压 ") + @Excel(name = "输入差压 ") + private String dDp; + + /** 压力单位 */ + @Schema(title = "压力单位 ") + @Excel(name = "压力单位 ") + private String dDpUnit; + + /** 体积流量单位 */ + @Schema(title = "体积流量单位 ") + @Excel(name = "体积流量单位 ") + private String dVFlowUnit; + + /** 质量流量单位 */ + @Schema(title = "质量流量单位 ") + @Excel(name = "质量流量单位 ") + private String dMFlowUnit; + + /** 能量流量单位 */ + @Schema(title = "能量流量单位 ") + @Excel(name = "能量流量单位 ") + private String dEFlowUnit; + + /** 流出系数 */ + @Schema(title = "流出系数 ") + @Excel(name = "流出系数 ") + private String dCd; + + /** 流出系数计算方法 */ + @Schema(title = "流出系数计算方法 ") + @Excel(name = "流出系数计算方法 ") + private String dCdCalMethod; + + /** 仪表系数 */ + @Schema(title = "仪表系数 ") + @Excel(name = "仪表系数 ") + private String dMeterFactor; + + /** 脉冲数 */ + @Schema(title = "脉冲数 ") + @Excel(name = "脉冲数 ") + private String dPulseNum; + + /** 最大体积流量 */ + @Schema(title = "最大体积流量 ") + @Excel(name = "最大体积流量 ") + private String dVFlowMax; + + /** 最小体积流量 */ + @Schema(title = "最小体积流量 ") + @Excel(name = "最小体积流量 ") + private String dVFlowMin; + + /** 常用流量 */ + @Schema(title = "常用流量 ") + @Excel(name = "常用流量 ") + private String dVFlowCon; + + /** 压力量程下限 */ + @Schema(title = "压力量程下限 ") + @Excel(name = "压力量程下限 ") + private String dPfRangeMin; + + /** 压力量程上限 */ + @Schema(title = "压力量程上限 ") + @Excel(name = "压力量程上限 ") + private String dPfRangeMax; + + /** 差压量程下限 */ + @Schema(title = "差压量程下限 ") + @Excel(name = "差压量程下限 ") + private String dDpRangeMin; + + /** 差压量程上限 */ + @Schema(title = "差压量程上限 ") + @Excel(name = "差压量程上限 ") + private String dDpRangeMax; + + /** 温度计量程下限 */ + @Schema(title = "温度计量程下限 ") + @Excel(name = "温度计量程下限 ") + private String dTfRangeMin; + + /** 温度计量程上限 */ + @Schema(title = "温度计量程上限 ") + @Excel(name = "温度计量程上限 ") + private String dTfRangeMax; + + /** 管束车容积 */ + @Schema(title = "管束车容积 ") + @Excel(name = "管束车容积 ") + private String dVGsc; + + /** 取样编号 */ + @Schema(title = "取样编号") + @Excel(name = "取样编号") + private String sampleno; + + /** 仪表编号 */ + @Schema(title = "仪表编号") + @Excel(name = "仪表编号") + private String meterno; + + /** 租户ID */ + @Schema(title = "租户ID") + @Excel(name = "租户ID") + private Long tenantId; + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + + public void setCreateName(String createName) + { + this.createName = createName; + } + + public String getCreateName() + { + return createName; + } + + + public void setUpdateName(String updateName) + { + this.updateName = updateName; + } + + public String getUpdateName() + { + return updateName; + } + + + public void setdFlowCalbz(String dFlowCalbz) + { + this.dFlowCalbz = dFlowCalbz; + } + + public String getdFlowCalbz() + { + return dFlowCalbz; + } + + + public void setdZcalbz(String dZcalbz) + { + this.dZcalbz = dZcalbz; + } + + public String getdZcalbz() + { + return dZcalbz; + } + + + public void setdCbtj(String dCbtj) + { + this.dCbtj = dCbtj; + } + + public String getdCbtj() + { + return dCbtj; + } + + + public void setDpbM(String dpbM) + { + this.dpbM = dpbM; + } + + public String getDpbM() + { + return dpbM; + } + + + public void setDtbM(String dtbM) + { + this.dtbM = dtbM; + } + + public String getDtbM() + { + return dtbM; + } + + + public void setDpbE(String dpbE) + { + this.dpbE = dpbE; + } + + public String getDpbE() + { + return dpbE; + } + + + public void setDtbE(String dtbE) + { + this.dtbE = dtbE; + } + + public String getDtbE() + { + return dtbE; + } + + + public void setdPatm(String dPatm) + { + this.dPatm = dPatm; + } + + public String getdPatm() + { + return dPatm; + } + + + public void setdPatmUnit(String dPatmUnit) + { + this.dPatmUnit = dPatmUnit; + } + + public String getdPatmUnit() + { + return dPatmUnit; + } + + + public void setDngCompents(String dngCompents) + { + this.dngCompents = dngCompents; + } + + public String getDngCompents() + { + return dngCompents; + } + + + public void setdMeterType(String dMeterType) + { + this.dMeterType = dMeterType; + } + + public String getdMeterType() + { + return dMeterType; + } + + + public void setdCoreType(String dCoreType) + { + this.dCoreType = dCoreType; + } + + public String getdCoreType() + { + return dCoreType; + } + + + public void setdPtmode(String dPtmode) + { + this.dPtmode = dPtmode; + } + + public String getdPtmode() + { + return dPtmode; + } + + + public void setdPipeType(String dPipeType) + { + this.dPipeType = dPipeType; + } + + public String getdPipeType() + { + return dPipeType; + } + + + public void setdPipeD(String dPipeD) + { + this.dPipeD = dPipeD; + } + + public String getdPipeD() + { + return dPipeD; + } + + + public void setdLenUnit(String dLenUnit) + { + this.dLenUnit = dLenUnit; + } + + public String getdLenUnit() + { + return dLenUnit; + } + + + public void setdPipeDtemp(String dPipeDtemp) + { + this.dPipeDtemp = dPipeDtemp; + } + + public String getdPipeDtemp() + { + return dPipeDtemp; + } + + + public void setdPileDtempU(String dPileDtempU) + { + this.dPileDtempU = dPileDtempU; + } + + public String getdPileDtempU() + { + return dPileDtempU; + } + + + public void setdPipeMaterial(String dPipeMaterial) + { + this.dPipeMaterial = dPipeMaterial; + } + + public String getdPipeMaterial() + { + return dPipeMaterial; + } + + + public void setdOrificeD(String dOrificeD) + { + this.dOrificeD = dOrificeD; + } + + public String getdOrificeD() + { + return dOrificeD; + } + + + public void setdOrificeUnit(String dOrificeUnit) + { + this.dOrificeUnit = dOrificeUnit; + } + + public String getdOrificeUnit() + { + return dOrificeUnit; + } + + + public void setdOrificeDtemp(String dOrificeDtemp) + { + this.dOrificeDtemp = dOrificeDtemp; + } + + public String getdOrificeDtemp() + { + return dOrificeDtemp; + } + + + public void setdOrificeDtempUnit(String dOrificeDtempUnit) + { + this.dOrificeDtempUnit = dOrificeDtempUnit; + } + + public String getdOrificeDtempUnit() + { + return dOrificeDtempUnit; + } + + + public void setdOrificeMaterial(String dOrificeMaterial) + { + this.dOrificeMaterial = dOrificeMaterial; + } + + public String getdOrificeMaterial() + { + return dOrificeMaterial; + } + + + public void setdOrificeSharpness(String dOrificeSharpness) + { + this.dOrificeSharpness = dOrificeSharpness; + } + + public String getdOrificeSharpness() + { + return dOrificeSharpness; + } + + + public void setdOrificeRk(String dOrificeRk) + { + this.dOrificeRk = dOrificeRk; + } + + public String getdOrificeRk() + { + return dOrificeRk; + } + + + public void setdOrificeRkLenU(String dOrificeRkLenU) + { + this.dOrificeRkLenU = dOrificeRkLenU; + } + + public String getdOrificeRkLenU() + { + return dOrificeRkLenU; + } + + + public void setdPf(String dPf) + { + this.dPf = dPf; + } + + public String getdPf() + { + return dPf; + } + + + public void setdPfUnit(String dPfUnit) + { + this.dPfUnit = dPfUnit; + } + + public String getdPfUnit() + { + return dPfUnit; + } + + + public void setdPfType(String dPfType) + { + this.dPfType = dPfType; + } + + public String getdPfType() + { + return dPfType; + } + + + public void setdTf(String dTf) + { + this.dTf = dTf; + } + + public String getdTf() + { + return dTf; + } + + + public void setdTfUnit(String dTfUnit) + { + this.dTfUnit = dTfUnit; + } + + public String getdTfUnit() + { + return dTfUnit; + } + + + public void setdDp(String dDp) + { + this.dDp = dDp; + } + + public String getdDp() + { + return dDp; + } + + + public void setdDpUnit(String dDpUnit) + { + this.dDpUnit = dDpUnit; + } + + public String getdDpUnit() + { + return dDpUnit; + } + + + public void setdVFlowUnit(String dVFlowUnit) + { + this.dVFlowUnit = dVFlowUnit; + } + + public String getdVFlowUnit() + { + return dVFlowUnit; + } + + + public void setdMFlowUnit(String dMFlowUnit) + { + this.dMFlowUnit = dMFlowUnit; + } + + public String getdMFlowUnit() + { + return dMFlowUnit; + } + + + public void setdEFlowUnit(String dEFlowUnit) + { + this.dEFlowUnit = dEFlowUnit; + } + + public String getdEFlowUnit() + { + return dEFlowUnit; + } + + + public void setdCd(String dCd) + { + this.dCd = dCd; + } + + public String getdCd() + { + return dCd; + } + + + public void setdCdCalMethod(String dCdCalMethod) + { + this.dCdCalMethod = dCdCalMethod; + } + + public String getdCdCalMethod() + { + return dCdCalMethod; + } + + + public void setdMeterFactor(String dMeterFactor) + { + this.dMeterFactor = dMeterFactor; + } + + public String getdMeterFactor() + { + return dMeterFactor; + } + + + public void setdPulseNum(String dPulseNum) + { + this.dPulseNum = dPulseNum; + } + + public String getdPulseNum() + { + return dPulseNum; + } + + + public void setdVFlowMax(String dVFlowMax) + { + this.dVFlowMax = dVFlowMax; + } + + public String getdVFlowMax() + { + return dVFlowMax; + } + + + public void setdVFlowMin(String dVFlowMin) + { + this.dVFlowMin = dVFlowMin; + } + + public String getdVFlowMin() + { + return dVFlowMin; + } + + + public void setdVFlowCon(String dVFlowCon) + { + this.dVFlowCon = dVFlowCon; + } + + public String getdVFlowCon() + { + return dVFlowCon; + } + + + public void setdPfRangeMin(String dPfRangeMin) + { + this.dPfRangeMin = dPfRangeMin; + } + + public String getdPfRangeMin() + { + return dPfRangeMin; + } + + + public void setdPfRangeMax(String dPfRangeMax) + { + this.dPfRangeMax = dPfRangeMax; + } + + public String getdPfRangeMax() + { + return dPfRangeMax; + } + + + public void setdDpRangeMin(String dDpRangeMin) + { + this.dDpRangeMin = dDpRangeMin; + } + + public String getdDpRangeMin() + { + return dDpRangeMin; + } + + + public void setdDpRangeMax(String dDpRangeMax) + { + this.dDpRangeMax = dDpRangeMax; + } + + public String getdDpRangeMax() + { + return dDpRangeMax; + } + + + public void setdTfRangeMin(String dTfRangeMin) + { + this.dTfRangeMin = dTfRangeMin; + } + + public String getdTfRangeMin() + { + return dTfRangeMin; + } + + + public void setdTfRangeMax(String dTfRangeMax) + { + this.dTfRangeMax = dTfRangeMax; + } + + public String getdTfRangeMax() + { + return dTfRangeMax; + } + + + public void setdVGsc(String dVGsc) + { + this.dVGsc = dVGsc; + } + + public String getdVGsc() + { + return dVGsc; + } + + + public void setSampleno(String sampleno) + { + this.sampleno = sampleno; + } + + public String getSampleno() + { + return sampleno; + } + + + public void setMeterno(String meterno) + { + this.meterno = meterno; + } + + public String getMeterno() + { + return meterno; + } + + + public void setTenantId(Long tenantId) + { + this.tenantId = tenantId; + } + + public Long getTenantId() + { + return tenantId; + } + + + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createName", getCreateName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateName", getUpdateName()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("dFlowCalbz", getdFlowCalbz()) + .append("dZcalbz", getdZcalbz()) + .append("dCbtj", getdCbtj()) + .append("dpbM", getDpbM()) + .append("dtbM", getDtbM()) + .append("dpbE", getDpbE()) + .append("dtbE", getDtbE()) + .append("dPatm", getdPatm()) + .append("dPatmUnit", getdPatmUnit()) + .append("dngCompents", getDngCompents()) + .append("dMeterType", getdMeterType()) + .append("dCoreType", getdCoreType()) + .append("dPtmode", getdPtmode()) + .append("dPipeType", getdPipeType()) + .append("dPipeD", getdPipeD()) + .append("dLenUnit", getdLenUnit()) + .append("dPipeDtemp", getdPipeDtemp()) + .append("dPileDtempU", getdPileDtempU()) + .append("dPipeMaterial", getdPipeMaterial()) + .append("dOrificeD", getdOrificeD()) + .append("dOrificeUnit", getdOrificeUnit()) + .append("dOrificeDtemp", getdOrificeDtemp()) + .append("dOrificeDtempUnit", getdOrificeDtempUnit()) + .append("dOrificeMaterial", getdOrificeMaterial()) + .append("dOrificeSharpness", getdOrificeSharpness()) + .append("dOrificeRk", getdOrificeRk()) + .append("dOrificeRkLenU", getdOrificeRkLenU()) + .append("dPf", getdPf()) + .append("dPfUnit", getdPfUnit()) + .append("dPfType", getdPfType()) + .append("dTf", getdTf()) + .append("dTfUnit", getdTfUnit()) + .append("dDp", getdDp()) + .append("dDpUnit", getdDpUnit()) + .append("dVFlowUnit", getdVFlowUnit()) + .append("dMFlowUnit", getdMFlowUnit()) + .append("dEFlowUnit", getdEFlowUnit()) + .append("dCd", getdCd()) + .append("dCdCalMethod", getdCdCalMethod()) + .append("dMeterFactor", getdMeterFactor()) + .append("dPulseNum", getdPulseNum()) + .append("dVFlowMax", getdVFlowMax()) + .append("dVFlowMin", getdVFlowMin()) + .append("dVFlowCon", getdVFlowCon()) + .append("dPfRangeMin", getdPfRangeMin()) + .append("dPfRangeMax", getdPfRangeMax()) + .append("dDpRangeMin", getdDpRangeMin()) + .append("dDpRangeMax", getdDpRangeMax()) + .append("dTfRangeMin", getdTfRangeMin()) + .append("dTfRangeMax", getdTfRangeMax()) + .append("dVGsc", getdVGsc()) + .append("sampleno", getSampleno()) + .append("meterno", getMeterno()) + .append("tenantId", getTenantId()) + .toString(); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgMeterresult.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgMeterresult.java new file mode 100644 index 0000000..32e4381 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgMeterresult.java @@ -0,0 +1,454 @@ +package com.ruoyi.system.domain; + +import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 流量计算结果对象 ng_meterresult + * + * @author ruoyi + * @date 2025-03-21 + */ +@Schema(description = "流量计算结果对象") +public class NgMeterresult extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + + /** ID */ + @Schema(title = "ID") + private String id; + + /** 创建人名称 */ + @Schema(title = "创建人名称") + @Excel(name = "创建人名称") + private String createName; + + /** 更新人名称 */ + @Schema(title = "更新人名称") + @Excel(name = "更新人名称") + private String updateName; + + /** 流量计编号 */ + @Schema(title = "流量计编号") + @Excel(name = "流量计编号") + private String ybbh; + + /** 求渐近速度系数 E */ + @Schema(title = "求渐近速度系数 E") + @Excel(name = "求渐近速度系数 E") + private String dE; + + /** 求相对密度系数 FG */ + @Schema(title = "求相对密度系数 FG") + @Excel(name = "求相对密度系数 FG") + private String dFG; + + /** 求流动温度系数 FT */ + @Schema(title = "求流动温度系数 FT") + @Excel(name = "求流动温度系数 FT") + private String dFT; + + /** 求动力粘度dlnd */ + @Schema(title = "求动力粘度dlnd") + @Excel(name = "求动力粘度dlnd") + private String dDViscosity; + + /** 求可膨胀系数 */ + @Schema(title = "求可膨胀系数") + @Excel(name = "求可膨胀系数") + private String dDExpCoefficient; + + /** 管道雷诺数 */ + @Schema(title = "管道雷诺数") + @Excel(name = "管道雷诺数") + private String dRnPipe; + + /** 孔板锐利度系数Bk */ + @Schema(title = "孔板锐利度系数Bk") + @Excel(name = "孔板锐利度系数Bk") + private String dBk; + + /** 管道粗糙度系数 Gme */ + @Schema(title = "管道粗糙度系数 Gme") + @Excel(name = "管道粗糙度系数 Gme") + private String dRoughNessPipe; + + /** 修正后的流出系数 */ + @Schema(title = "修正后的流出系数") + @Excel(name = "修正后的流出系数") + private String dCdCorrect; + + /** 喷嘴的流出系数 */ + @Schema(title = "喷嘴的流出系数") + @Excel(name = "喷嘴的流出系数") + private String dCdNozell; + + /** 标况体积流量m³/s */ + @Schema(title = "标况体积流量m³/s") + @Excel(name = "标况体积流量m³/s") + private String dVFlowb; + + /** 工况体积流量 */ + @Schema(title = "工况体积流量") + @Excel(name = "工况体积流量") + private String dVFlowf; + + /** 标况质量流量 */ + @Schema(title = "标况质量流量") + @Excel(name = "标况质量流量") + private String dMFlowb; + + /** 标况能量流量 */ + @Schema(title = "标况能量流量") + @Excel(name = "标况能量流量") + private String dEFlowb; + + /** 管道内天然气流速 */ + @Schema(title = "管道内天然气流速") + @Excel(name = "管道内天然气流速") + private String dVelocityFlow; + + /** 压力损失 */ + @Schema(title = "压力损失") + @Excel(name = "压力损失") + private String dPressLost; + + /** 直径比 */ + @Schema(title = "直径比") + @Excel(name = "直径比") + private String dBeta; + + /** 等熵指数 */ + @Schema(title = "等熵指数") + @Excel(name = "等熵指数") + private String dKappa; + + /** 取样编号 */ + @Schema(title = "取样编号") + @Excel(name = "取样编号") + private String sampleno; + + /** 仪表编号 */ + @Schema(title = "仪表编号") + @Excel(name = "仪表编号") + private String meterno; + + /** 租户ID */ + @Schema(title = "租户ID") + @Excel(name = "租户ID") + private Long tenantId; + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + + public void setCreateName(String createName) + { + this.createName = createName; + } + + public String getCreateName() + { + return createName; + } + + + public void setUpdateName(String updateName) + { + this.updateName = updateName; + } + + public String getUpdateName() + { + return updateName; + } + + + public void setYbbh(String ybbh) + { + this.ybbh = ybbh; + } + + public String getYbbh() + { + return ybbh; + } + + + public void setDE(String dE) + { + this.dE = dE; + } + + public String getDE() + { + return dE; + } + + + public void setdFG(String dFG) + { + this.dFG = dFG; + } + + public String getdFG() + { + return dFG; + } + + + public void setdFT(String dFT) + { + this.dFT = dFT; + } + + public String getdFT() + { + return dFT; + } + + + public void setdDViscosity(String dDViscosity) + { + this.dDViscosity = dDViscosity; + } + + public String getdDViscosity() + { + return dDViscosity; + } + + + public void setdDExpCoefficient(String dDExpCoefficient) + { + this.dDExpCoefficient = dDExpCoefficient; + } + + public String getdDExpCoefficient() + { + return dDExpCoefficient; + } + + + public void setdRnPipe(String dRnPipe) + { + this.dRnPipe = dRnPipe; + } + + public String getdRnPipe() + { + return dRnPipe; + } + + + public void setdBk(String dBk) + { + this.dBk = dBk; + } + + public String getdBk() + { + return dBk; + } + + + public void setdRoughNessPipe(String dRoughNessPipe) + { + this.dRoughNessPipe = dRoughNessPipe; + } + + public String getdRoughNessPipe() + { + return dRoughNessPipe; + } + + + public void setdCdCorrect(String dCdCorrect) + { + this.dCdCorrect = dCdCorrect; + } + + public String getdCdCorrect() + { + return dCdCorrect; + } + + + public void setdCdNozell(String dCdNozell) + { + this.dCdNozell = dCdNozell; + } + + public String getdCdNozell() + { + return dCdNozell; + } + + + public void setdVFlowb(String dVFlowb) + { + this.dVFlowb = dVFlowb; + } + + public String getdVFlowb() + { + return dVFlowb; + } + + + public void setdVFlowf(String dVFlowf) + { + this.dVFlowf = dVFlowf; + } + + public String getdVFlowf() + { + return dVFlowf; + } + + + public void setdMFlowb(String dMFlowb) + { + this.dMFlowb = dMFlowb; + } + + public String getdMFlowb() + { + return dMFlowb; + } + + + public void setdEFlowb(String dEFlowb) + { + this.dEFlowb = dEFlowb; + } + + public String getdEFlowb() + { + return dEFlowb; + } + + + public void setdVelocityFlow(String dVelocityFlow) + { + this.dVelocityFlow = dVelocityFlow; + } + + public String getdVelocityFlow() + { + return dVelocityFlow; + } + + + public void setdPressLost(String dPressLost) + { + this.dPressLost = dPressLost; + } + + public String getdPressLost() + { + return dPressLost; + } + + + public void setdBeta(String dBeta) + { + this.dBeta = dBeta; + } + + public String getdBeta() + { + return dBeta; + } + + + public void setdKappa(String dKappa) + { + this.dKappa = dKappa; + } + + public String getdKappa() + { + return dKappa; + } + + + public void setSampleno(String sampleno) + { + this.sampleno = sampleno; + } + + public String getSampleno() + { + return sampleno; + } + + + public void setMeterno(String meterno) + { + this.meterno = meterno; + } + + public String getMeterno() + { + return meterno; + } + + + public void setTenantId(Long tenantId) + { + this.tenantId = tenantId; + } + + public Long getTenantId() + { + return tenantId; + } + + + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createName", getCreateName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateName", getUpdateName()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("ybbh", getYbbh()) + .append("dE", getDE()) + .append("dFG", getdFG()) + .append("dFT", getdFT()) + .append("dDViscosity", getdDViscosity()) + .append("dDExpCoefficient", getdDExpCoefficient()) + .append("dRnPipe", getdRnPipe()) + .append("dBk", getdBk()) + .append("dRoughNessPipe", getdRoughNessPipe()) + .append("dCdCorrect", getdCdCorrect()) + .append("dCdNozell", getdCdNozell()) + .append("dVFlowb", getdVFlowb()) + .append("dVFlowf", getdVFlowf()) + .append("dMFlowb", getdMFlowb()) + .append("dEFlowb", getdEFlowb()) + .append("dVelocityFlow", getdVelocityFlow()) + .append("dPressLost", getdPressLost()) + .append("dBeta", getdBeta()) + .append("dKappa", getdKappa()) + .append("sampleno", getSampleno()) + .append("meterno", getMeterno()) + .append("tenantId", getTenantId()) + .toString(); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgNgpar.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgNgpar.java new file mode 100644 index 0000000..a03bd50 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/domain/NgNgpar.java @@ -0,0 +1,1032 @@ +package com.ruoyi.system.domain; + +import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 天然气物性参数对象 ng_ngpar + * + * @author ruoyi + * @date 2025-03-21 + */ +@Schema(description = "天然气物性参数对象") +public class NgNgpar extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + + /** ID */ + @Schema(title = "ID") + private String id; + + /** 创建人名称 */ + @Schema(title = "创建人名称") + @Excel(name = "创建人名称") + private String createName; + + /** 更新人名称 */ + @Schema(title = "更新人名称") + @Excel(name = "更新人名称") + private String updateName; + + /** 气体摩尔组成 */ + @Schema(title = "气体摩尔组成") + @Excel(name = "气体摩尔组成") + private String adMixture; + + /** 气体体积组成 */ + @Schema(title = "气体体积组成") + @Excel(name = "气体体积组成") + private String adMixtureV; + + /** 气体质量组成 */ + @Schema(title = "气体质量组成") + @Excel(name = "气体质量组成") + private String adMixtureD; + + /** 参比条件 */ + @Schema(title = "参比条件") + @Excel(name = "参比条件") + private String dCbtj; + + /** 参比压力 */ + @Schema(title = "参比压力") + @Excel(name = "参比压力") + private String dPb; + + /** 参比温度 */ + @Schema(title = "参比温度") + @Excel(name = "参比温度") + private String dTb; + + /** 工况压力 */ + @Schema(title = "工况压力") + @Excel(name = "工况压力") + private String dPf; + + /** 工况温度 */ + @Schema(title = "工况温度") + @Excel(name = "工况温度") + private String dTf; + + /** 分子量 */ + @Schema(title = "分子量") + @Excel(name = "分子量") + private String dMrx; + + /** 标况压缩因子 */ + @Schema(title = "标况压缩因子") + @Excel(name = "标况压缩因子") + private String dZb; + + /** 工况压缩因子 */ + @Schema(title = "工况压缩因子") + @Excel(name = "工况压缩因子") + private String dZf; + + /** 超压缩系数 */ + @Schema(title = "超压缩系数") + @Excel(name = "超压缩系数") + private String dFpv; + + /** 标况摩尔密度 */ + @Schema(title = "标况摩尔密度") + @Excel(name = "标况摩尔密度") + private String dDb; + + /** 工况摩尔密度 */ + @Schema(title = "工况摩尔密度") + @Excel(name = "工况摩尔密度") + private String dDf; + + /** 标况质量密度 */ + @Schema(title = "标况质量密度") + @Excel(name = "标况质量密度") + private String dRhob; + + /** 工况质量密度 */ + @Schema(title = "工况质量密度") + @Excel(name = "工况质量密度") + private String dRhof; + + /** 理想气体的相对密度 */ + @Schema(title = "理想气体的相对密度") + @Excel(name = "理想气体的相对密度") + private String drdIdeal; + + /** 真实气体的相对密度 */ + @Schema(title = "真实气体的相对密度") + @Excel(name = "真实气体的相对密度") + private String drdReal; + + /** 理想气体的比焓 */ + @Schema(title = "理想气体的比焓") + @Excel(name = "理想气体的比焓") + private String dHo; + + /** 真实气体的焓 */ + @Schema(title = "真实气体的焓") + @Excel(name = "真实气体的焓") + private String dH; + + /** 真实气体的熵 */ + @Schema(title = "真实气体的熵") + @Excel(name = "真实气体的熵") + private String dS; + + /** 理想气体定压热容 */ + @Schema(title = "理想气体定压热容") + @Excel(name = "理想气体定压热容") + private String dCpi; + + /** 定压热容 */ + @Schema(title = "定压热容") + @Excel(name = "定压热容") + private String dCp; + + /** 定容积热容 */ + @Schema(title = "定容积热容") + @Excel(name = "定容积热容") + private String dCv; + + /** 比热比 */ + @Schema(title = "比热比") + @Excel(name = "比热比") + private String dk; + + /** 等熵指数 */ + @Schema(title = "等熵指数") + @Excel(name = "等熵指数") + private String dKappa; + + /** 声速 */ + @Schema(title = "声速") + @Excel(name = "声速") + private String dSOS; + + /** 临界流函数 */ + @Schema(title = "临界流函数") + @Excel(name = "临界流函数") + private String dCstar; + + /** 摩尔高位发热量 */ + @Schema(title = "摩尔高位发热量") + @Excel(name = "摩尔高位发热量") + private String dHhvMol; + + /** 摩尔低位发热量 */ + @Schema(title = "摩尔低位发热量") + @Excel(name = "摩尔低位发热量") + private String dLhvMol; + + /** 体积高位发热量 */ + @Schema(title = "体积高位发热量") + @Excel(name = "体积高位发热量") + private String dHhvv; + + /** 体积低位发热量 */ + @Schema(title = "体积低位发热量") + @Excel(name = "体积低位发热量") + private String dLhvv; + + /** 质量高位发热量 */ + @Schema(title = "质量高位发热量") + @Excel(name = "质量高位发热量") + private String dHhvm; + + /** 质量地位发热量 */ + @Schema(title = "质量地位发热量") + @Excel(name = "质量地位发热量") + private String dLhvm; + + /** 标况压缩因子 */ + @Schema(title = "标况压缩因子") + @Excel(name = "标况压缩因子") + private String dZb11062; + + /** 标况质量密度 */ + @Schema(title = "标况质量密度") + @Excel(name = "标况质量密度") + private String dRhob11062; + + /** 工况质量密度 */ + @Schema(title = "工况质量密度") + @Excel(name = "工况质量密度") + private String dRhof11062; + + /** 理想气体的相对密度 */ + @Schema(title = "理想气体的相对密度") + @Excel(name = "理想气体的相对密度") + private String drdIdeal11062; + + /** 真实气体的相对密度 */ + @Schema(title = "真实气体的相对密度") + @Excel(name = "真实气体的相对密度") + private String drdReal11062; + + /** 真实气体的沃泊指数 */ + @Schema(title = "真实气体的沃泊指数") + @Excel(name = "真实气体的沃泊指数") + private String dWobbeIndex; + + /** 临界压力 */ + @Schema(title = "临界压力") + @Excel(name = "临界压力") + private String dPc; + + /** 临界温度 */ + @Schema(title = "临界温度") + @Excel(name = "临界温度") + private String dTC; + + /** 爆炸上限 */ + @Schema(title = "爆炸上限") + @Excel(name = "爆炸上限") + private String dBzsx; + + /** 爆炸下限 */ + @Schema(title = "爆炸下限") + @Excel(name = "爆炸下限") + private String dBzxx; + + /** 总炭含量(kg/m3) */ + @Schema(title = "总炭含量(kg/m3)") + @Excel(name = "总炭含量(kg/m3)") + private String dTotalC; + + /** C2组分含量(kg/m3) */ + @Schema(title = "C2组分含量(kg/m3)") + @Excel(name = "C2组分含量(kg/m3)") + private String dC2; + + /** C2以上组分含量(kg/m3) */ + @Schema(title = "C2以上组分含量(kg/m3)") + @Excel(name = "C2以上组分含量(kg/m3)") + private String dC2j; + + /** C3以上组分含量(kg/m3) */ + @Schema(title = "C3以上组分含量(kg/m3)") + @Excel(name = "C3以上组分含量(kg/m3)") + private String dC3j; + + /** C4以上组分含量(kg/m3) */ + @Schema(title = "C4以上组分含量(kg/m3)") + @Excel(name = "C4以上组分含量(kg/m3)") + private String dC4j; + + /** C5以上组分含量(kg/m3) */ + @Schema(title = "C5以上组分含量(kg/m3)") + @Excel(name = "C5以上组分含量(kg/m3)") + private String dC5j; + + /** C6以上组分含量(kg/m3) */ + @Schema(title = "C6以上组分含量(kg/m3)") + @Excel(name = "C6以上组分含量(kg/m3)") + private String dC6j; + + /** C3C4组分含量(kg/m3) */ + @Schema(title = "C3C4组分含量(kg/m3)") + @Excel(name = "C3C4组分含量(kg/m3)") + private String dC3C4; + + /** 取样编号 */ + @Schema(title = "取样编号") + @Excel(name = "取样编号") + private String sampleno; + + /** 仪表编号 */ + @Schema(title = "仪表编号") + @Excel(name = "仪表编号") + private String meterno; + + /** 压力类型 */ + @Schema(title = "压力类型") + @Excel(name = "压力类型") + private String dPfType; + + /** 租户ID */ + @Schema(title = "租户ID") + @Excel(name = "租户ID") + private Long tenantId; + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + + public void setCreateName(String createName) + { + this.createName = createName; + } + + public String getCreateName() + { + return createName; + } + + + public void setUpdateName(String updateName) + { + this.updateName = updateName; + } + + public String getUpdateName() + { + return updateName; + } + + + public void setAdMixture(String adMixture) + { + this.adMixture = adMixture; + } + + public String getAdMixture() + { + return adMixture; + } + + + public void setAdMixtureV(String adMixtureV) + { + this.adMixtureV = adMixtureV; + } + + public String getAdMixtureV() + { + return adMixtureV; + } + + + public void setAdMixtureD(String adMixtureD) + { + this.adMixtureD = adMixtureD; + } + + public String getAdMixtureD() + { + return adMixtureD; + } + + + public void setdCbtj(String dCbtj) + { + this.dCbtj = dCbtj; + } + + public String getdCbtj() + { + return dCbtj; + } + + + public void setdPb(String dPb) + { + this.dPb = dPb; + } + + public String getdPb() + { + return dPb; + } + + + public void setdTb(String dTb) + { + this.dTb = dTb; + } + + public String getdTb() + { + return dTb; + } + + + public void setdPf(String dPf) + { + this.dPf = dPf; + } + + public String getdPf() + { + return dPf; + } + + + public void setdTf(String dTf) + { + this.dTf = dTf; + } + + public String getdTf() + { + return dTf; + } + + + public void setdMrx(String dMrx) + { + this.dMrx = dMrx; + } + + public String getdMrx() + { + return dMrx; + } + + + public void setdZb(String dZb) + { + this.dZb = dZb; + } + + public String getdZb() + { + return dZb; + } + + + public void setdZf(String dZf) + { + this.dZf = dZf; + } + + public String getdZf() + { + return dZf; + } + + + public void setdFpv(String dFpv) + { + this.dFpv = dFpv; + } + + public String getdFpv() + { + return dFpv; + } + + + public void setdDb(String dDb) + { + this.dDb = dDb; + } + + public String getdDb() + { + return dDb; + } + + + public void setdDf(String dDf) + { + this.dDf = dDf; + } + + public String getdDf() + { + return dDf; + } + + + public void setdRhob(String dRhob) + { + this.dRhob = dRhob; + } + + public String getdRhob() + { + return dRhob; + } + + + public void setdRhof(String dRhof) + { + this.dRhof = dRhof; + } + + public String getdRhof() + { + return dRhof; + } + + + public void setDrdIdeal(String drdIdeal) + { + this.drdIdeal = drdIdeal; + } + + public String getDrdIdeal() + { + return drdIdeal; + } + + + public void setDrdReal(String drdReal) + { + this.drdReal = drdReal; + } + + public String getDrdReal() + { + return drdReal; + } + + + public void setdHo(String dHo) + { + this.dHo = dHo; + } + + public String getdHo() + { + return dHo; + } + + + public void setDH(String dH) + { + this.dH = dH; + } + + public String getDH() + { + return dH; + } + + + public void setDS(String dS) + { + this.dS = dS; + } + + public String getDS() + { + return dS; + } + + + public void setdCpi(String dCpi) + { + this.dCpi = dCpi; + } + + public String getdCpi() + { + return dCpi; + } + + + public void setdCp(String dCp) + { + this.dCp = dCp; + } + + public String getdCp() + { + return dCp; + } + + + public void setdCv(String dCv) + { + this.dCv = dCv; + } + + public String getdCv() + { + return dCv; + } + + + public void setDk(String dk) + { + this.dk = dk; + } + + public String getDk() + { + return dk; + } + + + public void setdKappa(String dKappa) + { + this.dKappa = dKappa; + } + + public String getdKappa() + { + return dKappa; + } + + + public void setdSOS(String dSOS) + { + this.dSOS = dSOS; + } + + public String getdSOS() + { + return dSOS; + } + + + public void setdCstar(String dCstar) + { + this.dCstar = dCstar; + } + + public String getdCstar() + { + return dCstar; + } + + + public void setdHhvMol(String dHhvMol) + { + this.dHhvMol = dHhvMol; + } + + public String getdHhvMol() + { + return dHhvMol; + } + + + public void setdLhvMol(String dLhvMol) + { + this.dLhvMol = dLhvMol; + } + + public String getdLhvMol() + { + return dLhvMol; + } + + + public void setdHhvv(String dHhvv) + { + this.dHhvv = dHhvv; + } + + public String getdHhvv() + { + return dHhvv; + } + + + public void setdLhvv(String dLhvv) + { + this.dLhvv = dLhvv; + } + + public String getdLhvv() + { + return dLhvv; + } + + + public void setdHhvm(String dHhvm) + { + this.dHhvm = dHhvm; + } + + public String getdHhvm() + { + return dHhvm; + } + + + public void setdLhvm(String dLhvm) + { + this.dLhvm = dLhvm; + } + + public String getdLhvm() + { + return dLhvm; + } + + + public void setdZb11062(String dZb11062) + { + this.dZb11062 = dZb11062; + } + + public String getdZb11062() + { + return dZb11062; + } + + + public void setdRhob11062(String dRhob11062) + { + this.dRhob11062 = dRhob11062; + } + + public String getdRhob11062() + { + return dRhob11062; + } + + + public void setdRhof11062(String dRhof11062) + { + this.dRhof11062 = dRhof11062; + } + + public String getdRhof11062() + { + return dRhof11062; + } + + + public void setDrdIdeal11062(String drdIdeal11062) + { + this.drdIdeal11062 = drdIdeal11062; + } + + public String getDrdIdeal11062() + { + return drdIdeal11062; + } + + + public void setDrdReal11062(String drdReal11062) + { + this.drdReal11062 = drdReal11062; + } + + public String getDrdReal11062() + { + return drdReal11062; + } + + + public void setdWobbeIndex(String dWobbeIndex) + { + this.dWobbeIndex = dWobbeIndex; + } + + public String getdWobbeIndex() + { + return dWobbeIndex; + } + + + public void setdPc(String dPc) + { + this.dPc = dPc; + } + + public String getdPc() + { + return dPc; + } + + + public void setdTC(String dTC) + { + this.dTC = dTC; + } + + public String getdTC() + { + return dTC; + } + + + public void setdBzsx(String dBzsx) + { + this.dBzsx = dBzsx; + } + + public String getdBzsx() + { + return dBzsx; + } + + + public void setdBzxx(String dBzxx) + { + this.dBzxx = dBzxx; + } + + public String getdBzxx() + { + return dBzxx; + } + + + public void setdTotalC(String dTotalC) + { + this.dTotalC = dTotalC; + } + + public String getdTotalC() + { + return dTotalC; + } + + + public void setdC2(String dC2) + { + this.dC2 = dC2; + } + + public String getdC2() + { + return dC2; + } + + + public void setdC2j(String dC2j) + { + this.dC2j = dC2j; + } + + public String getdC2j() + { + return dC2j; + } + + + public void setdC3j(String dC3j) + { + this.dC3j = dC3j; + } + + public String getdC3j() + { + return dC3j; + } + + + public void setdC4j(String dC4j) + { + this.dC4j = dC4j; + } + + public String getdC4j() + { + return dC4j; + } + + + public void setdC5j(String dC5j) + { + this.dC5j = dC5j; + } + + public String getdC5j() + { + return dC5j; + } + + + public void setdC6j(String dC6j) + { + this.dC6j = dC6j; + } + + public String getdC6j() + { + return dC6j; + } + + + public void setdC3C4(String dC3C4) + { + this.dC3C4 = dC3C4; + } + + public String getdC3C4() + { + return dC3C4; + } + + + public void setSampleno(String sampleno) + { + this.sampleno = sampleno; + } + + public String getSampleno() + { + return sampleno; + } + + + public void setMeterno(String meterno) + { + this.meterno = meterno; + } + + public String getMeterno() + { + return meterno; + } + + + public void setdPfType(String dPfType) + { + this.dPfType = dPfType; + } + + public String getdPfType() + { + return dPfType; + } + + + public void setTenantId(Long tenantId) + { + this.tenantId = tenantId; + } + + public Long getTenantId() + { + return tenantId; + } + + + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("createName", getCreateName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateName", getUpdateName()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("adMixture", getAdMixture()) + .append("adMixtureV", getAdMixtureV()) + .append("adMixtureD", getAdMixtureD()) + .append("dCbtj", getdCbtj()) + .append("dPb", getdPb()) + .append("dTb", getdTb()) + .append("dPf", getdPf()) + .append("dTf", getdTf()) + .append("dMrx", getdMrx()) + .append("dZb", getdZb()) + .append("dZf", getdZf()) + .append("dFpv", getdFpv()) + .append("dDb", getdDb()) + .append("dDf", getdDf()) + .append("dRhob", getdRhob()) + .append("dRhof", getdRhof()) + .append("drdIdeal", getDrdIdeal()) + .append("drdReal", getDrdReal()) + .append("dHo", getdHo()) + .append("dH", getDH()) + .append("dS", getDS()) + .append("dCpi", getdCpi()) + .append("dCp", getdCp()) + .append("dCv", getdCv()) + .append("dk", getDk()) + .append("dKappa", getdKappa()) + .append("dSOS", getdSOS()) + .append("dCstar", getdCstar()) + .append("dHhvMol", getdHhvMol()) + .append("dLhvMol", getdLhvMol()) + .append("dHhvv", getdHhvv()) + .append("dLhvv", getdLhvv()) + .append("dHhvm", getdHhvm()) + .append("dLhvm", getdLhvm()) + .append("dZb11062", getdZb11062()) + .append("dRhob11062", getdRhob11062()) + .append("dRhof11062", getdRhof11062()) + .append("drdIdeal11062", getDrdIdeal11062()) + .append("drdReal11062", getDrdReal11062()) + .append("dWobbeIndex", getdWobbeIndex()) + .append("dPc", getdPc()) + .append("dTC", getdTC()) + .append("dBzsx", getdBzsx()) + .append("dBzxx", getdBzxx()) + .append("dTotalC", getdTotalC()) + .append("dC2", getdC2()) + .append("dC2j", getdC2j()) + .append("dC3j", getdC3j()) + .append("dC4j", getdC4j()) + .append("dC5j", getdC5j()) + .append("dC6j", getdC6j()) + .append("dC3C4", getdC3C4()) + .append("sampleno", getSampleno()) + .append("meterno", getMeterno()) + .append("dPfType", getdPfType()) + .append("tenantId", getTenantId()) + .toString(); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgComponentsMapper.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgComponentsMapper.java new file mode 100644 index 0000000..16541d9 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgComponentsMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.NgComponents; + +/** + * 天然气组分Mapper接口 + * + * @author ruoyi + * @date 2025-03-21 + */ +public interface NgComponentsMapper +{ + /** + * 查询天然气组分 + * + * @param id 天然气组分主键 + * @return 天然气组分 + */ + public NgComponents selectNgComponentsById(String id); + + /** + * 查询天然气组分列表 + * + * @param ngComponents 天然气组分 + * @return 天然气组分集合 + */ + public List selectNgComponentsList(NgComponents ngComponents); + + /** + * 新增天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + public int insertNgComponents(NgComponents ngComponents); + + /** + * 修改天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + public int updateNgComponents(NgComponents ngComponents); + + /** + * 删除天然气组分 + * + * @param id 天然气组分主键 + * @return 结果 + */ + public int deleteNgComponentsById(String id); + + /** + * 批量删除天然气组分 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgComponentsByIds(String[] ids); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgMeterparMapper.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgMeterparMapper.java new file mode 100644 index 0000000..cbd63dc --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgMeterparMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.NgMeterpar; + +/** + * 流量计参数Mapper接口 + * + * @author ruoyi + * @date 2025-03-21 + */ +public interface NgMeterparMapper +{ + /** + * 查询流量计参数 + * + * @param id 流量计参数主键 + * @return 流量计参数 + */ + public NgMeterpar selectNgMeterparById(String id); + + /** + * 查询流量计参数列表 + * + * @param ngMeterpar 流量计参数 + * @return 流量计参数集合 + */ + public List selectNgMeterparList(NgMeterpar ngMeterpar); + + /** + * 新增流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + public int insertNgMeterpar(NgMeterpar ngMeterpar); + + /** + * 修改流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + public int updateNgMeterpar(NgMeterpar ngMeterpar); + + /** + * 删除流量计参数 + * + * @param id 流量计参数主键 + * @return 结果 + */ + public int deleteNgMeterparById(String id); + + /** + * 批量删除流量计参数 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgMeterparByIds(String[] ids); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgMeterresultMapper.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgMeterresultMapper.java new file mode 100644 index 0000000..cae4745 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgMeterresultMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.NgMeterresult; + +/** + * 流量计算结果Mapper接口 + * + * @author ruoyi + * @date 2025-03-21 + */ +public interface NgMeterresultMapper +{ + /** + * 查询流量计算结果 + * + * @param id 流量计算结果主键 + * @return 流量计算结果 + */ + public NgMeterresult selectNgMeterresultById(String id); + + /** + * 查询流量计算结果列表 + * + * @param ngMeterresult 流量计算结果 + * @return 流量计算结果集合 + */ + public List selectNgMeterresultList(NgMeterresult ngMeterresult); + + /** + * 新增流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + public int insertNgMeterresult(NgMeterresult ngMeterresult); + + /** + * 修改流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + public int updateNgMeterresult(NgMeterresult ngMeterresult); + + /** + * 删除流量计算结果 + * + * @param id 流量计算结果主键 + * @return 结果 + */ + public int deleteNgMeterresultById(String id); + + /** + * 批量删除流量计算结果 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgMeterresultByIds(String[] ids); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgNgparMapper.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgNgparMapper.java new file mode 100644 index 0000000..483c6d0 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/mapper/NgNgparMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.NgNgpar; + +/** + * 天然气物性参数Mapper接口 + * + * @author ruoyi + * @date 2025-03-21 + */ +public interface NgNgparMapper +{ + /** + * 查询天然气物性参数 + * + * @param id 天然气物性参数主键 + * @return 天然气物性参数 + */ + public NgNgpar selectNgNgparById(String id); + + /** + * 查询天然气物性参数列表 + * + * @param ngNgpar 天然气物性参数 + * @return 天然气物性参数集合 + */ + public List selectNgNgparList(NgNgpar ngNgpar); + + /** + * 新增天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + public int insertNgNgpar(NgNgpar ngNgpar); + + /** + * 修改天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + public int updateNgNgpar(NgNgpar ngNgpar); + + /** + * 删除天然气物性参数 + * + * @param id 天然气物性参数主键 + * @return 结果 + */ + public int deleteNgNgparById(String id); + + /** + * 批量删除天然气物性参数 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgNgparByIds(String[] ids); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgComponentsService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgComponentsService.java new file mode 100644 index 0000000..7b82277 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgComponentsService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.NgComponents; + +/** + * 天然气组分Service接口 + * + * @author ruoyi + * @date 2025-03-21 + */ +public interface INgComponentsService +{ + /** + * 查询天然气组分 + * + * @param id 天然气组分主键 + * @return 天然气组分 + */ + public NgComponents selectNgComponentsById(String id); + + /** + * 查询天然气组分列表 + * + * @param ngComponents 天然气组分 + * @return 天然气组分集合 + */ + public List selectNgComponentsList(NgComponents ngComponents); + + /** + * 新增天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + public int insertNgComponents(NgComponents ngComponents); + + /** + * 修改天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + public int updateNgComponents(NgComponents ngComponents); + + /** + * 批量删除天然气组分 + * + * @param ids 需要删除的天然气组分主键集合 + * @return 结果 + */ + public int deleteNgComponentsByIds(String[] ids); + + /** + * 删除天然气组分信息 + * + * @param id 天然气组分主键 + * @return 结果 + */ + public int deleteNgComponentsById(String id); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgMeterparService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgMeterparService.java new file mode 100644 index 0000000..73697bc --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgMeterparService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.NgMeterpar; + +/** + * 流量计参数Service接口 + * + * @author ruoyi + * @date 2025-03-21 + */ +public interface INgMeterparService +{ + /** + * 查询流量计参数 + * + * @param id 流量计参数主键 + * @return 流量计参数 + */ + public NgMeterpar selectNgMeterparById(String id); + + /** + * 查询流量计参数列表 + * + * @param ngMeterpar 流量计参数 + * @return 流量计参数集合 + */ + public List selectNgMeterparList(NgMeterpar ngMeterpar); + + /** + * 新增流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + public int insertNgMeterpar(NgMeterpar ngMeterpar); + + /** + * 修改流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + public int updateNgMeterpar(NgMeterpar ngMeterpar); + + /** + * 批量删除流量计参数 + * + * @param ids 需要删除的流量计参数主键集合 + * @return 结果 + */ + public int deleteNgMeterparByIds(String[] ids); + + /** + * 删除流量计参数信息 + * + * @param id 流量计参数主键 + * @return 结果 + */ + public int deleteNgMeterparById(String id); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgMeterresultService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgMeterresultService.java new file mode 100644 index 0000000..5bfc212 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgMeterresultService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.NgMeterresult; + +/** + * 流量计算结果Service接口 + * + * @author ruoyi + * @date 2025-03-21 + */ +public interface INgMeterresultService +{ + /** + * 查询流量计算结果 + * + * @param id 流量计算结果主键 + * @return 流量计算结果 + */ + public NgMeterresult selectNgMeterresultById(String id); + + /** + * 查询流量计算结果列表 + * + * @param ngMeterresult 流量计算结果 + * @return 流量计算结果集合 + */ + public List selectNgMeterresultList(NgMeterresult ngMeterresult); + + /** + * 新增流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + public int insertNgMeterresult(NgMeterresult ngMeterresult); + + /** + * 修改流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + public int updateNgMeterresult(NgMeterresult ngMeterresult); + + /** + * 批量删除流量计算结果 + * + * @param ids 需要删除的流量计算结果主键集合 + * @return 结果 + */ + public int deleteNgMeterresultByIds(String[] ids); + + /** + * 删除流量计算结果信息 + * + * @param id 流量计算结果主键 + * @return 结果 + */ + public int deleteNgMeterresultById(String id); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgNgparService.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgNgparService.java new file mode 100644 index 0000000..65188b9 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/INgNgparService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.NgNgpar; + +/** + * 天然气物性参数Service接口 + * + * @author ruoyi + * @date 2025-03-21 + */ +public interface INgNgparService +{ + /** + * 查询天然气物性参数 + * + * @param id 天然气物性参数主键 + * @return 天然气物性参数 + */ + public NgNgpar selectNgNgparById(String id); + + /** + * 查询天然气物性参数列表 + * + * @param ngNgpar 天然气物性参数 + * @return 天然气物性参数集合 + */ + public List selectNgNgparList(NgNgpar ngNgpar); + + /** + * 新增天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + public int insertNgNgpar(NgNgpar ngNgpar); + + /** + * 修改天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + public int updateNgNgpar(NgNgpar ngNgpar); + + /** + * 批量删除天然气物性参数 + * + * @param ids 需要删除的天然气物性参数主键集合 + * @return 结果 + */ + public int deleteNgNgparByIds(String[] ids); + + /** + * 删除天然气物性参数信息 + * + * @param id 天然气物性参数主键 + * @return 结果 + */ + public int deleteNgNgparById(String id); +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgComponentsServiceImpl.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgComponentsServiceImpl.java new file mode 100644 index 0000000..b1cd4e3 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgComponentsServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.NgComponentsMapper; +import com.ruoyi.system.domain.NgComponents; +import com.ruoyi.system.service.INgComponentsService; + +/** + * 天然气组分Service业务层处理 + * + * @author ruoyi + * @date 2025-03-21 + */ +@Service +public class NgComponentsServiceImpl implements INgComponentsService +{ + @Autowired + private NgComponentsMapper ngComponentsMapper; + + /** + * 查询天然气组分 + * + * @param id 天然气组分主键 + * @return 天然气组分 + */ + @Override + public NgComponents selectNgComponentsById(String id) + { + return ngComponentsMapper.selectNgComponentsById(id); + } + + /** + * 查询天然气组分列表 + * + * @param ngComponents 天然气组分 + * @return 天然气组分 + */ + @Override + public List selectNgComponentsList(NgComponents ngComponents) + { + return ngComponentsMapper.selectNgComponentsList(ngComponents); + } + + /** + * 新增天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + @Override + public int insertNgComponents(NgComponents ngComponents) + { + ngComponents.setCreateTime(DateUtils.getNowDate()); + return ngComponentsMapper.insertNgComponents(ngComponents); + } + + /** + * 修改天然气组分 + * + * @param ngComponents 天然气组分 + * @return 结果 + */ + @Override + public int updateNgComponents(NgComponents ngComponents) + { + ngComponents.setUpdateTime(DateUtils.getNowDate()); + return ngComponentsMapper.updateNgComponents(ngComponents); + } + + /** + * 批量删除天然气组分 + * + * @param ids 需要删除的天然气组分主键 + * @return 结果 + */ + @Override + public int deleteNgComponentsByIds(String[] ids) + { + return ngComponentsMapper.deleteNgComponentsByIds(ids); + } + + /** + * 删除天然气组分信息 + * + * @param id 天然气组分主键 + * @return 结果 + */ + @Override + public int deleteNgComponentsById(String id) + { + return ngComponentsMapper.deleteNgComponentsById(id); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgMeterparServiceImpl.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgMeterparServiceImpl.java new file mode 100644 index 0000000..d290091 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgMeterparServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.NgMeterparMapper; +import com.ruoyi.system.domain.NgMeterpar; +import com.ruoyi.system.service.INgMeterparService; + +/** + * 流量计参数Service业务层处理 + * + * @author ruoyi + * @date 2025-03-21 + */ +@Service +public class NgMeterparServiceImpl implements INgMeterparService +{ + @Autowired + private NgMeterparMapper ngMeterparMapper; + + /** + * 查询流量计参数 + * + * @param id 流量计参数主键 + * @return 流量计参数 + */ + @Override + public NgMeterpar selectNgMeterparById(String id) + { + return ngMeterparMapper.selectNgMeterparById(id); + } + + /** + * 查询流量计参数列表 + * + * @param ngMeterpar 流量计参数 + * @return 流量计参数 + */ + @Override + public List selectNgMeterparList(NgMeterpar ngMeterpar) + { + return ngMeterparMapper.selectNgMeterparList(ngMeterpar); + } + + /** + * 新增流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + @Override + public int insertNgMeterpar(NgMeterpar ngMeterpar) + { + ngMeterpar.setCreateTime(DateUtils.getNowDate()); + return ngMeterparMapper.insertNgMeterpar(ngMeterpar); + } + + /** + * 修改流量计参数 + * + * @param ngMeterpar 流量计参数 + * @return 结果 + */ + @Override + public int updateNgMeterpar(NgMeterpar ngMeterpar) + { + ngMeterpar.setUpdateTime(DateUtils.getNowDate()); + return ngMeterparMapper.updateNgMeterpar(ngMeterpar); + } + + /** + * 批量删除流量计参数 + * + * @param ids 需要删除的流量计参数主键 + * @return 结果 + */ + @Override + public int deleteNgMeterparByIds(String[] ids) + { + return ngMeterparMapper.deleteNgMeterparByIds(ids); + } + + /** + * 删除流量计参数信息 + * + * @param id 流量计参数主键 + * @return 结果 + */ + @Override + public int deleteNgMeterparById(String id) + { + return ngMeterparMapper.deleteNgMeterparById(id); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgMeterresultServiceImpl.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgMeterresultServiceImpl.java new file mode 100644 index 0000000..b9769e0 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgMeterresultServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.NgMeterresultMapper; +import com.ruoyi.system.domain.NgMeterresult; +import com.ruoyi.system.service.INgMeterresultService; + +/** + * 流量计算结果Service业务层处理 + * + * @author ruoyi + * @date 2025-03-21 + */ +@Service +public class NgMeterresultServiceImpl implements INgMeterresultService +{ + @Autowired + private NgMeterresultMapper ngMeterresultMapper; + + /** + * 查询流量计算结果 + * + * @param id 流量计算结果主键 + * @return 流量计算结果 + */ + @Override + public NgMeterresult selectNgMeterresultById(String id) + { + return ngMeterresultMapper.selectNgMeterresultById(id); + } + + /** + * 查询流量计算结果列表 + * + * @param ngMeterresult 流量计算结果 + * @return 流量计算结果 + */ + @Override + public List selectNgMeterresultList(NgMeterresult ngMeterresult) + { + return ngMeterresultMapper.selectNgMeterresultList(ngMeterresult); + } + + /** + * 新增流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + @Override + public int insertNgMeterresult(NgMeterresult ngMeterresult) + { + ngMeterresult.setCreateTime(DateUtils.getNowDate()); + return ngMeterresultMapper.insertNgMeterresult(ngMeterresult); + } + + /** + * 修改流量计算结果 + * + * @param ngMeterresult 流量计算结果 + * @return 结果 + */ + @Override + public int updateNgMeterresult(NgMeterresult ngMeterresult) + { + ngMeterresult.setUpdateTime(DateUtils.getNowDate()); + return ngMeterresultMapper.updateNgMeterresult(ngMeterresult); + } + + /** + * 批量删除流量计算结果 + * + * @param ids 需要删除的流量计算结果主键 + * @return 结果 + */ + @Override + public int deleteNgMeterresultByIds(String[] ids) + { + return ngMeterresultMapper.deleteNgMeterresultByIds(ids); + } + + /** + * 删除流量计算结果信息 + * + * @param id 流量计算结果主键 + * @return 结果 + */ + @Override + public int deleteNgMeterresultById(String id) + { + return ngMeterresultMapper.deleteNgMeterresultById(id); + } +} diff --git a/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgNgparServiceImpl.java b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgNgparServiceImpl.java new file mode 100644 index 0000000..4a3a9d1 --- /dev/null +++ b/ruoyi-ngtools/src/main/java/com/ruoyi/system/service/impl/NgNgparServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.NgNgparMapper; +import com.ruoyi.system.domain.NgNgpar; +import com.ruoyi.system.service.INgNgparService; + +/** + * 天然气物性参数Service业务层处理 + * + * @author ruoyi + * @date 2025-03-21 + */ +@Service +public class NgNgparServiceImpl implements INgNgparService +{ + @Autowired + private NgNgparMapper ngNgparMapper; + + /** + * 查询天然气物性参数 + * + * @param id 天然气物性参数主键 + * @return 天然气物性参数 + */ + @Override + public NgNgpar selectNgNgparById(String id) + { + return ngNgparMapper.selectNgNgparById(id); + } + + /** + * 查询天然气物性参数列表 + * + * @param ngNgpar 天然气物性参数 + * @return 天然气物性参数 + */ + @Override + public List selectNgNgparList(NgNgpar ngNgpar) + { + return ngNgparMapper.selectNgNgparList(ngNgpar); + } + + /** + * 新增天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + @Override + public int insertNgNgpar(NgNgpar ngNgpar) + { + ngNgpar.setCreateTime(DateUtils.getNowDate()); + return ngNgparMapper.insertNgNgpar(ngNgpar); + } + + /** + * 修改天然气物性参数 + * + * @param ngNgpar 天然气物性参数 + * @return 结果 + */ + @Override + public int updateNgNgpar(NgNgpar ngNgpar) + { + ngNgpar.setUpdateTime(DateUtils.getNowDate()); + return ngNgparMapper.updateNgNgpar(ngNgpar); + } + + /** + * 批量删除天然气物性参数 + * + * @param ids 需要删除的天然气物性参数主键 + * @return 结果 + */ + @Override + public int deleteNgNgparByIds(String[] ids) + { + return ngNgparMapper.deleteNgNgparByIds(ids); + } + + /** + * 删除天然气物性参数信息 + * + * @param id 天然气物性参数主键 + * @return 结果 + */ + @Override + public int deleteNgNgparById(String id) + { + return ngNgparMapper.deleteNgNgparById(id); + } +} diff --git a/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgComponentsMapper.xml b/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgComponentsMapper.xml new file mode 100644 index 0000000..e5aa246 --- /dev/null +++ b/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgComponentsMapper.xml @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, create_name, create_by, create_time, update_name, update_by, update_time, NG_C1, NG_N2, NG_CO2, NG_C2, NG_C3, NG_H2O, NG_H2S, NG_H2, NG_CO, NG_O2, NG_iC4, NG_nC4, NG_iC5, NG_nC5, NG_C6, NG_C7, NG_C8, NG_C9, NG_C10, NG_He, NG_Ar, sum, sampleno, meterno, cyzf from ng_components + + + + + + + + insert into ng_components + + id, + create_name, + create_by, + create_time, + update_name, + update_by, + update_time, + NG_C1, + NG_N2, + NG_CO2, + NG_C2, + NG_C3, + NG_H2O, + NG_H2S, + NG_H2, + NG_CO, + NG_O2, + NG_iC4, + NG_nC4, + NG_iC5, + NG_nC5, + NG_C6, + NG_C7, + NG_C8, + NG_C9, + NG_C10, + NG_He, + NG_Ar, + sum, + sampleno, + meterno, + cyzf, + + + #{id}, + #{createName}, + #{createBy}, + #{createTime}, + #{updateName}, + #{updateBy}, + #{updateTime}, + #{ngC1}, + #{ngN2}, + #{ngCo2}, + #{ngC2}, + #{ngC3}, + #{ngH2o}, + #{ngH2s}, + #{ngH2}, + #{ngCo}, + #{ngO2}, + #{ngIc4}, + #{ngNc4}, + #{ngIc5}, + #{ngNc5}, + #{ngC6}, + #{ngC7}, + #{ngC8}, + #{ngC9}, + #{ngC10}, + #{ngHe}, + #{ngAr}, + #{sum}, + #{sampleno}, + #{meterno}, + #{cyzf}, + + + + + update ng_components + + create_name = #{createName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_name = #{updateName}, + update_by = #{updateBy}, + update_time = #{updateTime}, + NG_C1 = #{ngC1}, + NG_N2 = #{ngN2}, + NG_CO2 = #{ngCo2}, + NG_C2 = #{ngC2}, + NG_C3 = #{ngC3}, + NG_H2O = #{ngH2o}, + NG_H2S = #{ngH2s}, + NG_H2 = #{ngH2}, + NG_CO = #{ngCo}, + NG_O2 = #{ngO2}, + NG_iC4 = #{ngIc4}, + NG_nC4 = #{ngNc4}, + NG_iC5 = #{ngIc5}, + NG_nC5 = #{ngNc5}, + NG_C6 = #{ngC6}, + NG_C7 = #{ngC7}, + NG_C8 = #{ngC8}, + NG_C9 = #{ngC9}, + NG_C10 = #{ngC10}, + NG_He = #{ngHe}, + NG_Ar = #{ngAr}, + sum = #{sum}, + sampleno = #{sampleno}, + meterno = #{meterno}, + cyzf = #{cyzf}, + + where id = #{id} + + + + delete from ng_components where id = #{id} + + + + delete from ng_components where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgMeterparMapper.xml b/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgMeterparMapper.xml new file mode 100644 index 0000000..af4827e --- /dev/null +++ b/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgMeterparMapper.xml @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, create_name, create_by, create_time, update_name, update_by, update_time, dFlowCalbz, dZcalbz, dCbtj, dPb_M, dTb_M, dPb_E, dTb_E, dPatm, dPatmUnit, dNG_Compents, dMeterType, dCoreType, dPtmode, dPipeType, dPipeD, dLenUnit, dPipeDtemp, dPileDtempU, dPipeMaterial, dOrificeD, dOrificeUnit, dOrificeDtemp, dOrificeDtempUnit, dOrificeMaterial, dOrificeSharpness, dOrificeRk, dOrificeRkLenU, dPf, dPfUnit, dPfType, dTf, dTfUnit, dDp, dDpUnit, dVFlowUnit, dMFlowUnit, dEFlowUnit, dCd, dCdCalMethod, dMeterFactor, dPulseNum, dVFlowMax, dVFlowMin, dVFlowCon, dPfRangeMin, dPfRangeMax, dDpRangeMin, dDpRangeMax, dTfRangeMin, dTfRangeMax, dVGsc, sampleno, meterno from ng_meterpar + + + + + + + + insert into ng_meterpar + + id, + create_name, + create_by, + create_time, + update_name, + update_by, + update_time, + dFlowCalbz, + dZcalbz, + dCbtj, + dPb_M, + dTb_M, + dPb_E, + dTb_E, + dPatm, + dPatmUnit, + dNG_Compents, + dMeterType, + dCoreType, + dPtmode, + dPipeType, + dPipeD, + dLenUnit, + dPipeDtemp, + dPileDtempU, + dPipeMaterial, + dOrificeD, + dOrificeUnit, + dOrificeDtemp, + dOrificeDtempUnit, + dOrificeMaterial, + dOrificeSharpness, + dOrificeRk, + dOrificeRkLenU, + dPf, + dPfUnit, + dPfType, + dTf, + dTfUnit, + dDp, + dDpUnit, + dVFlowUnit, + dMFlowUnit, + dEFlowUnit, + dCd, + dCdCalMethod, + dMeterFactor, + dPulseNum, + dVFlowMax, + dVFlowMin, + dVFlowCon, + dPfRangeMin, + dPfRangeMax, + dDpRangeMin, + dDpRangeMax, + dTfRangeMin, + dTfRangeMax, + dVGsc, + sampleno, + meterno, + + + #{id}, + #{createName}, + #{createBy}, + #{createTime}, + #{updateName}, + #{updateBy}, + #{updateTime}, + #{dFlowCalbz}, + #{dZcalbz}, + #{dCbtj}, + #{dpbM}, + #{dtbM}, + #{dpbE}, + #{dtbE}, + #{dPatm}, + #{dPatmUnit}, + #{dngCompents}, + #{dMeterType}, + #{dCoreType}, + #{dPtmode}, + #{dPipeType}, + #{dPipeD}, + #{dLenUnit}, + #{dPipeDtemp}, + #{dPileDtempU}, + #{dPipeMaterial}, + #{dOrificeD}, + #{dOrificeUnit}, + #{dOrificeDtemp}, + #{dOrificeDtempUnit}, + #{dOrificeMaterial}, + #{dOrificeSharpness}, + #{dOrificeRk}, + #{dOrificeRkLenU}, + #{dPf}, + #{dPfUnit}, + #{dPfType}, + #{dTf}, + #{dTfUnit}, + #{dDp}, + #{dDpUnit}, + #{dVFlowUnit}, + #{dMFlowUnit}, + #{dEFlowUnit}, + #{dCd}, + #{dCdCalMethod}, + #{dMeterFactor}, + #{dPulseNum}, + #{dVFlowMax}, + #{dVFlowMin}, + #{dVFlowCon}, + #{dPfRangeMin}, + #{dPfRangeMax}, + #{dDpRangeMin}, + #{dDpRangeMax}, + #{dTfRangeMin}, + #{dTfRangeMax}, + #{dVGsc}, + #{sampleno}, + #{meterno}, + + + + + update ng_meterpar + + create_name = #{createName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_name = #{updateName}, + update_by = #{updateBy}, + update_time = #{updateTime}, + dFlowCalbz = #{dFlowCalbz}, + dZcalbz = #{dZcalbz}, + dCbtj = #{dCbtj}, + dPb_M = #{dpbM}, + dTb_M = #{dtbM}, + dPb_E = #{dpbE}, + dTb_E = #{dtbE}, + dPatm = #{dPatm}, + dPatmUnit = #{dPatmUnit}, + dNG_Compents = #{dngCompents}, + dMeterType = #{dMeterType}, + dCoreType = #{dCoreType}, + dPtmode = #{dPtmode}, + dPipeType = #{dPipeType}, + dPipeD = #{dPipeD}, + dLenUnit = #{dLenUnit}, + dPipeDtemp = #{dPipeDtemp}, + dPileDtempU = #{dPileDtempU}, + dPipeMaterial = #{dPipeMaterial}, + dOrificeD = #{dOrificeD}, + dOrificeUnit = #{dOrificeUnit}, + dOrificeDtemp = #{dOrificeDtemp}, + dOrificeDtempUnit = #{dOrificeDtempUnit}, + dOrificeMaterial = #{dOrificeMaterial}, + dOrificeSharpness = #{dOrificeSharpness}, + dOrificeRk = #{dOrificeRk}, + dOrificeRkLenU = #{dOrificeRkLenU}, + dPf = #{dPf}, + dPfUnit = #{dPfUnit}, + dPfType = #{dPfType}, + dTf = #{dTf}, + dTfUnit = #{dTfUnit}, + dDp = #{dDp}, + dDpUnit = #{dDpUnit}, + dVFlowUnit = #{dVFlowUnit}, + dMFlowUnit = #{dMFlowUnit}, + dEFlowUnit = #{dEFlowUnit}, + dCd = #{dCd}, + dCdCalMethod = #{dCdCalMethod}, + dMeterFactor = #{dMeterFactor}, + dPulseNum = #{dPulseNum}, + dVFlowMax = #{dVFlowMax}, + dVFlowMin = #{dVFlowMin}, + dVFlowCon = #{dVFlowCon}, + dPfRangeMin = #{dPfRangeMin}, + dPfRangeMax = #{dPfRangeMax}, + dDpRangeMin = #{dDpRangeMin}, + dDpRangeMax = #{dDpRangeMax}, + dTfRangeMin = #{dTfRangeMin}, + dTfRangeMax = #{dTfRangeMax}, + dVGsc = #{dVGsc}, + sampleno = #{sampleno}, + meterno = #{meterno}, + + where id = #{id} + + + + delete from ng_meterpar where id = #{id} + + + + delete from ng_meterpar where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgMeterresultMapper.xml b/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgMeterresultMapper.xml new file mode 100644 index 0000000..7c1805d --- /dev/null +++ b/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgMeterresultMapper.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, create_name, create_by, create_time, update_name, update_by, update_time, ybbh, dE, dFG, dFT, dDViscosity, dDExpCoefficient, dRnPipe, dBk, dRoughNessPipe, dCdCorrect, dCdNozell, dVFlowb, dVFlowf, dMFlowb, dEFlowb, dVelocityFlow, dPressLost, dBeta, dKappa, sampleno, meterno from ng_meterresult + + + + + + + + insert into ng_meterresult + + id, + create_name, + create_by, + create_time, + update_name, + update_by, + update_time, + ybbh, + dE, + dFG, + dFT, + dDViscosity, + dDExpCoefficient, + dRnPipe, + dBk, + dRoughNessPipe, + dCdCorrect, + dCdNozell, + dVFlowb, + dVFlowf, + dMFlowb, + dEFlowb, + dVelocityFlow, + dPressLost, + dBeta, + dKappa, + sampleno, + meterno, + + + #{id}, + #{createName}, + #{createBy}, + #{createTime}, + #{updateName}, + #{updateBy}, + #{updateTime}, + #{ybbh}, + #{dE}, + #{dFG}, + #{dFT}, + #{dDViscosity}, + #{dDExpCoefficient}, + #{dRnPipe}, + #{dBk}, + #{dRoughNessPipe}, + #{dCdCorrect}, + #{dCdNozell}, + #{dVFlowb}, + #{dVFlowf}, + #{dMFlowb}, + #{dEFlowb}, + #{dVelocityFlow}, + #{dPressLost}, + #{dBeta}, + #{dKappa}, + #{sampleno}, + #{meterno}, + + + + + update ng_meterresult + + create_name = #{createName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_name = #{updateName}, + update_by = #{updateBy}, + update_time = #{updateTime}, + ybbh = #{ybbh}, + dE = #{dE}, + dFG = #{dFG}, + dFT = #{dFT}, + dDViscosity = #{dDViscosity}, + dDExpCoefficient = #{dDExpCoefficient}, + dRnPipe = #{dRnPipe}, + dBk = #{dBk}, + dRoughNessPipe = #{dRoughNessPipe}, + dCdCorrect = #{dCdCorrect}, + dCdNozell = #{dCdNozell}, + dVFlowb = #{dVFlowb}, + dVFlowf = #{dVFlowf}, + dMFlowb = #{dMFlowb}, + dEFlowb = #{dEFlowb}, + dVelocityFlow = #{dVelocityFlow}, + dPressLost = #{dPressLost}, + dBeta = #{dBeta}, + dKappa = #{dKappa}, + sampleno = #{sampleno}, + meterno = #{meterno}, + + where id = #{id} + + + + delete from ng_meterresult where id = #{id} + + + + delete from ng_meterresult where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgNgparMapper.xml b/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgNgparMapper.xml new file mode 100644 index 0000000..47bc1b2 --- /dev/null +++ b/ruoyi-ngtools/src/main/resources/mapper/ngtools/NgNgparMapper.xml @@ -0,0 +1,349 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, create_name, create_by, create_time, update_name, update_by, update_time, adMixture, adMixtureV, adMixtureD, dCbtj, dPb, dTb, dPf, dTf, dMrx, dZb, dZf, dFpv, dDb, dDf, dRhob, dRhof, dRD_Ideal, dRD_Real, dHo, dH, dS, dCpi, dCp, dCv, dk, dKappa, dSOS, dCstar, dHhvMol, dLhvMol, dHhvv, dLhvv, dHhvm, dLhvm, dZb11062, dRhob11062, dRhof11062, dRD_Ideal11062, dRD_Real11062, dWobbeIndex, dPc, dTC, dBzsx, dBzxx, dTotalC, dC2, dC2j, dC3j, dC4j, dC5j, dC6j, dC3C4, sampleno, meterno from ng_ngpar + + + + + + + + insert into ng_ngpar + + id, + create_name, + create_by, + create_time, + update_name, + update_by, + update_time, + adMixture, + adMixtureV, + adMixtureD, + dCbtj, + dPb, + dTb, + dPf, + dTf, + dMrx, + dZb, + dZf, + dFpv, + dDb, + dDf, + dRhob, + dRhof, + dRD_Ideal, + dRD_Real, + dHo, + dH, + dS, + dCpi, + dCp, + dCv, + dk, + dKappa, + dSOS, + dCstar, + dHhvMol, + dLhvMol, + dHhvv, + dLhvv, + dHhvm, + dLhvm, + dZb11062, + dRhob11062, + dRhof11062, + dRD_Ideal11062, + dRD_Real11062, + dWobbeIndex, + dPc, + dTC, + dBzsx, + dBzxx, + dTotalC, + dC2, + dC2j, + dC3j, + dC4j, + dC5j, + dC6j, + dC3C4, + sampleno, + meterno, + + + #{id}, + #{createName}, + #{createBy}, + #{createTime}, + #{updateName}, + #{updateBy}, + #{updateTime}, + #{adMixture}, + #{adMixtureV}, + #{adMixtureD}, + #{dCbtj}, + #{dPb}, + #{dTb}, + #{dPf}, + #{dTf}, + #{dMrx}, + #{dZb}, + #{dZf}, + #{dFpv}, + #{dDb}, + #{dDf}, + #{dRhob}, + #{dRhof}, + #{drdIdeal}, + #{drdReal}, + #{dHo}, + #{dH}, + #{dS}, + #{dCpi}, + #{dCp}, + #{dCv}, + #{dk}, + #{dKappa}, + #{dSOS}, + #{dCstar}, + #{dHhvMol}, + #{dLhvMol}, + #{dHhvv}, + #{dLhvv}, + #{dHhvm}, + #{dLhvm}, + #{dZb11062}, + #{dRhob11062}, + #{dRhof11062}, + #{drdIdeal11062}, + #{drdReal11062}, + #{dWobbeIndex}, + #{dPc}, + #{dTC}, + #{dBzsx}, + #{dBzxx}, + #{dTotalC}, + #{dC2}, + #{dC2j}, + #{dC3j}, + #{dC4j}, + #{dC5j}, + #{dC6j}, + #{dC3C4}, + #{sampleno}, + #{meterno}, + + + + + update ng_ngpar + + create_name = #{createName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_name = #{updateName}, + update_by = #{updateBy}, + update_time = #{updateTime}, + adMixture = #{adMixture}, + adMixtureV = #{adMixtureV}, + adMixtureD = #{adMixtureD}, + dCbtj = #{dCbtj}, + dPb = #{dPb}, + dTb = #{dTb}, + dPf = #{dPf}, + dTf = #{dTf}, + dMrx = #{dMrx}, + dZb = #{dZb}, + dZf = #{dZf}, + dFpv = #{dFpv}, + dDb = #{dDb}, + dDf = #{dDf}, + dRhob = #{dRhob}, + dRhof = #{dRhof}, + dRD_Ideal = #{drdIdeal}, + dRD_Real = #{drdReal}, + dHo = #{dHo}, + dH = #{dH}, + dS = #{dS}, + dCpi = #{dCpi}, + dCp = #{dCp}, + dCv = #{dCv}, + dk = #{dk}, + dKappa = #{dKappa}, + dSOS = #{dSOS}, + dCstar = #{dCstar}, + dHhvMol = #{dHhvMol}, + dLhvMol = #{dLhvMol}, + dHhvv = #{dHhvv}, + dLhvv = #{dLhvv}, + dHhvm = #{dHhvm}, + dLhvm = #{dLhvm}, + dZb11062 = #{dZb11062}, + dRhob11062 = #{dRhob11062}, + dRhof11062 = #{dRhof11062}, + dRD_Ideal11062 = #{drdIdeal11062}, + dRD_Real11062 = #{drdReal11062}, + dWobbeIndex = #{dWobbeIndex}, + dPc = #{dPc}, + dTC = #{dTC}, + dBzsx = #{dBzsx}, + dBzxx = #{dBzxx}, + dTotalC = #{dTotalC}, + dC2 = #{dC2}, + dC2j = #{dC2j}, + dC3j = #{dC3j}, + dC4j = #{dC4j}, + dC5j = #{dC5j}, + dC6j = #{dC6j}, + dC3C4 = #{dC3C4}, + sampleno = #{sampleno}, + meterno = #{meterno}, + + where id = #{id} + + + + delete from ng_ngpar where id = #{id} + + + + delete from ng_ngpar where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/resources/mapper/system/NgComponentsMapper.xml b/ruoyi-ngtools/src/main/resources/mapper/system/NgComponentsMapper.xml new file mode 100644 index 0000000..8cfcf41 --- /dev/null +++ b/ruoyi-ngtools/src/main/resources/mapper/system/NgComponentsMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + nc.id, + nc.create_name, + nc.create_by, + nc.create_time, + nc.update_name, + nc.update_by, + nc.update_time, + nc.NG_C1, + nc.NG_N2, + nc.NG_CO2, + nc.NG_C2, + nc.NG_C3, + nc.NG_H2O, + nc.NG_H2S, + nc.NG_H2, + nc.NG_CO, + nc.NG_O2, + nc.NG_iC4, + nc.NG_nC4, + nc.NG_iC5, + nc.NG_nC5, + nc.NG_C6, + nc.NG_C7, + nc.NG_C8, + nc.NG_C9, + nc.NG_C10, + nc.NG_He, + nc.NG_Ar, + nc.sum, + nc.sampleno, + nc.meterno, + nc.cyzf, + nc.tenant_id + from ng_components nc + + + + + + + + insert into ng_components + + id, + create_name, + create_by, + create_time, + update_name, + update_by, + update_time, + NG_C1, + NG_N2, + NG_CO2, + NG_C2, + NG_C3, + NG_H2O, + NG_H2S, + NG_H2, + NG_CO, + NG_O2, + NG_iC4, + NG_nC4, + NG_iC5, + NG_nC5, + NG_C6, + NG_C7, + NG_C8, + NG_C9, + NG_C10, + NG_He, + NG_Ar, + sum, + sampleno, + meterno, + cyzf, + tenant_id, + + + #{id}, + #{createName}, + #{createBy}, + #{createTime}, + #{updateName}, + #{updateBy}, + #{updateTime}, + #{ngC1}, + #{ngN2}, + #{ngCo2}, + #{ngC2}, + #{ngC3}, + #{ngH2o}, + #{ngH2s}, + #{ngH2}, + #{ngCo}, + #{ngO2}, + #{ngIc4}, + #{ngNc4}, + #{ngIc5}, + #{ngNc5}, + #{ngC6}, + #{ngC7}, + #{ngC8}, + #{ngC9}, + #{ngC10}, + #{ngHe}, + #{ngAr}, + #{sum}, + #{sampleno}, + #{meterno}, + #{cyzf}, + #{tenantId}, + + + + + update ng_components + + create_name = #{createName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_name = #{updateName}, + update_by = #{updateBy}, + update_time = #{updateTime}, + NG_C1 = #{ngC1}, + NG_N2 = #{ngN2}, + NG_CO2 = #{ngCo2}, + NG_C2 = #{ngC2}, + NG_C3 = #{ngC3}, + NG_H2O = #{ngH2o}, + NG_H2S = #{ngH2s}, + NG_H2 = #{ngH2}, + NG_CO = #{ngCo}, + NG_O2 = #{ngO2}, + NG_iC4 = #{ngIc4}, + NG_nC4 = #{ngNc4}, + NG_iC5 = #{ngIc5}, + NG_nC5 = #{ngNc5}, + NG_C6 = #{ngC6}, + NG_C7 = #{ngC7}, + NG_C8 = #{ngC8}, + NG_C9 = #{ngC9}, + NG_C10 = #{ngC10}, + NG_He = #{ngHe}, + NG_Ar = #{ngAr}, + sum = #{sum}, + sampleno = #{sampleno}, + meterno = #{meterno}, + cyzf = #{cyzf}, + tenant_id = #{tenantId}, + + where ng_components.id = #{id} + + + + delete from ng_components where id = #{id} + + + + delete from ng_components where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/resources/mapper/system/NgMeterparMapper.xml b/ruoyi-ngtools/src/main/resources/mapper/system/NgMeterparMapper.xml new file mode 100644 index 0000000..69f6090 --- /dev/null +++ b/ruoyi-ngtools/src/main/resources/mapper/system/NgMeterparMapper.xml @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + nm.id, + nm.create_name, + nm.create_by, + nm.create_time, + nm.update_name, + nm.update_by, + nm.update_time, + nm.dFlowCalbz, + nm.dZcalbz, + nm.dCbtj, + nm.dPb_M, + nm.dTb_M, + nm.dPb_E, + nm.dTb_E, + nm.dPatm, + nm.dPatmUnit, + nm.dNG_Compents, + nm.dMeterType, + nm.dCoreType, + nm.dPtmode, + nm.dPipeType, + nm.dPipeD, + nm.dLenUnit, + nm.dPipeDtemp, + nm.dPileDtempU, + nm.dPipeMaterial, + nm.dOrificeD, + nm.dOrificeUnit, + nm.dOrificeDtemp, + nm.dOrificeDtempUnit, + nm.dOrificeMaterial, + nm.dOrificeSharpness, + nm.dOrificeRk, + nm.dOrificeRkLenU, + nm.dPf, + nm.dPfUnit, + nm.dPfType, + nm.dTf, + nm.dTfUnit, + nm.dDp, + nm.dDpUnit, + nm.dVFlowUnit, + nm.dMFlowUnit, + nm.dEFlowUnit, + nm.dCd, + nm.dCdCalMethod, + nm.dMeterFactor, + nm.dPulseNum, + nm.dVFlowMax, + nm.dVFlowMin, + nm.dVFlowCon, + nm.dPfRangeMin, + nm.dPfRangeMax, + nm.dDpRangeMin, + nm.dDpRangeMax, + nm.dTfRangeMin, + nm.dTfRangeMax, + nm.dVGsc, + nm.sampleno, + nm.meterno, + nm.tenant_id + from ng_meterpar nm + + + + + + + + insert into ng_meterpar + + id, + create_name, + create_by, + create_time, + update_name, + update_by, + update_time, + dFlowCalbz, + dZcalbz, + dCbtj, + dPb_M, + dTb_M, + dPb_E, + dTb_E, + dPatm, + dPatmUnit, + dNG_Compents, + dMeterType, + dCoreType, + dPtmode, + dPipeType, + dPipeD, + dLenUnit, + dPipeDtemp, + dPileDtempU, + dPipeMaterial, + dOrificeD, + dOrificeUnit, + dOrificeDtemp, + dOrificeDtempUnit, + dOrificeMaterial, + dOrificeSharpness, + dOrificeRk, + dOrificeRkLenU, + dPf, + dPfUnit, + dPfType, + dTf, + dTfUnit, + dDp, + dDpUnit, + dVFlowUnit, + dMFlowUnit, + dEFlowUnit, + dCd, + dCdCalMethod, + dMeterFactor, + dPulseNum, + dVFlowMax, + dVFlowMin, + dVFlowCon, + dPfRangeMin, + dPfRangeMax, + dDpRangeMin, + dDpRangeMax, + dTfRangeMin, + dTfRangeMax, + dVGsc, + sampleno, + meterno, + tenant_id, + + + #{id}, + #{createName}, + #{createBy}, + #{createTime}, + #{updateName}, + #{updateBy}, + #{updateTime}, + #{dFlowCalbz}, + #{dZcalbz}, + #{dCbtj}, + #{dpbM}, + #{dtbM}, + #{dpbE}, + #{dtbE}, + #{dPatm}, + #{dPatmUnit}, + #{dngCompents}, + #{dMeterType}, + #{dCoreType}, + #{dPtmode}, + #{dPipeType}, + #{dPipeD}, + #{dLenUnit}, + #{dPipeDtemp}, + #{dPileDtempU}, + #{dPipeMaterial}, + #{dOrificeD}, + #{dOrificeUnit}, + #{dOrificeDtemp}, + #{dOrificeDtempUnit}, + #{dOrificeMaterial}, + #{dOrificeSharpness}, + #{dOrificeRk}, + #{dOrificeRkLenU}, + #{dPf}, + #{dPfUnit}, + #{dPfType}, + #{dTf}, + #{dTfUnit}, + #{dDp}, + #{dDpUnit}, + #{dVFlowUnit}, + #{dMFlowUnit}, + #{dEFlowUnit}, + #{dCd}, + #{dCdCalMethod}, + #{dMeterFactor}, + #{dPulseNum}, + #{dVFlowMax}, + #{dVFlowMin}, + #{dVFlowCon}, + #{dPfRangeMin}, + #{dPfRangeMax}, + #{dDpRangeMin}, + #{dDpRangeMax}, + #{dTfRangeMin}, + #{dTfRangeMax}, + #{dVGsc}, + #{sampleno}, + #{meterno}, + #{tenantId}, + + + + + update ng_meterpar + + create_name = #{createName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_name = #{updateName}, + update_by = #{updateBy}, + update_time = #{updateTime}, + dFlowCalbz = #{dFlowCalbz}, + dZcalbz = #{dZcalbz}, + dCbtj = #{dCbtj}, + dPb_M = #{dpbM}, + dTb_M = #{dtbM}, + dPb_E = #{dpbE}, + dTb_E = #{dtbE}, + dPatm = #{dPatm}, + dPatmUnit = #{dPatmUnit}, + dNG_Compents = #{dngCompents}, + dMeterType = #{dMeterType}, + dCoreType = #{dCoreType}, + dPtmode = #{dPtmode}, + dPipeType = #{dPipeType}, + dPipeD = #{dPipeD}, + dLenUnit = #{dLenUnit}, + dPipeDtemp = #{dPipeDtemp}, + dPileDtempU = #{dPileDtempU}, + dPipeMaterial = #{dPipeMaterial}, + dOrificeD = #{dOrificeD}, + dOrificeUnit = #{dOrificeUnit}, + dOrificeDtemp = #{dOrificeDtemp}, + dOrificeDtempUnit = #{dOrificeDtempUnit}, + dOrificeMaterial = #{dOrificeMaterial}, + dOrificeSharpness = #{dOrificeSharpness}, + dOrificeRk = #{dOrificeRk}, + dOrificeRkLenU = #{dOrificeRkLenU}, + dPf = #{dPf}, + dPfUnit = #{dPfUnit}, + dPfType = #{dPfType}, + dTf = #{dTf}, + dTfUnit = #{dTfUnit}, + dDp = #{dDp}, + dDpUnit = #{dDpUnit}, + dVFlowUnit = #{dVFlowUnit}, + dMFlowUnit = #{dMFlowUnit}, + dEFlowUnit = #{dEFlowUnit}, + dCd = #{dCd}, + dCdCalMethod = #{dCdCalMethod}, + dMeterFactor = #{dMeterFactor}, + dPulseNum = #{dPulseNum}, + dVFlowMax = #{dVFlowMax}, + dVFlowMin = #{dVFlowMin}, + dVFlowCon = #{dVFlowCon}, + dPfRangeMin = #{dPfRangeMin}, + dPfRangeMax = #{dPfRangeMax}, + dDpRangeMin = #{dDpRangeMin}, + dDpRangeMax = #{dDpRangeMax}, + dTfRangeMin = #{dTfRangeMin}, + dTfRangeMax = #{dTfRangeMax}, + dVGsc = #{dVGsc}, + sampleno = #{sampleno}, + meterno = #{meterno}, + tenant_id = #{tenantId}, + + where ng_meterpar.id = #{id} + + + + delete from ng_meterpar where id = #{id} + + + + delete from ng_meterpar where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/resources/mapper/system/NgMeterresultMapper.xml b/ruoyi-ngtools/src/main/resources/mapper/system/NgMeterresultMapper.xml new file mode 100644 index 0000000..ac5d94f --- /dev/null +++ b/ruoyi-ngtools/src/main/resources/mapper/system/NgMeterresultMapper.xml @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + nm.id, + nm.create_name, + nm.create_by, + nm.create_time, + nm.update_name, + nm.update_by, + nm.update_time, + nm.ybbh, + nm.dE, + nm.dFG, + nm.dFT, + nm.dDViscosity, + nm.dDExpCoefficient, + nm.dRnPipe, + nm.dBk, + nm.dRoughNessPipe, + nm.dCdCorrect, + nm.dCdNozell, + nm.dVFlowb, + nm.dVFlowf, + nm.dMFlowb, + nm.dEFlowb, + nm.dVelocityFlow, + nm.dPressLost, + nm.dBeta, + nm.dKappa, + nm.sampleno, + nm.meterno, + nm.tenant_id + from ng_meterresult nm + + + + + + + + insert into ng_meterresult + + id, + create_name, + create_by, + create_time, + update_name, + update_by, + update_time, + ybbh, + dE, + dFG, + dFT, + dDViscosity, + dDExpCoefficient, + dRnPipe, + dBk, + dRoughNessPipe, + dCdCorrect, + dCdNozell, + dVFlowb, + dVFlowf, + dMFlowb, + dEFlowb, + dVelocityFlow, + dPressLost, + dBeta, + dKappa, + sampleno, + meterno, + tenant_id, + + + #{id}, + #{createName}, + #{createBy}, + #{createTime}, + #{updateName}, + #{updateBy}, + #{updateTime}, + #{ybbh}, + #{dE}, + #{dFG}, + #{dFT}, + #{dDViscosity}, + #{dDExpCoefficient}, + #{dRnPipe}, + #{dBk}, + #{dRoughNessPipe}, + #{dCdCorrect}, + #{dCdNozell}, + #{dVFlowb}, + #{dVFlowf}, + #{dMFlowb}, + #{dEFlowb}, + #{dVelocityFlow}, + #{dPressLost}, + #{dBeta}, + #{dKappa}, + #{sampleno}, + #{meterno}, + #{tenantId}, + + + + + update ng_meterresult + + create_name = #{createName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_name = #{updateName}, + update_by = #{updateBy}, + update_time = #{updateTime}, + ybbh = #{ybbh}, + dE = #{dE}, + dFG = #{dFG}, + dFT = #{dFT}, + dDViscosity = #{dDViscosity}, + dDExpCoefficient = #{dDExpCoefficient}, + dRnPipe = #{dRnPipe}, + dBk = #{dBk}, + dRoughNessPipe = #{dRoughNessPipe}, + dCdCorrect = #{dCdCorrect}, + dCdNozell = #{dCdNozell}, + dVFlowb = #{dVFlowb}, + dVFlowf = #{dVFlowf}, + dMFlowb = #{dMFlowb}, + dEFlowb = #{dEFlowb}, + dVelocityFlow = #{dVelocityFlow}, + dPressLost = #{dPressLost}, + dBeta = #{dBeta}, + dKappa = #{dKappa}, + sampleno = #{sampleno}, + meterno = #{meterno}, + tenant_id = #{tenantId}, + + where ng_meterresult.id = #{id} + + + + delete from ng_meterresult where id = #{id} + + + + delete from ng_meterresult where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ngtools/src/main/resources/mapper/system/NgNgparMapper.xml b/ruoyi-ngtools/src/main/resources/mapper/system/NgNgparMapper.xml new file mode 100644 index 0000000..5647f67 --- /dev/null +++ b/ruoyi-ngtools/src/main/resources/mapper/system/NgNgparMapper.xml @@ -0,0 +1,423 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + nn.id, + nn.create_name, + nn.create_by, + nn.create_time, + nn.update_name, + nn.update_by, + nn.update_time, + nn.adMixture, + nn.adMixtureV, + nn.adMixtureD, + nn.dCbtj, + nn.dPb, + nn.dTb, + nn.dPf, + nn.dTf, + nn.dMrx, + nn.dZb, + nn.dZf, + nn.dFpv, + nn.dDb, + nn.dDf, + nn.dRhob, + nn.dRhof, + nn.dRD_Ideal, + nn.dRD_Real, + nn.dHo, + nn.dH, + nn.dS, + nn.dCpi, + nn.dCp, + nn.dCv, + nn.dk, + nn.dKappa, + nn.dSOS, + nn.dCstar, + nn.dHhvMol, + nn.dLhvMol, + nn.dHhvv, + nn.dLhvv, + nn.dHhvm, + nn.dLhvm, + nn.dZb11062, + nn.dRhob11062, + nn.dRhof11062, + nn.dRD_Ideal11062, + nn.dRD_Real11062, + nn.dWobbeIndex, + nn.dPc, + nn.dTC, + nn.dBzsx, + nn.dBzxx, + nn.dTotalC, + nn.dC2, + nn.dC2j, + nn.dC3j, + nn.dC4j, + nn.dC5j, + nn.dC6j, + nn.dC3C4, + nn.sampleno, + nn.meterno, + nn.dPfType, + nn.tenant_id + from ng_ngpar nn + + + + + + + + insert into ng_ngpar + + id, + create_name, + create_by, + create_time, + update_name, + update_by, + update_time, + adMixture, + adMixtureV, + adMixtureD, + dCbtj, + dPb, + dTb, + dPf, + dTf, + dMrx, + dZb, + dZf, + dFpv, + dDb, + dDf, + dRhob, + dRhof, + dRD_Ideal, + dRD_Real, + dHo, + dH, + dS, + dCpi, + dCp, + dCv, + dk, + dKappa, + dSOS, + dCstar, + dHhvMol, + dLhvMol, + dHhvv, + dLhvv, + dHhvm, + dLhvm, + dZb11062, + dRhob11062, + dRhof11062, + dRD_Ideal11062, + dRD_Real11062, + dWobbeIndex, + dPc, + dTC, + dBzsx, + dBzxx, + dTotalC, + dC2, + dC2j, + dC3j, + dC4j, + dC5j, + dC6j, + dC3C4, + sampleno, + meterno, + dPfType, + tenant_id, + + + #{id}, + #{createName}, + #{createBy}, + #{createTime}, + #{updateName}, + #{updateBy}, + #{updateTime}, + #{adMixture}, + #{adMixtureV}, + #{adMixtureD}, + #{dCbtj}, + #{dPb}, + #{dTb}, + #{dPf}, + #{dTf}, + #{dMrx}, + #{dZb}, + #{dZf}, + #{dFpv}, + #{dDb}, + #{dDf}, + #{dRhob}, + #{dRhof}, + #{drdIdeal}, + #{drdReal}, + #{dHo}, + #{dH}, + #{dS}, + #{dCpi}, + #{dCp}, + #{dCv}, + #{dk}, + #{dKappa}, + #{dSOS}, + #{dCstar}, + #{dHhvMol}, + #{dLhvMol}, + #{dHhvv}, + #{dLhvv}, + #{dHhvm}, + #{dLhvm}, + #{dZb11062}, + #{dRhob11062}, + #{dRhof11062}, + #{drdIdeal11062}, + #{drdReal11062}, + #{dWobbeIndex}, + #{dPc}, + #{dTC}, + #{dBzsx}, + #{dBzxx}, + #{dTotalC}, + #{dC2}, + #{dC2j}, + #{dC3j}, + #{dC4j}, + #{dC5j}, + #{dC6j}, + #{dC3C4}, + #{sampleno}, + #{meterno}, + #{dPfType}, + #{tenantId}, + + + + + update ng_ngpar + + create_name = #{createName}, + create_by = #{createBy}, + create_time = #{createTime}, + update_name = #{updateName}, + update_by = #{updateBy}, + update_time = #{updateTime}, + adMixture = #{adMixture}, + adMixtureV = #{adMixtureV}, + adMixtureD = #{adMixtureD}, + dCbtj = #{dCbtj}, + dPb = #{dPb}, + dTb = #{dTb}, + dPf = #{dPf}, + dTf = #{dTf}, + dMrx = #{dMrx}, + dZb = #{dZb}, + dZf = #{dZf}, + dFpv = #{dFpv}, + dDb = #{dDb}, + dDf = #{dDf}, + dRhob = #{dRhob}, + dRhof = #{dRhof}, + dRD_Ideal = #{drdIdeal}, + dRD_Real = #{drdReal}, + dHo = #{dHo}, + dH = #{dH}, + dS = #{dS}, + dCpi = #{dCpi}, + dCp = #{dCp}, + dCv = #{dCv}, + dk = #{dk}, + dKappa = #{dKappa}, + dSOS = #{dSOS}, + dCstar = #{dCstar}, + dHhvMol = #{dHhvMol}, + dLhvMol = #{dLhvMol}, + dHhvv = #{dHhvv}, + dLhvv = #{dLhvv}, + dHhvm = #{dHhvm}, + dLhvm = #{dLhvm}, + dZb11062 = #{dZb11062}, + dRhob11062 = #{dRhob11062}, + dRhof11062 = #{dRhof11062}, + dRD_Ideal11062 = #{drdIdeal11062}, + dRD_Real11062 = #{drdReal11062}, + dWobbeIndex = #{dWobbeIndex}, + dPc = #{dPc}, + dTC = #{dTC}, + dBzsx = #{dBzsx}, + dBzxx = #{dBzxx}, + dTotalC = #{dTotalC}, + dC2 = #{dC2}, + dC2j = #{dC2j}, + dC3j = #{dC3j}, + dC4j = #{dC4j}, + dC5j = #{dC5j}, + dC6j = #{dC6j}, + dC3C4 = #{dC3C4}, + sampleno = #{sampleno}, + meterno = #{meterno}, + dPfType = #{dPfType}, + tenant_id = #{tenantId}, + + where ng_ngpar.id = #{id} + + + + delete from ng_ngpar where id = #{id} + + + + delete from ng_ngpar where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java new file mode 100644 index 0000000..3702dc0 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUnitConvertController.java @@ -0,0 +1,113 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.SysUnitConvert; +import com.ruoyi.system.service.ISysUnitConvertService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; + +/** + * 单位转换Controller + * + * @author ruoyi + * @date 2025-03-20 + */ +@RestController +@RequestMapping("/system/SysUnitConvert") +@Tag(name = "【单位转换】管理") +public class SysUnitConvertController extends BaseController +{ + @Autowired + private ISysUnitConvertService sysUnitConvertService; + + /** + * 查询单位转换列表 + */ + @Operation(summary = "查询单位转换列表") + @PreAuthorize("@ss.hasPermi('system:SysUnitConvert:list')") + @GetMapping("/list") + public TableDataInfo list(SysUnitConvert sysUnitConvert) + { + startPage(); + List list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert); + return getDataTable(list); + } + + /** + * 导出单位转换列表 + */ + @Operation(summary = "导出单位转换列表") + @PreAuthorize("@ss.hasPermi('system:SysUnitConvert:export')") + @Log(title = "单位转换", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysUnitConvert sysUnitConvert) + { + List list = sysUnitConvertService.selectSysUnitConvertList(sysUnitConvert); + ExcelUtil util = new ExcelUtil(SysUnitConvert.class); + util.exportExcel(response, list, "单位转换数据"); + } + + /** + * 获取单位转换详细信息 + */ + @Operation(summary = "获取单位转换详细信息") + @PreAuthorize("@ss.hasPermi('system:SysUnitConvert:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysUnitConvertService.selectSysUnitConvertById(id)); + } + + /** + * 新增单位转换 + */ + @Operation(summary = "新增单位转换") + @PreAuthorize("@ss.hasPermi('system:SysUnitConvert:add')") + @Log(title = "单位转换", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysUnitConvert sysUnitConvert) + { + return toAjax(sysUnitConvertService.insertSysUnitConvert(sysUnitConvert)); + } + + /** + * 修改单位转换 + */ + @Operation(summary = "修改单位转换") + @PreAuthorize("@ss.hasPermi('system:SysUnitConvert:edit')") + @Log(title = "单位转换", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysUnitConvert sysUnitConvert) + { + return toAjax(sysUnitConvertService.updateSysUnitConvert(sysUnitConvert)); + } + + /** + * 删除单位转换 + */ + @Operation(summary = "删除单位转换") + @PreAuthorize("@ss.hasPermi('system:SysUnitConvert:remove')") + @Log(title = "单位转换", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable( name = "ids" ) Long[] ids) + { + return toAjax(sysUnitConvertService.deleteSysUnitConvertByIds(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/UnitConvert.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/UnitConvert.java new file mode 100644 index 0000000..940d532 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/UnitConvert.java @@ -0,0 +1,100 @@ +package com.ruoyi.system.controller; + +import com.ruoyi.system.domain.SysUnitConvert; +import com.ruoyi.system.service.ISysUnitConvertService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.math.BigDecimal; +import java.math.RoundingMode; + +@Component +public class UnitConvert { + + private final ISysUnitConvertService sysUnitConvertService; + + @Autowired + public UnitConvert(ISysUnitConvertService sysUnitConvertService) { + this.sysUnitConvertService = sysUnitConvertService; + } + + public double ConvertUniter(String unitType, double oldValue, int oldUnit, int newUnit) { + // 查询旧单位信息 + if ("temperature".equalsIgnoreCase(unitType)) { + return handleTemperatureConversion(BigDecimal.valueOf(oldValue), (long) oldUnit, (long) newUnit).doubleValue(); + } else { + SysUnitConvert tempUnit = new SysUnitConvert(); + tempUnit.setUnitType(unitType); + tempUnit.setUnitOrder((long) oldUnit); + + SysUnitConvert oldUnitInfo = sysUnitConvertService.selectSysUnitConvertUnitByTypeOrder(tempUnit); + if (oldUnitInfo == null) { + throw new IllegalArgumentException("旧单位 '" + oldUnit + "' 不存在或不可用"); + } + tempUnit=new SysUnitConvert();; + tempUnit.setUnitType(unitType); + tempUnit.setBaseUnit("Y"); + + SysUnitConvert baseUnitInfo = sysUnitConvertService.selectSysUnitConvertUnitByTypeOrder(tempUnit); + if (baseUnitInfo == null) { + throw new IllegalArgumentException("基准单位 不存在或不可用"); + } + tempUnit=new SysUnitConvert(); + tempUnit.setUnitType(unitType); + tempUnit.setUnitOrder((long) newUnit); + // 查询新单位信息 + SysUnitConvert newUnitInfo = sysUnitConvertService.selectSysUnitConvertUnitByTypeOrder(tempUnit); + if (newUnitInfo == null) { + throw new IllegalArgumentException("新单位 '" + newUnit + "' 不存在或不可用"); + } + + BigDecimal oldFactor = oldUnitInfo.getConversionFactor(); + BigDecimal newFactor = newUnitInfo.getConversionFactor(); + + // 检查旧单位转换因子是否为零 + if (oldFactor.compareTo(BigDecimal.ZERO) == 0) { + throw new ArithmeticException("旧单位 '" + oldUnit + "' 的转换因子为零,无法进行转换"); + } + + // 计算基准值:oldValue / oldFactor + int scale = 20; // 设置足够大的精度以避免精度丢失 + BigDecimal baseValue = BigDecimal.valueOf(oldValue).divide(oldFactor, scale, RoundingMode.HALF_UP); + + // 计算新值:baseValue * newFactor + BigDecimal newValue = baseValue.multiply(newFactor); + + // 四舍五入到合理的小数位数(例如10位) + newValue = newValue.setScale(10, RoundingMode.HALF_UP); + + return newValue.doubleValue(); + } + } + + // 温度转换方法 + public BigDecimal handleTemperatureConversion(BigDecimal oldValue, Long oldUnit, Long newUnit) { + final BigDecimal THIRTY_TWO = BigDecimal.valueOf(32); + final BigDecimal FIVE = BigDecimal.valueOf(5); + final BigDecimal NINE = BigDecimal.valueOf(9); + final BigDecimal TWO_HUNDRED_SEVENTY_THREE_POINT_ONE_FIVE = BigDecimal.valueOf(273.15); + // 使用原始值计算 + BigDecimal celsius; + if (oldUnit == 0) { + celsius = oldValue; + } else if (oldUnit == 1) { + celsius = oldValue.subtract(THIRTY_TWO).multiply(FIVE).divide(NINE, 10, RoundingMode.HALF_UP); + } else if (oldUnit == 2) { + celsius = oldValue.subtract(TWO_HUNDRED_SEVENTY_THREE_POINT_ONE_FIVE); + } else { + throw new IllegalArgumentException("无效温度单位"); + } + + if (newUnit == 0) { + return celsius; + } else if (newUnit == 1) { + return celsius.multiply(NINE).divide(FIVE, 10, RoundingMode.HALF_UP).add(THIRTY_TWO); + } else if (newUnit == 2) { + return celsius.add(TWO_HUNDRED_SEVENTY_THREE_POINT_ONE_FIVE); + } + throw new IllegalArgumentException("无效温度单位"); + } +} \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java new file mode 100644 index 0000000..b106518 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUnitConvert.java @@ -0,0 +1,162 @@ +package com.ruoyi.system.domain; + +import java.math.BigDecimal; +import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 单位转换对象 sys_unit_convert + * + * @author ruoyi + * @date 2025-03-20 + */ +@Schema(description = "单位转换对象") +public class SysUnitConvert extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + + /** $column.columnComment */ + @Schema(title = "$column.columnComment") + private Long id; + + /** 单位类型 */ + @Schema(title = "单位类型") + @Excel(name = "单位类型") + private String unitType; + + /** 单位名称 */ + @Schema(title = "单位名称") + @Excel(name = "单位名称") + private String unitName; + + /** 是否基准 */ + @Schema(title = "是否基准") + @Excel(name = "是否基准") + private String baseUnit; + + /** 换算因子 */ + @Schema(title = "换算因子") + @Excel(name = "换算因子") + private BigDecimal conversionFactor; + + /** 类型名称 */ + @Schema(title = "类型名称") + @Excel(name = "类型名称") + private String unitTypeName; + + /** 状态 */ + @Schema(title = "状态") + @Excel(name = "状态") + private String status; + + /** 单位序号 */ + @Schema(title = "单位序号") + @Excel(name = "单位序号") + private Long unitOrder; + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + + public void setUnitType(String unitType) + { + this.unitType = unitType; + } + + public String getUnitType() + { + return unitType; + } + + + public void setUnitName(String unitName) + { + this.unitName = unitName; + } + + public String getUnitName() + { + return unitName; + } + + + public void setBaseUnit(String baseUnit) + { + this.baseUnit = baseUnit; + } + + public String getBaseUnit() + { + return baseUnit; + } + + + public void setConversionFactor(BigDecimal conversionFactor) + { + this.conversionFactor = conversionFactor; + } + + public BigDecimal getConversionFactor() + { + return conversionFactor; + } + + + public void setUnitTypeName(String unitTypeName) + { + this.unitTypeName = unitTypeName; + } + + public String getUnitTypeName() + { + return unitTypeName; + } + + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + + public void setUnitOrder(Long unitOrder) + { + this.unitOrder = unitOrder; + } + + public Long getUnitOrder() + { + return unitOrder; + } + + + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("unitType", getUnitType()) + .append("unitName", getUnitName()) + .append("baseUnit", getBaseUnit()) + .append("conversionFactor", getConversionFactor()) + .append("unitTypeName", getUnitTypeName()) + .append("status", getStatus()) + .append("unitOrder", getUnitOrder()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java new file mode 100644 index 0000000..362cc27 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUnitConvertMapper.java @@ -0,0 +1,74 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.SysUnitConvert; + +/** + * 单位转换Mapper接口 + * + * @author ruoyi + * @date 2025-03-20 + */ +public interface SysUnitConvertMapper +{ + /** + * 查询单位转换 + * + * @param id 单位转换主键 + * @return 单位转换 + */ + public SysUnitConvert selectSysUnitConvertById(Long id); + + /** + * 查询单位转换列表 + * + * @param sysUnitConvert 单位转换 + * @return 单位转换集合 + */ + public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert); + + /** + * 新增单位转换 + * + * @param sysUnitConvert 单位转换 + * @return 结果 + */ + public int insertSysUnitConvert(SysUnitConvert sysUnitConvert); + + /** + * 修改单位转换 + * + * @param sysUnitConvert 单位转换 + * @return 结果 + */ + public int updateSysUnitConvert(SysUnitConvert sysUnitConvert); + + /** + * 删除单位转换 + * + * @param id 单位转换主键 + * @return 结果 + */ + public int deleteSysUnitConvertById(Long id); + + /** + * 批量删除单位转换 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysUnitConvertByIds(Long[] ids); + + /** + * 查询单位换算 + * + * @param sysUnitConvert 需要删除的数据主键集合 + * @return 结果 + */ + public SysUnitConvert selectSysUnitConvertUnitByTypeOrder(SysUnitConvert sysUnitConvert); + + + + + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java new file mode 100644 index 0000000..5fc491e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUnitConvertService.java @@ -0,0 +1,68 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.SysUnitConvert; + +/** + * 单位转换Service接口 + * + * @author ruoyi + * @date 2025-03-20 + */ +public interface ISysUnitConvertService +{ + /** + * 查询单位转换 + * + * @param id 单位转换主键 + * @return 单位转换 + */ + public SysUnitConvert selectSysUnitConvertById(Long id); + + /** + * 查询单位转换列表 + * + * @param sysUnitConvert 单位转换 + * @return 单位转换集合 + */ + public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert); + /** + * 查询单位 + * + * @param sysUnitConvert 单位换算 + * @return 单位换算集合 + */ + public SysUnitConvert selectSysUnitConvertUnitByTypeOrder(SysUnitConvert sysUnitConvert); + + /** + * 新增单位转换 + * + * @param sysUnitConvert 单位转换 + * @return 结果 + */ + public int insertSysUnitConvert(SysUnitConvert sysUnitConvert); + + /** + * 修改单位转换 + * + * @param sysUnitConvert 单位转换 + * @return 结果 + */ + public int updateSysUnitConvert(SysUnitConvert sysUnitConvert); + + /** + * 批量删除单位转换 + * + * @param ids 需要删除的单位转换主键集合 + * @return 结果 + */ + public int deleteSysUnitConvertByIds(Long[] ids); + + /** + * 删除单位转换信息 + * + * @param id 单位转换主键 + * @return 结果 + */ + public int deleteSysUnitConvertById(Long id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java new file mode 100644 index 0000000..7317f80 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUnitConvertServiceImpl.java @@ -0,0 +1,105 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.SysUnitConvertMapper; +import com.ruoyi.system.domain.SysUnitConvert; +import com.ruoyi.system.service.ISysUnitConvertService; + +/** + * 单位转换Service业务层处理 + * + * @author ruoyi + * @date 2025-03-20 + */ +@Service +public class SysUnitConvertServiceImpl implements ISysUnitConvertService +{ + @Autowired + private SysUnitConvertMapper sysUnitConvertMapper; + + /** + * 查询单位转换 + * + * @param id 单位转换主键 + * @return 单位转换 + */ + @Override + public SysUnitConvert selectSysUnitConvertById(Long id) + { + return sysUnitConvertMapper.selectSysUnitConvertById(id); + } + + /** + * 查询单位转换列表 + * + * @param sysUnitConvert 单位转换 + * @return 单位转换 + */ + @Override + public List selectSysUnitConvertList(SysUnitConvert sysUnitConvert) + { + return sysUnitConvertMapper.selectSysUnitConvertList(sysUnitConvert); + } + + /** + * 查询单位换算 + * + * @param sysUnitConvert 单位换算 + * @return 单位换算 + */ + + @Override + public SysUnitConvert selectSysUnitConvertUnitByTypeOrder(SysUnitConvert sysUnitConvert) { + return sysUnitConvertMapper.selectSysUnitConvertUnitByTypeOrder(sysUnitConvert); + } + + /** + * 新增单位转换 + * + * @param sysUnitConvert 单位转换 + * @return 结果 + */ + @Override + public int insertSysUnitConvert(SysUnitConvert sysUnitConvert) + { + return sysUnitConvertMapper.insertSysUnitConvert(sysUnitConvert); + } + + /** + * 修改单位转换 + * + * @param sysUnitConvert 单位转换 + * @return 结果 + */ + @Override + public int updateSysUnitConvert(SysUnitConvert sysUnitConvert) + { + return sysUnitConvertMapper.updateSysUnitConvert(sysUnitConvert); + } + + /** + * 批量删除单位转换 + * + * @param ids 需要删除的单位转换主键 + * @return 结果 + */ + @Override + public int deleteSysUnitConvertByIds(Long[] ids) + { + return sysUnitConvertMapper.deleteSysUnitConvertByIds(ids); + } + + /** + * 删除单位转换信息 + * + * @param id 单位转换主键 + * @return 结果 + */ + @Override + public int deleteSysUnitConvertById(Long id) + { + return sysUnitConvertMapper.deleteSysUnitConvertById(id); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUnitConvertMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUnitConvertMapper.xml new file mode 100644 index 0000000..25d3cfd --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/SysUnitConvertMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + select + suc.id, + suc.unit_type, + suc.unit_name, + suc.base_unit, + suc.conversion_factor, + suc.unit_type_name, + suc.status, + suc.unit_order + from sys_unit_convert suc + + + + + + + + insert into sys_unit_convert + + unit_type, + unit_name, + base_unit, + conversion_factor, + unit_type_name, + status, + unit_order, + + + #{unitType}, + #{unitName}, + #{baseUnit}, + #{conversionFactor}, + #{unitTypeName}, + #{status}, + #{unitOrder}, + + + + + update sys_unit_convert + + unit_type = #{unitType}, + unit_name = #{unitName}, + base_unit = #{baseUnit}, + conversion_factor = #{conversionFactor}, + unit_type_name = #{unitTypeName}, + status = #{status}, + unit_order = #{unitOrder}, + + where sys_unit_convert.id = #{id} + + + + delete from sys_unit_convert where id = #{id} + + + + delete from sys_unit_convert where id in + + #{id} + + + \ No newline at end of file diff --git a/sql/SysUnitConvertMenu.sql b/sql/SysUnitConvertMenu.sql new file mode 100644 index 0000000..e5a630b --- /dev/null +++ b/sql/SysUnitConvertMenu.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('单位转换', '3', '1', 'SysUnitConvert', 'system/SysUnitConvert/index', 1, 0, 'C', '0', '0', 'system:SysUnitConvert:list', '#', 'admin', sysdate(), '', null, '单位转换菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('单位转换查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:SysUnitConvert:query', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('单位转换新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:SysUnitConvert:add', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('单位转换修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:SysUnitConvert:edit', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('单位转换删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:SysUnitConvert:remove', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('单位转换导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:SysUnitConvert:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file diff --git a/sql/componentsMenu.sql b/sql/componentsMenu.sql new file mode 100644 index 0000000..8fbc026 --- /dev/null +++ b/sql/componentsMenu.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气组分', '2053', '1', 'components', 'system/components/index', 1, 0, 'C', '0', '0', 'system:components:list', '#', 'admin', sysdate(), '', null, '天然气组分菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气组分查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:components:query', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气组分新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:components:add', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气组分修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:components:edit', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气组分删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:components:remove', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气组分导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:components:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file diff --git a/sql/meterparMenu.sql b/sql/meterparMenu.sql new file mode 100644 index 0000000..f8f607b --- /dev/null +++ b/sql/meterparMenu.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计参数', '2053', '1', 'meterpar', 'system/meterpar/index', 1, 0, 'C', '0', '0', 'system:meterpar:list', '#', 'admin', sysdate(), '', null, '流量计参数菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计参数查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:meterpar:query', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计参数新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:meterpar:add', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计参数修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:meterpar:edit', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计参数删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:meterpar:remove', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计参数导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:meterpar:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file diff --git a/sql/meterresultMenu.sql b/sql/meterresultMenu.sql new file mode 100644 index 0000000..cc90b77 --- /dev/null +++ b/sql/meterresultMenu.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计算结果', '2053', '1', 'meterresult', 'system/meterresult/index', 1, 0, 'C', '0', '0', 'system:meterresult:list', '#', 'admin', sysdate(), '', null, '流量计算结果菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计算结果查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:meterresult:query', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计算结果新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:meterresult:add', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计算结果修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:meterresult:edit', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计算结果删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:meterresult:remove', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('流量计算结果导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:meterresult:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file diff --git a/sql/ngparMenu.sql b/sql/ngparMenu.sql new file mode 100644 index 0000000..daaff35 --- /dev/null +++ b/sql/ngparMenu.sql @@ -0,0 +1,22 @@ +-- 菜单 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气物性参数', '2053', '1', 'ngpar', 'system/ngpar/index', 1, 0, 'C', '0', '0', 'system:ngpar:list', '#', 'admin', sysdate(), '', null, '天然气物性参数菜单'); + +-- 按钮父菜单ID +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气物性参数查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:ngpar:query', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气物性参数新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:ngpar:add', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气物性参数修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:ngpar:edit', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气物性参数删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:ngpar:remove', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('天然气物性参数导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:ngpar:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file