From edcd7574e709748c5d3ccc0bd54930414ddcfc9a Mon Sep 17 00:00:00 2001 From: chenhaozhe <cgz@hz-kingdee.com> Date: 星期五, 30 五月 2025 21:00:08 +0800 Subject: [PATCH] 合并冲突 --- WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs | 89 +++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 82 insertions(+), 7 deletions(-) diff --git a/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs b/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs index 898371b..b6db605 100644 --- a/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs +++ b/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs @@ -12,6 +12,8 @@ using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�; using System.IO; using SyntacticSugar.constant; +using Newtonsoft.Json; + namespace WebAPI.Controllers.SBGL { public class Gy_EquipTypeController : ApiController @@ -32,6 +34,7 @@ { try { + List<object> columnNameList = new List<object>(); //if (!DBUtility.ClsPub.Security_Log("Gy_EquipTypeList", 1, false, user)) //{ // objJsonResult.code = "0"; @@ -40,13 +43,22 @@ // objJsonResult.data = null; // return objJsonResult; //} - ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag,HMakeEmp,HMakeTime,HCheckEmp,HCheckTime,HModifyEmp,HModifyTime,HCloseEmp,HCloseTime from Gy_EquipFileType where 1=1 " + sWhere+ " order by HItemID ", "Gy_EquipFileType"); - + ds = oCN.RunProcReturn("select * from h_v_Gy_EquipFileTypeList where 1=1 " + sWhere+ " order by HItemID ", "h_v_Gy_EquipFileTypeList"); + + //娣诲姞鍒楀悕 + 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 ex) @@ -134,7 +146,8 @@ string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); - string msg4 = sArray[1].ToString(); + string msg4 = sArray[2].ToString(); + string HUseOrgID = sArray[3].ToString(); if (!DBUtility.ClsPub.Security_Log("Gy_EquipType_Edit", 1, false, msg4)) { @@ -159,6 +172,8 @@ bool HStopflag = list[0].HStopflag; string HUseFlag = list[0].HUseFlag; bool HEndFlag = list[0].HEndFlag; + long HUSEORGID = list[0].HUSEORGID; + long HCREATEORGID = list[0].HCREATEORGID; if (!DBUtility.ClsPub.AllowNumber(HNumber)) @@ -170,19 +185,38 @@ return objJsonResult; } - + //淇濆瓨鍓嶆帶鍒�========================================= + ds = oCN.RunProcReturn("Exec h_p_Gy_EquipType_BeforeSaveCtrl '" + HNumber.ToString() + "','" + HName + "'," + HUSEORGID + ",1,0", " h_p_Gy_EquipType_BeforeSaveCtrl "); + if (ds == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + //========================================================= //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� oCN.BeginTran(); //涓昏〃 oCN.RunProc("Insert into Gy_EquipFileType " + " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + - ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HMakeEmp) " + + ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HMakeEmp,HUSEORGID,HCREATEORGID) " + " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID + - "," + HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate(),'" + msg4 + "')", ref DBUtility.ClsPub.sExeReturnInfo); + "," + HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate(),'" + msg4 + "'," + HUSEORGID + "," + HCREATEORGID + ")", ref DBUtility.ClsPub.sExeReturnInfo); //淇敼涓婄骇涓洪潪鏈骇浠g爜 oCN.RunProc("Update Gy_EquipFileType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); oCN.Commit(); + objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "鏂板鎴愬姛锛�"; @@ -242,6 +276,7 @@ string HRemark = list[0].HRemark; bool HStopflag = list[0].HStopflag; string HUseFlag = list[0].HUseFlag; + long HUSEORGID = list[0].HUSEORGID; if (!DBUtility.ClsPub.AllowNumber(HNumber)) { @@ -262,6 +297,25 @@ return objJsonResult; } + //淇濆瓨鍓嶆帶鍒�========================================= + ds = oCN.RunProcReturn("Exec h_p_Gy_EquipType_BeforeSaveCtrl '" + HNumber.ToString() + "','" + HName + "'," + HUSEORGID + ",3," + HItemID, " h_p_Gy_EquipType_BeforeSaveCtrl "); + if (ds == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨鍓嶅垽鏂け璐ワ紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + //========================================================= //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� oCN.BeginTran(); @@ -275,6 +329,7 @@ ",HModifyTime=getdate()" + ",HModifyEmp='" + msg4 + "'" + ",HStopflag='" + HStopflag + "'" + + ",HUSEORGID=" + HUSEORGID + ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); //淇敼瀛愰」鐩唬鐮� //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); @@ -307,7 +362,7 @@ { try { - ds = oCN.RunProcReturn("select * from Gy_EquipFileType where HItemID=" + HInterID, "Gy_EquipFileType"); + ds = oCN.RunProcReturn("select * from h_v_Gy_EquipFileTypeEdit with(nolock) where HItemID=" + HInterID, "h_v_Gy_EquipFileTypeEdit"); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -352,6 +407,26 @@ return objJsonResult; } + //瀹℃牳鍓嶆帶鍒�========================================= + ds = oCN.RunProcReturn("Exec h_p_Gy_EquipType_BeforeAuditCtrl " + HInterID + ",'" + Type + "'", " h_p_Gy_EquipType_BeforeAuditCtrl "); + if (ds == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏍¢獙鍒ゆ柇澶辫触锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + //========================================================= + ClsPub.CurUserName = user; oCN.BeginTran();//寮�濮嬩簨鍔� -- Gitblit v1.9.1