|
@@ -105,6 +105,26 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
pm_WageSheet = _mapper.Map<Pm_WageSheet>(dto);
|
|
|
pm_WageSheet.LastUpdateUserId = dto.CreateUserId;
|
|
|
|
|
|
+ #region 计算工资
|
|
|
+
|
|
|
+ //应发合计
|
|
|
+ decimal salary = pm_WageSheet.Basic + pm_WageSheet.Floats + pm_WageSheet.PostAllowance + pm_WageSheet.GarmentWashSubsidies + pm_WageSheet.CommunicationSubsidies + pm_WageSheet.GroupCost +
|
|
|
+ pm_WageSheet.TrafficSubsidies + pm_WageSheet.InformationSecurityFee + pm_WageSheet.OperationBonus + pm_WageSheet.SpecialAllowance + pm_WageSheet.OtherSubsidies +
|
|
|
+ pm_WageSheet.Mealsupplement;
|
|
|
+ //扣款合计
|
|
|
+ decimal totalDeduction = pm_WageSheet.SickLeave + pm_WageSheet.SomethingFalse + pm_WageSheet.LateTo + pm_WageSheet.LeaveEarly + pm_WageSheet.Absenteeism + pm_WageSheet.NotPunch +
|
|
|
+ pm_WageSheet.OtherDeductions;
|
|
|
+
|
|
|
+ //实发合计 不含个税
|
|
|
+ decimal actualTotal = salary - totalDeduction;
|
|
|
+ pm_WageSheet.Should = salary;
|
|
|
+ pm_WageSheet.TotalDeductions = totalDeduction;
|
|
|
+ pm_WageSheet.TotalRealHair = actualTotal;
|
|
|
+ pm_WageSheet.AfterTax = actualTotal - pm_WageSheet.WithholdingTax;
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
if (dto.Status == 1) //添加
|
|
|
{
|
|
|
var select = await _sqlSugar.Queryable<Pm_WageSheet>().
|