|
@@ -72,6 +72,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
try
|
|
|
{
|
|
|
+
|
|
|
|
|
|
|
|
|
foreach (var pm_wsInfo in pm_WageSheetDattaSources)
|
|
@@ -406,7 +407,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
List<Root> roots_words = checkInDayDataView.datas.Where(it => it.base_info.day_type == 0).ToList();
|
|
|
List<Root> roots_exs = checkInDayDataView.datas.Where(it => it.exception_infos.Count > 0).ToList();
|
|
|
|
|
|
-
|
|
|
+ int user_cd_zt_num = 0;
|
|
|
foreach (var roots_ex in roots_exs)
|
|
|
{
|
|
|
foreach (var exception_info in roots_ex.exception_infos)
|
|
@@ -446,7 +447,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
if (timelength < 10)
|
|
|
{
|
|
|
- reissueCardNum++;
|
|
|
+ user_cd_zt_num++;
|
|
|
beLate_belate_ex.SubTypeId = 1;
|
|
|
beLate_belate_ex.SubType = "迟到";
|
|
|
|
|
@@ -456,7 +457,7 @@ namespace OASystem.API.OAMethodLib
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- day_deduction = 10.00M;
|
|
|
+ day_deduction = 0.00M;
|
|
|
}
|
|
|
beLate_deduction += day_deduction;
|
|
|
}
|
|
@@ -487,16 +488,18 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
if (timelength < 10)
|
|
|
{
|
|
|
- reissueCardNum++;
|
|
|
+ user_cd_zt_num++;
|
|
|
beLate_belate_ex.SubTypeId = 2;
|
|
|
beLate_belate_ex.SubType = "早退";
|
|
|
|
|
|
if (reissueCardNum >= 3)
|
|
|
{
|
|
|
day_deduction = 50.00M;
|
|
|
- early_deduction += day_deduction;
|
|
|
}
|
|
|
-
|
|
|
+ else {
|
|
|
+ day_deduction = 0.00M;
|
|
|
+ }
|
|
|
+ early_deduction += day_deduction;
|
|
|
}
|
|
|
else if (timelength >= 10 && timelength <= 60)
|
|
|
{
|
|
@@ -1027,5 +1030,59 @@ namespace OASystem.API.OAMethodLib
|
|
|
return num;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public static async Task<Result> GetHoilDays(DateTime startDt,DateTime endDt)
|
|
|
+ {
|
|
|
+ Result result = new Result();
|
|
|
+
|
|
|
+
|
|
|
+ HttpClient _httpClient = new HttpClient();
|
|
|
+ var res = await _httpClient.GetAsync("https://timor.tech/api/holiday/year/"+ startDt.ToString("yyyy"));
|
|
|
+
|
|
|
+ if (res.IsSuccessStatusCode)
|
|
|
+ {
|
|
|
+ var stringResponse = await res.Content.ReadAsStringAsync();
|
|
|
+
|
|
|
+ HoiDaysRes obj = JsonConvert.DeserializeObject<HoiDaysRes>(stringResponse);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if (obj.code == 0)
|
|
|
+ {
|
|
|
+ int hoilDays = 0;
|
|
|
+ while (true)
|
|
|
+ {
|
|
|
+ string dt = startDt.ToString("MM-dd");
|
|
|
+
|
|
|
+ if (startDt == endDt)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ startDt.AddDays(1);
|
|
|
+ }
|
|
|
+
|
|
|
+ result.Code = 0;
|
|
|
+ result.Data = hoilDays;
|
|
|
+ }
|
|
|
+ int code = obj.code;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public class HoiDaysRes
|
|
|
+ {
|
|
|
+ public int code { get; set; }
|
|
|
+
|
|
|
+ public object holiday { get; set; }
|
|
|
+ }
|
|
|
}
|
|
|
}
|