From e7759a5610e5efb7ebb5c9c2963402ce2f6546ab Mon Sep 17 00:00:00 2001 From: DB <2502523450@qq.com> Date: Thu, 25 Jan 2024 16:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8B=A4=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ClockInRecordController.java | 3 - .../clockin/business/dto/ClassesStaffDto.java | 193 ++++++++++++++++++ .../service/ClockInRecordService.java | 2 - .../impl/ClockInRecordServiceImpl.java | 5 - 4 files changed, 193 insertions(+), 10 deletions(-) create mode 100644 Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/dto/ClassesStaffDto.java diff --git a/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/controller/ClockInRecordController.java b/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/controller/ClockInRecordController.java index 24a16b2..4ed08ae 100644 --- a/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/controller/ClockInRecordController.java +++ b/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/controller/ClockInRecordController.java @@ -1,7 +1,6 @@ package com.cpop.clockin.business.controller; import com.alibaba.excel.EasyExcel; -import com.cpop.clockin.business.bo.ClockInRecordBo; import com.cpop.clockin.business.bo.EmployeeAttendanceBo; import com.cpop.clockin.business.service.ClockInRecordService; import com.cpop.clockin.framework.constant.ClockInConstant; @@ -15,9 +14,7 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.OutputStream; import java.net.URLEncoder; import java.text.ParseException; import java.util.ArrayList; diff --git a/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/dto/ClassesStaffDto.java b/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/dto/ClassesStaffDto.java new file mode 100644 index 0000000..55d6090 --- /dev/null +++ b/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/dto/ClassesStaffDto.java @@ -0,0 +1,193 @@ +package com.cpop.clockin.business.dto; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-01-25 13:32 + */ +@Data +public class ClassesStaffDto { + + /** + * 姓名 + */ + @ExcelProperty(value = "姓名",index = 0) + private String name; + + /** + * 考勤组 + */ + @ExcelProperty(value = "考勤组",index = 1) + private String attendanceGroup; + + /** + * 部门 + */ + @ExcelProperty(value = "部门",index = 2) + private String department; + + /** + * 工号 + */ + @ExcelProperty(value = "工号",index = 3) + private String employeeId; + + /** + * 职位 + */ + @ExcelProperty(value = "职位",index = 4) + private String position; + + /** + * 用户id + */ + @ExcelProperty(value = "UserId",index = 5) + private String userId; + + /** + * + */ + @ExcelProperty(value = "day1",index = 6) + private String day1; + + /** + * + */ + @ExcelProperty(value = "day2",index = 7) + private String day2; + + /** + * + */ + @ExcelProperty(value = "day3",index = 8) + private String day3; + + /** + * + */ + @ExcelProperty(value = "day4",index = 9) + private String day4; + + /** + * + */ + @ExcelProperty(value = "day5",index = 10) + private String day5; + + /** + * + */ + @ExcelProperty(value = "day6",index = 11) + private String day6; + + /** + * + */ + @ExcelProperty(value = "day7",index = 12) + private String day7; + + /** + * + */ + @ExcelProperty(value = "day8",index = 13) + private String day8; + + /** + * + */ + @ExcelProperty(value = "day9",index = 14) + private String day9; + + /** + * + */ + @ExcelProperty(value = "day10",index = 15) + private String day10; + + /** + * + */ + @ExcelProperty(value = "day11",index = 16) + private String day11; + + /** + * + */ + @ExcelProperty(value = "day12",index = 17) + private String day12; + + /** + * + */ + @ExcelProperty(value = "day13",index = 18) + private String day13; + + /** + * + */ + @ExcelProperty(value = "day14",index = 19) + private String day14; + + /** + * + */ + @ExcelProperty(value = "day15",index = 20) + private String day15; + + /** + * + */ + @ExcelProperty(value = "day16",index = 21) + private String day16; + + /** + * + */ + @ExcelProperty(value = "day17",index = 22) + private String day17; + + @ExcelProperty(value = "day18",index = 23) + private String day18; + + @ExcelProperty(value = "day19",index = 24) + private String day19; + + @ExcelProperty(value = "day20",index = 25) + private String day20; + + @ExcelProperty(value = "day21",index = 26) + private String day21; + + @ExcelProperty(value = "day22",index = 27) + private String day22; + + @ExcelProperty(value = "day23",index = 28) + private String day23; + + @ExcelProperty(value = "day24",index = 29) + private String day24; + + @ExcelProperty(value = "day25",index = 30) + private String day25; + + @ExcelProperty(value = "day26",index = 31) + private String day26; + + @ExcelProperty(value = "day27",index = 32) + private String day27; + + @ExcelProperty(value = "day28",index = 33) + private String day28; + + @ExcelProperty(value = "day29",index = 34) + private String day29; + + @ExcelProperty(value = "day30",index = 35) + private String day30; + + @ExcelProperty(value = "day31",index = 36) + private String day31; +} diff --git a/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/service/ClockInRecordService.java b/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/service/ClockInRecordService.java index e1deced..7149412 100644 --- a/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/service/ClockInRecordService.java +++ b/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/service/ClockInRecordService.java @@ -1,11 +1,9 @@ package com.cpop.clockin.business.service; -import com.cpop.clockin.business.bo.ClockInRecordBo; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; import java.text.ParseException; -import java.util.List; /** * 打卡记录服务类 diff --git a/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/service/impl/ClockInRecordServiceImpl.java b/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/service/impl/ClockInRecordServiceImpl.java index 7a01c9f..911721b 100644 --- a/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/service/impl/ClockInRecordServiceImpl.java +++ b/Cpop-ClockIn-Demo/src/main/java/com/cpop/clockin/business/service/impl/ClockInRecordServiceImpl.java @@ -4,10 +4,7 @@ import cn.hutool.core.util.ObjectUtil; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.event.AnalysisEventListener; - - import com.alibaba.fastjson2.JSON; -import com.cpop.clockin.business.bo.ClockInRecordBo; import com.cpop.clockin.business.entity.Classes; import com.cpop.clockin.business.entity.ClockInStaff; import com.cpop.clockin.business.entity.StaffClasses; @@ -18,8 +15,6 @@ import com.cpop.clockin.business.service.StaffClassesService; import com.cpop.clockin.framework.constant.ClockInConstant; import com.cpop.core.service.RedisService; import com.mybatisflex.core.query.QueryWrapper; -import org.json.JSONArray; -import org.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile;