From e4c1d8a8c75368c091db094d616ddc7bafd52df8 Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期二, 08 十月 2024 10:50:25 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/BaseSet/Gy_CustomerController.cs | 90 ++++++++++++++++++++++---------------------- 1 files changed, 45 insertions(+), 45 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs index 03f153d..414d5cd 100644 --- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs @@ -12,8 +12,8 @@ using SyntacticSugar.constant; using System.Web; using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�; -using WebAPI.WebBLL.JCJM.GYZL; -using WebAPI.WebBLL.JCJM.IMPL; +//using WebAPI.WebBLL.JCJM.GYZL; +//using WebAPI.WebBLL.JCJM.IMPL; using System.IO; namespace WebAPI.Controllers { @@ -25,7 +25,7 @@ private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - private Gy_CustomerService customerService = new Gy_CustomerImpl(); + //private Gy_CustomerService customerService = new Gy_CustomerImpl(); DataSet ds; #region 杩斿洖瀹㈡埛鍒楄〃 @@ -1367,41 +1367,41 @@ #endregion #region 瀹㈡埛鍒楄〃 鏂囦欢涓婁紶 - [Route("Gy_Customer/Gy_Process_Excel")] - [HttpPost] - public json Gy_Department_Excel() - { - json res = new json(); - try - { - //鑾峰彇鏂囦欢鍚嶇О - var file = HttpContext.Current.Request.Files[0]; - //鑾峰彇鏂囦欢鐗╃悊璺緞 - string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); - //淇濆瓨鏂囦欢 - file.SaveAs(ExcelPath); + //[Route("Gy_Customer/Gy_Process_Excel")] + //[HttpPost] + //public json Gy_Department_Excel() + //{ + // json res = new json(); + // try + // { + // //鑾峰彇鏂囦欢鍚嶇О + // var file = HttpContext.Current.Request.Files[0]; + // //鑾峰彇鏂囦欢鐗╃悊璺緞 + // string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName); + // //淇濆瓨鏂囦欢 + // file.SaveAs(ExcelPath); - NpoiHelper np = new NpoiHelper(); - DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); - //鍒犻櫎鏂囦欢 - File.Delete(ExcelPath); - DataTable provisional = customerService.UploadExcel(ExcelDs); + // NpoiHelper np = new NpoiHelper(); + // DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0"); + // //鍒犻櫎鏂囦欢 + // File.Delete(ExcelPath); + // DataTable provisional = customerService.UploadExcel(ExcelDs); - res.code = CodeConstant.SUCCEED; - res.count = CountConstant.SUCCEED; - res.Message = "涓婁紶鎴愬姛"; - res.data = provisional; - return res; - } - catch (Exception e) - { - res.code = "0"; - res.count = 0; - res.Message = "Exception锛�" + e.ToString(); - res.data = null; - return res; - } - } + // res.code = CodeConstant.SUCCEED; + // res.count = CountConstant.SUCCEED; + // res.Message = "涓婁紶鎴愬姛"; + // res.data = provisional; + // return res; + // } + // catch (Exception e) + // { + // res.code = "0"; + // res.count = 0; + // res.Message = "Exception锛�" + e.ToString(); + // res.data = null; + // return res; + // } + //} /// <summary> /// 鍒ゆ柇褰撳墠鑱屽憳鏄惁瀛樺湪 @@ -1409,15 +1409,15 @@ /// <param name="HEmpNumber"></param> /// <param name="HEmpName"></param> /// <returns></returns> - private bool JudgeEmp(string HEmpNumber, string HEmpName) - { - if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName)) - { - DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); - return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false; - } - return false; - } + //private bool JudgeEmp(string HEmpNumber, string HEmpName) + //{ + // if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName)) + // { + // DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); + // return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false; + // } + // return false; + //} /// <summary> /// 鍒ゆ柇鍒� -- Gitblit v1.9.1