王 垚
2022-06-27 2ffc4b7794e47bd8cf9f7b9662b0f92322406bb7
工资管理调整
4个文件已修改
124 ■■■■ 已修改文件
WebAPI/Controllers/PublicPageMethodController.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/工资管理/Gy_ClassTimePrjSubController.cs 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/工资管理/Pay_SingleBalBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/PublicPageMethodController.cs
@@ -34,7 +34,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无该组织的用户数据!";
                    objJsonResult.Message = "当前组织数据未维护!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -108,7 +108,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无该组织的用户数据!";
                objJsonResult.Message = "当前组织数据未维护!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -140,7 +140,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无该组织的用户数据!";
                    objJsonResult.Message = "当前组织数据未维护!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -214,7 +214,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无该组织的用户数据!";
                objJsonResult.Message = "当前组织数据未维护!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -245,7 +245,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无该组织的用户数据!";
                    objJsonResult.Message = "当前组织数据未维护!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -319,7 +319,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无该组织的用户数据!";
                objJsonResult.Message = "当前组织数据未维护!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -350,7 +350,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无该组织的用户数据!";
                    objJsonResult.Message = "当前组织数据未维护!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -424,7 +424,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无该组织的用户数据!";
                objJsonResult.Message = "当前组织数据未维护!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -455,7 +455,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无该组织的用户数据!";
                    objJsonResult.Message = "当前组织数据未维护!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -529,7 +529,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无该组织的用户数据!";
                objJsonResult.Message = "当前组织数据未维护!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2228,7 +2228,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无该组织的用户数据!";
                    objJsonResult.Message = "当前组织数据未维护!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -2302,7 +2302,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "无该组织的用户数据!";
                objJsonResult.Message = "当前组织数据未维护!";
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -2333,7 +2333,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无该组织的用户数据!";
                    objJsonResult.Message = "当前组织数据未维护!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -2438,7 +2438,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无该组织的用户数据!";
                    objJsonResult.Message = "当前组织数据未维护!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
WebAPI/Controllers/WebAPIController.cs
@@ -2153,6 +2153,58 @@
                return objjson;
            }
        }
        /// <summary>
        /// æ ¸ç®—方式组编辑
        /// </summary>
        /// <param name="sWhere"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        [Route("Web/GetClassTimePrjGroupBillEdit_Json")]
        [HttpGet]
        public object GetClassTimePrjGroupBillEdit_Json(string sWhere)
        {
            //if (!DBUtility.ClsPub.Security_Log("Gy_ClassTimePrj", 1, false, user))
            //{
            //    objJsonResult.code = "0";
            //    objJsonResult.count = 0;
            //    objJsonResult.Message = "没有查看权限";
            //    objJsonResult.data = null;
            //    return objJsonResult;
            //}
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = "select a.HNumber,a.HName,a.HDeptID,b.HName as ä»“库名称 from  Gy_ClassTimePrjGroup a left join Gy_Department b on a.HDeptID = b.HItemID where a.hitemid = " + sWhere;
                ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrjGroup");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo;
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "1";
                    objjson.count = 1;
                    objjson.Message = "获取成功!";
                    objjson.data = ds.Tables[0];
                    return objjson;
                }
            }
            catch (Exception ex)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + ex.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        #region åˆ é™¤æ ¸ç®—方式组
        /// <summary>
        /// æ ¸ç®—方式列表删除按钮
WebAPI/Controllers/¹¤×ʹÜÀí/Gy_ClassTimePrjSubController.cs
@@ -17,7 +17,6 @@
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        /// <summary>
        /// è¿”回列表
        ///参数:string sql。
@@ -268,18 +267,34 @@
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_ClassTimePrjSub/ModifyByID")]
        [HttpPost]
        [Route("Gy_ClassTimePrjSub/Calc")]
        [HttpGet]
        public object Calc(string HEntryID, string HYear, string HPeriod)
        {
            try
            {
                oCN.RunProcReturn("exec h_p_Pay_GetAvgMoney " + HYear.ToString() + "," + HPeriod.ToString() + "," + HEntryID.ToString(), "pjgz");
                if (string.IsNullOrEmpty(HEntryID) || HEntryID == "0")
                {
                objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "请选择核算方式组!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (HYear == "" || HPeriod == "" || !IsDate($"{HYear}-{HPeriod}-1"))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "请输入有限的年月份!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql = $"exec h_p_Pay_GetAvgMoneyTest {HYear},{HPeriod},{HEntryID}";
                ds = oCN.RunProcReturn(sql, "Pay_GetAvgMoneyTest");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "保存成功!";
                objJsonResult.data = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
@@ -292,5 +307,18 @@
                return objJsonResult;
            }
        }
        public bool IsDate(string strDate)
        {
            try
            {
                DateTime.Parse(strDate);
                return true;
            }
            catch
            {
                return false;
            }
        }
    }
}
WebAPI/Controllers/¹¤×ʹÜÀí/Pay_SingleBalBillController.cs
@@ -408,7 +408,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.Message = "执行异常,联系管理员!报错:" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }