From ab973f62261817e581f48e63074d62d8f0e50c24 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 22 八月 2024 09:30:23 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs |  222 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 210 insertions(+), 12 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index 7822634..08ca53e 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -528,7 +528,8 @@
                 return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
             SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
             string sql =string.Format(@"select A.HInterID,b.HEntryID,A.HBillStatus,A.HBillNo,A.HDate,A.HContext,A.HDescription,A.HRemark,
-                                        A.HQty,A.HSendType,
+                                      A.HQty,A.HSendType,a.HForm,a.HChangeNote,a.HNote,a.HBadProcMan,f1.HName HBadProcManName,
+										a.HQEMan,f2.HName HQEManName,a.HSourceID,s.HName HSourceName,a.HShiftsID,s1.HName HShiftsName,
                                         A.HDeptID,D.HName HDeptName, A.HSendMan, 
                                         A.HReceiveMan,A.HCopyMan,A.HHasten,
                                         A.HLevel,A.HMaterNumber,A.HMaterName,A.HMaterModel,
@@ -540,6 +541,10 @@
                                         left join Gy_Department D on A.HDeptID=D.HItemID
 										left join Gy_Employee f on A.HHandleEmpID=f.HItemID     
                                         left join Gy_ErrMsgBackType g on A.HErrMsgBackTypeID=g.HItemID
+                                        left join Gy_Employee f1 on a.HBadProcMan=f1.HItemID
+										left join Gy_Employee f2 on a.HQEMan=f2.HItemID
+										left join Gy_Source s on a.HSourceID=s.HItemID
+										left join Gy_Shifts s1 on a.HShiftsID=s1.HItemID
                                         where A.HInterID='" + HID + "' and b.HEntryID='" + HEntryID + "'");
             var dataSet = oCN.RunProcReturn(sql, "OA_ErrMsgBackBillMain");
             if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
@@ -6623,10 +6628,31 @@
         /// <returns></returns>
         public async Task<object> SendDingDingAsync(string HSendMan, int HHandleEmpID,string HDescription,string HCopyMan)
         {
+            
             string concatenatedNames = "";
+            string appKey = "";
+            string appSecret = "";
+            string sReturn = "";
+            string agentIds = "";
             Cls_DDMsg msg = new Cls_DDMsg();
-            string appKey = "dingrsrzhdyn3mlaof95";
-            string appSecret = "RAqH6YtZnPLCpDbuqfaYQkKkVtVdS0wqfC8I26X6qiS-8eoCJCNrzx3fubGND4Sq";
+            if (oSystemParameter.ShowBill(ref sReturn) == true)
+            {
+                //绯荤粺鍙傛暟鏄惁 N涓烘湰鍦帮紝Y涓烘柉鑾皵
+                if (oSystemParameter.omodel.OA_ErrMsgBackBill_SendDingDingMsg == "N")
+                {
+                    appKey = "dingrsrzhdyn3mlaof95";
+                     appSecret = "RAqH6YtZnPLCpDbuqfaYQkKkVtVdS0wqfC8I26X6qiS-8eoCJCNrzx3fubGND4Sq";
+                    agentIds = "3118119317";
+                }
+                else if (oSystemParameter.omodel.OA_ErrMsgBackBill_SendDingDingMsg == "Y")
+                {
+                    appKey = "dingkdddbhdcssk7jduw";
+                    appSecret = "iv07c-GLfJPnzfJaNAAOfJDl3Z-eODvDAhlInMZCZhGorkle5Evbaxx3ImylvdjQ";
+                    agentIds = "3151454458";
+                }
+
+            }
+
             if (HHandleEmpID==0) //寮傚父鍙嶉楠屾敹鍗曚繚瀛�  灏嗘秷鎭� 鍙戦�佺粰 鎺ユ敹浜猴紝鎸囨淳澶勭悊浜猴紝鍏ㄩ儴鎶勯�佷汉 
             {
                 string HReceiveMan = HSendMan;
@@ -6654,7 +6680,7 @@
                 //鑾峰彇鍙戦�佷汉  鎺ユ敹浜�
                 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++)
                 {
@@ -6672,6 +6698,7 @@
                 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, "寮傚父缃氭");
                 ds = oCN.RunProcReturn(sql1, "Gy_Czygl");
                 List<string> HNames = new List<string>();
                 for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
@@ -6681,6 +6708,7 @@
 
                 }
                 concatenatedNames = string.Join(",", HNames);
+                LogService.CustomWriteLog("9鍙傛暟" + concatenatedNames, "寮傚父缃氭");
             }
           
             //鑾峰彇浼佷笟鐨刟ccess_token鐨勫��
@@ -6690,7 +6718,7 @@
             string accessToken = responseJson["accessToken"].ToString();
 
             //璋冪敤鏂规硶鍙戦�佹秷鎭�           
-            string agentId = "3118119317";//閽夐拤鍚庡彴寤虹珛鐨勫皬绋嬪簭id
+            string agentId = agentIds;//閽夐拤鍚庡彴寤虹珛鐨勫皬绋嬪簭id
             string userIdList = concatenatedNames;//閽夐拤浜哄憳鐨刬d
             string deptIdList = "0"; // 绌哄瓧绗︿覆琛ㄧず涓嶆寚瀹氶儴闂�
             string toAllUser = "false";
@@ -6760,7 +6788,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");
 
                 //娣诲姞鍒楀悕
@@ -6836,18 +6865,28 @@
         {
             try
             {
+                //string sReturn = "";
                 List<object> columnNameList = new List<object>();
                 //鏍规嵁褰撳墠浜鸿幏鍙栬亴鍔�
                 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();
-                //鏍规嵁鑱屽姟鎵惧埌浠栫殑涓婄骇
-                string sql1 = "select *  from Gy_Duty where HParentID=(select HParentID 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");
+                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 Job1= ds.Tables[0].Rows[0]["HName"].ToString(); 
-                //鐢ㄤ笂绾х殑鑱屽姟鎵惧埌鐢ㄦ埛
-                string sql2 = "select a.Czymc 鐢ㄦ埛鍚嶇О  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(sql2, "Gy_Czygl");
+                //鐢ㄨ亴鍔℃壘鍒扮敤鎴�
+                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");
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
                 {
@@ -6874,5 +6913,164 @@
         }
         #endregion
 
+        #region 鎶ュ伐鍙拌烦杞紓甯稿弽棣堝崟 寮圭獥鑾峰彇 璁惧缂栫爜
+
+        [Route("Sc_MESTransFerWorkBill/set_EquipFile")]
+        [HttpGet]
+        public object set_EquipFile(string HSourceName)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                string sql = "select a.HEquipFileNumber 璁惧缂栫爜 ,a.HName 璁惧鍚嶇О from Gy_EquipFileBillMain a left join Gy_Source b on a.HSourceID = b.HItemID where b.HName ='" + HSourceName   + "'";
+                ds = oCN.RunProcReturn(sql, "Gy_ErrMsgBackType");
+
+                //娣诲姞鍒楀悕
+                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
+
+        #region 寮傚父鍙嶉鍗� 璺熻釜鏌ヨ
+        [Route("Sc_MESTransFerWorkBill/GetErrMsgBackResumeList")]
+        [HttpGet]
+        public object GetErrMsgBackResumeList(string HInterID, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ds = oCN.RunProcReturn($@"select a.HInterID,a.HDate '鏃ユ湡',a.HBillType,x.HName 鍗曟嵁绫诲瀷,a.HBillNo as '鍗曟嵁鍙�',
+                CASE WHEN a.HBillStatus <= 1 THEN '鍒涘缓' WHEN a.HBillStatus = 2 THEN '宸插鏍�' WHEN a.HBillStatus = 3 AND 
+                a.HCloseType = 0 THEN '鑷姩鍏抽棴' WHEN a.HBillStatus = 3 AND 
+                a.HCloseType = 1 THEN '鎵嬪姩鍏抽棴' WHEN a.HBillStatus = 4 THEN '宸蹭綔搴�' ELSE '鍏跺畠鐘舵��' END AS 鍗曟嵁鐘舵��,
+                a.HSendMan AS 鍙戦�佷汉,a.HReceiveMan AS 鎺ユ敹浜�,a.HCopyMan AS 鎶勯�佷汉,a.HLevel AS 绱ф�ョ▼搴�,a.HContext AS 涓婚,a.HDescription AS 鍐呭,a.HErrMsgBackTypeID,b.HName AS 寮傚父绫诲瀷,
+                a.HMaker AS 鍒跺崟浜�, a.HMakeDate AS 鍒跺崟鏃ユ湡,a.HChecker AS 瀹℃牳浜�, a.HCheckDate AS 瀹℃牳鏃ユ湡, a.HUpDater AS 淇敼浜�, a.HUpDateDate AS 淇敼鏃ユ湡, 
+                a.HCloseMan AS 鍏抽棴浜�, a.HCloseDate AS 鍏抽棴鏃ユ湡, a.HDeleteMan AS 浣滃簾浜�, a.HDeleteDate AS 浣滃簾鏃ユ湡
+                from (
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID  from OA_ErrMsgBackBillMain where HInterID = {HInterID} UNION ALL 
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID from OA_ErrMsgBackReceiveBillMain where HMainSourceInterID = {HInterID} UNION ALL
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID from OA_ErrMsgBackSignBillMain where HErrMsgBackInterID = {HInterID} UNION ALL
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID from OA_ErrMsgBackHandleBillMain  where HErrMsgBackInterID = {HInterID} UNION ALL
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID from OA_ErrMsgBackCheckBillMain where HErrMsgBackInterID = {HInterID}
+                )as a,Xt_BillType as x,Gy_ErrMsgBackType as b
+                where a.HBillType = x.HNumber and a.HErrMsgBackTypeID = b.HItemID
+                ORDER BY '鏃ユ湡' ASC;", "OA_ErrMsgBackBillResume");
+
+                //娣诲姞鍔ㄦ�佸垪淇℃伅
+                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 e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 寮傚父鍙嶉鍗� 璺熻釜鏉′欢鏌ヨ
+        [Route("Sc_MESTransFerWorkBill/GetErrMsgBackResumeList")]
+        [HttpGet]
+        public object GetErrMsgBackResumeList(string HInterID,string sWhere,string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ds = oCN.RunProcReturn($@"select * from
+               (select a.HInterID,a.HDate '鏃ユ湡',a.HBillType,x.HName 鍗曟嵁绫诲瀷,a.HBillNo as '鍗曟嵁鍙�',
+                CASE WHEN a.HBillStatus <= 1 THEN '鍒涘缓' WHEN a.HBillStatus = 2 THEN '宸插鏍�' WHEN a.HBillStatus = 3 AND 
+                a.HCloseType = 0 THEN '鑷姩鍏抽棴' WHEN a.HBillStatus = 3 AND 
+                a.HCloseType = 1 THEN '鎵嬪姩鍏抽棴' WHEN a.HBillStatus = 4 THEN '宸蹭綔搴�' ELSE '鍏跺畠鐘舵��' END AS 鍗曟嵁鐘舵��,
+                a.HSendMan AS 鍙戦�佷汉,a.HReceiveMan AS 鎺ユ敹浜�,a.HCopyMan AS 鎶勯�佷汉,a.HLevel AS 绱ф�ョ▼搴�,a.HContext AS 涓婚,a.HDescription AS 鍐呭,a.HErrMsgBackTypeID,b.HName AS 寮傚父绫诲瀷,
+                a.HMaker AS 鍒跺崟浜�, a.HMakeDate AS 鍒跺崟鏃ユ湡,a.HChecker AS 瀹℃牳浜�, a.HCheckDate AS 瀹℃牳鏃ユ湡, a.HUpDater AS 淇敼浜�, a.HUpDateDate AS 淇敼鏃ユ湡, 
+                a.HCloseMan AS 鍏抽棴浜�, a.HCloseDate AS 鍏抽棴鏃ユ湡, a.HDeleteMan AS 浣滃簾浜�, a.HDeleteDate AS 浣滃簾鏃ユ湡
+                from (
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID  from OA_ErrMsgBackBillMain where HInterID = {HInterID} UNION ALL 
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID from OA_ErrMsgBackReceiveBillMain where HMainSourceInterID = {HInterID} UNION ALL
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID from OA_ErrMsgBackSignBillMain where HErrMsgBackInterID = {HInterID} UNION ALL
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID from OA_ErrMsgBackHandleBillMain  where HErrMsgBackInterID = {HInterID} UNION ALL
+                select HInterID,HDate,HBillType,HBillNo,HBillStatus,HMaker,HMakeDate,HChecker,HCheckDate,HUpDater,HUpDateDate,HCloseMan,HCloseDate,HDeleteMan,HDeleteDate,HCloseType,HSendMan,HReceiveMan,HCopyMan,HLevel,HContext,HDescription,HErrMsgBackTypeID from OA_ErrMsgBackCheckBillMain where HErrMsgBackInterID = {HInterID}
+                )as a,Xt_BillType as x,Gy_ErrMsgBackType as b
+                where a.HBillType = x.HNumber and a.HErrMsgBackTypeID = b.HItemID ) AS a where 1=1 " + sWhere + 
+                @" ORDER BY 鏃ユ湡 ASC;", "OA_ErrMsgBackBillResume");
+
+                //娣诲姞鍔ㄦ�佸垪淇℃伅
+                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 e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1