From 87125f90855242f628ed58dc2bcd40f505868c61 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 31 Jul 2025 10:04:30 +0800 Subject: [PATCH] 1 --- .../ArchitectureReportSave.aspx.cs | 76 ++++++++++++------- 1 file changed, 50 insertions(+), 26 deletions(-) diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs index 292dbbeb..99b6ba2a 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs @@ -1089,91 +1089,115 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[0].Values[5] = (F6 + (F9 * Convert.ToDecimal(0.9714) + F10 * Convert.ToDecimal(1.229) + F11 * Convert.ToDecimal(1.4286) + F12 * Convert.ToDecimal(1.4714) + F13 * Convert.ToDecimal(1.4714) + F14 * Convert.ToDecimal(1.4571) + F15 * Convert.ToDecimal(1.4286) + F16 * Convert.ToDecimal(13.3) + F17 * Convert.ToDecimal(0.0341) + F18) / 10000); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && !string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && this.Grid1.Rows[0].Values[4].ToString() != "0" && this.Grid1.Rows[0].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString())) { this.Grid1.Rows[0].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E20 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E20 > 0) { this.Grid1.Rows[14].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E20, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F20 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F20 > 0) { this.Grid1.Rows[14].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F20, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[14].Values[4].ToString()) && this.Grid1.Rows[14].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[14].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[14].Values[4].ToString()) && this.Grid1.Rows[14].Values[4].ToString() != "0" && this.Grid1.Rows[14].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[14].Values[5].ToString())) { this.Grid1.Rows[14].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 > 0) { this.Grid1.Rows[16].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 > 0) { this.Grid1.Rows[16].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[16].Values[4].ToString()) && this.Grid1.Rows[16].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[16].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[16].Values[4].ToString()) && this.Grid1.Rows[16].Values[4].ToString() != "0" && this.Grid1.Rows[16].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[16].Values[5].ToString())) { this.Grid1.Rows[16].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 > 0) { this.Grid1.Rows[18].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E24, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F24 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F24 > 0) { this.Grid1.Rows[18].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F24, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[18].Values[4].ToString()) && this.Grid1.Rows[18].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[18].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[18].Values[4].ToString()) && this.Grid1.Rows[18].Values[4].ToString() != "0" && this.Grid1.Rows[18].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[18].Values[5].ToString())) { this.Grid1.Rows[18].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 > 0) { this.Grid1.Rows[20].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E26, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 > 0) { this.Grid1.Rows[20].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F26, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[20].Values[4].ToString()) && this.Grid1.Rows[20].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[20].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[20].Values[4].ToString()) && this.Grid1.Rows[20].Values[4].ToString() != "0" && this.Grid1.Rows[20].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[20].Values[5].ToString())) { this.Grid1.Rows[20].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E28 != 0) + if (E22 > 0) { - this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E28, 4); + this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[4].ToString()) * 10000 / E22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F28 != 0) + if (F22 > 0) { - this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F28, 4); + this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[5].ToString()) * 10000 / F22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[22].Values[4].ToString()) && this.Grid1.Rows[22].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[22].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[22].Values[4].ToString()) && this.Grid1.Rows[22].Values[4].ToString() != "0" && this.Grid1.Rows[22].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[22].Values[5].ToString())) { this.Grid1.Rows[22].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E42 != 0) + if (E22 > 0 && E42 > 0) { - this.Grid1.Rows[36].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E42, 4); + this.Grid1.Rows[36].Values[4] = decimal.Round(E42 * 10000 / E22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F42 != 0) + if (F22 > 0 && F42 > 0) { - this.Grid1.Rows[36].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F42, 4); + this.Grid1.Rows[36].Values[5] = decimal.Round(F42 * 10000 / F22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[36].Values[4].ToString()) && this.Grid1.Rows[36].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[36].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[36].Values[4].ToString()) && this.Grid1.Rows[36].Values[4].ToString() != "0" && this.Grid1.Rows[36].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[36].Values[5].ToString())) { this.Grid1.Rows[36].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString()), 2).ToString() + "%"; } - if (E64 != 0 && E65 != 0 && E20 != 0) + if (E44 > 0 && E46 > 0) + { + this.Grid1.Rows[38].Values[4] = decimal.Round((E44 - E45) / E46 * 100, 4); + } + if (F44 > 0 && F46 > 0) + { + this.Grid1.Rows[38].Values[5] = decimal.Round((F44 - F45) / F46 * 100, 4); + } + if (!string.IsNullOrEmpty(this.Grid1.Rows[38].Values[4].ToString()) && this.Grid1.Rows[38].Values[4].ToString() != "0" && this.Grid1.Rows[38].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[38].Values[5].ToString())) + { + this.Grid1.Rows[38].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[38].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[38].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[38].Values[4].ToString()), 2).ToString() + "%"; + } + if (E48 > 0 && E50 > 0) + { + this.Grid1.Rows[42].Values[4] = decimal.Round((E48 - E49) / E50 * 100, 4); + } + if (F48 > 0 && F50 > 0) + { + this.Grid1.Rows[42].Values[5] = decimal.Round((F48 - F49) / F50 * 100, 4); + } + if (!string.IsNullOrEmpty(this.Grid1.Rows[42].Values[4].ToString()) && this.Grid1.Rows[42].Values[4].ToString() != "0" && this.Grid1.Rows[42].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[42].Values[5].ToString())) + { + this.Grid1.Rows[42].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[42].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[42].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[42].Values[4].ToString()), 2).ToString() + "%"; + } + if (E64 > 0 && E65 > 0 && E20 > 0) { this.Grid1.Rows[58].Values[4] = decimal.Round((E64 + E65) / E20, 4); } - if (F64 != 0 && F65 != 0 && F20 != 0) + if (F64 > 0 && F65 > 0 && F20 > 0) { this.Grid1.Rows[58].Values[5] = decimal.Round((F64 + F65) / F20, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[58].Values[4].ToString()) && this.Grid1.Rows[58].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[58].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[58].Values[4].ToString()) && this.Grid1.Rows[58].Values[4].ToString() != "0" && this.Grid1.Rows[58].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[58].Values[5].ToString())) { this.Grid1.Rows[58].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[58].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[58].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[58].Values[4].ToString()), 2).ToString() + "%"; }