Browse Source

增加接口,检查景昱的考勤

seyason 1 year ago
parent
commit
e8060250e8

+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -1723,6 +1723,27 @@ public class ReportController {
         return httpRespMsg;
     }
 
+    @RequestMapping("/checkBeiSengCardTime")
+    public HttpRespMsg checkBeiSengCardTime(String userId, String dateWorkingTime) {
+        HttpRespMsg msg = new HttpRespMsg();
+        JSONArray array = JSONArray.parseArray(dateWorkingTime);
+        List<String> dateList = new ArrayList<>();
+        for (int i = 0; i < array.size(); i++) {
+            JSONObject jsonObject = array.getJSONObject(i);
+            String date = jsonObject.getString("date");
+            double workingTime = jsonObject.getDouble("workingTime");
+            dateList.add(date);
+        }
+        //获取景昱的考勤和加班时长,进行比对,如果有不一致的,返回错误
+        //错误信息格式:有加班工资的情况下,返回 异常:2024-04-18日填报工时(6h)不等于考勤总时长(8h);无加班工资情况下,返回 异常:2024-04-18日填报工时(8h)少于考勤工时(10h)
+        String warningMsg = null;
+
+        if (warningMsg != null) {
+            msg.setError(warningMsg);
+        }
+        return msg;
+    }
+
     private void fillReportHours(Report report, BigDecimal hourCost, Double workingTime, Integer timeType, String startTime, String endTime, SimpleDateFormat sdf, TimeType comTimeType, List<TimeAutoExclude> excludeTimeList) {
         if (report.getMultiWorktime() == 0) {
             //普通工时成本计算