From 1b9037dc460ee7caed5954e3b935bf89f9e0524e Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 06 五月 2025 09:39:31 +0800
Subject: [PATCH] 三升小诸葛数据同步
---
WebAPI/Controllers/WebAPIController.cs | 201 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 192 insertions(+), 9 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 3c29c17..7e43c66 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,22 +19291,18 @@
/// <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 where 1=1 order by 鍗曟嵁鍙� desc,hsubid", "h_v_Sc_ProcessExchangeBillList");
+ }
else
{
- string sql = "select * from h_v_Sc_ProcessExchangeBillList " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid ";
+ string sql = "select * from h_v_Sc_ProcessExchangeBillList where 1=1 " + sWhere + " order by 鍗曟嵁鍙� desc,hsubid ";
ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList");
}
if (ds == null || ds.Tables[0].Rows.Count <= 0)
--
Gitblit v1.9.1