소스 검색

计算工资 调整

leiy 1 년 전
부모
커밋
20a2c47521
1개의 변경된 파일19개의 추가작업 그리고 1개의 파일을 삭제
  1. 19 1
      OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs

+ 19 - 1
OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs

@@ -795,6 +795,7 @@ namespace OASystem.API.OAMethodLib
                 {
                     string itemName = userNames.Where(it => it.Id == pm_wsInfo.UserId).FirstOrDefault().CnName;
 
+
                     //补贴 金额
                     decimal meal_subsidy = 0.00M;  // 午餐(午餐10元/天)  补贴 * 计算方式:单日上午请假时长(小时)大于或者等于三小时 没有餐补
 
@@ -837,7 +838,18 @@ 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(); //工作日日报 1-固定上下班;
+
+                    List<Root> userRoots = new List<Root>();
+
+                    if (itemName == "蔡雯")
+                    {
+                        userRoots = workday_userRoots.Where(it => it.base_info.name == "蔡蔡" || it.base_info.name == "蔡雯").ToList(); //工作日日报 1-固定上下班;
+                    }
+                    else
+                    {
+                        userRoots = workday_userRoots.Where(it => it.base_info.name == itemName).ToList(); //工作日日报 1-固定上下班;
+                    } 
+
                     //userRoots = userRoots.Distinct().ToList();
                     userRoots = userRoots.OrderBy(it => it.base_info.date).ToList();
 
@@ -853,6 +865,12 @@ 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>(); //审批数据