| | |
| | | } |
| | | |
| | | string sql1 = "select * from h_v_Gy_CusType where 1 = 1"; |
| | | string sql = sql1 + sWhere + " order by HNumber "; |
| | | string sql = sql1 + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_CusType"); |
| | | |
| | | //æ·»å åå |
| | |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using System.Text.RegularExpressions; |
| | | using SyntacticSugar.constant; |
| | | using System.Web; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using WebAPI.WebBLL.JCJM.GYZL; |
| | | using WebAPI.WebBLL.JCJM.IMPL; |
| | | using System.IO; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Gy_CustomerController : ApiController |
| | |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | private Gy_CustomerService customerService = new Gy_CustomerImpl(); |
| | | DataSet ds; |
| | | |
| | | |
| | | #region è¿å客æ·å表 |
| | | /// <summary> |
| | | /// è¿å客æ·å表 |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 客æ·å表[å
³èç¨æ·] æ¥è¯¢ |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 客æ·åè¡¨ä¿®æ¹æé®æ¹æ³ |
| | | /// <summary> |
| | | /// 客æ·åè¡¨ä¿®æ¹æé®æ¹æ³ |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region è·åå½åæå¤§ç客æ·ä»£ç |
| | | [Route("Gy_Customer/getMaxCusNumber")] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region è·åæå¤§èµæIDåæ° |
| | | /// <summary> |
| | | /// è·åæå¤§åºç¡èµæID |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å®¢æ·æ ¹æ®åç±»è·åæå¤§å®¢æ·ç¼ç |
| | | [Route("Gy_Customer/getMaxNum")] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 客æ·å表æ å½¢ç»æ |
| | | /// <summary> |
| | | /// 客æ·å表æ å½¢ç»æ |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ°å¢åæ® |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ä¿å客æ·å表 |
| | | /// <summary> |
| | | /// ä¿å客æ·å表 |
| | | /// </summary> |
| | | /// <param name="oMain"></param> |
| | | /// <returns></returns> |
| | | [Route("Gy_Customer/SaveGy_CustomerListApi")] |
| | | [HttpPost] |
| | | public object SaveGy_CustomerListApi([FromBody] JObject oMain) |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ä¿®æ¹åæ®-ä¿åæé® |
| | | /// <summary> |
| | | /// ä¿®æ¹åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | # region 客æ·å表å é¤æé® |
| | | /// <summary> |
| | | /// 客æ·å表å é¤æé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 客æ·å®¡æ ¸ãåå®¡æ ¸ |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region [忥åºç¡èµæ] |
| | | [Route("Gy_Customer/Gy_CustomerViewApi")] |
| | | [HttpGet] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 客æ·åç±» æ å½¢å¾(æ ¹æ®ä»£ç å±å¼æ ç¶å¾) |
| | | #region 客æ·åç±» æ å½¢å¾(æ ¹æ®ä»£ç å±å¼æ ç¶å¾) |
| | | |
| | | [Route("Gy_BadReason/Gy_CusrTypeTreeList")] |
| | | [HttpGet] |
| | |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_CusType order by hnumber"); |
| | | string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_CusType order by hnumber "); |
| | | |
| | | ds = oCN.RunProcReturn(sql1, "Gy_CusType"); |
| | | |
| | |
| | | } |
| | | #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); |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿å½åè忝å¦åå¨ |
| | | /// </summary> |
| | | /// <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; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿å |
| | | /// </summary> |
| | | /// <param name="provisional"></param> |
| | | /// <returns></returns> |
| | | private static string JudgmentColumns(DataTable provisional) |
| | | { |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!provisional.Columns.Contains("é¨é¨ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãé¨é¨ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("é¨é¨åç§°")) |
| | | error += "æ²¡ææ¾å°ãé¨é¨åç§°ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | #endregion |
| | | |
| | | #region ç©æåç±» æ å½¢å¾(æ ¹æ®ä»£ç å±å¼æ ç¶å¾) |
| | | |
| | |
| | | getTreeByLevel(dt, tree[m].children, num + 1);//忬¡ç¨åéå»å¾ªç¯ï¼æ¿åºåéçåé |
| | | } |
| | | } |
| | | |
| | | } |
| | | public class TreeModel |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region éå½å½æ° |
| | | /// <summary> |
| | | /// éå½å½æ° |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | } |
| | | #endregion |
| | | } |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.IO; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using WebAPI.Models; |
| | | namespace WebAPI.Controllers |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region é¨é¨å表 æä»¶ä¸ä¼ |
| | | [Route("Gy_Department/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 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = provisional.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | provisional.Rows.Add(row); |
| | | } |
| | | |
| | | //夿å |
| | | string error = JudgmentColumns(provisional); |
| | | if (error.Length > 0) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | |
| | | for (int i = 0; i <= provisional.Rows.Count - 1; i++) |
| | | { |
| | | string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["é¨é¨ä»£ç "].ToString()); |
| | | string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["é¨é¨åç§°"].ToString()); |
| | | string HEmpNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["è´è´£äººä»£ç "].ToString()); |
| | | string HEmpName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["è´è´£äººåç§°"].ToString()); |
| | | string HBarCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["æ¡å½¢ç "].ToString()); |
| | | string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["å©è®°ç "]); |
| | | string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["夿³¨"].ToString()); |
| | | |
| | | //夿è´è´£äººæ¯å¦åå¨ |
| | | if (JudgeEmp(HEmpNumber, HEmpName)) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "å½åèåä¸åå¨"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | //è·åçå®è¡æ° |
| | | int line = i + 1; |
| | | } |
| | | |
| | | res.code = "1"; |
| | | res.count = 1; |
| | | res.Message = error; |
| | | 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> |
| | | /// 夿å½åè忝å¦åå¨ |
| | | /// </summary> |
| | | /// <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; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿å |
| | | /// </summary> |
| | | /// <param name="provisional"></param> |
| | | /// <returns></returns> |
| | | private static string JudgmentColumns(DataTable provisional) |
| | | { |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!provisional.Columns.Contains("é¨é¨ä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãé¨é¨ä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("é¨é¨åç§°")) |
| | | error += "æ²¡ææ¾å°ãé¨é¨åç§°ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | #endregion |
| | | |
| | | #region é¨é¨å表 导å
¥(ä¿å) |
| | | [Route("Gy_Department/Gy_Process_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_InspectBasis_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | string organ = sArray[2].ToString(); |
| | | json res = new json(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "æ ä¿åæéï¼"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HNumber = item["é¨é¨ä»£ç "].ToString(); |
| | | string HName = item["é¨é¨åç§°"].ToString(); |
| | | string HEmpNumber = item["è´è´£äººä»£ç "].ToString(); |
| | | string HEmpName = item["è´è´£äººåç§°"].ToString(); |
| | | string HBarCode = item["æ¡å½¢ç "].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | int HEmpID = 0; |
| | | if (!String.IsNullOrEmpty(HEmpName) && !String.IsNullOrEmpty(HEmpNumber)) |
| | | { |
| | | DataSet emp = oCN.RunProcReturn("select HItemID from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); |
| | | HEmpID = (int)emp.Tables[0].Rows[0]["HItemID"]; |
| | | } |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | res.data = 1; |
| | | return res; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | res.data = 1; |
| | | return res; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Department where HNumber='" + HNumber + "'", "Gy_InspectInstruMent"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | string sql = "insert into Gy_Department (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HEmpID, HBarCodeForBase)" + |
| | | $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', 'æªä½¿ç¨', '{organ}', '{organ}', '{HEmpID}', '{HBarCode}')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_Department set HName ='" + HName + "' , HHelpCode = '" + HHelpCode + " ', HBarCodeForBase = '" + HBarCode + "', HEmpID = '" + HEmpID + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "' where HNumber= '" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | res.code = "1"; |
| | | res.count = 1; |
| | | res.Message = "导å
¥æå!"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.IO; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Controllers.SCGL.æ¥è®¡å管ç; |
| | | using WebAPI.Models; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region ç©æåç±»å®¡æ ¸ãåå®¡æ ¸ |
| | | /// <summary> |
| | | /// |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region æ£éªä¾æ®å表 æä»¶ä¸ä¼ |
| | | [Route("Gy_Warehouse/Gy_Process_Excel")] |
| | | [HttpPost] |
| | | public json Gy_InspectBasis_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 = new DataTable("dt2"); |
| | | |
| | | //æ·»å åå |
| | | for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++) |
| | | { |
| | | provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString()); |
| | | } |
| | | |
| | | //æ·»å æ°æ® |
| | | for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++) |
| | | { |
| | | DataRow row = provisional.NewRow(); |
| | | for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++) |
| | | { |
| | | row[j] = ExcelDs.Tables[0].Rows[i][j].ToString(); |
| | | } |
| | | provisional.Rows.Add(row); |
| | | } |
| | | |
| | | //夿å |
| | | string error = JudgmentColumns(provisional); |
| | | if (error.Length > 0) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = $"Excel模æ¿åå¨é误,{error}\r\n"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | |
| | | for (int i = 0; i <= provisional.Rows.Count - 1; i++) |
| | | { |
| | | string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ä»åºä»£ç "].ToString()); |
| | | string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["ä»åºåç§°"].ToString()); |
| | | string phone = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["èç³»çµè¯"].ToString()); |
| | | string HEmpNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["èå代ç "].ToString()); |
| | | string HEmpName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["èååç§°"].ToString()); |
| | | string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["å©è®°ç "]); |
| | | string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["夿³¨"].ToString()); |
| | | if(JudgeEmp(HEmpNumber, HEmpName)) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "å½åèåä¸åå¨"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | //è·åçå®è¡æ° |
| | | int line = i + 1; |
| | | } |
| | | |
| | | res.code = "1"; |
| | | res.count = 1; |
| | | res.Message = error; |
| | | 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> |
| | | /// 夿å½åè忝å¦åå¨ |
| | | /// </summary> |
| | | /// <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; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿å |
| | | /// </summary> |
| | | /// <param name="provisional"></param> |
| | | /// <returns></returns> |
| | | private static string JudgmentColumns(DataTable provisional) |
| | | { |
| | | var error = ""; |
| | | |
| | | //æ¥è¯¢æ²¡æçå |
| | | if (!provisional.Columns.Contains("ä»åºä»£ç ")) |
| | | error += "æ²¡ææ¾å°ãä»åºä»£ç ãçæ é¢,"; |
| | | |
| | | if (!provisional.Columns.Contains("ä»åºåç§°")) |
| | | error += "æ²¡ææ¾å°ãä»åºåç§°ãçæ é¢,"; |
| | | return error; |
| | | } |
| | | #endregion |
| | | |
| | | #region æ£éªä¾æ®å表 导å
¥(ä¿å) |
| | | [Route("Gy_Warehouse/Gy_Process_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_InspectBasis_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { "&å" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | string organ = sArray[2].ToString(); |
| | | json res = new json(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "æ ä¿åæéï¼"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | |
| | | List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2); |
| | | List<Dictionary<string, string>> list = new List<Dictionary<string, string>>(); |
| | | |
| | | foreach (JObject item in Excel) |
| | | { |
| | | Dictionary<string, string> dic = new Dictionary<string, string>(); |
| | | foreach (var itm in item.Properties()) |
| | | { |
| | | dic.Add(itm.Name, itm.Value.ToString()); |
| | | } |
| | | list.Add(dic); |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | int i = 1; |
| | | foreach (Dictionary<string, string> item in list) |
| | | { |
| | | string HNumber = item["ä»åºä»£ç "].ToString(); |
| | | string HName = item["ä»åºåç§°"].ToString(); |
| | | string phone = item["èç³»çµè¯"].ToString(); |
| | | string HEmpNumber = item["èå代ç "].ToString(); |
| | | string HEmpName = item["èååç§°"].ToString(); |
| | | string HHelpCode = item["å©è®°ç "].ToString(); |
| | | string HRemark = item["夿³¨"].ToString(); |
| | | int HEmpID = 0; |
| | | if (!String.IsNullOrEmpty(HEmpName) && !String.IsNullOrEmpty(HEmpNumber)) |
| | | { |
| | | DataSet emp = oCN.RunProcReturn("select HItemID from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee"); |
| | | HEmpID = (int)emp.Tables[0].Rows[0]["HItemID"]; |
| | | } |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//ç代ç |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | res.data = 1; |
| | | return res; |
| | | } |
| | | int HEndFlag = 1;//æ«çº§æ å¿ |
| | | int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //ç级 |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim())) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "ä¿å失败ï¼ä»£ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | res.data = 1; |
| | | return res; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Warehouse where HNumber='" + HNumber + "'", "Gy_InspectInstruMent"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | string sql = "insert into Gy_Warehouse (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HEmpID, HPhone)" + |
| | | $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', 'æªä½¿ç¨', '{organ}', '{organ}', '{HEmpID}', '{phone}')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("update Gy_Warehouse set HName ='" + HName + "' , HHelpCode = '" + HHelpCode + " ', HPhone= '" + phone + "', HEmpID = '" + HEmpID + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "' where HNumber= '" + HNumber + "'"); |
| | | } |
| | | |
| | | i++; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | res.code = "1"; |
| | | res.count = 1; |
| | | res.Message = "导å
¥æå!"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write(e); |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºåºç«æ±æ¥åå表 |
| | | [Route("Cj_StationOutBill/page")] |
| | | [HttpGet] |
| | | public json page(string sWhere, string user, int page, int size) |
| | | { |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "åºç«åæ æ¥è¯¢æé!"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",''", "h_p_MES_StationOutBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_MES_StationOutBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #region å·¥åºåºç«æ±æ¥å å表æ¥è¯¢ |
| | | [Route("Cj_StationOutBill/get_SubDisplay")] |
| | | [HttpGet] |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºæµè½¬å¡å页å表 |
| | | [Route("Sc_ProcessExchangeBillList/page")] |
| | | [HttpGet] |
| | | public json page(string sWhere, string user, int page, int size) |
| | | { |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_ProcessExchangeBill_SubQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_Query " + page + "," + size + ",''", "h_p_Sc_ProcessExchangeBillList_Query"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_Query " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_ProcessExchangeBillList_Query"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºæµè½¬å¡å表 |
| | | /// <summary> |
| | | /// è·åå·¥åºæµè½¬å¡åè¡¨ä¿¡æ¯ |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers.CKGL.TMZD |
| | | { |
| | | public class Gy_BarCodeBillListController : ApiController |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | public string sWhere = ""; |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region æ¡ç 主档å页å表 |
| | | [Route("Gy_BarCodeBillList/page")] |
| | | [HttpGet] |
| | | public json page(string sWhere, string user, int page, int size) |
| | | { |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_Material", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",''", "h_p_IF_BarCodeBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_BarCodeBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | #region å·¥èºè·¯çº¿ |
| | | |
| | | #region å·¥èºè·¯çº¿å页å表 |
| | | [Route("Gy_RoutingBill/page")] |
| | | [HttpGet] |
| | | public json Gy_RoutingBillPage(string sWhere, string user, int page, int size) |
| | | { |
| | | DataSet ds; |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Query", 1, false, user)) |
| | | { |
| | | res.code = "0"; |
| | | res.count = 0; |
| | | res.Message = "æ æ¥çæéï¼"; |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBillList " + page + "," + size + ",''", "h_p_Gy_RoutingBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Gy_RoutingBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥èºè·¯çº¿å表 |
| | | /// <summary> |
| | | /// è¿åå·¥èºè·¯çº¿å表 |
| | |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | #region ç产订åå页å表 |
| | | [Route("LEMS/MES_IF_ICMOBillListPage")] |
| | | [HttpGet] |
| | | public object MES_IF_ICMOBillListPage(string sWhere, string user, int page, int size) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_ICMOBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_ICMOBillList " + page + "," + size + ",''", "h_p_IF_ICMOBillList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_IF_ICMOBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_ICMOBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºæµè½¬å¡ä¸æ¨çäº§è´¨éæ±æ¥å |
| | | [Route("LEMS/MES_IF_ProcessBillList_Json")] |
| | | [HttpGet] |
| | |
| | | using Newtonsoft.Json; |
| | | using Model; |
| | | using Newtonsoft.Json; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | string sql = "select * from h_v_Sb_EquipMentCollectionTechParam_TempList where 1 = 1" + sWhere; |
| | | DataSet ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMentCollectionTechParam_TempList"); |
| | | |
| | | |
| | | |
| | | //æ°æ®éå, è·ååå |
| | | List<object> columnNameList = new List<object>(); |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | |
| | | [Route("Gy_MaterType/Gy_MaterTypeTreeListByLevel")] |
| | | [HttpGet] |
| | | public object Gy_MaterTypeTreeListByLevel() |
| | | public object Gy_MaterTypeTreeListByLevel(string HOrgID) |
| | | { |
| | | try |
| | | { |
| | | string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_MaterType order by hnumber"); |
| | | string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_MaterType where HUSEORGID = '" + HOrgID + "' order by hnumber"); |
| | | |
| | | ds = oCN.RunProcReturn(sql1, "Gy_MaterType"); |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Exceptions |
| | | { |
| | | /// <summary> |
| | | /// ç©ºæ°æ®å¼å¸¸ |
| | | /// </summary> |
| | | public class EmptyException : Exception |
| | | { |
| | | public EmptyException(string message): base(message) |
| | | { |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Exceptions |
| | | { |
| | | /// <summary> |
| | | /// EXCELå¼å¸¸æ¥éç±» |
| | | /// </summary> |
| | | public class ExcelException : Exception |
| | | { |
| | | public ExcelException(string message) : base(message) |
| | | { |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models.Query |
| | | { |
| | | /// <summary> |
| | | /// æ¥è¯¢ç±» |
| | | /// </summary> |
| | | public class QueryModel |
| | | { |
| | | /// <summary> |
| | | /// sqlæ¥è¯¢è¯å¥ |
| | | /// </summary> |
| | | public string sWhere { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢ç¨æ· |
| | | /// </summary> |
| | | public string user { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Model |
| | | { |
| | | public class QueryModel |
| | | { |
| | | /// <summary> |
| | | /// sqlæ¥è¯¢è¯å¥ |
| | | /// </summary> |
| | | public string sWhere { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢ç¨æ· |
| | | /// </summary> |
| | | public string user { get; set; } |
| | | } |
| | | } |