From bb001d64dcb47dd59179f334719a8dd95d2908a0 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 11 九月 2024 21:12:21 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs | 101 +++++++++++++++++++++++++++++++++-----------------
1 files changed, 66 insertions(+), 35 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index 08ca53e..6d03813 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -1839,7 +1839,7 @@
[Route("OA_ErrMsgBackSignBill_BrushCard/ErrMsgBackReceive")]
[HttpGet]
- public object ErrMsgBackReceive(string sWhere, string user)
+ public object ErrMsgBackReceive(string sWhere,string num, string user)
{
try
{
@@ -1854,18 +1854,38 @@
objJsonResult.data = null;
return objJsonResult;
}
-
- if (sWhere == null || sWhere.Equals(""))
+ if (num=="2") //鎶ュ伐鍙拌幏鍙栧埛鍗$鍒版暟鎹�
{
- string sql = "select * from h_v_OA_ErrMsgBackReceiveBillList_BrushCard order by 鍗曟嵁鍙� desc";
- ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillList_BrushCard");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ string sql = "select * from h_v_SingOA_ErrMsgBackList_BrushCard order by 鍗曟嵁鍙� desc";
+ ds = oCN.RunProcReturn(sql, "h_v_SingOA_ErrMsgBackList_BrushCard");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_SingOA_ErrMsgBackList_BrushCard where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+ ds = oCN.RunProcReturn(sql, "h_v_SingOA_ErrMsgBackList_BrushCard");
+ }
}
- else
+ else //鍘熸湁鐨勫埛鍗$鍒拌幏鍙栨暟鎹�
{
- string sql1 = "select * from h_v_OA_ErrMsgBackReceiveBillList_BrushCard where 1 = 1 ";
- string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
- ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillList_BrushCard");
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ string sql = "select * from h_v_OA_ErrMsgBackReceiveBillList_BrushCard order by 鍗曟嵁鍙� desc";
+ ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillList_BrushCard");
+ }
+ else
+ {
+ string sql1 = "select * from h_v_OA_ErrMsgBackReceiveBillList_BrushCard where 1 = 1 ";
+ string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+ ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillList_BrushCard");
+ }
+ }
}
+
+
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
@@ -2925,7 +2945,7 @@
{
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
- _ = SendDingDingAsync(oBill.omodel.HSendMan, 1, oBill.omodel.HDescription, oBill.omodel.HReceiveMan);
+ _ = SendDingDingAsync(oBill.omodel.HSendMan, 2, oBill.omodel.HDescription, oBill.omodel.HReceiveMan);
}
else if (refSav == "Update")
{
@@ -6653,7 +6673,7 @@
}
- if (HHandleEmpID==0) //寮傚父鍙嶉楠屾敹鍗曚繚瀛� 灏嗘秷鎭� 鍙戦�佺粰 鎺ユ敹浜猴紝鎸囨淳澶勭悊浜猴紝鍏ㄩ儴鎶勯�佷汉
+ if (HHandleEmpID==0) //
{
string HReceiveMan = HSendMan;
string[] names = HCopyMan.Split(',');
@@ -6674,13 +6694,14 @@
}
concatenatedNames = string.Join(",", HNames);
+ HDescription = HDescription + "--宸查獙鏀�";
}
- else if (HHandleEmpID==1)//寮傚父鍙嶉绛惧埌鍗�,寮傚父鍙嶉澶勭悊鍗� 灏嗘秷鎭� 鍙戦�佺粰 鍙戦�佷汉锛屾帴鏀朵汉
+ else if (HHandleEmpID==1)//寮傚父鍙嶉澶勭悊鍗� 灏嗘秷鎭� 鍙戦�佺粰 鍙戦�佷汉锛屾帴鏀朵汉
{
//鑾峰彇鍙戦�佷汉 鎺ユ敹浜�
string HReceiveMan = HCopyMan;
string sql1 = "select HDingDingUserID 閽夐拤id from Gy_Czygl where Czymc in ('" + HSendMan + "','" + HReceiveMan + "')";
- ds = oCN.RunProcReturn(sql1, "Gy_Czygl");
+ ds = oCN.RunProcReturn(sql1, "Gy_Czygl");
List<string> HNames = new List<string>();
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
@@ -6689,16 +6710,13 @@
}
concatenatedNames = string.Join(",", HNames);
+ HDescription = HDescription + "--宸茬鍒�";
}
- else
+ else if (HHandleEmpID == 2)//寮傚父鍙嶉澶勭悊鍗� 灏嗘秷鎭� 鍙戦�佺粰 鍙戦�佷汉锛屾帴鏀朵汉
{
- //鏌ヨ鎸囨淳澶勭悊浜�
- string sql = "select HName from Gy_Employee where HItemID='" + HHandleEmpID + "'";
- ds = oCN.RunProcReturn(sql, "Gy_Employee");
- string HHandleEmpName = ds.Tables[0].Rows[0]["HName"].ToString();
- //鑾峰彇鎸囨淳澶勭悊浜�,鍙戦�佷汉鐨勯拤閽塱d
- string sql1 = "select HDingDingUserID 閽夐拤id from Gy_Czygl where Czymc in ('" + HSendMan + "','" + HHandleEmpName + "')";
- LogService.CustomWriteLog("10鍙傛暟" + sql1, "寮傚父缃氭");
+ //鑾峰彇鍙戦�佷汉 鎺ユ敹浜�
+ string HReceiveMan = HCopyMan;
+ string sql1 = "select HDingDingUserID 閽夐拤id from Gy_Czygl where Czymc in ('" + HSendMan + "','" + HReceiveMan + "')";
ds = oCN.RunProcReturn(sql1, "Gy_Czygl");
List<string> HNames = new List<string>();
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
@@ -6708,7 +6726,26 @@
}
concatenatedNames = string.Join(",", HNames);
- LogService.CustomWriteLog("9鍙傛暟" + concatenatedNames, "寮傚父缃氭");
+ HDescription = HDescription + "--宸插鐞�";
+ }
+ else
+ {
+ //鏌ヨ鎸囨淳澶勭悊浜�
+ string sql = "select HName from Gy_Employee where HItemID='" + HHandleEmpID + "'";
+ ds = oCN.RunProcReturn(sql, "Gy_Employee");
+ string HHandleEmpName = ds.Tables[0].Rows[0]["HName"].ToString();
+ //鑾峰彇鎸囨淳澶勭悊浜�,鍙戦�佷汉鐨勯拤閽塱d
+ string sql1 = "select HDingDingUserID 閽夐拤id from Gy_Czygl where Czymc in ('" + HSendMan + "','" + HHandleEmpName + "')";
+ ds = oCN.RunProcReturn(sql1, "Gy_Czygl");
+ List<string> HNames = new List<string>();
+ for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+ {
+ string HName = ds.Tables[0].Rows[i]["閽夐拤id"].ToString();
+ HNames.Add(HName);
+
+ }
+ concatenatedNames = string.Join(",", HNames);
+ HDescription = HDescription + "--宸叉帴鏀�";
}
//鑾峰彇浼佷笟鐨刟ccess_token鐨勫��
@@ -6788,7 +6825,7 @@
{
List<object> columnNameList = new List<object>();
- string sql = "select a.HSourceBillNo 娴佽浆鍗″彿,a.HSourceBillType 娴佽浆鍗$被鍨�,a.HSourceInterID 娴佽浆鍗′富鍐呯爜,a.HSourceEntryID 娴佽浆鍗″瓙鍐呯爜,b.HNumber 鐗╂枡浠g爜,b.HName 鐗╂枡鍚嶇О,b.HModel 瑙勬牸鍨嬪彿,a.HPlanQty 璁″垝鏁伴噺,a.HSourceID,c.HName 鐢熶骇璧勬簮 from Sc_ICMOBillStatus_Tmp a " +
+ string sql = "select a.HSourceBillNo 娴佽浆鍗″彿,a.HSourceBillType 娴佽浆鍗$被鍨�,a.HSourceInterID 娴佽浆鍗′富鍐呯爜,a.HSourceEntryID 娴佽浆鍗″瓙鍐呯爜,b.HNumber 鐗╂枡浠g爜,b.HName 鐗╂枡鍚嶇О,b.HModel 瑙勬牸鍨嬪彿,a.HDatePlanQty 璁″垝鏁伴噺,a.HSourceID,c.HName 鐢熶骇璧勬簮 from Sc_ICMOBillStatus_Tmp a " +
"left join Gy_Material b on a.HMaterID=b.HItemID left join Gy_Source c on a.HSourceID=c.HItemID where HSourceBillNo='" + HSourceBill + "'";
ds = oCN.RunProcReturn(sql, "Sc_ICMOBillStatus_Tmp");
@@ -6871,19 +6908,13 @@
string sql = "select a.Czymc 鐢ㄦ埛鍚嶇О,c.GroupName 鑱屽姟 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId left join System_UserGroup c on b.GroupId = c.GroupID where a.Czymc = '"+HName+"'";
ds = oCN.RunProcReturn(sql, "Gy_ErrMsgBackType");
string Job = ds.Tables[0].Rows[0]["鑱屽姟"].ToString();
- if (Job=="娉ㄥ鐝粍闀�" || Job=="鍚庡鐞嗙彮缁勯暱")
- {
- //鏍规嵁鑱屽姟鎵惧埌浠栫殑涓嬬骇,缁欏彂閫佷汉榛樿涓虹彮缁勯暱涔嬩笅
- string sql1 = "select * from Gy_Duty where HParentID =(select HItemID from Gy_Duty group by HItemID, HName having HName = '"+Job+"' and count(*) = 1)";
- ds = oCN.RunProcReturn(sql1, "Gy_Duty");
- }
- else
- {
- //鏍规嵁鑱屽姟鎵惧埌浠栫殑涓婄骇
- string sql2 = "select * from Gy_Duty where HItemID =(select HParentID from Gy_Duty group by HParentID, HName having HName = '" + Job + "' and count(*) = 1)";
- ds = oCN.RunProcReturn(sql2, "Gy_Duty");
- }
+
+ //鏍规嵁鑱屽姟鎵惧埌浠栫殑涓婄骇,缁欏彂閫佷汉榛樿涓哄綋鍓嶇櫥褰曚汉
+ string sql1 = "select * from Gy_Duty where HItemID =(select HParentID from Gy_Duty group by HParentID, HName having HName = '" + Job + "' and count(*) = 1))";
+ ds = oCN.RunProcReturn(sql1, "Gy_Duty");
+
string Job1= ds.Tables[0].Rows[0]["HName"].ToString();
+
//鐢ㄨ亴鍔℃壘鍒扮敤鎴�
string sql3 = "select a.Czymc 鐢ㄦ埛鍚嶇О,c.GroupName 鑱屽姟 from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId left join System_UserGroup c on b.GroupId = c.GroupID where c.GroupName = '" + Job1+"'";
ds = oCN.RunProcReturn(sql3, "Gy_Czygl");
--
Gitblit v1.9.1