From 19c616c00b49b4785ff429780f8295ceb8171bd5 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 28 八月 2023 10:04:03 +0800
Subject: [PATCH] 异常反馈单 列表

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

diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index c1ee855..8f82893 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -1,4 +1,5 @@
 锘縰sing DBUtility;
+using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
@@ -373,6 +374,8 @@
         {
             try
             {
+                List<object> columnNameList = new List<object>();
+
                 //鏌ョ湅鏉冮檺
                 if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackBill_Query", 1, false, user))
                 {
@@ -383,24 +386,32 @@
                     return objJsonResult;
                 }
 
-                ds = Get_TransFerBillList(sWhere);
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    string sql = "select * from h_v_OA_ErrMsgBackBillList order by 鍗曟嵁鍙� desc";
+                    ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_OA_ErrMsgBackBillList where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+                    ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList");
+                }
 
-                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
-                //{
+                //娣诲姞鍒楀悕
+                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;
-                //}
-                //else
-                //{
-                //objJsonResult.code = "0";
-                //objJsonResult.count = 0;
-                //objJsonResult.Message = "鏃犳暟鎹�";
-                //objJsonResult.data = null;
-                //return objJsonResult;
-                //}
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.1