zrg
2024-10-09 243e86af1a7c74c8bfda3bb41f29a11fef13c065
WebAPI/Controllers/¹¤×ʹÜÀí/Pay_SalaryCalculateController.cs
@@ -25,6 +25,58 @@
        string user_LongShan = "";
        string HName_LongShan = "";
        #region å·¥èµ„运算
        /// <summary>
        /// æ ¹æ®å¼€å§‹æ—¥æœŸã€ç»“束日期、班组进行工资运算
        /// </summary>
        /// <returns></returns>
        [Route("Pay_SalaryCulateController/GetSalaryCalculate_Json")]
        [HttpGet]
        public object GetSalaryCalculate_Json(DateTime HBeginDate, DateTime HEndDate, Int64 HGroupID, string HSourceBillType, string HMaker, Int64 HStockOrgID)
        {
            try
            {
                ds = oCN.RunProcReturn("exec h_p_Pay_SalaryCalculate '" + HBeginDate + "','" + HEndDate + "'," + HGroupID.ToString() + ",'" + HSourceBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Pay_SalaryCalculate");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "工资运算时出现错误,请重新运算!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "工资运算失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region å·¥èµ„计算-数据查询
        /// <summary>
        /// è¿”回项目阶段列表