From 99afe4aa57546afd30f59cb36089da1304d3962e Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 27 六月 2025 15:33:08 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs |   96 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 95 insertions(+), 1 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index 0e564eb..83b8bcd 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -7534,6 +7534,22 @@
                 concatenatedNames = string.Join(",", HNames);
                 HDescription = HDescription + "--宸插鐞�";
             }
+            else if (HHandleEmpID == 4)//鎶ュ伐鍙� 寮傚父楠屾敹  椹冲洖鎸夐挳  灏嗘秷鎭� 鍙戦�佺粰 鍙戦�佷汉锛屾帴鏀朵汉
+            {
+                //鑾峰彇鍙戦�佷汉  鎺ユ敹浜�
+                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++)
+                {
+                    string HName = ds.Tables[0].Rows[i]["閽夐拤id"].ToString();
+                    HNames.Add(HName);
+
+                }
+                concatenatedNames = string.Join(",", HNames);
+                HDescription = HDescription + "--'"+ HSendMan + "'宸查┏鍥炴湰娆″鐞嗭紝璇�'"+ HReceiveMan + "'閲嶆柊澶勭悊";
+            }
             else
             {
                 //鏌ヨ鎸囨淳澶勭悊浜�
@@ -7642,7 +7658,14 @@
                 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 + "' and a.HICMOStatus=1";
                 ds = oCN.RunProcReturn(sql, "Sc_ICMOBillStatus_Tmp");
-
+                if (ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲搴旀纭姸鎬佸伐鍗曚俊鎭�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
                 {
@@ -7917,5 +7940,76 @@
             }
         }
         #endregion
+
+        #region 鎶ュ伐鍙� 寮傚父楠屾敹 椹冲洖澶勭悊鍗曞姛鑳�
+        [Route("Sc_MESTransFerWorkBill/BHOA_ErrMsgBackHandleBillDismiss")]
+        [HttpGet]
+        public object BHOA_ErrMsgBackHandleBillDismiss(string HInterID, string user)
+        {
+            try
+            {
+                string sql = "select HErrMsgBackInterID,HErrMsgBackEntryID,HSendMan,HDescription,HReceiveMan from OA_ErrMsgBackHandleBillMain where HErrMsgBackInterID=" + HInterID;
+                //鏇存柊寮傚父鍙嶉澶勭悊鍗曚綔搴�
+                oCN.RunProc("update OA_ErrMsgBackHandleBillMain set HBillStatus=4, HDeleteDate=GETDATE(),HDeleteMan='" + user + "'  where HErrMsgBackInterID=" + HInterID);
+                DataSet dt = oCN.RunProcReturn(sql, "OA_ErrMsgBackHandleBillMain");
+
+                //鍙嶉澶勭悊鍗曢┏鍥炲悗,鏇存柊寮傚父鍙嶉鍗曠殑鐘舵��
+                string sql1 = "update OA_ErrMsgBackBillMain set HBillStatus='13' where HInterID='" + dt.Tables[0].Rows[0]["HErrMsgBackInterID"].ToString() + "' ";
+                oCN.RunProc(sql1);
+                _ = SendDingDingAsync(dt.Tables[0].Rows[0]["HSendMan"].ToString(), 4, dt.Tables[0].Rows[0]["HDescription"].ToString(), dt.Tables[0].Rows[0]["HReceiveMan"].ToString());
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";            
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧鐐规璁板綍PDA 淇濆瓨鍚� 鏌ヨ鏄惁鏈塏G 璋冩暣瀹夌伅
+
+        [Route("Sc_MESTransFerWorkBill/getGy_EquipFile_AD")]
+        [HttpGet]
+        public object getGy_EquipFile_AD(string HInterID, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                string sql = "select * from h_v_Gy_EquipFileMainList where hmainid='" + HInterID + "'";
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_EquipFileMainList");
+
+                //娣诲姞鍒楀悕
+                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.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1