From 72e0c48841482d66677f636b1796002f7b7fbe82 Mon Sep 17 00:00:00 2001 From: pzy <2829717936@qq.com> Date: 星期五, 23 八月 2024 10:42:56 +0800 Subject: [PATCH] 11 --- WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs | 46 ++++++++++++++++++++++++++++++++-------------- 1 files changed, 32 insertions(+), 14 deletions(-) diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs index 5e17f82..cf91001 100644 --- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs @@ -2925,7 +2925,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 +6653,7 @@ } - if (HHandleEmpID==0) //寮傚父鍙嶉楠屾敹鍗曚繚瀛� 灏嗘秷鎭� 鍙戦�佺粰 鎺ユ敹浜猴紝鎸囨淳澶勭悊浜猴紝鍏ㄩ儴鎶勯�佷汉 + if (HHandleEmpID==0) // { string HReceiveMan = HSendMan; string[] names = HCopyMan.Split(','); @@ -6674,13 +6674,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 +6690,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 +6706,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 +6805,8 @@ { 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 璁″垝鏁伴噺 from Sc_ICMOBillStatus_Tmp a left join Gy_Material b on a.HMaterID=b.HItemID where HSourceBillNo='" + HSourceBill + "'"; + 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 " + + "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"); //娣诲姞鍒楀悕 -- Gitblit v1.9.1