From 374ce4ffd0c459bb4067e8d5765f972668aff9b1 Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期四, 02 三月 2023 14:56:23 +0800 Subject: [PATCH] 变更oracle访问组件 --- web/web/GwSm.ashx | 37 ++++++++++++++++++++++++++++++++----- 1 files changed, 32 insertions(+), 5 deletions(-) diff --git a/web/web/GwSm.ashx b/web/web/GwSm.ashx index 832050d..6c25e4e 100644 --- a/web/web/GwSm.ashx +++ b/web/web/GwSm.ashx @@ -10,9 +10,16 @@ public class GwSm : PageHandler<SysUser> { + private int _userId = -1; + private string _userType = ""; + private string _account = ""; + public override JsonPageResult ProcessRequestInternal(PageContext<Model.SysUser> context) { string action = context.GetString("action"); + _userId = context.SessionObject.UserID; + _userType = context.SessionObject.UserType; + _account = context.SessionObject.Account; switch (action) { @@ -63,8 +70,11 @@ int recordCount = 0; int pageSize = context.GetInt("pageSize", 20); int pageIndex = context.GetInt("pageIndex", 1); + + //鏍规嵁绯荤粺鐢ㄦ埛鑾峰彇鏈夋潈闄愬鎴疯处鍙� + string permissionsSQL = new GwClientDao().GetSpPermissions(_userId, _userType, "sm"); - List<Model.GwSm> list = dao.LoadInfoList(selectedApMID, selectedOpName, selectedClientID, selectedSpID, selectedDestnationID, selectedDate, selectedBeginTime, selectedEndTime, selectedContent, selectedOpStat, TStatus, out recordCount, pageSize, pageIndex); + List<Model.GwSm> list = dao.LoadInfoList(selectedApMID, selectedOpName, selectedClientID, selectedSpID, selectedDestnationID, selectedDate, selectedBeginTime, selectedEndTime, selectedContent, selectedOpStat, TStatus, permissionsSQL, out recordCount, pageSize, pageIndex ); string str = ""; @@ -93,6 +103,15 @@ if (item.ResendStatus == 1 && item.ResendFlag == 1) { resendStatusText = "<span class='text-danger'>澶辫触鐭俊宸茶ˉ鍙�</span>"; } if (item.ResendStatus == 1 && item.ResendFlag == 0) { resendStatusText = "<span class='text-success'>琛ュ彂璁板綍</span>"; } str += "<td>" + resendStatusText + "</td>"; + if (item.OpDeliverTime.ToString() == "0001/1/1 0:00:00" || item.OpDeliverTime == null) + { + str += "<td>" + "鏃犳硶璁$畻" + "</td>"; + } + else + { + str += "<td>" + (item.OpDeliverTime - item.SubmitTime).TotalSeconds + "</td>"; + } + str += "<td>" + item.APFeeCount + "/" + item.OPFeeCount + "</td>"; str += "<td>" + item.APResult + "/" + item.OPResult + "</td>"; str += @"<td class=""text-right"">" + (item.SubmitTime == DateTime.MinValue ? string.Empty : item.SubmitTime.ToString("yy-MM-dd HH:mm:ss")) + "</td>"; @@ -101,7 +120,7 @@ str += @"<tr>"; str += @"<td>" + item.OPMID + "</td>"; str += @"<td><span class=""label " + css + @""">" + errorMsg + "</span></td>"; - str += @"<td colspan=""8"" class=""text-right"">" + item.MsgContent + "</td>"; + str += @"<td colspan=""9"" class=""text-right"">" + item.MsgContent + "</td>"; str += @"<td class=""text-right text-info"">" + (item.OpDeliverTime == DateTime.MinValue ? string.Empty : item.OpDeliverTime.ToString("yy-MM-dd HH:mm:ss")) + "</td>"; str += "</tr>"; } @@ -156,16 +175,20 @@ int recordCount = 0; int pageSize = context.GetInt("pageSize", 20); int pageIndex = context.GetInt("pageIndex", 1); + + string permissionsSQL = new GwClientDao().GetSpPermissions(_userId, _userType, "sm"); - List<Model.GwSm> list = dao.LoadInfoList(selectedApMID, selectedOpName, selectedClientID, selectedSpID, selectedDestnationID, selectedDate, selectedBeginTime, selectedEndTime, selectedContent, selectedOpStat, TStatus, out recordCount, pageSize, pageIndex,"ReSend"); + List<Model.GwSm> list = dao.LoadInfoList(selectedApMID, selectedOpName, selectedClientID, selectedSpID, selectedDestnationID, selectedDate, selectedBeginTime, selectedEndTime, selectedContent, selectedOpStat, TStatus, permissionsSQL, out recordCount, pageSize, pageIndex, "ReSend"); string str = ""; if (list != null && list.Count > 0) { int i = 0; + int j = 0; foreach (Model.GwSm item in list) { + if (item.ResendStatus == 1 && item.ResendFlag == 0) { i++; @@ -188,6 +211,7 @@ if (item.ResendStatus == 1 && item.ResendFlag == 1) { resendStatusText = "<span class='text-danger'>澶辫触鐭俊宸茶ˉ鍙�</span>"; } if (item.ResendStatus == 1 && item.ResendFlag == 0) { resendStatusText = "<span class='text-success'>琛ュ彂璁板綍</span>"; } str += "<td>" + resendStatusText + "</td>"; + str += "<td>" + (item.OpDeliverTime - item.SubmitTime).TotalSeconds + "</td>"; str += "<td>" + item.APFeeCount + "/" + item.OPFeeCount + "</td>"; str += "<td>" + item.APResult + "/" + item.OPResult + "</td>"; str += @"<td class=""text-right"">" + (item.SubmitTime == DateTime.MinValue ? string.Empty : item.SubmitTime.ToString("yy-MM-dd HH:mm:ss")) + "</td>"; @@ -196,10 +220,13 @@ str += @"<tr>"; str += @"<td>" + item.OPMID + "</td>"; str += @"<td><span class=""label " + css + @""">" + errorMsg + "</span></td>"; - str += @"<td colspan=""8"" class=""text-right"">" + item.MsgContent + "</td>"; + str += @"<td colspan=""9"" class=""text-right"">" + item.MsgContent + "</td>"; str += @"<td class=""text-right text-info"">" + (item.OpDeliverTime == DateTime.MinValue ? string.Empty : item.OpDeliverTime.ToString("yy-MM-dd HH:mm:ss")) + "</td>"; str += "</tr>"; - } + }//琛ュ彂鐘舵�佹樉绀� + + + } } else -- Gitblit v1.9.1