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/GwSp.ashx | 68 +++++++++++++++++++++++++++++----- 1 files changed, 58 insertions(+), 10 deletions(-) diff --git a/web/web/GwSp.ashx b/web/web/GwSp.ashx index 061d32c..78adb08 100644 --- a/web/web/GwSp.ashx +++ b/web/web/GwSp.ashx @@ -307,17 +307,17 @@ string string1 = context.GetString("apID"); string clientId = context.GetString("clientID"); string string2 = context.GetString("spID"); - string string3 = context.GetString("opID"); + string opId = context.GetString("opID"); int int1 = context.GetInt("routerType"); - string string4 = context.GetString("clientName"); + string company = context.GetString("company"); int int2 = context.GetInt("chargeType"); int recordCount = 0; int int3 = context.GetInt("pageSize", 20); int int4 = context.GetInt("pageIndex", 1); int int5 = context.GetInt("resendStatus", 1); string productId = context.GetString("productId")==null? "": context.GetString("productId"); - if (!string.IsNullOrEmpty(string3) && int1 <= 0) - throw new ArgumentException("璇烽�夋嫨閫氶亾缁勮矾鐢辨ā寮�"); + if (!string.IsNullOrEmpty(opId) && int1 <= 0) + { throw new ArgumentException("璇烽�夋嫨閫氶亾缁勮矾鐢辨ā寮�"); } GwSpDao gwSpDao = new GwSpDao(); string apId = "0"; if (this.IsInt(string1)) @@ -328,7 +328,7 @@ string permissionsSQL = new GwClientDao().GetClientPermissions(_userId, _userType, null); //鍔犺浇璐﹀彿鍒楄〃淇℃伅 - List<GwSp> list = gwSpDao.LoadInfoList(string2, apId, clientId, string4, int1, string3, int2, int4, int3, int5.ToString(), productId, permissionsSQL, out recordCount); + List<GwSp> list = gwSpDao.LoadInfoList(string2, apId, clientId, company, int1, opId, int2, int4, int3, int5.ToString(), productId, permissionsSQL, out recordCount); string str1 = ""; if (list != null && list.Count > 0) { @@ -620,7 +620,7 @@ o.CumulativeAuditTime = context.GetInt("CumulativeAuditTime"); o.IsSyncChildSendAudit = context.GetInt("IsSyncChildSendAudit"); - o.ProductId = context.GetString("ProductId",""); + o.ProductId = context.GetString("ProductId","");//浜у搧ID if (context.GetInt("RouterType", 1) == 1) { @@ -663,8 +663,8 @@ o.CUGroupID = 0; o.CTGroupID = 0; } - o.BalanceThreshold = context.GetInt("BalanceThreshold"); - o.AlarmMobile = context.GetString("AlarmMobile"); + o.BalanceThreshold = context.GetInt("BalanceThreshold");//鍛婅鏉℃暟 + o.AlarmMobile = context.GetString("AlarmMobile");//鍛婅鍙风爜 o.ForceSignFlag = context.GetInt("ForceSignFlag"); o.ForceSign = context.GetString("ForceSign"); o.SignatureMode = context.GetInt("signatureMode"); @@ -690,8 +690,8 @@ cTPattern.Enabled = context.GetInt("enabled"); cTPattern.Pattern = context.GetString("patternContent"); string pattern = @"^[A-Za-z0-9]+$"; //鍒ゆ柇鏄瓧绗︽垨鏁板瓧 - //if (!Regex.IsMatch(o.SpID, "^\\d{6}$")) - // throw new Exception("璐﹀彿蹇呴』涓�6浣嶆暟瀛楋紒"); + //if (!Regex.IsMatch(o.SpID, "^\\d{6}$")) + // throw new Exception("璐﹀彿蹇呴』涓�6浣嶆暟瀛楋紒"); if (!Regex.IsMatch(o.SpID, "^[A-Za-z0-9]{6}$")) throw new Exception("璐﹀彿蹇呴』涓�6浣嶅瓧绗︽垨鏁板瓧锛�"); if (o.AccessCodeMode == 1) @@ -715,6 +715,27 @@ throw new Exception("璐﹀彿瀵嗙爜涓嶈兘涓虹┖"); this._Dao.Update(o); this._Dao.UpdatePattern(cTPattern, context.OperatorID); //鏇存柊璐﹀彿閲岄潰鐨勬姤澶囧唴瀹� + + //鍚屾椂淇敼瀹㈡埛-浜у搧琛ㄨ褰曪紝鑻ュ瓨鍦紝鍒欐洿鏂帮紝鍚﹀垯鏂板缓 + bool flag = GwClientProductDao.Instance.FindBySp(o.SpID); + GwClientProduct clientProduct = new GwClientProduct() + { + ClientId = o.ClientID, + ProductId = o.ProductId, + SpId = o.SpID, + ActivateStatus = 1, + Id=Guid.NewGuid().ToString() + }; + if (flag)//瀛樺湪,鏇存柊 + { + GwClientProductDao.Instance.Update(clientProduct); + } + else + { + + GwClientProductDao.Instance.Add(clientProduct); + } + return new JsonPageResult(true, (object)("璐︽埛" + o.SpID + "淇敼鎴愬姛锛�")); } @@ -817,6 +838,33 @@ throw new Exception("SPID宸茬粡瀛樺湪锛岃閲嶆柊濉啓锛�"); this._Dao.Add(o); this._Dao.UpdatePattern(string1, @int, string2, context.OperatorID);//娣诲姞璐﹀彿鐨勬椂鍊欓厤缃姤澶� + + + //濡傛灉閫夋嫨浜嗕骇鍝侊紝琛ㄧず鍒涘缓鐨勬椂鍊欏氨婵�娲汇�傚悗鍙板垱寤烘棤璧犻�� + if (!string.IsNullOrEmpty(o.ProductId)) + { + //鍚屾椂淇敼瀹㈡埛-浜у搧琛ㄨ褰曪紝鑻ュ瓨鍦紝鍒欐洿鏂帮紝鍚﹀垯鏂板缓 + bool flag = GwClientProductDao.Instance.FindBySp(o.SpID); + GwClientProduct clientProduct = new GwClientProduct() + { + ClientId = o.ClientID, + ProductId = o.ProductId, + SpId = o.SpID, + ActivateStatus = 1, + Id = Guid.NewGuid().ToString() + }; + if (flag)//瀛樺湪,鏇存柊 + { + GwClientProductDao.Instance.Update(clientProduct); + } + else + { + + GwClientProductDao.Instance.Add(clientProduct); + } + } + + return new JsonPageResult(true, (object)("璐︽埛" + o.SpID + "娣诲姞鎴愬姛锛�")); } -- Gitblit v1.9.1