|
@@ -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;
|
|
|
|
|
|
|
|
|
|
|
@@ -295,12 +295,14 @@ namespace OASystem.API.OAMethodLib
|
|
|
day_deduction = ConvertToDecimal(day_miner_unit * 6);
|
|
|
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);
|
|
|
+ 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);
|
|
|
+ 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 累计类型扣款
|
|
|
|
|
|
|
|
|
- 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);
|
|
|
|
|
|
if (duration >= 3 && duration < 7.5M)
|
|
|
{
|
|
@@ -1124,17 +1177,18 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
|
|
|
decimal chengDuMinimumWage_halrHour = _chengDuMinimumWage / work_days / halfHour;
|
|
|
- decimal sickLeave_dailywage_halfhour_deduction = personalkLeave_dailywage_day - chengDuMinimumWage_halrHour;
|
|
|
+ decimal sickLeave_dailywage_halfhour_deduction1 = (personalkLeave_dailywage_day / halfHour) - chengDuMinimumWage_halrHour;
|
|
|
|
|
|
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);
|
|
|
}
|
|
|
|
|
|
|