From 85ba9e8a7a250a0f0ded178ffef168ddda71ccd8 Mon Sep 17 00:00:00 2001 From: chenhaozhe <cgz@hz-kingdee.com> Date: 星期二, 13 五月 2025 09:24:35 +0800 Subject: [PATCH] 完成 客户分类 客户列表 供应商分类 供应商列表 月面的优化功能 --- WebAPI/Controllers/BaseSet/Gy_SupplierController.cs | 61 +++++++++++++++++++++++++++++- 1 files changed, 58 insertions(+), 3 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs index 030c263..413433b 100644 --- a/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_SupplierController.cs @@ -247,6 +247,7 @@ } #endregion + #region 鑾峰彇渚涘簲鍟嗙紪杈戞煡鐪� 瑙嗗浘 /// <summary> /// 渚涘簲鍟嗗垪琛ㄤ慨鏀规寜閽柟娉� ///鍙傛暟锛歴tring sql銆� @@ -281,8 +282,46 @@ return objJsonResult; } } + #endregion + #region 鑾峰彇渚涘簲鍟嗙紪杈戞煡鐪� 瑙嗗浘 鎵╁睍鍒跺崟淇℃伅 + /// <summary> + /// 渚涘簲鍟嗗垪琛ㄤ慨鏀规寜閽柟娉� + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Gy_Supplier/xg_ExpendBillMake")] + [HttpGet] + public object xg_ExpendBillMake(long HInterID) + { + try + { + string sql = string.Format(@"select * from h_v_Gy_SupplierEdit_ExpendBillMake where HItemID='" + HInterID + "'"); + ds = oCN.RunProcReturn(sql, "h_v_Gy_SupplierEdit_ExpendBillMake"); + DataSet cs = oCN.RunProcReturn("select * from Gy_Supplier_PayPlan where HSupID = '" + HInterID + "'", "Gy_Supplier_PayPlan"); + DataSet cs1 = oCN.RunProcReturn("select * from Gy_Supplier_Link where HSupID = '" + HInterID + "'", "Gy_Supplier_Link"); + List<Object> list = new List<object>(); + list.Add(cs); + list.Add(cs1); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = ""; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = list; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 鍗曟嵁淇濆瓨缁撳悎澶嶅埗鍔熻兘 /// <summary> /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳 ///鍙傛暟锛歴tring sql銆� @@ -345,6 +384,7 @@ string HMaterClass = list[0].HMaterClass; long HPSStyleID = list[0].HPSStyleID; long HSupTypeID = list[0].HSupTypeID; + string HMaker = list[0].HMaker; if (!DBUtility.ClsPub.AllowNumber(HNumber)) { @@ -356,6 +396,17 @@ } //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� oCN.BeginTran(); + // 鑻ュ湪鏂板鍜屽鍒朵腑瀛樺湪鐩稿悓缁勭粐锛屽垯杩斿洖閿欒淇℃伅 + DataSet ds_check = oCN.RunProcReturn(@"select * from Gy_Supplier where HNumber ='" + HNumber + "'" + "and HUSEORGID = '" + HUseOrgID + "'", "Gy_Supplier"); + if (ds_check.Tables[0].Rows.Count != 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐩稿悓缁勭粐涓嬩笉鑳藉瓨鍦ㄧ浉鍚屼緵搴斿晢浠g爜!"; + objJsonResult.data = null; + return objJsonResult; + } + //涓昏〃 oCN.RunProc("Insert Into Gy_Supplier " + "(HNumber,HName,HHelpCode,HShortNumber,HParentID" + @@ -363,13 +414,13 @@ ",HShortName,HAddress,HLinkMan,HLinkPhone,HMobilePhone" + ",HFax,HPostalCode,HEmail,HBank,HBankAccount" + ",HTaxNum,HTaxRate,HCountry,HCorMan,HEnglishName" + - ",HEnglishAddress,HCurID,HSSID,HAreaID,HMaterClass,HUSEORGID,HCREATEORGID,HPSStyleID,HSupTypeID) " + + ",HEnglishAddress,HCurID,HSSID,HAreaID,HMaterClass,HUSEORGID,HCREATEORGID,HPSStyleID,HSupTypeID,HMaker) " + " values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "','" + HParentID + "'" + "," + HLevel + ",1,'" + HStopflag + "','" + HRemark + "'" + ",'" + HShortName + "','" + HAddress + "','" + HLinkMan + "','" + HLinkPhone + "','" + HMobilePhone + "'" + ",'" + HFax + "','" + HPostalCode + "','" + HEmail + "','" + HBank + "','" + HBankAccount + "'" + ",'" + HTaxNum + "','" + HTaxRate + "','" + HCountry + "','" + HCorMan + "','" + HEnglishName + "'" + - ",'" + HEnglishAddress + "'," + HCurID + "," + HSSID + "," + HAreaID +" ,'" + HMaterClass + " ','" + HUseOrgID + "' ,'" + HCreateOrgID + "' ,'" + HPSStyleID+ "' ,'" + HSupTypeID + + ",'" + HEnglishAddress + "'," + HCurID + "," + HSSID + "," + HAreaID +" ,'" + HMaterClass + " ','" + HUseOrgID + "' ,'" + HCreateOrgID + "' ,'" + HPSStyleID+ "' ,'" + HSupTypeID + "' ,'" + HMaker + "') "); //淇敼涓婄骇涓洪潪鏈骇浠g爜 oCN.RunProc("Update Gy_Supplier set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); @@ -420,6 +471,7 @@ return objJsonResult; } } + #endregion [Route("Gy_Supplier/SaveGy_SupplierListApi")] [HttpPost] @@ -480,7 +532,6 @@ ///鍙傛暟锛歴tring sql銆� ///杩斿洖鍊硷細object銆� /// </summary> - [Route("Gy_Supplier/AddBill1")] [HttpPost] public object AddBill1([FromBody] JObject oMain) @@ -552,6 +603,10 @@ return objJsonResult; } + if(HItemID == 0) // 浣跨敤鏂板鍑芥暟 + { + + } if (!DBUtility.ClsPub.AllowNumber(HNumber)) { -- Gitblit v1.9.1