@@ -13,9 +13,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
/// 日 期:2021-04-20 16:52 | /// 日 期:2021-04-20 16:52 | ||||
/// 描 述:工资条 | /// 描 述:工资条 | ||||
/// </summary> | /// </summary> | ||||
public class 工资项目Controller : MvcControllerBase | |||||
public class EmpPayrollController : MvcControllerBase | |||||
{ | { | ||||
private 工资项目IBLL 工资项目IBLL = new 工资项目BLL(); | |||||
private SalarySheetIBLL Emps = new SalarySheetBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -52,7 +52,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
public ActionResult GetPageList(string pagination, string queryJson) | public ActionResult GetPageList(string pagination, string queryJson) | ||||
{ | { | ||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | Pagination paginationobj = pagination.ToObject<Pagination>(); | ||||
var data = 工资项目IBLL.GetPageList(paginationobj, queryJson); | |||||
var data = Emps.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
rows = data, | rows = data, | ||||
@@ -71,7 +71,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetFormData(string keyValue) | public ActionResult GetFormData(string keyValue) | ||||
{ | { | ||||
var EMP_PayrollData = 工资项目IBLL.GetEMP_PayrollEntity( keyValue ); | |||||
var EMP_PayrollData = Emps.GetSalarySheetEntity( keyValue ); | |||||
var jsonData = new { | var jsonData = new { | ||||
EMP_Payroll = EMP_PayrollData, | EMP_Payroll = EMP_PayrollData, | ||||
}; | }; | ||||
@@ -88,9 +88,9 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
/// <returns></returns> | /// <returns></returns> | ||||
[HttpPost] | [HttpPost] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult DeleteForm( keyValue) | |||||
public ActionResult DeleteForm( string keyValue) | |||||
{ | { | ||||
工资项目IBLL.DeleteEntity(keyValue); | |||||
Emps.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | return Success("删除成功!"); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -102,10 +102,10 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
[HttpPost] | [HttpPost] | ||||
[ValidateAntiForgeryToken] | [ValidateAntiForgeryToken] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult SaveForm( keyValue, string strEntity) | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | { | ||||
EMP_PayrollEntity entity = strEntity.ToObject<EMP_PayrollEntity>(); | |||||
工资项目IBLL.SaveEntity(keyValue,entity); | |||||
SalarySheetEntity entity = strEntity.ToObject<SalarySheetEntity>(); | |||||
Emps.SaveEntity(keyValue,entity); | |||||
if (keyValue != null) | if (keyValue != null) | ||||
{ | { | ||||
} | } | ||||
@@ -18,7 +18,7 @@ namespace Learun.Application.Mapping | |||||
//表 | //表 | ||||
this.ToTable("EMP_PAYROLL"); | this.ToTable("EMP_PAYROLL"); | ||||
//主键 | //主键 | ||||
this.HasKey(t => t.dm); | |||||
this.HasKey(t => t.SalaryID); | |||||
#endregion | #endregion | ||||
#region 配置关系 | #region 配置关系 | ||||
@@ -267,9 +267,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// 编辑调用 | /// 编辑调用 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue"></param> | /// <param name="keyValue"></param> | ||||
public void Modify( keyValue) | |||||
public void Modify( string keyValue) | |||||
{ | { | ||||
this. = keyValue; | |||||
this.SalaryID= keyValue; | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
@@ -12,9 +12,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// 日 期:2021-04-20 16:52 | /// 日 期:2021-04-20 16:52 | ||||
/// 描 述:工资条 | /// 描 述:工资条 | ||||
/// </summary> | /// </summary> | ||||
public class 工资项目BLL : 工资项目IBLL | |||||
public class EmpSalaryBLL : EMP_PayrollEntity | |||||
{ | { | ||||
private 工资项目Service 工资项目Service = new 工资项目Service(); | |||||
private EmpSalaryBLL Emp = new EmpSalaryBLL(); | |||||
#region 获取数据 | #region 获取数据 | ||||
@@ -28,7 +28,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return 工资项目Service.GetPageList(pagination, queryJson); | |||||
return Emp.GetPageList(pagination, queryJson); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -52,7 +52,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return 工资项目Service.GetEMP_PayrollEntity(keyValue); | |||||
return Emp.GetEMP_PayrollEntity(keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -75,11 +75,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// 删除实体数据 | /// 删除实体数据 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
public void DeleteEntity( keyValue) | |||||
public void DeleteEntity(string keyValue) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
工资项目Service.DeleteEntity(keyValue); | |||||
Emp.DeleteEntity(keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -100,11 +100,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="entity">实体</param> | /// <param name="entity">实体</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
public void SaveEntity( keyValue, EMP_PayrollEntity entity) | |||||
public void SaveEntity( string keyValue, EMP_PayrollEntity entity) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
工资项目Service.SaveEntity(keyValue, entity); | |||||
Emp.SaveEntity(keyValue, entity); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// 日 期:2021-04-20 16:52 | /// 日 期:2021-04-20 16:52 | ||||
/// 描 述:工资条 | /// 描 述:工资条 | ||||
/// </summary> | /// </summary> | ||||
public interface 工资项目IBLL | |||||
public interface EmpSalaryIBLL | |||||
{ | { | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -35,13 +35,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// 删除实体数据 | /// 删除实体数据 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
void DeleteEntity( keyValue); | |||||
void DeleteEntity( string keyValue); | |||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="entity">实体</param> | /// <param name="entity">实体</param> | ||||
void SaveEntity( keyValue, EMP_PayrollEntity entity); | |||||
void SaveEntity(EmpSalaryBLL keyValue, EMP_PayrollEntity entity); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -133,11 +133,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// 删除实体数据 | /// 删除实体数据 | ||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
public void DeleteEntity( keyValue) | |||||
public void DeleteEntity(string keyValue) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<EMP_PayrollEntity>(t=>t.dm == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<EMP_PayrollEntity>(t=>t.SalaryID == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -157,7 +157,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// </summary> | /// </summary> | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <param name="entity">实体</param> | /// <param name="entity">实体</param> | ||||
public void SaveEntity( keyValue, EMP_PayrollEntity entity) | |||||
public void SaveEntity(string keyValue, EMP_PayrollEntity entity) | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||