From 2ec1b01d8a5e076eba607d83b902846876957a3e Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期四, 03 十月 2024 23:00:03 +0800
Subject: [PATCH] 111
---
WebAPI/Exceptions/ExcelException.cs | 17 +
WebAPI/Models/QueryModel.cs | 21 +
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 53 +++
WebAPI/Controllers/基础资料/基础资料/Gy_MaterTypeBillController.cs | 4
WebAPI/Models/Query/QueryModel.cs | 23 +
WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs | 54 +++
WebAPI/Controllers/CKGL/TMZD/Gy_BarCodeBillListController.cs | 77 ++++
WebAPI/Controllers/LMESController.cs | 108 ++++++
WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs | 242 ++++++++++++++
WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs | 2
WebAPI/Controllers/BaseSet/Gy_CustomerController.cs | 116 ++++++
WebAPI/Exceptions/EmptyException.cs | 17 +
WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs | 242 ++++++++++++++
WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs | 5
14 files changed, 961 insertions(+), 20 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
index 6a8549e..ad1d60a 100644
--- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -4529,7 +4529,7 @@
}
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");
//娣诲姞鍒楀悕
diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
index cd5c648..03f153d 100644
--- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -9,6 +9,12 @@
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
@@ -19,9 +25,10 @@
private json objJsonResult = new json();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ private Gy_CustomerService customerService = new Gy_CustomerImpl();
DataSet ds;
-
+ #region 杩斿洖瀹㈡埛鍒楄〃
/// <summary>
/// 杩斿洖瀹㈡埛鍒楄〃
///鍙傛暟锛歴tring sql銆�
@@ -93,6 +100,7 @@
return objJsonResult;
}
}
+ #endregion
#region 瀹㈡埛瀛愯〃[鍏宠仈鐢ㄦ埛] 鏌ヨ
/// <summary>
@@ -137,6 +145,7 @@
}
#endregion
+ #region 瀹㈡埛鍒楄〃淇敼鎸夐挳鏂规硶
/// <summary>
/// 瀹㈡埛鍒楄〃淇敼鎸夐挳鏂规硶
///鍙傛暟锛歴tring sql銆�
@@ -174,7 +183,7 @@
return objJsonResult;
}
}
-
+ #endregion
#region 鑾峰彇褰撳墠鏈�澶х殑瀹㈡埛浠g爜
[Route("Gy_Customer/getMaxCusNumber")]
@@ -214,6 +223,7 @@
}
#endregion
+ #region 鑾峰彇鏈�澶ц祫鏂橧D鍙傛暟
/// <summary>
/// 鑾峰彇鏈�澶у熀纭�璧勬枡ID
///鍙傛暟锛歴tring sql銆�
@@ -242,6 +252,7 @@
return objJsonResult;
}
}
+ #endregion
#region 瀹㈡埛鏍规嵁鍒嗙被鑾峰彇鏈�澶у鎴风紪鐮�
[Route("Gy_Customer/getMaxNum")]
@@ -320,7 +331,7 @@
}
#endregion
-
+ #region 瀹㈡埛鍒楄〃鏍戝舰缁撴瀯
/// <summary>
/// 瀹㈡埛鍒楄〃鏍戝舰缁撴瀯
///鍙傛暟锛歴tring sql銆�
@@ -350,7 +361,9 @@
return objJsonResult;
}
}
+ #endregion
+ #region 鏂板鍗曟嵁
/// <summary>
/// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
///鍙傛暟锛歴tring sql銆�
@@ -506,9 +519,14 @@
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)
@@ -632,9 +650,9 @@
return objJsonResult;
}
}
+ #endregion
-
-
+ #region 淇敼鍗曟嵁-淇濆瓨鎸夐挳
/// <summary>
/// 淇敼鍗曟嵁-淇濆瓨鎸夐挳
///鍙傛暟锛歴tring sql銆�
@@ -805,9 +823,9 @@
return objJsonResult;
}
}
+ #endregion
-
-
+ # region 瀹㈡埛鍒楄〃鍒犻櫎鎸夐挳
/// <summary>
/// 瀹㈡埛鍒楄〃鍒犻櫎鎸夐挳
///鍙傛暟锛歴tring sql銆�
@@ -898,7 +916,7 @@
return objJsonResult;
}
}
-
+ #endregion
#region 瀹㈡埛瀹℃牳銆佸弽瀹℃牳
/// <summary>
@@ -1090,7 +1108,6 @@
}
#endregion
-
#region [鍚屾鍩虹璧勬枡]
[Route("Gy_Customer/Gy_CustomerViewApi")]
[HttpGet]
@@ -1253,7 +1270,7 @@
}
#endregion
- #region 瀹㈡埛鍒嗙被 鏍戝舰鍥�(鏍规嵁浠g爜灞曞紑鏍戠姸鍥�)
+ #region 瀹㈡埛鍒嗙被 鏍戝舰鍥�(鏍规嵁浠g爜灞曞紑鏍戠姸鍥�)
[Route("Gy_BadReason/Gy_CusrTypeTreeList")]
[HttpGet]
@@ -1309,7 +1326,7 @@
{
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");
@@ -1349,7 +1366,77 @@
}
#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("閮ㄩ棬浠g爜"))
+ error += "娌℃湁鎵惧埌銆愰儴闂ㄤ唬鐮併�戠殑鏍囬,";
+
+ if (!provisional.Columns.Contains("閮ㄩ棬鍚嶇О"))
+ error += "娌℃湁鎵惧埌銆愰儴闂ㄥ悕绉般�戠殑鏍囬,";
+ return error;
+ }
+ #endregion
#region 鐗╂枡鍒嗙被 鏍戝舰鍥�(鏍规嵁浠g爜灞曞紑鏍戠姸鍥�)
@@ -1375,7 +1462,6 @@
getTreeByLevel(dt, tree[m].children, num + 1);//鍐嶆鐢ㄥ瓙闆嗗幓寰幆锛屾嬁鍑哄瓙闆嗙殑瀛愰泦
}
}
-
}
public class TreeModel
{
@@ -1386,6 +1472,7 @@
#endregion
+ #region 閫掑綊鍑芥暟
/// <summary>
/// 閫掑綊鍑芥暟
/// </summary>
@@ -1415,4 +1502,5 @@
}
}
+ #endregion
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs b/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
index 7abfd45..da05301 100644
--- a/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
@@ -1,12 +1,16 @@
锘縰sing 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
{
@@ -1161,5 +1165,243 @@
}
#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]["閮ㄩ棬浠g爜"].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("閮ㄩ棬浠g爜"))
+ 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["閮ㄩ棬浠g爜"].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 = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ 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
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs b/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
index e8f092b..c04c1eb 100644
--- a/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
@@ -2,11 +2,14 @@
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;
@@ -781,8 +784,6 @@
}
#endregion
-
-
#region 鐗╂枡鍒嗙被瀹℃牳銆佸弽瀹℃牳
/// <summary>
///
@@ -973,5 +974,242 @@
}
#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]["浠撳簱浠g爜"].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]["鑱屽憳浠g爜"].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("浠撳簱浠g爜"))
+ 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["浠撳簱浠g爜"].ToString();
+ string HName = item["浠撳簱鍚嶇О"].ToString();
+ string phone = item["鑱旂郴鐢佃瘽"].ToString();
+ string HEmpNumber = item["鑱屽憳浠g爜"].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 = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+ 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
+
}
}
\ No newline at end of file
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 76cbab4..43bedb9 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -2,6 +2,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
+using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -1715,6 +1716,58 @@
}
#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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ 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]
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
index 28e33cc..9f9ab49 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -1,6 +1,7 @@
锘縰sing Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
+using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -1911,6 +1912,59 @@
}
#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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ 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>
/// 鑾峰彇宸ュ簭娴佽浆鍗″垪琛ㄤ俊鎭�
diff --git a/WebAPI/Controllers/CKGL/TMZD/Gy_BarCodeBillListController.cs b/WebAPI/Controllers/CKGL/TMZD/Gy_BarCodeBillListController.cs
new file mode 100644
index 0000000..6a713dd
--- /dev/null
+++ b/WebAPI/Controllers/CKGL/TMZD/Gy_BarCodeBillListController.cs
@@ -0,0 +1,77 @@
+锘縰sing 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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ 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
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index d1ddb30..08f05ba 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -1,6 +1,7 @@
锘縰sing Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
+using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -1114,6 +1115,60 @@
#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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ 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>
/// 杩斿洖宸ヨ壓璺嚎鍒楄〃
@@ -1676,6 +1731,59 @@
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));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ 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]
diff --git a/WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs b/WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs
index 11f896a..f08d474 100644
--- a/WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs
+++ b/WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json;
+锘縰sing Model;
+using Newtonsoft.Json;
using SyntacticSugar.constant;
using System;
using System.Collections.Generic;
@@ -36,6 +37,8 @@
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)
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs"
index eedb205..2cc35e9 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs"
@@ -544,11 +544,11 @@
[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");
diff --git a/WebAPI/Exceptions/EmptyException.cs b/WebAPI/Exceptions/EmptyException.cs
new file mode 100644
index 0000000..6d9211b
--- /dev/null
+++ b/WebAPI/Exceptions/EmptyException.cs
@@ -0,0 +1,17 @@
+锘縰sing 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)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Exceptions/ExcelException.cs b/WebAPI/Exceptions/ExcelException.cs
new file mode 100644
index 0000000..f7583df
--- /dev/null
+++ b/WebAPI/Exceptions/ExcelException.cs
@@ -0,0 +1,17 @@
+锘縰sing 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)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/Query/QueryModel.cs b/WebAPI/Models/Query/QueryModel.cs
new file mode 100644
index 0000000..4e813c0
--- /dev/null
+++ b/WebAPI/Models/Query/QueryModel.cs
@@ -0,0 +1,23 @@
+锘縰sing 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; }
+ }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/QueryModel.cs b/WebAPI/Models/QueryModel.cs
new file mode 100644
index 0000000..3c3ffa1
--- /dev/null
+++ b/WebAPI/Models/QueryModel.cs
@@ -0,0 +1,21 @@
+锘縰sing 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; }
+ }
+}
--
Gitblit v1.9.1