From 6db857c2480bd8d2d86069da92e4892de94d1c8a Mon Sep 17 00:00:00 2001 From: pzy <2829717936@qq.com> Date: 星期二, 13 八月 2024 16:09:21 +0800 Subject: [PATCH] 1 --- BLL/bin/Release/DAL.dll | 0 Model/obj/Release/Model.pdb | 0 BLL/bin/Release/BLL.pdb | 0 Model/基础资料/基础资料/ClsGy_TechnologyParameterType_Model .cs | 13 + WebAPI/DLL/ClsGy_TechnologyParameterType_Ctl.cs | 101 ++++++++++ DAL/bin/Release/Model.dll | 0 Model/Model.csproj | 1 Model/obj/Release/Model.csproj.AssemblyReference.cache | 0 WebAPI/Controllers/WebAPIController.cs | 269 ++++++++++++++++++++++++++ Model/bin/Release/Model.pdb | 0 SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache | 0 WebAPI/Properties/PublishProfiles/FolderProfile18.pubxml.user | 24 +- DAL/bin/Release/DAL.pdb | 0 Model/bin/Release/Model.dll | 0 WebAPI/ListModels.cs | 14 + WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs | 150 ++++++++++++++ BLL/bin/Release/Model.dll | 0 BLL/bin/Release/BLL.dll | 0 BLL/bin/Release/DAL.pdb | 0 BLL/bin/Release/Model.pdb | 0 DAL/bin/Release/DAL.dll | 0 WebAPI/WebAPI.csproj | 1 DAL/bin/Release/Model.pdb | 0 Model/obj/Release/Model.dll | 0 24 files changed, 559 insertions(+), 14 deletions(-) diff --git a/BLL/bin/Release/BLL.dll b/BLL/bin/Release/BLL.dll index 63fadab..db706b4 100644 --- a/BLL/bin/Release/BLL.dll +++ b/BLL/bin/Release/BLL.dll Binary files differ diff --git a/BLL/bin/Release/BLL.pdb b/BLL/bin/Release/BLL.pdb index 9e02fe8..f31e036 100644 --- a/BLL/bin/Release/BLL.pdb +++ b/BLL/bin/Release/BLL.pdb Binary files differ diff --git a/BLL/bin/Release/DAL.dll b/BLL/bin/Release/DAL.dll index f0f621c..66c9521 100644 --- a/BLL/bin/Release/DAL.dll +++ b/BLL/bin/Release/DAL.dll Binary files differ diff --git a/BLL/bin/Release/DAL.pdb b/BLL/bin/Release/DAL.pdb index 18689e5..1ac5efa 100644 --- a/BLL/bin/Release/DAL.pdb +++ b/BLL/bin/Release/DAL.pdb Binary files differ diff --git a/BLL/bin/Release/Model.dll b/BLL/bin/Release/Model.dll index 6602548..6e161f0 100644 --- a/BLL/bin/Release/Model.dll +++ b/BLL/bin/Release/Model.dll Binary files differ diff --git a/BLL/bin/Release/Model.pdb b/BLL/bin/Release/Model.pdb index 3017901..60699bd 100644 --- a/BLL/bin/Release/Model.pdb +++ b/BLL/bin/Release/Model.pdb Binary files differ diff --git a/DAL/bin/Release/DAL.dll b/DAL/bin/Release/DAL.dll index f0f621c..66c9521 100644 --- a/DAL/bin/Release/DAL.dll +++ b/DAL/bin/Release/DAL.dll Binary files differ diff --git a/DAL/bin/Release/DAL.pdb b/DAL/bin/Release/DAL.pdb index 18689e5..1ac5efa 100644 --- a/DAL/bin/Release/DAL.pdb +++ b/DAL/bin/Release/DAL.pdb Binary files differ diff --git a/DAL/bin/Release/Model.dll b/DAL/bin/Release/Model.dll index 6602548..6e161f0 100644 --- a/DAL/bin/Release/Model.dll +++ b/DAL/bin/Release/Model.dll Binary files differ diff --git a/DAL/bin/Release/Model.pdb b/DAL/bin/Release/Model.pdb index 3017901..60699bd 100644 --- a/DAL/bin/Release/Model.pdb +++ b/DAL/bin/Release/Model.pdb Binary files differ diff --git a/Model/Model.csproj b/Model/Model.csproj index 9b41d12..31e7841 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -144,6 +144,7 @@ <Compile Include="CRM\ClsSec_ProductRepairBillSub1.cs" /> <Compile Include="MES\ClsSc_MESBeginWorkBillSub_RelationBill.cs" /> <Compile Include="WMS\ClsWMS_CusBarCodeCheckBillMain.cs" /> + <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TechnologyParameterType_Model .cs" /> <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_RestDay_Model.cs" /> <Compile Include="璐ㄦ绠$悊\ClsQC_MonthTarGetBillMain.cs" /> <Compile Include="璐ㄦ绠$悊\ClsQC_MonthTarGetBillSub.cs" /> diff --git a/Model/bin/Release/Model.dll b/Model/bin/Release/Model.dll index 6602548..6e161f0 100644 --- a/Model/bin/Release/Model.dll +++ b/Model/bin/Release/Model.dll Binary files differ diff --git a/Model/bin/Release/Model.pdb b/Model/bin/Release/Model.pdb index 3017901..60699bd 100644 --- a/Model/bin/Release/Model.pdb +++ b/Model/bin/Release/Model.pdb Binary files differ diff --git a/Model/obj/Release/Model.csproj.AssemblyReference.cache b/Model/obj/Release/Model.csproj.AssemblyReference.cache index d23d3002..1a81f01 100644 --- a/Model/obj/Release/Model.csproj.AssemblyReference.cache +++ b/Model/obj/Release/Model.csproj.AssemblyReference.cache Binary files differ diff --git a/Model/obj/Release/Model.dll b/Model/obj/Release/Model.dll index 6602548..6e161f0 100644 --- a/Model/obj/Release/Model.dll +++ b/Model/obj/Release/Model.dll Binary files differ diff --git a/Model/obj/Release/Model.pdb b/Model/obj/Release/Model.pdb index 3017901..60699bd 100644 --- a/Model/obj/Release/Model.pdb +++ b/Model/obj/Release/Model.pdb Binary files differ diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_TechnologyParameterType_Model .cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_TechnologyParameterType_Model .cs" new file mode 100644 index 0000000..b2be00c --- /dev/null +++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_TechnologyParameterType_Model .cs" @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsGy_TechnologyParameterType_Model : DBUtility.ClsGy_Base_Model + { + + + + } +} diff --git a/SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache b/SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache index b530dd8..b513a46 100644 --- a/SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache +++ b/SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache Binary files differ diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs index 37ca28d..1e0f858 100644 --- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs @@ -4150,6 +4150,154 @@ } #endregion + + #region 宸ヨ壓鍙傛暟鍒嗙被 鏌ヨ,瀹℃牳锛屽弽瀹℃牳锛岀鐢紝鍙嶇鐢� + /// <summary> + /// 渚涘簲鍟嗗垎绫� 鏌ヨ + /// </summary> + /// <param name="sWhere"></param> + /// <param name="user"></param> + /// <returns></returns> + [Route("Gy_BadReason/Gy_TechnologyTypeList")] + [HttpGet] + public object Gy_TechnologyTypeList(string sWhere, string user) + { + try + { + List<object> columnNameList = new List<object>(); + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_Technology_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string sql1 = "select * from h_v_Gy_Technology where 1 = 1"; + string sql = sql1 + sWhere + " order by 宸ヨ壓鍙傛暟鍒嗙被浠g爜 "; + ds = oCN.RunProcReturn(sql, "h_v_Gy_Technology"); + + //娣诲姞鍒楀悕 + 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 = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + /// <summary> + /// 渚涘簲鍟嗗垎绫� 绂佺敤銆佸弽绂佺敤 + /// </summary> + /// <param name="HInterID">鍗曟嵁ID</param> + /// <param name="IsStop">绂佺敤(0),鍙嶇鐢�(1)</param> + /// <param name="CurUserName">瀹℃牳浜�</param> + /// <returns></returns> + [Route("Gy_BadReason/StopGy_TechnologyType")] + [HttpGet] + public object StopGy_TechnologyType(int HInterID, int IsStop, string CurUserName) + { + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyType_Close", 1, false, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + var ds = oCN.RunProcReturn("select * from Gy_TechnologyParameterClass where HItemID=" + HInterID, "Gy_TechnologyParameterClass"); + if (ds.Tables[0].Rows.Count > 0) + { + if (IsStop == 0) //绂佺敤鍒ゆ柇 + { + if (ds.Tables[0].Rows[0]["HStopflag"].Equals(true)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸茬鐢�!涓嶈兘鍐嶆绂佺敤锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂� + { + if (ds.Tables[0].Rows[0]["HStopflag"].Equals(false)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈鐢�!涓嶉渶瑕佸弽绂佺敤!"; + objJsonResult.data = null; + return objJsonResult; + } + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!"; + objJsonResult.data = null; + return objJsonResult; + } + + oCN.BeginTran(); + + if (IsStop == 0) //绂佺敤鍒ゆ柇 + { + oCN.RunProc("update Gy_TechnologyParameterClass set HStopflag=1 where HItemID=" + HInterID); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "绂佺敤鎴愬姛"; + objJsonResult.data = null; + } + if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂� + { + oCN.RunProc("update Gy_TechnologyParameterClass set HStopflag=0 where HItemID=" + HInterID); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶇鐢ㄦ垚鍔�"; + objJsonResult.data = null; + } + oCN.Commit(); + + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "绂佺敤澶辫触鎴栬�呭弽绂佺敤澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 瀹㈡埛鍒嗙被 鏌ヨ,瀹℃牳锛屽弽瀹℃牳锛岀鐢紝鍙嶇鐢� /// <summary> /// 瀹㈡埛鍒嗙被 鏌ヨ @@ -4295,6 +4443,7 @@ return objJsonResult; } } + #endregion @@ -4390,7 +4539,6 @@ return objJsonResult; } } - #endregion #region 鐩樼偣鏂规 鏌ヨ,瀹℃牳锛屽弽瀹℃牳锛岀鐢紝鍙嶇鐢� /// <summary> diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index db4fc44..5c3dbdf 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -7500,6 +7500,275 @@ } #endregion + #region 宸ヨ壓鍙傛暟鍒嗙被 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶 + /// <summary> + /// 宸ヨ壓鍙傛暟鍒嗙被 淇濆瓨 + /// </summary> + /// <param name="msg"></param> + /// <returns></returns> + [Route("SaveGy_TechnologyTypeList")] + [HttpPost] + public object SaveGy_TechnologyTypeList([FromBody] JObject msg) + { + DataSet ds; + var _value = msg["msg"].ToString(); + string msg3 = _value.ToString(); + string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg1 = sArray[0].ToString(); + string msg2 = sArray[1].ToString(); + + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_Technology_Edit", 1, false, msg2)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + Int64 HItemID = 0; + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + //鑾峰彇鏈�澶D鍊艰祴鍊� + DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_TechnologyParameterClass ", "Gy_TechnologyParameterClass"); + if (Maxds != null || Maxds.Tables[0].Rows.Count > 0) + { + //HItemID= Maxds.Tables[0].Rows[0]["HItemID"] + var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]); + maxid += 1; + HItemID = maxid; + } + ListModels oListModels = new ListModels(); + try + { + WebAPI.DLL.ClsGy_TechnologyParameterType_Ctl oBill = new WebAPI.DLL.ClsGy_TechnologyParameterType_Ctl(); + List<Model.ClsGy_TechnologyParameterType_Model> lsmain = new List<Model.ClsGy_TechnologyParameterType_Model>(); + msg1 = msg1.Replace("\\", ""); + msg1 = msg1.Replace("\n", ""); + lsmain = oListModels.getObjectByJson_Gy_TechnologyParameterType(msg1); + foreach (Model.ClsGy_TechnologyParameterType_Model oItem in lsmain) + { + if (oItem.HNumber.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒"; + objJsonResult.data = 1; + return objJsonResult; + } + if (oItem.HName.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒"; + objJsonResult.data = 1; + return objJsonResult; + } + if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim())) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒"; + objJsonResult.data = 1; + return objJsonResult; + } + //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮� + + ds = oCN.RunProcReturn("select * from Gy_TechnologyParameterClass where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_TechnologyParameterClass"); + if (oItem.HNumber.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷负绌猴紒"; + objJsonResult.data = 1; + return objJsonResult; + } + //鏂板鏃跺垽鏂� + if (oItem.HItemID == 0) + { + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒"; + objJsonResult.data = 1; + return objJsonResult; + } + //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦� + string sParent; + sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); + if (sParent.Trim() == "") + { + oBill.oModel.HParentID = 0; + } + else + { + if (oBill.HavParentCode(sParent.Trim(), HItemID)) + { + oBill.oModel.HParentID = oBill.oModel.HItemID; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + } + } + else//缂栬緫鏃跺垽鏂� + { + //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦� + string sParent; + sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); + if (sParent.Trim() == "") + { + oBill.oModel.HParentID = 0; + } + else + { + if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID)) + { + oBill.oModel.HParentID = oBill.oModel.HItemID; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + } + } + //寰楀埌鐭唬鐮� + string sShortNumber; + sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); + if (sShortNumber.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + oItem.HShortNumber = sShortNumber;//鐭唬鐮� + oItem.HEndFlag = true;//鏈骇鏍囧織 + oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇 + oItem.HMakeEmp = msg2; //鍒涘缓浜� + + oBill.oModel = oItem; + } + + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + bool bResult; + if (oBill.oModel.HItemID == 0) + { + // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); + bResult = oBill.AddNew(); + } + else + { + bResult = oBill.ModifyByID(oBill.oModel.HItemID); + } + if (bResult) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); + objJsonResult.data = 1; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = 1; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); + objJsonResult.data = 1; + return objJsonResult; + } + } + + /// <summary> + /// 宸ヨ壓鍙傛暟鍒嗙被鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Route("DeltetGy_TechnologyType")] + [HttpGet] + public object DeltetGy_TechnologyType(string HItemID, string user) + { + DataSet ds; + //string ModRightNameCheck = "Sc_ProcessReport_check"; + try + { + //鍒犻櫎鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_Technology_Drop", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + if (string.IsNullOrWhiteSpace(HItemID)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HItemID涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + oCN.BeginTran();//寮�濮嬩簨鍔� + ds = oCN.RunProcReturn("select * from Gy_TechnologyParameterClass where HItemID=" + HItemID, "Gy_TechnologyParameterClass"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒"; + objJsonResult.data = null; + return objJsonResult; ; + } + + + oCN.RunProc("delete Gy_TechnologyParameterClass where HItemID=" + HItemID); + oCN.Commit();//鎻愪氦浜嬪姟 + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鏁版嵁鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; ; + + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + #region 瀹㈡埛鍒嗙被 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶 /// <summary> /// 瀹㈡埛鍒嗙被 淇濆瓨 diff --git a/WebAPI/DLL/ClsGy_TechnologyParameterType_Ctl.cs b/WebAPI/DLL/ClsGy_TechnologyParameterType_Ctl.cs new file mode 100644 index 0000000..f373143 --- /dev/null +++ b/WebAPI/DLL/ClsGy_TechnologyParameterType_Ctl.cs @@ -0,0 +1,101 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Data; + +namespace WebAPI.DLL +{ + public class ClsGy_TechnologyParameterType_Ctl : DBUtility.ClsGy_Base_Ctl + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩� + public string HOldNumber; + public Model.ClsGy_TechnologyParameterType_Model oModel = new Model.ClsGy_TechnologyParameterType_Model(); + //鏂板 + public override bool AddNew() + { + // + try + { + oCn.BeginTran(); + oCn.RunProc("Insert into " + MvarItemKey + " " + + " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + + ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUseFlag,HMakeEmp) " + + " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() + + "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "','" +DateTime.Now+ "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp+ "')", ref DBUtility.ClsPub.sExeReturnInfo); + //淇敼涓婄骇涓洪潪鏈骇浠g爜 + oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); + oCn.Commit(); + return true; + } + catch (Exception e) + { + oCn.RollBack(); + throw (e); + } + } + + //淇敼 + public override bool ModifyByID(Int64 sItemID) + { + try + { + + oCn.BeginTran(); + oCn.RunProc("Update " + MvarItemKey + " set " + + " HNumber='" + oModel.HNumber + "'" + + ",HName='" + oModel.HName + "'" + + ",HShortNumber='" + oModel.HShortNumber + "'" + + ",HHelpCode='" + oModel.HHelpCode + "'" + + //",HModifyTime='" + DateTime.Now + "'" + + //",HUSEORGID='" + oModel.HUSEORGID + "'" + + //",HModifyEmp ='" + oModel.HMakeEmp + "'" + + ",HUseFlag='" + oModel.HUseFlag + "'" + + ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) + + ",HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); + //淇敼瀛愰」鐩唬鐮� + oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); + //灏嗕笂绾� 涓洪潪鏈骇 + oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); + // + oCn.Commit(); + return true; + } + catch (Exception e) + { + oCn.RollBack(); + throw (e); + } + } + //鏍规嵁浠g爜鍒ゆ柇淇℃伅 + public override bool HavParentCode(string sCode, Int64 sItemID) + { + DataSet DS; + try + { + DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo); + if (DS.Tables[0].Rows.Count == 0) + return false; + else + { + oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]); + return true; + } + } + catch (Exception e) + { + throw (e); + } + } + //鏋勯�犲嚱鏁� + public ClsGy_TechnologyParameterType_Ctl() + { + MvarItemKey = "Gy_TechnologyParameterClass"; + MvarReportTitle = "宸ヨ壓鍙傛暟鍒嗙被璁剧疆"; + oModel = new Model.ClsGy_TechnologyParameterType_Model(); + } + + + + } +} diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs index 14979fa..9650001 100644 --- a/WebAPI/ListModels.cs +++ b/WebAPI/ListModels.cs @@ -1099,7 +1099,19 @@ List<Model.ClsGy_CusType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_CusType_Model>>(jsonString); return list; } - + + /// <summary> + /// 澶勭悊鏂板宸ヨ壓鍙傛暟鍒嗙被琛ㄧ殑json + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsGy_TechnologyParameterType_Model> getObjectByJson_Gy_TechnologyParameterType(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsGy_TechnologyParameterType_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_TechnologyParameterType_Model>>(jsonString); + return list; + } + /// <summary> /// 澶勭悊鏂板渚涘簲鍟嗗垎绫昏〃鐨刯son /// </summary> diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile18.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile18.pubxml.user index a354ac5..250e5fc 100644 --- a/WebAPI/Properties/PublishProfiles/FolderProfile18.pubxml.user +++ b/WebAPI/Properties/PublishProfiles/FolderProfile18.pubxml.user @@ -5,7 +5,7 @@ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <_PublishTargetUrl>D:\缃戠珯鍙戝竷\API</_PublishTargetUrl> - <History>True|2024-08-12T07:16:25.4105873Z;True|2024-08-12T14:13:56.5759921+08:00;True|2024-08-12T14:05:25.6296408+08:00;True|2024-08-12T13:50:57.0810804+08:00;True|2024-08-12T10:30:24.8931359+08:00;False|2024-08-12T10:25:18.6962973+08:00;True|2024-08-12T09:44:06.5186758+08:00;True|2024-08-11T16:06:42.9557785+08:00;</History> + <History>True|2024-08-13T07:57:03.8268438Z;True|2024-08-13T15:32:59.4887828+08:00;True|2024-08-13T15:02:20.6766194+08:00;True|2024-08-13T14:27:49.9912681+08:00;True|2024-08-13T13:13:01.1556314+08:00;True|2024-08-12T15:16:25.4105873+08:00;True|2024-08-12T14:13:56.5759921+08:00;True|2024-08-12T14:05:25.6296408+08:00;True|2024-08-12T13:50:57.0810804+08:00;True|2024-08-12T10:30:24.8931359+08:00;False|2024-08-12T10:25:18.6962973+08:00;True|2024-08-12T09:44:06.5186758+08:00;True|2024-08-11T16:06:42.9557785+08:00;</History> </PropertyGroup> <ItemGroup> <File Include="apiapp.json"> @@ -21,28 +21,28 @@ <publishTime>02/22/2013 16:43:40</publishTime> </File> <File Include="bin/BLL.dll"> - <publishTime>08/11/2024 16:06:30</publishTime> + <publishTime>08/13/2024 14:27:38</publishTime> </File> <File Include="bin/BLL.pdb"> - <publishTime>08/11/2024 16:06:30</publishTime> + <publishTime>08/13/2024 14:27:38</publishTime> </File> <File Include="bin/BouncyCastle.Crypto.dll"> <publishTime>12/18/2020 05:32:28</publishTime> </File> <File Include="bin/DAL.dll"> - <publishTime>08/11/2024 16:06:29</publishTime> + <publishTime>08/13/2024 14:27:36</publishTime> </File> <File Include="bin/DAL.pdb"> - <publishTime>08/11/2024 16:06:29</publishTime> + <publishTime>08/13/2024 14:27:36</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 22:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> - <publishTime>08/11/2024 16:06:25</publishTime> + <publishTime>08/13/2024 09:04:39</publishTime> </File> <File Include="bin/DBUtility.pdb"> - <publishTime>08/11/2024 16:06:25</publishTime> + <publishTime>08/13/2024 09:04:39</publishTime> </File> <File Include="bin/Grpc.Core.Api.dll"> <publishTime>03/22/2022 13:17:26</publishTime> @@ -87,10 +87,10 @@ <publishTime>07/25/2012 19:48:56</publishTime> </File> <File Include="bin/Model.dll"> - <publishTime>08/11/2024 16:06:26</publishTime> + <publishTime>08/13/2024 14:27:32</publishTime> </File> <File Include="bin/Model.pdb"> - <publishTime>08/11/2024 16:06:26</publishTime> + <publishTime>08/13/2024 14:27:32</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>04/06/2023 15:57:04</publishTime> @@ -255,13 +255,13 @@ <publishTime>11/24/2014 19:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> - <publishTime>08/12/2024 15:16:20</publishTime> + <publishTime>08/13/2024 15:32:53</publishTime> </File> <File Include="bin/WebAPI.pdb"> - <publishTime>08/12/2024 15:16:20</publishTime> + <publishTime>08/13/2024 15:32:53</publishTime> </File> <File Include="bin/WebAPI.XmlSerializers.dll"> - <publishTime>08/12/2024 15:16:24</publishTime> + <publishTime>08/13/2024 15:32:57</publishTime> </File> <File Include="bin/WebGrease.dll"> <publishTime>07/18/2013 01:03:52</publishTime> diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 69fe3ef..003f490 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -686,6 +686,7 @@ <Compile Include="Dapper\SqlPools.cs" /> <Compile Include="DbUntil\DataFormatUntil.cs" /> <Compile Include="DLL\ClsGy_BadPhenomena_Ctl.cs" /> + <Compile Include="DLL\ClsGy_TechnologyParameterType_Ctl.cs" /> <Compile Include="DLL\ClsGy_InspectInstruMent_Ctl.cs" /> <Compile Include="DLL\ClsGy_InspectBasis_Ctl.cs" /> <Compile Include="DLL\ClsGy_CheckNoteItem_Ctl.cs" /> -- Gitblit v1.9.1