cwjbxqmz
2024-02-06 0a56001e1b8e9ae7d2f39c982912cd6d10c22032
WebAPI/Controllers/¹¤×ʹÜÀí/Pay_PayMentBillController.cs
@@ -175,9 +175,9 @@
                string HMaker = mainList[0].HMaker;
                string HMakerDate = mainList[0].HMakerDate;
                DateTime HMakerDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                string HUpdater = mainList[0].HUpdater;
                string HUpdaterDate = mainList[0].HUpdaterDate;
                DateTime HUpdaterDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                string HChecker = mainList[0].HChecker;
                string HCheckerDate = mainList[0].HCheckerDate;
                string HCloseMan = mainList[0].HCloseMan;
@@ -836,5 +836,42 @@
            }
        }
        #endregion
        #region æ ¹æ®ç­ç»„获取工资单子表数据
        [Route("Pay_PayMentBill/getPayMentBillSub")]
        [HttpGet]
        public object getPayMentBillSub(int HGroupID, int HYear, int HMonth, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql = "exec h_v_Pay_PayMentBill_getSubDataBasedGroupID " + HGroupID + "," + HYear + "," + HMonth;
                ds = oCN.RunProcReturn(sql, "h_v_Pay_PayMentBill_getSubDataBasedGroupID");
                //添加列名
                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));//获取到DataColumn列对象的列名
                }
                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
    }
}