From f28db6dafe8027026d06d011aab8093c07e4bcda Mon Sep 17 00:00:00 2001
From: wzp <2040239371@qq.com>
Date: 星期三, 02 十一月 2022 17:48:44 +0800
Subject: [PATCH] 修复bug

---
 web/web/GwSp.ashx |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/web/web/GwSp.ashx b/web/web/GwSp.ashx
index 864549e..061d32c 100644
--- a/web/web/GwSp.ashx
+++ b/web/web/GwSp.ashx
@@ -343,12 +343,12 @@
                 if (gwSp.RouterType == 1)
                 {
                     str1 += "<td rowspan=\"1\"><span class='label label-primary'>閫氶亾</span>";
-                    str1 += string.Format("<div>绉诲姩锛歿0}</div><div>鐢典俊锛歿1}</div><div>鑱旈�氾細{2}</div>", (object)this.GetOpName(gwSp.CMOPID), (object)this.GetOpName(gwSp.CTOPID), (object)this.GetOpName(gwSp.UNOPID));
+                    str1 += string.Format("<div style='margin-top:10px;'>绉诲姩锛歿0}</div><div>鐢典俊锛歿1}</div><div>鑱旈�氾細{2}</div>", (object)this.GetOpName(gwSp.CMOPID), (object)this.GetOpName(gwSp.CTOPID), (object)this.GetOpName(gwSp.UNOPID));
                 }
                 else if (gwSp.RouterType == 3)
                 {
                     str1 += "<td rowspan=\"1\"><span class='label label-success'>閫氶亾缁�</span>";
-                    str1 += string.Format("<div>绉诲姩锛歿0}</div><div>鐢典俊锛歿1}</div><div>鑱旈�氾細{2}</div>", (object)this.GetGroupName(gwSp.CMGroupID), (object)this.GetGroupName(gwSp.CTGroupID), (object)this.GetGroupName(gwSp.CUGroupID));
+                    str1 += string.Format("<div style='margin-top:10px;'>绉诲姩锛歿0}</div><div>鐢典俊锛歿1}</div><div>鑱旈�氾細{2}</div>", (object)this.GetGroupName(gwSp.CMGroupID), (object)this.GetGroupName(gwSp.CTGroupID), (object)this.GetGroupName(gwSp.CUGroupID));
                 }
                 /**
                 if (gwSp.RESEND_STATUS == 1)
@@ -373,7 +373,7 @@
                 str1 = str1 + (object)"<td>" + (object)(gwSp.BasicNum + (long)gwSp.GivingNum) + "鏉� / " + (object)(gwSp.BasicNum) + "鏉� / " + (object)(gwSp.GivingNum) + "鏉�";
                 //add: yangzh by 2022-03-14 end
                 if (gwSp.BalanceThreshold > 0 && !string.IsNullOrEmpty(gwSp.AlarmMobile))
-                    str1 = str1 + (object)"<div class=\"text-danger\">" + (object)(gwSp.BalanceThreshold / 1000) + "鍏�(" + gwSp.AlarmMobile + ")</div>";
+                    str1 = str1 + "<div class=\"text-danger\">" + gwSp.BalanceThreshold + "鏉�(" + gwSp.AlarmMobile + ")</div>";
                 str1 += "</td>";
                 /**
             str1 = str1 + "<td>" + this.GetDiverterName(gwSp.DiverterID);
@@ -385,20 +385,20 @@
             str1 = str1 + "<div class=\"text-muted\">" + (gwSp.ExtnoExtensionMode == 1 ? "绂佹瀹㈡埛鎵╁睍" : "鍏佽瀹㈡埛鎵╁睍") + "</div>";
             str1 = str1 + "<div>" + (gwSp.AccessCodeMode == 1 ? "閫氶亾鐩磋繛妯″紡" : "铏氭嫙鎺ュ叆妯″紡") + "</div></td>";
                 **/
-                str1 = str1 + "<td>" + this.FormatIpHtml(gwSp.ClientIp) + "</td>";
+                //str1 = str1 + "<td>" + this.FormatIpHtml(gwSp.ClientIp) + "</td>";//鍘绘帀IP
                 // str1 = str1 + "<td>" + this.GetStatusText(gwSp.Status);
                 str1 = str1 + "<td>" + this.GetStatusText(gwSp.Status, gwSp.SpID);
                 str1 += "</td>";
                 str1 += "<td>" + gwSp.CreateTime + "</td>";
-                str1 += "<td rowspan=\"1\" class=\"text-center\">";
+                str1 += "<td rowspan=\"1\" class=\"text-center\" >";
                 if (context.HasRight("3023"))
-                    str1 += string.Format(" <a class=\"btn btn-primary btn-xs action-modal-edit\" data-id=\"{0}\"><i class=\"fa fa-edit\"></i>  缂栬緫</a>", (object)gwSp.SpID);
+                    str1 += string.Format(" <a style='margin-top:5px;' class=\"btn btn-primary btn-xs action-modal-edit\" data-id=\"{0}\"><i class=\"fa fa-edit\"></i>  缂栬緫</a>", (object)gwSp.SpID);
                 //str1 += string.Format(" <a class=\"btn-block btn btn-success btn-xs action-create-summary\" data-id=\"{0}\">璐﹀彿鎽樿</a>", (object)gwSp.SpID);
-                str1 = gwSp.Status != 0 ? str1 + string.Format(" <a href=\"javascript:;\" data-spid=\"{0}\" data-status=\"0\" class=\"action-updateStatus btn btn-primary btn-xs\"><i class=\"fa fa-toggle-off\"></i>&nbsp;鍋滅敤</a><br> ", (object) gwSp.SpID ) : str1 + string.Format("<a href=\"javascript:;\" data-spid=\"{0}\" data-status=\"1\" class=\"action-updateStatus btn  btn-default btn-xs\"><i class=\"fa fa-toggle-on\"/></i>&nbsp;鍚敤</a><br> ", (object) gwSp.SpID );
+                str1 = gwSp.Status != 0 ? str1 + string.Format(" <a style='margin-top:5px;' href=\"javascript:;\" data-spid=\"{0}\" data-status=\"0\" class=\"action-updateStatus btn btn-primary btn-xs\"><i class=\"fa fa-toggle-off\"></i>&nbsp;鍋滅敤</a><br> ", (object) gwSp.SpID ) : str1 + string.Format("<a href=\"javascript:;\" data-spid=\"{0}\" data-status=\"1\" class=\"action-updateStatus btn  btn-default btn-xs\"><i class=\"fa fa-toggle-on\"/></i>&nbsp;鍚敤</a><br> ", (object) gwSp.SpID );
                 if (context.HasRight("3021"))
-                    str1 += string.Format(" <a class=\"btn btn-xs btn-success action-modal-charge\"  data-id=\"{0}\"><i class=\"fa fa-cny\"></i> 鍏呭��</a>", (object)gwSp.SpID);
+                    str1 += string.Format(" <a style='margin-top:5px;' class=\"btn btn-xs btn-success action-modal-charge\"  data-id=\"{0}\"><i class=\"fa fa-cny\"></i> 鍏呭��</a>", (object)gwSp.SpID);
                 if (context.HasRight("3022"))
-                    str1 += string.Format(" <a class=\" btn btn-success btn-xs action-modal-Acctunchargelog\"  data-id=\"{0}\"><i class=\"fa fa-list-alt\"></i> 鍏呭�兼棩蹇�</a>", (object)gwSp.SpID);
+                    str1 += string.Format(" <a style='margin-top:5px;' class=\" btn btn-success btn-xs action-modal-Acctunchargelog\"  data-id=\"{0}\"><i class=\"fa fa-list-alt\"></i> 鍏呭�兼棩蹇�</a>", (object)gwSp.SpID);
 
                 //if (context.HasRight("3024"))
                 //    str1 += string.Format(" <a class=\"btn-block btn btn-xs btn-default action-delete\"  data-id=\"{0}\"><i class=\"fa fa-trash\"></i> 鍒犻櫎</a>", (object)gwSp.SpID);
@@ -593,7 +593,7 @@
         o.AccessCode = context.GetString("AccessCode");
         o.Priority = context.GetInt("Priority", 0);
         o.Price = Math.Max((int)(context.GetDecimal("Price", new Decimal(4, 0, 0, false, (byte)2)) * new Decimal(1000)), 1);
-        //o.ChargeType = context.GetInt("ChargeType", 0);
+        o.ChargeType = context.GetInt("ChargeType", 0);
         o.IsAutoReturn = context.GetInt("IsAutoReturn", 0);
         o.Threshold = Math.Max(context.GetInt("Threshold", 10), 10);
         o.MaxConnCount = context.GetInt("MaxConnCount", 1);
@@ -619,6 +619,8 @@
         o.CumulativeAuditNum = context.GetInt("CumulativeAuditNum");
         o.CumulativeAuditTime = context.GetInt("CumulativeAuditTime");
         o.IsSyncChildSendAudit = context.GetInt("IsSyncChildSendAudit");
+
+        o.ProductId = context.GetString("ProductId","");
 
         if (context.GetInt("RouterType", 1) == 1)
         {
@@ -661,7 +663,7 @@
             o.CUGroupID = 0;
             o.CTGroupID = 0;
         }
-        o.BalanceThreshold = context.GetInt("BalanceThreshold") * 1000;
+        o.BalanceThreshold = context.GetInt("BalanceThreshold");
         o.AlarmMobile = context.GetString("AlarmMobile");
         o.ForceSignFlag = context.GetInt("ForceSignFlag");
         o.ForceSign = context.GetString("ForceSign");
@@ -731,7 +733,7 @@
         o.AccessCode = context.GetString("AccessCode");
         o.Priority = context.GetInt("Priority", 0);
         o.Price = Math.Max((int)(context.GetDecimal("Price", new Decimal(4, 0, 0, false, (byte)2)) * new Decimal(1000)), 1);
-        //o.ChargeType = context.GetInt("ChargeType", 0);
+        o.ChargeType = context.GetInt("ChargeType", 0);
         o.IsAutoReturn = context.GetInt("IsAutoReturn", 0);
         o.Threshold = Math.Max(context.GetInt("Threshold", 10), 10);
         o.MaxConnCount = context.GetInt("MaxConnCount", 1);
@@ -891,7 +893,7 @@
         int cuGroupId = context.GetInt("cuGroupID");
         int ctGroupId = context.GetInt("ctGroupID");
 
-        if (cmOpId == 0 || cuOpId == 0 || ctOpId == 0||cmGroupId ==0 ||cuGroupId==0||ctGroupId==0)
+        if (cmOpId == 0 && cuOpId == 0 && ctOpId == 0 && cmGroupId ==0 && cuGroupId==0 &&ctGroupId==0)
         {
             throw new ArgumentException("閫夐」涓嶅厑璁稿叏閮ㄤ负绌猴紝璇疯嚦灏戦�夋嫨涓�椤癸紒");
         }

--
Gitblit v1.9.1