Administrator 3 роки тому
батько
коміт
339039becb

+ 4 - 0
boman-api/boman-domain/src/main/java/com.boman.domain/constant/AttendanceConst.java

@@ -11,6 +11,10 @@ public class AttendanceConst {
     public static final String ATTENDANCE_USER_NAME = "attendance_table_username";
     /** 考勤人员姓名id **/
     public static final String ATTENDANCE_USER_ID = "user_id";
+    /**
+     * 考勤人员部门id
+     */
+    public static final String ATTENDANCE_DEPT_ID = "dept_id";
 
     /** 是否考勤异常 **/
     public static final String ATTENDANCE_ABNORMAL = "attendance_abnormal";

+ 2 - 0
boman-web-core/src/main/java/com/boman/web/core/service/attendance/AttendanceServiceImpl.java

@@ -295,6 +295,7 @@ public class AttendanceServiceImpl implements AttendanceService {
         commitData.put(ATTENDANCE_TABLE_LONGITUDE, dto.getLongitude());
         commitData.put(ATTENDANCE_TABLE_LATITUDE, dto.getLatitude());
         commitData.put(ATTENDANCE_USER_ID, SecurityUtils.getUserId());
+        commitData.put(ATTENDANCE_DEPT_ID, AuthUtils.getLoginUser().getSysUser().getDeptId());
         Timestamp currentTime = new Timestamp(System.currentTimeMillis());
         // 是否请假
         if (checkIsLeave()) {
@@ -302,6 +303,7 @@ public class AttendanceServiceImpl implements AttendanceService {
         }
 
         UpdateDto updateDto = new UpdateDto();
+        //如果是更新
         JSONObject commitDataUpdate = new JSONObject();
         if (GO_TO_WORK_TYPE == type) {
             if (checkIsLate(currentTime,type)) {