From 7b778c7647e1c14288f7919290b7c403989c541c Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 12 九月 2023 11:24:04 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/工资管理/Pay_WorkTimesBillController.cs |   79 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 75 insertions(+), 4 deletions(-)

diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
index 6d10537..175fa43 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 using Pub_Class;
 using System;
 using System.Collections;
@@ -328,8 +329,6 @@
                 return objJsonResult;
             }
         }
-        //
-
         /// <summary>
         /// 閫氳繃鐝粍鏌ヨ鑱屽憳淇℃伅
         ///鍙傛暟锛歴tring sql銆�
@@ -343,7 +342,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "浜у搧鍣ㄥ叿鏈�夋嫨";
+                objJsonResult.Message = "鐝粍鏈�夋嫨";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -372,6 +371,78 @@
                 return objJsonResult;
             }
         }
+        
+        [Route("Pay_WorkTimesBill/calcAvgMoney")]
+        [HttpPost]
+        public object GetEmployeeByHGroup([FromBody] JObject msg) {
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                List<object> list = new List<object>();
+                DataSet ds;
+                string sql = string.Format($"exec h_p_CalcAvgMoney '{msg["msg"]}'");
+                ds = oCN.RunProcReturn(sql, "h_p_CalcAvgMoney");
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
 
+
+        #region 鑰冨嫟姹囨�绘暟鎹鐞嗚〃鏌ヨ
+        [Route("Pay_WorkTimesSumQueryBill/list")]
+        [HttpGet]
+        public object getWorkTimesSumQueryBillList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (!DBUtility.ClsPub.Security_Log("Pay_WorkTimesSumQueryBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                ds = oCN.RunProcReturn("exec h_p_Pay_WorkTimesSumQueryBillList " + sWhere, "Pay_WorkTimesSumQueryBillList");
+
+                //娣诲姞鍒楀悕
+                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