From 7d1ce3d6438e820c0fb69480f5d50cd68e271dd4 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 15 十月 2025 14:26:09 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 104 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs
index 381c87c..bdf580d 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcExchSendWorkBillController.cs
@@ -59,6 +59,86 @@
}
#endregion
+ #region 宸ュ簭娲惧伐鍗曞垪琛�(鑱屽憳鏌ョ湅鑷繁浠诲姟)
+ [Route("Sc_ProcExchSendWorkBill/Sc_ProcExchSendWorkBillListByEmp")]
+ [HttpGet]
+ public object Sc_ProcExchSendWorkBillListByEmp(string sWhere, string user,int HEmpID)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sql = $"exec h_p_Sc_ProcExchSendWorkBillListByEmp '{sWhere}','{user}',{HEmpID} ";
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_ProcExchSendWorkBillListByEmp");
+
+ //娣诲姞鍒楀悕
+ 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.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 娲惧伐骞冲彴鏌ヨ宸ュ簭娴佽浆鍗℃暟鎹�
+ [Route("Sc_ProcExchSendWorkBill/Sc_ProcessExchangeHEmpList")]
+ [HttpGet]
+ public object Sc_ProcessExchangeHEmpList(string sWhere, string user)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ List<object> columnNameList = new List<object>();
+ //寰楀埌淇℃伅锛堝澶栨爣璁颁负0鏃讹紝娴佽浆鏍囪涓�1鏃讹級
+ //ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillList_Sec where 涓嬮亾娴佽浆宸ュ簭<>'杞�' and 濮斿鏍囪=0 and 娴佽浆鏍囪=1 and 宸ュ簭鍙�='" + sProcNo + "' and 搴忓垪鍙�='" + HSEQNumber + "'", "h_v_Sc_ProcessExchangeBillList_Sec");
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeArrangementHEmpList where 1=1 " + sWhere, "h_v_Sc_ProcessExchangeArrangementHEmpList");
+
+ //娣诲姞鍒楀悕
+ 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 = "[0000-1-037]Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
#region 鏌ヨ宸ュ簭娴佽浆鍗℃暟鎹�
[Route("Sc_ProcExchSendWorkBill/GetProcessExchangeBillSub")]
[HttpGet]
@@ -237,7 +317,30 @@
return objJsonResult;
}
- bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+ string sql1 = "exec h_p_Sc_ProcExchSendWorkBill_BeforeDelCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
+ ds = oCN.RunProcReturn(sql1, "h_p_Sc_ProcExchSendWorkBill_BeforeDelCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //==================================================================================
+
+ bool IsDete = oBill.DeleteBill(lngBillKey, HBillNo, "h_p_Sc_ProcExchSendWorkBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
if (IsDete)
{
objJsonResult.code = "0";
--
Gitblit v1.9.1