From ebb5a4cabce43b6eff66a1f46f9adecb337ed820 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期四, 24 四月 2025 14:58:39 +0800
Subject: [PATCH] 修正
---
WebAPI/Controllers/WebAPIController.cs | 245 +++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 228 insertions(+), 17 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 3c29c17..edc4139 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -17888,6 +17888,193 @@
}
#endregion
+ #region 璁惧鑺傛媿缁存姢 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
+ /// <summary>
+ /// 椤圭洰璐圭敤鍒嗙被 淇濆瓨
+ /// </summary>
+ /// <param name="msg"></param>
+ /// <returns></returns>
+ [Route("SaveSb_EqiupMaterWorkTime")]
+ [HttpPost]
+ public object SaveSb_EqiupMaterWorkTime([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();
+
+
+ Int64 HItemID = 0;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鑾峰彇鏈�澶D鍊艰祴鍊�
+ DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from EqiupMaterWorkTimes ", "EqiupMaterWorkTimes");
+ 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
+ {
+ //淇濆瓨鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("EqiupMaterWorkTimes_Edit", 1, false, msg2))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ WebAPI.DLL.ClsEqiupMaterWorkTimes_Ctl oBill = new WebAPI.DLL.ClsEqiupMaterWorkTimes_Ctl();
+ List<Model.ClsEqiupMaterWorkTimes_Model> lsmain = new List<Model.ClsEqiupMaterWorkTimes_Model>();
+ msg1 = msg1.Replace("\\", "");
+ msg1 = msg1.Replace("\n", "");
+ lsmain = oListModels.getObjectByJson_EqiupMaterWorkTimes(msg1);
+ foreach (ClsEqiupMaterWorkTimes_Model item in lsmain)
+ {
+ oBill.oModel = item;
+ }
+
+ //淇濆瓨
+ //淇濆瓨瀹屾瘯鍚庡鐞�
+ bool bResult;
+ if (oBill.oModel.HItemID == 0)
+ {
+ bResult = oBill.AddNew();
+ }
+ else
+ {
+ bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+ }
+ if (bResult)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ 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("GetEqiupMaterWorkTimeDetail")]
+ [HttpGet]
+ public ApiResult<DataSet> GetEqiupMaterWorkTimeDetail(string HID)
+ {
+ var model = LuBaoSevice.GetEqiupMaterWorkTimeDetail(HID);
+ return model;
+ }
+
+ /// <summary>
+ /// 璁惧鑺傛媿缁存姢 鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("DeltetEqiupMaterWorkTime")]
+ [HttpGet]
+ public object DeltetEqiupMaterWorkTime(string HItemID, string user)
+ {
+ DataSet ds;
+ try
+ {
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("EqiupMaterWorkTimes_Delete", 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 EqiupMaterWorkTimes where HItemID=" + HItemID, "EqiupMaterWorkTimes");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
+ {
+ 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.RunProc("delete from EqiupMaterWorkTimes 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
+
/// <summary>
/// 鐢ㄥ叧鑱斿伐搴忚幏鍙栦俊鎭�
@@ -19104,23 +19291,19 @@
/// <returns></returns>
[Route("Web/GetSc_ProcessExchangeBillListView")]
[HttpGet]
- public object GetSc_ProcessExchangeBillListView(string ICMOBill, int OrganizationID)
- {
- if (ICMOBill != "" & ICMOBill != null)
- {
- sWhere = " where 1=1 and 鍗曟嵁鍙� like '%" + ICMOBill + "%' ";
- }
+ public object GetSc_ProcessExchangeBillListView(string sWhere,int OrganizationID)
+ {
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessExchangeBillList where 1=1 order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList");
- }
+ ds = oCN.RunProcReturn("select top 300 * from h_v_Sc_ProcessExchangeBillList_PDA where 1=1 order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList_PDA");
+ }
else
{
- string sql = "select * from h_v_Sc_ProcessExchangeBillList " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid ";
- ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList");
+ string sql = "select * from h_v_Sc_ProcessExchangeBillList_PDA where 1=1 " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid ";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList_PDA");
}
if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
@@ -20784,6 +20967,33 @@
return objJsonResult;
}
}
+
+ //鑾峰彇鎵�鏈夋ā鍧楅〉闈�
+ [Route("Web/ModePageList")]
+ [HttpGet]
+ public object ModePageList()
+ {
+ try
+ {
+
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ ds = oCn.RunProcReturn("Select * from Gy_Menu_1 where isnull(Hurl,'') like'%html%' Order by HItemID ", "Gy_Menu"); //鑾峰彇Gy_Menu_1涓殑鎵�鏈夎彍鍗曚俊鎭紝鐢ㄤ簬涓簃enuInitList鍒楄〃鍏�
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鏌ヨ鎴愬姛锛�";
+ objJsonResult.data = ds;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ澶辫触锛�";
+ objJsonResult.data = e.ToString();
+ return objJsonResult;
+ }
+ }
#endregion
#region 淇濆瓨鑷畾涔夋暟鎹�
@@ -20883,7 +21093,7 @@
//蹇嵎鏂瑰紡鑷畾涔夎彍鍗曪細鑾峰彇鏍戠粍浠舵暟鎹�
[Route("Web/Xt_UserFastMenu_Display")]
[HttpGet]
- public object Xt_UserFastMenu_Display(string HMakeName, string HType)
+ public object Xt_UserFastMenu_Display(string HMakeName, string HType,string HModelAtributos)
{
try
{
@@ -20908,7 +21118,7 @@
menuInit.HSelected = false;
//鍒ゆ柇鐢ㄦ埛鏄惁閫変腑鏄剧ず璇ヨ彍鍗�
- String sql = "Select * from Xt_UserFastMenu where HSubFuncID = '" + ds.Tables[0].Rows[i]["HItemID"] + "' and HUserID='" + HMakeName + "'";
+ String sql = "Select * from Xt_UserFastMenu where HSubFuncID = '" + ds.Tables[0].Rows[i]["HItemID"] + "' and HUserID='" + HMakeName + "' and HModelAtributos='" + HModelAtributos + "'";
ds1 = oCn.RunProcReturn(sql, "Xt_UserFastMenu");
if (ds1.Tables[0].Rows.Count > 0) //瀵逛簬Gy_Menu_1琛ㄤ腑鐨勮彍鍗曡妭鐐癸紝閫氳繃妫�绱㈠湪Gy_MenuDefineSet琛ㄤ腑瀵瑰簲鐢ㄦ埛鏄惁瀛樺湪璇ヨ妭鐐圭殑淇℃伅锛屽垽鏂鐢ㄦ埛鏄惁閫変腑璇ヨ妭鐐归渶瑕佸姞杞芥樉绀哄湪渚ц彍鍗曟爮
{
@@ -20976,6 +21186,7 @@
string HMakeName = sArray[1].ToString();
string saveData = sArray[0].ToString();
string HTypes = sArray[2].ToString();
+ string HModelAtributos = sArray[3].ToString();
List<SaveDefineMenu> saveDataList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<SaveDefineMenu>>(saveData);
//澹版槑鏁版嵁搴撴搷浣滃伐鍏�
@@ -20985,7 +21196,7 @@
oCN.BeginTran();
//鍒犻櫎褰撳墠鐢ㄦ埛鐨勮嚜瀹氫箟鏁版嵁
- string sql = "delete from Xt_UserFastMenu where HUserID = '" + HMakeName + "' and HType = '" + HTypes + "'";
+ string sql = "delete from Xt_UserFastMenu where HUserID = '" + HMakeName + "' and HType = '" + HTypes + "' and HModelAtributos = '" + HModelAtributos + "'";
oCN.RunProc(sql);
//鎻掑叆褰撳墠鐢ㄦ埛鏈�鏂扮殑鑷畾涔夋暟鎹�
@@ -21004,7 +21215,7 @@
string HCaption = ds.Tables[0].Rows[0]["HName"].ToString();
string HType = ds.Tables[0].Rows[0]["HType"].ToString();
- sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "')";
+ sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType,HModelAtributos) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "','"+ HModelAtributos + "')";
oCN.RunProc(sql);
}
}
@@ -21034,17 +21245,17 @@
//蹇嵎鏂瑰紡鑷畾涔夎彍鍗曪細鑾峰彇鏍戠粍浠舵暟鎹�
[Route("Web/Xt_UserFastMenu_Init")]
[HttpGet]
- public object Xt_UserFastMenu_Init(string HMakeName, string HType)
+ public object Xt_UserFastMenu_Init(string HMakeName, string HType,string HModelAtributos)
{
try
{
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
- string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' Order by a.HItemID";
+ string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' and a.HModelAtributos = '" + HModelAtributos + "' Order by a.HItemID";
ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
- sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = 'admin' and b.HType = '" + HType + "' Order by a.HItemID";
+ sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = 'admin' and b.HType = '" + HType + "' and a.HModelAtributos = '" + HModelAtributos + "' Order by a.HItemID";
ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇
}
--
Gitblit v1.9.1