Browse Source

计算工资 调整外出打卡

leiy 1 year ago
parent
commit
9acc7e4a5c
1 changed files with 5 additions and 4 deletions
  1. 5 4
      OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs

+ 5 - 4
OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs

@@ -455,7 +455,8 @@ namespace OASystem.API.OAMethodLib
                             else //下午
                             {
                                 DateTime pmDt = Convert.ToDateTime("18:00:00");
-                                timelength = (decimal)(pmDt - wcdkDt).TotalMinutes;
+                                DateTime pmDt1 = Convert.ToDateTime("13:30:00");
+                                timelength = (decimal)(pmDt1 - wcdkDt).TotalMinutes;
                                 if (wcdkDt >= pmDt)
                                 {
                                     continue;
@@ -475,7 +476,7 @@ namespace OASystem.API.OAMethodLib
                                 SubTypeId = 4,
                                 SubType = "旷工",
                                 Duration = timelength,
-                                StartTimeDt = wcdkDt,
+                                StartTimeDt = checkInData.checkin_time_dt,
                                 Unit = "分钟",
                                 Reason = "[外出打卡]"
                             };
@@ -484,7 +485,7 @@ namespace OASystem.API.OAMethodLib
                             {
                                 user_cd_zt_num++;
                                 beLate_belate_ex.SubTypeId = 1;
-                                beLate_belate_ex.SubType = "迟到/早退";
+                                beLate_belate_ex.SubType = "迟到";
                                 string thisStartDt = wcdkDt.ToString("yyyy-MM-dd HH:mm:ss");
                                 beLate_belate_ex.StartTimeDt = Convert.ToDateTime(thisStartDt);
 
@@ -501,7 +502,7 @@ namespace OASystem.API.OAMethodLib
                             }
                             else if (timelength >= 10 && timelength <= 60)
                             {
-                                beLate_belate_ex.SubType = "迟到/早退";
+                                beLate_belate_ex.SubType = "迟到";
                                 string thisStartDt = wcdkDt.ToString("yyyy-MM-dd HH:mm:ss");
                                 beLate_belate_ex.StartTimeDt = Convert.ToDateTime(thisStartDt);