|
@@ -28,7 +28,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
private static readonly IQiYeWeChatApiService _qiYeWeChatApiService = AutofacIocManager.Instance.GetService<IQiYeWeChatApiService>();
|
|
|
private static readonly UsersRepository _usersRep = AutofacIocManager.Instance.GetService<UsersRepository>();
|
|
|
private static readonly IMapper _mapper = AutofacIocManager.Instance.GetService<IMapper>();
|
|
|
- private static readonly decimal _chengDuMinimumWage = 2100.00M;
|
|
|
+ private static readonly decimal _chengDuMinimumWage = 2100.00M * 0.80M; //员工在病假医疗期限内的病假工资按照成都市最低工资标准的 80%发放
|
|
|
|
|
|
/// <summary>
|
|
|
/// 计算工资
|
|
@@ -295,12 +295,14 @@ namespace OASystem.API.OAMethodLib
|
|
|
day_deduction = ConvertToDecimal(day_miner_unit * 6); //3小时
|
|
|
meal_deduction += 10.00M; //餐补扣款
|
|
|
absenteeism_deduction += day_deduction; //矿工半日
|
|
|
+ beLate_belate_ex.Reason = thisDtStr + " 上午(09:00)缺卡/未打卡视为下午旷工(3小时)";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
day_deduction = ConvertToDecimal(dailyWage);
|
|
|
absenteeism_deduction += day_deduction; //矿工一日
|
|
|
meal_deduction += 10.00M;
|
|
|
+ beLate_belate_ex.Reason = thisDtStr + " 上午(09:00)-下午(18:00) 缺卡/未打视为旷工一天(7.5小时)";
|
|
|
}
|
|
|
|
|
|
beLate_belate_ex.Deduction = day_deduction;
|
|
@@ -359,12 +361,62 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
if (root.exception_infos.Count == 2)
|
|
|
{
|
|
|
- day_deduction = dailyWage;
|
|
|
- meal_deduction += 10.00M;
|
|
|
- absenteeism_deduction += day_deduction;
|
|
|
- beLate_belate_ex.Reason = "上午-下午 缺卡/未打卡为旷工 一天";
|
|
|
- beLate_belate_ex.Deduction = day_deduction;
|
|
|
- ex_reissuecard_Items.Add(beLate_belate_ex);
|
|
|
+ if (ex_reissuecard_Items.Where(it => it.StartTimeDt.ToString("yyyy-MM-dd").Equals(thisDtStr)).Count() > 0)
|
|
|
+ {
|
|
|
+ if (earliest_time == lastest_time)
|
|
|
+ {
|
|
|
+ DateTime thisDt1 = Convert.ToDateTime(thisDtStr + " 12:00");
|
|
|
+
|
|
|
+
|
|
|
+ if (thisDt >= thisDt1) //旷工 下午
|
|
|
+ {
|
|
|
+ day_deduction = ConvertToDecimal(day_miner_unit * 9); //4.5小时
|
|
|
+ meal_deduction += 10.00M;
|
|
|
+
|
|
|
+ beLate_belate_ex.Duration = 270;
|
|
|
+ absenteeism_deduction += day_deduction; //矿工半日
|
|
|
+ beLate_belate_ex.Reason = thisDtStr + " 下午(18:00)缺卡/未打卡视为下午旷工(4.5小时)";
|
|
|
+
|
|
|
+ beLate_belate_ex.Deduction = day_deduction;
|
|
|
+ ex_reissuecard_Items.Add(beLate_belate_ex);
|
|
|
+ }
|
|
|
+ else if (thisDt <= thisDt1) //旷工 上午
|
|
|
+ {
|
|
|
+ day_deduction = ConvertToDecimal(day_miner_unit * 6); //3小时
|
|
|
+ meal_deduction += 10.00M;
|
|
|
+ absenteeism_deduction += day_deduction; //矿工半日
|
|
|
+ beLate_belate_ex.Duration = 180;
|
|
|
+ beLate_belate_ex.Reason = thisDtStr + " 上午(09:00)缺卡/未打卡视为上午旷工(3小时)";
|
|
|
+
|
|
|
+ beLate_belate_ex.Deduction = day_deduction;
|
|
|
+ ex_reissuecard_Items.Add(beLate_belate_ex);
|
|
|
+ }
|
|
|
+ else //矿工一日
|
|
|
+ {
|
|
|
+
|
|
|
+ day_deduction = ConvertToDecimal(dailyWage);
|
|
|
+ meal_deduction += 10.00M;
|
|
|
+ absenteeism_deduction += day_deduction;
|
|
|
+ beLate_belate_ex.Reason = thisDtStr + " 上午(09:00)-下午(18:00) 缺卡/未打视为旷工一天(7.5小时)";
|
|
|
+
|
|
|
+ beLate_belate_ex.Deduction = day_deduction;
|
|
|
+ ex_reissuecard_Items.Add(beLate_belate_ex);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ day_deduction = dailyWage;
|
|
|
+ meal_deduction += 10.00M;
|
|
|
+ absenteeism_deduction += day_deduction;
|
|
|
+ beLate_belate_ex.Reason = "上午-下午 缺卡/未打卡为旷工 一天";
|
|
|
+ beLate_belate_ex.Deduction = day_deduction;
|
|
|
+ ex_reissuecard_Items.Add(beLate_belate_ex);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
else if (root.exception_infos.Count == 1)
|
|
@@ -570,7 +622,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
#region 累计类型扣款
|
|
|
//1年假;2事假;3病假;4调休假;5婚假;6产假;7陪产假;8其他;9丧假
|
|
|
|
|
|
- if (leaveType == 2) //事假
|
|
|
+ if (leaveType == 2) //调休假
|
|
|
{
|
|
|
personalLeaveTotal += thisTypeDeduction;
|
|
|
}
|
|
@@ -634,7 +686,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
DateTime bukaDt = punch_correction.time_dt;
|
|
|
DateTime bukaDtJudge = Convert.ToDateTime(bukaDt.ToString("yyyy-MM-dd"));
|
|
|
//筛选 不在工作日内的假勤申请
|
|
|
- if (startDt >= bukaDtJudge || bukaDtJudge > endDt)
|
|
|
+ if (startDt > bukaDtJudge || bukaDtJudge > endDt)
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
@@ -971,6 +1023,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -1081,7 +1134,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
|
|
|
decimal leave_halfHour = Convert.ToDecimal(duration) / Convert.ToDecimal(0.5);
|
|
|
- typeDeduction = ConvertToDecimal( personalkLeave_dailywage_halfhour * leave_halfHour);
|
|
|
+ typeDeduction = ConvertToDecimal(personalkLeave_dailywage_halfhour * leave_halfHour);
|
|
|
//duration = 11M;
|
|
|
if (duration >= 3 && duration < 7.5M) //单天请假三小时
|
|
|
{
|
|
@@ -1124,17 +1177,18 @@ namespace OASystem.API.OAMethodLib
|
|
|
// 病假日薪 *计算方式:日平均工资 = 成都市最低工资标准的80% /当月应出勤天数。 短期病假=当月15天内
|
|
|
|
|
|
decimal chengDuMinimumWage_halrHour = _chengDuMinimumWage / work_days / halfHour;
|
|
|
- decimal sickLeave_dailywage_halfhour_deduction = personalkLeave_dailywage_day - chengDuMinimumWage_halrHour; //病假单位 0.5小时 扣款金额
|
|
|
+ decimal sickLeave_dailywage_halfhour_deduction1 = (personalkLeave_dailywage_day / halfHour) - chengDuMinimumWage_halrHour; //病假单位 0.5小时 扣款金额
|
|
|
|
|
|
if (date_Range_type == "halfday")
|
|
|
{
|
|
|
mealDeduction = 10; //餐补扣款
|
|
|
- typeDeduction = ConvertToDecimal( sickLeave_dailywage_halfhour_deduction * halfHour);
|
|
|
+ typeDeduction = ConvertToDecimal( sickLeave_dailywage_halfhour_deduction1 * halfHour);
|
|
|
}
|
|
|
else if (date_Range_type == "hour")
|
|
|
{
|
|
|
decimal sickLeave_halfHour = duration / 0.5M;
|
|
|
- typeDeduction = ConvertToDecimal(personalkLeave_dailywage_day); ;
|
|
|
+ typeDeduction = ConvertToDecimal(sickLeave_dailywage_halfhour_deduction1 * sickLeave_halfHour);
|
|
|
+
|
|
|
if (duration >= 3 && duration < 7.5M) //单天请假三小时 && 请假时间在上午 则没有餐补
|
|
|
{
|
|
|
mealDeduction = 10; //餐补扣款
|
|
@@ -1145,7 +1199,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
decimal leaveDays = Convert.ToDecimal(duration / 7.5M);
|
|
|
|
|
|
- typeDeduction = ConvertToDecimal(sickLeave_dailywage_halfhour_deduction * sickLeave_halfHour1);
|
|
|
+ typeDeduction = ConvertToDecimal(sickLeave_dailywage_halfhour_deduction1 * sickLeave_halfHour1);
|
|
|
if (leaveDays % 1 == 0)
|
|
|
{
|
|
|
mealDeduction = 10 * leaveDays; //餐补扣款
|
|
@@ -1154,12 +1208,12 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
mealDeduction = 10 * Convert.ToInt32(leaveDays);
|
|
|
|
|
|
- typeDeduction = ConvertToDecimal(sickLeave_dailywage_halfhour_deduction * Convert.ToInt32(leaveDays));
|
|
|
+ typeDeduction = ConvertToDecimal(sickLeave_dailywage_halfhour_deduction1 * Convert.ToInt32(leaveDays));
|
|
|
|
|
|
decimal sy_bingjiaunit = sickLeave_halfHour1 - Convert.ToDecimal(15.00M * Convert.ToInt32(leaveDays));
|
|
|
if (sy_bingjiaunit > 0)
|
|
|
{
|
|
|
- typeDeduction += ConvertToDecimal(sickLeave_dailywage_halfhour_deduction * sy_bingjiaunit);
|
|
|
+ typeDeduction += ConvertToDecimal(sickLeave_dailywage_halfhour_deduction1 * sy_bingjiaunit);
|
|
|
}
|
|
|
|
|
|
//得到最后一天的请假时间 是否有餐补
|