From e9148201e38544b76a5c33083f939933fee51d32 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期三, 17 七月 2024 10:36:19 +0800 Subject: [PATCH] 流转卡下推设备工艺参数点检获取数据,修复休息日出现重复数据不能保存 --- WebAPI/Controllers/LMESController.cs | 30 ++++++++++++-- WebAPI/Controllers/WebAPIController.cs | 3 - WebAPI/Properties/PublishProfiles/FolderProfile15.pubxml.user | 36 +++++++++--------- WebAPI/DLL/ClsGy_RestDay_Ctl.cs | 36 +++++++++++------ 4 files changed, 67 insertions(+), 38 deletions(-) diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs index 8c31fa0..267935f 100644 --- a/WebAPI/Controllers/LMESController.cs +++ b/WebAPI/Controllers/LMESController.cs @@ -1667,11 +1667,7 @@ return GetObjectJson(ds); } - /// <summary> - /// 杩斿洖宸ュ簭娴佽浆鍗″垪琛� - ///鍙傛暟锛歴tring sql銆� - ///杩斿洖鍊硷細object銆� - /// </summary> + #region 宸ュ簭娴佽浆鍗′笅鎺ㄧ敓浜ц川閲忔眹鎶ュ崟 [Route("LEMS/MES_IF_ProcessBillList_Json")] [HttpGet] public object MES_IF_ProcessBillList_Json(string hinterid, string HEntryID, string user) @@ -1692,6 +1688,30 @@ } return GetObjectJson(ds); } + #endregion + + #region 宸ュ簭娴佽浆鍗′笅鎺ㄨ澶囩偣妫�鍙傛暟琛� + [Route("LEMS/MES_IF_EquipICMOTechParamList_Json")] + [HttpGet] + public object MES_IF_EquipICMOTechParamList_Json(string hinterid, string HEntryID, string user) + { + DataSet ds; + try + { + + ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery_TechParam where hmainid ='" + hinterid + "' and HEntryID='" + HEntryID + "'", "h_v_Sc_ProcessExchangeBillQuerySub"); + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + return GetObjectJson(ds); + } + #endregion #region 鐢熶骇璁㈠崟 涓嬫煡 /// <summary> diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 1c84ba2..b1d9647 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -10496,7 +10496,6 @@ objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; - //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); objJsonResult.data = 1; return objJsonResult; } @@ -10504,7 +10503,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.Message = "淇濆瓨澶辫触锛佹暟鎹凡瀛樺湪!"; objJsonResult.data = 1; return objJsonResult; } diff --git a/WebAPI/DLL/ClsGy_RestDay_Ctl.cs b/WebAPI/DLL/ClsGy_RestDay_Ctl.cs index 78a82aa..7fd3ac7 100644 --- a/WebAPI/DLL/ClsGy_RestDay_Ctl.cs +++ b/WebAPI/DLL/ClsGy_RestDay_Ctl.cs @@ -15,21 +15,31 @@ //鏂板 public override bool AddNew() { - // + DataSet ds; try { - oCn.BeginTran(); - oCn.RunProc("Insert into " + MvarItemKey + " " + - " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + - ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID," + - "HOrgID,HDeptID,HRestDay,HWeekDay) " + - " 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.HUSEORGID + "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp+ "','" + oModel.HUSEORGID + "'" + - ",'" + oModel.HOrgID.ToString() + "','" + oModel.HDeptID.ToString() + "','" + oModel.HRestDay.ToString() + "','" + oModel.HWeekDay.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo); - //淇敼涓婄骇涓洪潪鏈骇浠g爜 - oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); - oCn.Commit(); - return true; + //鍏堟煡鐪嬫暟鎹簱鏈夋病鏈� + ds = oCn.RunProcReturn("select * from Gy_RestDay where HRestDay='" + oModel.HRestDay.ToString() + "' and HOrgID='" + oModel.HOrgID.ToString() + "' and HDeptID='" + oModel.HDeptID.ToString() + "'", "Gy_RestDay"); + if (ds.Tables[0].Rows.Count < 1) + { + oCn.BeginTran(); + oCn.RunProc("Insert into " + MvarItemKey + " " + + " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + + ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID," + + "HOrgID,HDeptID,HRestDay,HWeekDay) " + + " 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.HUSEORGID + "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp + "','" + oModel.HUSEORGID + "'" + + ",'" + oModel.HOrgID.ToString() + "','" + oModel.HDeptID.ToString() + "','" + oModel.HRestDay.ToString() + "','" + oModel.HWeekDay.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo); + //淇敼涓婄骇涓洪潪鏈骇浠g爜 + oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); + oCn.Commit(); + return true; + } + else + { + return false; + } + } catch (Exception e) { diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile15.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile15.pubxml.user index 515506b..eb2edc8 100644 --- a/WebAPI/Properties/PublishProfiles/FolderProfile15.pubxml.user +++ b/WebAPI/Properties/PublishProfiles/FolderProfile15.pubxml.user @@ -4,7 +4,7 @@ --> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> - <History>True|2024-07-15T10:25:56.8513970Z;True|2024-07-15T18:09:06.8846250+08:00;True|2024-07-15T16:43:30.5405561+08:00;True|2024-07-15T15:21:21.1227016+08:00;True|2024-07-15T15:17:39.9283465+08:00;True|2024-07-15T14:54:11.3495767+08:00;True|2024-07-15T13:59:09.4243337+08:00;True|2024-07-15T13:54:34.1993714+08:00;True|2024-07-15T13:50:18.8921152+08:00;True|2024-07-15T13:48:52.6793990+08:00;True|2024-07-15T13:41:38.7896562+08:00;True|2024-07-15T12:07:43.8834464+08:00;True|2024-07-15T12:03:36.2859286+08:00;True|2024-07-15T11:31:11.9462854+08:00;True|2024-07-12T11:12:48.2429052+08:00;True|2024-07-12T11:00:40.3954752+08:00;True|2024-07-12T10:59:20.7895441+08:00;True|2024-07-12T10:23:59.9903863+08:00;True|2024-07-12T10:23:38.3456675+08:00;False|2024-07-11T20:05:30.6369108+08:00;False|2024-07-11T20:04:21.0285923+08:00;</History> + <History>True|2024-07-17T02:34:20.6073593Z;True|2024-07-17T09:54:04.5489967+08:00;True|2024-07-16T16:30:18.3627034+08:00;True|2024-07-15T18:25:56.8513970+08:00;True|2024-07-15T18:09:06.8846250+08:00;True|2024-07-15T16:43:30.5405561+08:00;True|2024-07-15T15:21:21.1227016+08:00;True|2024-07-15T15:17:39.9283465+08:00;True|2024-07-15T14:54:11.3495767+08:00;True|2024-07-15T13:59:09.4243337+08:00;True|2024-07-15T13:54:34.1993714+08:00;True|2024-07-15T13:50:18.8921152+08:00;True|2024-07-15T13:48:52.6793990+08:00;True|2024-07-15T13:41:38.7896562+08:00;True|2024-07-15T12:07:43.8834464+08:00;True|2024-07-15T12:03:36.2859286+08:00;True|2024-07-15T11:31:11.9462854+08:00;True|2024-07-12T11:12:48.2429052+08:00;True|2024-07-12T11:00:40.3954752+08:00;True|2024-07-12T10:59:20.7895441+08:00;True|2024-07-12T10:23:59.9903863+08:00;True|2024-07-12T10:23:38.3456675+08:00;False|2024-07-11T20:05:30.6369108+08:00;False|2024-07-11T20:04:21.0285923+08:00;</History> <_PublishTargetUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</_PublishTargetUrl> </PropertyGroup> <ItemGroup> @@ -21,28 +21,28 @@ <publishTime>02/22/2013 16:43:40</publishTime> </File> <File Include="bin/BLL.dll"> - <publishTime>07/15/2024 18:25:44</publishTime> + <publishTime>07/17/2024 10:34:05</publishTime> </File> <File Include="bin/BLL.pdb"> - <publishTime>07/15/2024 18:25:44</publishTime> + <publishTime>07/17/2024 10:34:05</publishTime> </File> <File Include="bin/BouncyCastle.Crypto.dll"> <publishTime>12/18/2020 05:32:28</publishTime> </File> <File Include="bin/DAL.dll"> - <publishTime>07/15/2024 18:25:43</publishTime> + <publishTime>07/17/2024 10:34:04</publishTime> </File> <File Include="bin/DAL.pdb"> - <publishTime>07/15/2024 18:25:43</publishTime> + <publishTime>07/17/2024 10:34:04</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 22:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> - <publishTime>07/15/2024 18:25:40</publishTime> + <publishTime>07/17/2024 10:34:01</publishTime> </File> <File Include="bin/DBUtility.pdb"> - <publishTime>07/15/2024 18:25:40</publishTime> + <publishTime>07/17/2024 10:34:01</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>07/15/2024 18:25:41</publishTime> + <publishTime>07/17/2024 10:34:01</publishTime> </File> <File Include="bin/Model.pdb"> - <publishTime>07/15/2024 18:25:41</publishTime> + <publishTime>07/17/2024 10:34:01</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>05/25/2024 09:46:41</publishTime> @@ -123,25 +123,25 @@ <publishTime>10/23/2021 17:07:54</publishTime> </File> <File Include="bin/Pub_Class.dll"> - <publishTime>07/15/2024 18:25:39</publishTime> + <publishTime>07/17/2024 10:33:58</publishTime> </File> <File Include="bin/Pub_Class.pdb"> - <publishTime>07/15/2024 18:25:39</publishTime> + <publishTime>07/17/2024 10:33:58</publishTime> </File> <File Include="bin/Pub_Control.dll"> - <publishTime>07/15/2024 18:25:40</publishTime> + <publishTime>07/17/2024 10:33:59</publishTime> </File> <File Include="bin/Pub_Control.pdb"> - <publishTime>07/15/2024 18:25:40</publishTime> + <publishTime>07/17/2024 10:33:59</publishTime> </File> <File Include="bin/RestSharp.dll"> <publishTime>08/31/2012 06:22:50</publishTime> </File> <File Include="bin/SQLHelper.dll"> - <publishTime>07/15/2024 18:25:40</publishTime> + <publishTime>07/17/2024 10:34:00</publishTime> </File> <File Include="bin/SQLHelper.pdb"> - <publishTime>07/15/2024 18:25:40</publishTime> + <publishTime>07/17/2024 10:34:00</publishTime> </File> <File Include="bin/Swashbuckle.Core.dll"> <publishTime>02/16/2015 01:57:08</publishTime> @@ -255,10 +255,10 @@ <publishTime>11/24/2014 19:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> - <publishTime>07/15/2024 18:25:49</publishTime> + <publishTime>07/17/2024 10:34:12</publishTime> </File> <File Include="bin/WebAPI.pdb"> - <publishTime>07/15/2024 18:25:49</publishTime> + <publishTime>07/17/2024 10:34:12</publishTime> </File> <File Include="bin/WebGrease.dll"> <publishTime>07/18/2013 01:03:52</publishTime> @@ -453,7 +453,7 @@ <publishTime>05/25/2024 09:46:41</publishTime> </File> <File Include="Web.config"> - <publishTime>07/15/2024 18:25:56</publishTime> + <publishTime>07/17/2024 10:34:19</publishTime> </File> </ItemGroup> </Project> \ No newline at end of file -- Gitblit v1.9.1