From e11e9f587dd58f06df076b4b95141d50019e0ba0 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 18 十一月 2024 16:38:08 +0800
Subject: [PATCH] 钉钉OA导入异常工时单

---
 WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs
index 8c58423..1e3c9a8 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipBeginBillController.cs
@@ -210,7 +210,7 @@
 
                     oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                     oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
-                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now);
 
                     if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                     {
@@ -738,7 +738,62 @@
         }
         #endregion
 
-       
+        #region 璁惧寮�鏈哄崟鍒楄〃PDA 鏌ヨ       
+        [Route("Sb_EquipBeginBill/锘縎b_EquipBeginBillList_PDA")]
+        [HttpGet]
+        public object Sb_EquipBeginBillList_PDA(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipBeginBillMain_Check", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏌ヨ澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipBeginBillList_PDA order by 鍗曟嵁鍙� desc", "锘縣_v_Sb_EquipBeginBillList_PDA");
+                }
+                else
+                {
+                    string sql1 = "select * from  h_v_Sb_EquipBeginBillList_PDA  where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+                    ds = oCN.RunProcReturn(sql, "锘縣_v_Sb_EquipBeginBillList_PDA");
+                }
+
+                //娣诲姞鍒楀悕
+                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