From 8bbba0f6f4591251f425e3d344831ee35ab77978 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期二, 24 八月 2021 16:16:06 +0800 Subject: [PATCH] nothing --- WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | 36 ++++---- Model/生产管理/模具管理/ClsSc_MouldMaintainRuleBillSub_Item.cs | 2 WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs | 2 Pub_Class/Pub_Class.csproj | 1 WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 2 Pub_Class/CustomerCls/WebClsPub.cs | 147 ++++++++++++++++++++++++++++++++++++ WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs | 5 7 files changed, 173 insertions(+), 22 deletions(-) diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBillSub_Item.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBillSub_Item.cs" index 4ebd423..8096866 100644 --- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBillSub_Item.cs" +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBillSub_Item.cs" @@ -8,7 +8,7 @@ { //============ - public Int64 HMaintainItemID;// int --保养项目ID + public Int64 HMaintainItemID;// int --保养项目ID public string HMaintainItem;// varchar(100) --保养项目 public string HMaintainPart;// varchar(100) --保养部位 public string HClaim;// varchar(100) --具体要求 diff --git a/Pub_Class/CustomerCls/WebClsPub.cs b/Pub_Class/CustomerCls/WebClsPub.cs new file mode 100644 index 0000000..ce19349 --- /dev/null +++ b/Pub_Class/CustomerCls/WebClsPub.cs @@ -0,0 +1,147 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Pub_Class +{ + + public class WebClsPub + { + public static string ComputerName; + public static string IPAddress; + + //鍒ゆ柇鏄兘瀛樺湪鏉冮檺,骞跺啓鍏ユ棩蹇� + public static bool Security_Log(string gnsy, int LogTF, bool Msg, string CurUserName,ref string StrMessage) + { + //gnsy 鍔熻兘绱㈠紩,妯″潡 + //usercode 褰撳墠鐢ㄦ埛浠g爜 + //LogTF 1鍒ゆ柇鏉冮檺骞跺啓鏃ュ織锛�2鍙啓鏃ュ織锛�3鍙垽鏂潈闄� + //Msg 娌℃湁鏉冮檺鏃� 鏄惁鎻愮ず妗� + string UserID = CurUserName; + try + { + ClsSqlHelper oCn = new ClsSqlHelper(); + DataSet Ds = new DataSet(); + DataSet DsUser = new DataSet(); + DataSet DsJS = new DataSet();//瑙掕壊 + long ModID = 0; + bool HavRight = false; + //鎵惧埌妯″潡鏉冮檺 + Ds = oCn.RunProcReturn("select * from xt_xtgnb where gnsy='" + gnsy.Trim() + "'", "xt_xtgnb"); + if (Ds.Tables[0].Rows.Count == 0) + { + if (Msg == true) + { + StrMessage="娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒"; + } + return false; + } + else + { + ModID = ClsPub.isLong(Ds.Tables[0].Rows[0]["ID"].ToString()); //杩斿洖妯″潡 + } + if (LogTF == 1 || LogTF == 3)//闇�瑕佸垽鏂潈闄� + { + //鏍规嵁鐢ㄦ埛鍚嶇О鍒ゆ柇鏉冮檺 + DsUser = oCn.RunProcReturn("select * from gy_czygl where czymc='" + UserID.Trim() + "'", "gy_czygl"); + if (DsUser.Tables[0].Rows.Count == 0) + { + if (Msg == true) + { + StrMessage = "娌℃湁鎵惧埌褰撳墠鎿嶄綔鍛橈紒"; + } + return false; + } + //鏍规嵁鐢ㄦ埛鍚嶇О鍒ゆ柇鏉冮檺 + if ((bool)DsUser.Tables[0].Rows[0]["ManagerFlag"]) //鏄惁绠$悊鍛� + { + HavRight = true; + } + else + { + if (DsUser.Tables[0].Rows[0]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1") + { + HavRight = true; + } + else + { + //鑾峰彇鐢ㄦ埛缁� 骞跺惊鐜垽鏂潈闄� + //鍒ゆ柇瑙掕壊鏄惁鏈夋潈闄� + DsJS = oCn.RunProcReturn("select isnull(AuthorityID,'') AuthorityID from System_UserGroupinfo a inner join System_UserGroup b on a.GroupID=b.GroupID " + + " Where a.USERID='" + UserID.Trim() + "'", "gy_czygl"); + if (DsJS == null) + { + HavRight = false; + } + else + { + HavRight = false; + for (int i = 0; i < DsJS.Tables[0].Rows.Count; i++) + { + if (ClsPub.isStrNull(DsJS.Tables[0].Rows[i]["AuthorityID"]).Length > ModID) + { + if (DsJS.Tables[0].Rows[i]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1") + { + HavRight = true; + break; + } + } + } + + } + } + } + + if (HavRight == false) + { + if (Msg == true) + { + StrMessage = "鎮ㄦ病鏈夋潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒"; + } + } + } + //闇�瑕佸啓鍏ユ棩蹇� + if ((LogTF == 1 && HavRight) || LogTF == 2) + { + Add_Log(Ds.Tables[0].Rows[0]["id"].ToString().Trim(), gnsy + "," + Ds.Tables[0].Rows[0]["gnmc"].ToString().Trim(), CurUserName, ref StrMessage); + } + return HavRight; + } + catch (Exception e) + { + if (Msg == true) + { + StrMessage = "鍒ゆ柇鏉冮檺鏃跺彂鐜伴敊璇�,璇蜂笌绠$悊鍛樿仈绯伙紒"; + } + return false; + } + } + + //鍐欏叆鏃ュ織 + /// <summary> + /// 鍐欏叆鏃ュ織 + /// </summary> + /// <param name="UserID">鏃犵敤</param> + /// <param name="WorkList">鎿嶄綔鏃ュ織</param> + /// <param name="CurUserName">鎿嶄綔鍛�</param> + /// <returns></returns> + public static bool Add_Log(string UserID, string WorkList, string CurUserName,ref string StrMessage) + { + ClsSqlHelper oCn = new ClsSqlHelper(); + try + { + oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " + + "(getdate(),'" + CurUserName + "','" + ComputerName + "','" + WorkList + "','ERP绯荤粺','" + IPAddress + "','杩涘叆')" + ); + return true; + } + catch (Exception e) + { + StrMessage = "鍐欏叆鏃ュ織鏃跺彂鐜伴敊,鍘熷洜鏄細" + e.Message; + return false; + } + } + } +} diff --git a/Pub_Class/Pub_Class.csproj b/Pub_Class/Pub_Class.csproj index 0542373..eb30a24 100644 --- a/Pub_Class/Pub_Class.csproj +++ b/Pub_Class/Pub_Class.csproj @@ -87,6 +87,7 @@ <Compile Include="CustomerCls\ClsPub.cs" /> <Compile Include="CustomerCls\Cell.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="CustomerCls\WebClsPub.cs" /> </ItemGroup> <ItemGroup> <COMReference Include="stdole"> diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs index 78af215..c2eeaac 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs @@ -186,6 +186,7 @@ } } #endregion + #region [璁惧鐐规璁板綍琛ㄥ垹闄ゅ姛鑳絔 /// <summary> /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳� @@ -279,6 +280,7 @@ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet }; } #endregion + #region[璁惧鐐规璁板綍琛ㄧ紪杈戞椂鑾峰彇琛ㄩ鏁版嵁] [Route("Sb_EquipDotCheckBill/Sb_EquipDotCheckBillListProjectDetai")] [HttpGet] diff --git a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs index adbe425..13d594a 100644 --- a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs @@ -913,12 +913,13 @@ DBUtility.ClsPub.CurUserName = CurUserName; try { + string StrMessage = ""; //瀹℃牳鏉冮檺 - if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) + if (!WebClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName,ref StrMessage)) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.Message = StrMessage; objJsonResult.data = null; return objJsonResult; } diff --git a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs index 16bf02a..df0b009 100644 --- a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs +++ b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs @@ -2693,7 +2693,7 @@ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainBillListItem"); //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 string sql1 = "select HMaterID, 閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,鍗曚綅浠g爜 HUnitNumber,鍗曚綅鍚嶇О HUnitName,瀹為檯鐢ㄩ噺 HQty,鏍囧噯鐢ㄩ噺 HQtyMust,HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName,琛ㄤ綋澶囨敞 HRemark from h_v_Sc_MouldMaintainBillList where 1 = 1 " + Swhere + ""; - ds1 = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainBillList"); + ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainBillList"); list.Add(ds.Tables[0]); list.Add(ds1.Tables[0]); objJsonResult.code = "0"; diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index a9a720a..337330e 100644 --- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -18,28 +18,28 @@ <publishTime>02/22/2013 08:43:40</publishTime> </File> <File Include="bin/BLL.dll"> - <publishTime>08/23/2021 12:09:10</publishTime> + <publishTime>08/24/2021 15:02:10</publishTime> </File> <File Include="bin/BLL.pdb"> - <publishTime>08/23/2021 12:09:10</publishTime> + <publishTime>08/24/2021 15:02:10</publishTime> </File> <File Include="bin/DAL.dll"> - <publishTime>08/23/2021 12:09:08</publishTime> + <publishTime>08/24/2021 15:02:08</publishTime> </File> <File Include="bin/DAL.pdb"> - <publishTime>08/23/2021 12:09:08</publishTime> + <publishTime>08/24/2021 15:02:08</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 14:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> - <publishTime>08/23/2021 12:09:06</publishTime> + <publishTime>08/24/2021 15:02:06</publishTime> </File> <File Include="bin/DBUtility.pdb"> - <publishTime>08/23/2021 12:09:06</publishTime> + <publishTime>08/24/2021 15:02:06</publishTime> </File> <File Include="bin/Interop.gregn6Lib.dll"> - <publishTime>08/23/2021 12:09:09</publishTime> + <publishTime>08/24/2021 15:02:09</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.Client.dll"> <publishTime>08/09/2021 09:06:25</publishTime> @@ -60,10 +60,10 @@ <publishTime>07/25/2012 11:48:56</publishTime> </File> <File Include="bin/Model.dll"> - <publishTime>08/23/2021 12:09:06</publishTime> + <publishTime>08/24/2021 15:02:07</publishTime> </File> <File Include="bin/Model.pdb"> - <publishTime>08/23/2021 12:09:06</publishTime> + <publishTime>08/24/2021 15:02:07</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>08/09/2021 09:06:27</publishTime> @@ -72,22 +72,22 @@ <publishTime>08/03/2014 20:33:56</publishTime> </File> <File Include="bin/Pub_Class.dll"> - <publishTime>08/23/2021 12:09:05</publishTime> + <publishTime>08/24/2021 15:02:05</publishTime> </File> <File Include="bin/Pub_Class.pdb"> - <publishTime>08/23/2021 12:09:05</publishTime> + <publishTime>08/24/2021 15:02:05</publishTime> </File> <File Include="bin/Pub_Control.dll"> - <publishTime>08/23/2021 12:09:05</publishTime> + <publishTime>08/24/2021 15:02:06</publishTime> </File> <File Include="bin/Pub_Control.pdb"> - <publishTime>08/23/2021 12:09:05</publishTime> + <publishTime>08/24/2021 15:02:06</publishTime> </File> <File Include="bin/SQLHelper.dll"> - <publishTime>08/23/2021 12:09:05</publishTime> + <publishTime>08/24/2021 15:02:06</publishTime> </File> <File Include="bin/SQLHelper.pdb"> - <publishTime>08/23/2021 12:09:05</publishTime> + <publishTime>08/24/2021 15:02:06</publishTime> </File> <File Include="bin/stdole.dll"> <publishTime>05/09/2021 13:35:37</publishTime> @@ -189,10 +189,10 @@ <publishTime>11/24/2014 11:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> - <publishTime>08/23/2021 12:09:12</publishTime> + <publishTime>08/24/2021 15:02:11</publishTime> </File> <File Include="bin/WebAPI.pdb"> - <publishTime>08/23/2021 12:09:12</publishTime> + <publishTime>08/24/2021 15:02:11</publishTime> </File> <File Include="bin/WebGrease.dll"> <publishTime>07/17/2013 17:03:52</publishTime> @@ -363,7 +363,7 @@ <publishTime>08/06/2021 22:57:28</publishTime> </File> <File Include="Web.config"> - <publishTime>08/23/2021 12:09:20</publishTime> + <publishTime>08/24/2021 15:02:18</publishTime> </File> </ItemGroup> </Project> \ No newline at end of file -- Gitblit v1.9.1