|
@@ -768,7 +768,8 @@ namespace OASystem.API.OAMethodLib
|
|
|
return _result;
|
|
|
}
|
|
|
|
|
|
- List<string> qyWhchatIdList = userIdListView.dept_user.Select(it => it.userid).ToList();
|
|
|
+ List<string> qyWhchatIdList = new List<string>();
|
|
|
+ qyWhchatIdList = userIdListView.dept_user.Select(it => it.userid).ToList();
|
|
|
CheckInDayDataView checkInDayDataView = await _qiYeWeChatApiService.GetCheckInDayDataAsync(qyWhchatIdList, startDt, endDt);
|
|
|
if (checkInDayDataView.errcode != 0)
|
|
|
{
|
|
@@ -794,6 +795,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
string itemName = userNames.Where(it => it.Id == pm_wsInfo.UserId).FirstOrDefault().CnName;
|
|
|
|
|
|
+
|
|
|
|
|
|
decimal meal_subsidy = 0.00M;
|
|
|
|
|
@@ -836,8 +838,21 @@ namespace OASystem.API.OAMethodLib
|
|
|
Ex_Items ex_Items_jq = new Ex_Items() { Type = "假勤" };
|
|
|
#endregion
|
|
|
|
|
|
- List<Root> userRoots = workday_userRoots.Where(it => it.base_info.name == itemName).ToList();
|
|
|
- userRoots = userRoots.Distinct().ToList();
|
|
|
+
|
|
|
+ List<Root> userRoots = new List<Root>();
|
|
|
+
|
|
|
+ if (itemName == "蔡雯")
|
|
|
+ {
|
|
|
+ userRoots = workday_userRoots.Where(it => it.base_info.name == "蔡蔡" || it.base_info.name == "蔡雯").ToList();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ userRoots = workday_userRoots.Where(it => it.base_info.name == itemName).ToList();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ userRoots = userRoots.OrderBy(it => it.base_info.date).ToList();
|
|
|
+
|
|
|
|
|
|
int dk_work_days = userRoots.Count;
|
|
|
|
|
@@ -850,10 +865,21 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
if (!itemName.Equals("张海麟"))
|
|
|
{
|
|
|
+ if (userRoots.Count <= 0)
|
|
|
+ {
|
|
|
+ _result.Msg = "【企业微信】【打卡】【获取打卡数据】【Msg】" + startDt + " - " + endDt + "打卡日数据 获取失败!";
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
string acctid = userRoots[0].base_info.acctid;
|
|
|
List<Ex_Item> ex_reissuecard_Items = new List<Ex_Item>();
|
|
|
List<Sp_items> acc_sp_items = new List<Sp_items>();
|
|
|
|
|
|
+ int user_probationary_bk_num = 0;
|
|
|
+
|
|
|
+
|
|
|
+ decimal user_probationary_bk_decimal = pm_wsInfo.Floats;
|
|
|
+
|
|
|
#region 迟到 早退 矿工
|
|
|
|
|
|
int user_cd_zt_num = 0;
|
|
@@ -999,7 +1025,6 @@ namespace OASystem.API.OAMethodLib
|
|
|
}
|
|
|
else if (exception == 3)
|
|
|
{
|
|
|
-
|
|
|
if (root.exception_infos.Count == 2)
|
|
|
{
|
|
|
day_deduction = dailyWage;
|
|
@@ -1078,7 +1103,6 @@ namespace OASystem.API.OAMethodLib
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
#endregion
|
|
|
|
|
|
#region 假勤/补卡次数 审批
|
|
@@ -1123,7 +1147,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
Date_range date_Range = attendance.date_range;
|
|
|
|
|
|
|
|
|
- if (startDt >= date_Range.new_begin_dt || date_Range.new_end_dt > endDt)
|
|
|
+ if (startDt >= date_Range.new_begin_dt || Convert.ToDateTime( date_Range.new_end_dt.ToString("yyyy-MM-dd")) > endDt)
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
@@ -1201,13 +1225,16 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
if (ex_ItemInfos.Count > 0)
|
|
|
{
|
|
|
- ex_Items_jq.Ex_ItemInfo = ex_ItemInfos.OrderBy(it => it.SubTypeId).ThenBy(it => it.Apply_time_dt).ToList();
|
|
|
+ ex_Items_jq.Ex_ItemInfo = ex_ItemInfos.OrderBy(it => it.StartTimeDt).ThenBy(it => it.Apply_time_dt).ToList();
|
|
|
ex_Items.Add(ex_Items_jq);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (reissuecardNum > 0)
|
|
|
{
|
|
|
List<Sp_Detail> sp_buka_details = new List<Sp_Detail>();
|
|
@@ -1234,16 +1261,23 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
decimal bukaPrice = 0.00M;
|
|
|
- if (bukaNum <= 2)
|
|
|
+
|
|
|
+ if (user_probationary_bk_decimal == 0)
|
|
|
{
|
|
|
- bukaPrice = 10.00M;
|
|
|
- }
|
|
|
- else
|
|
|
+ if (bukaNum <= 2) bukaPrice = 0.00M;
|
|
|
+ else if (bukaNum <= 4 && bukaNum > 2) bukaPrice = 10.00M;
|
|
|
+ else bukaPrice = 50.00M;
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
- bukaPrice = 50.00M;
|
|
|
+ if (bukaNum <= 2) bukaPrice = 10.00M;
|
|
|
+ else bukaPrice = 50.00M;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
var app_data = item.apply_data;
|
|
|
var punch_correction1 = app_data.contents[0].value.punch_correction;
|
|
|
var punch_correction2 = app_data.contents[1].value;
|
|
@@ -1274,7 +1308,6 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1427,8 +1460,6 @@ namespace OASystem.API.OAMethodLib
|
|
|
string am_starttime = "08:59";
|
|
|
string am_endtime = "13:01";
|
|
|
|
|
|
-
|
|
|
-
|
|
|
decimal personalkLeave_dailywage_day = ConvertToDecimal( amountPayable / work_days);
|
|
|
|
|
|
|
|
@@ -1452,17 +1483,22 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
decimal leave_halfHour = Convert.ToDecimal(duration) / Convert.ToDecimal(0.5);
|
|
|
typeDeduction = personalkLeave_dailywage_halfhour * leave_halfHour;
|
|
|
- if (duration >= 3 && duration <= 7.5M)
|
|
|
+ if (duration >= 3 && duration <= 7.5M)
|
|
|
{
|
|
|
+ mealDeduction = 10;
|
|
|
+
|
|
|
+ #region 上午请假超三小时 扣款
|
|
|
|
|
|
- if (startTime.CompareTo(am_starttime) > 0 && startTime.CompareTo(am_endtime) < 0)
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- mealDeduction = 10;
|
|
|
-
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
}
|
|
|
else if (duration > 7.5M)
|
|
|
{
|
|
@@ -1510,15 +1546,20 @@ namespace OASystem.API.OAMethodLib
|
|
|
typeDeduction = sickLeave_dailywage_halfhour_deduction *sickLeave_halfHour ;
|
|
|
if (duration >= 3 && duration <= 7.5M)
|
|
|
{
|
|
|
-
|
|
|
- if (startTime.CompareTo(am_starttime) > 0 && startTime.CompareTo(am_endtime) < 0)
|
|
|
- {
|
|
|
-
|
|
|
- if (endTime.CompareTo(am_starttime) > 0 && endTime.CompareTo(am_endtime) < 0)
|
|
|
- {
|
|
|
- mealDeduction = 10;
|
|
|
- }
|
|
|
- }
|
|
|
+ mealDeduction = 10;
|
|
|
+
|
|
|
+ #region 上午请假超三小时扣款
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
}
|
|
|
else if (duration > 7.5M)
|
|
|
{
|
|
@@ -1584,8 +1625,8 @@ namespace OASystem.API.OAMethodLib
|
|
|
public static void CalculateTypeFeeSub(string date_Range_type, string startTime, string endTime, decimal duration, out decimal mealDeduction)
|
|
|
{
|
|
|
mealDeduction = 0;
|
|
|
- string am_starttime = "08:59";
|
|
|
- string am_endtime = "13:01";
|
|
|
+ string am_starttime = "09:00";
|
|
|
+ string am_endtime = "11:59";
|
|
|
|
|
|
if (date_Range_type == "halfday")
|
|
|
{
|
|
@@ -1595,15 +1636,28 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
if (duration >= 3 && duration < 7)
|
|
|
{
|
|
|
-
|
|
|
- if (startTime.CompareTo(am_starttime) > 0 && startTime.CompareTo(am_endtime) < 0)
|
|
|
- {
|
|
|
-
|
|
|
- if (endTime.CompareTo(am_starttime) > 0 && endTime.CompareTo(am_endtime) < 0)
|
|
|
- {
|
|
|
- mealDeduction = 10;
|
|
|
- }
|
|
|
- }
|
|
|
+ mealDeduction = 10;
|
|
|
+
|
|
|
+ #region 上午请假超三小时 扣款
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
}
|
|
|
else if (duration >= 7 && duration <= 7.50M )
|
|
|
{
|
|
@@ -1625,11 +1679,13 @@ namespace OASystem.API.OAMethodLib
|
|
|
int lastHours = (Convert.ToDateTime(endTime) - Convert.ToDateTime("09:00")).Hours;
|
|
|
if (lastHours >= 3)
|
|
|
{
|
|
|
-
|
|
|
- if (endTime.CompareTo(am_starttime) > 0 && endTime.CompareTo(am_endtime) < 0)
|
|
|
- {
|
|
|
- mealDeduction += 10;
|
|
|
- }
|
|
|
+ mealDeduction += 10;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|