liujc 1 year ago
parent
commit
65d11a1aa7

+ 52 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/EmployeeInfo.java

@@ -138,7 +138,7 @@ public class EmployeeInfo extends BaseEntity {
 	@ApiModelProperty(value = "是否覆盖", required = false)
 	private Boolean isCover = false;
 
-	public Boolean getCover() {
+    public Boolean getCover() {
 		return isCover;
 	}
 
@@ -487,4 +487,55 @@ public class EmployeeInfo extends BaseEntity {
 		return ToStringBuilder.reflectionToString(this);
 	}
 
+
+    // 教育背景
+    //[{"level":"本科","school":"测试院校","year":"2023-01-31T16:00:00.000Z","subject":"测试"},{"level":"本科","school":"测试院校2","year":"2023-09-30T16:00:00.000Z","subject":"测试"}]
+    public static class EduBackground {
+        private String level;
+        private String school;
+        private String year;
+        private String subject;
+
+        public EduBackground() {
+        }
+
+        public EduBackground(String level, String school, String year, String subject) {
+            this.level = level;
+            this.school = school;
+            this.year = year;
+            this.subject = subject;
+        }
+
+        public String getLevel() {
+            return level;
+        }
+
+        public void setLevel(String level) {
+            this.level = level;
+        }
+
+        public String getSchool() {
+            return school;
+        }
+
+        public void setSchool(String school) {
+            this.school = school;
+        }
+
+        public String getYear() {
+            return year;
+        }
+
+        public void setYear(String year) {
+            this.year = year;
+        }
+
+        public String getSubject() {
+            return subject;
+        }
+
+        public void setSubject(String subject) {
+            this.subject = subject;
+        }
+    }
 }

+ 19 - 5
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -1,5 +1,6 @@
 package com.ym.mec.web.controller;
 
+import com.alibaba.fastjson.JSONArray;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.*;
@@ -2322,18 +2323,31 @@ public class ExportController extends BaseController {
         if (CollectionUtils.isEmpty(rows)) {
             throw new BizException("没有可导出的记录");
         }
+
+        for (EmployeeInfo row : rows) {
+            if (StringUtils.isNotBlank(row.getEducationalBackground())) {
+                List<EmployeeInfo.EduBackground> eduBackgrounds = JSONArray.parseArray(row.getEducationalBackground(), EmployeeInfo.EduBackground.class);
+                if (!CollectionUtils.isEmpty(eduBackgrounds)) {
+                    row.setEducationalBackground(eduBackgrounds.stream()
+                        .map(o -> StringUtils.joinWith("-", o.getSchool(), o.getLevel(), o.getYear().substring(0,10)))
+                        .collect(Collectors.joining(",")));
+                }
+
+            }
+        }
+
         OutputStream outputStream = response.getOutputStream();
         try {
             String[] header = {"编号", "姓名", "手机号", "微信",
                     "声部", "所在城市", "工作意向", "信息来源", "下次沟通时间", "入职时间",
                     "职位", "分部", "人员状态", "证件号码", "年龄", "性别",
                     "银行卡", "开户行", "紧急联系人", "紧急联系人关系", "紧急联系人电话", "最后一次操作时间",
-                    "HRBP", "离职时间"
+                    "HRBP", "离职时间","背景描述"
             };
             String[] body = {"id", "realName", "mobileNo", "wechatNo", "subjectName", "liveCity", "intentionCity",
                     "sourceFrom", "nextVisitDateStr", "entryDateStr", "position.msg", "organName", "status.desc",
                     "idCard", "age", "gender?'男':'女'", "bankCardNo", "bankAddress", "emergencyContactName",
-                    "emergencyContactRelation", "emergencyContactPhone", "updateTime", "hrbpName", "resignationDateStr"};
+                    "emergencyContactRelation", "emergencyContactPhone", "updateTime", "hrbpName", "resignationDateStr","educationalBackground"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=employeeInfo-" + DateUtil.getDate(new Date()) + ".xls");
@@ -2828,7 +2842,7 @@ public class ExportController extends BaseController {
     @PostMapping("export/studentVisitRecord")
     @PreAuthorize("@pcs.hasPermissions('export/studentVisitRecord')")
     public void exportStudentVisitRecord(HttpServletResponse response, StudentVisitQueryInfo queryInfo) throws IOException {
-    	queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
+        queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         List<StudentVisitDto> rows = studentVisitService.getPageList(queryInfo).getRows();
@@ -2865,7 +2879,7 @@ public class ExportController extends BaseController {
     @PostMapping("export/noClassGroupStudentList")
     @PreAuthorize("@pcs.hasPermissions('export/noClassGroupStudentList')")
     public void exportNoClassGroupStudentList(HttpServletResponse response, NoClassMusicStudentQueryInfo queryInfo) throws IOException {
-    	queryInfo = organizationService.onlyEducation(queryInfo);
+        queryInfo = organizationService.onlyEducation(queryInfo);
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         List<NoClassMusicStudentDto> rows = studentRegistrationService.queryNoClassMusicStudentInfo(queryInfo).getRows();
@@ -2901,7 +2915,7 @@ public class ExportController extends BaseController {
     @PostMapping("export/studentErrorLeaveList")
     @PreAuthorize("@pcs.hasPermissions('export/studentErrorLeaveList')")
     public void exportStudentErrorLeaveList(HttpServletResponse response, StudentErrorLeaveQueryInfo queryInfo) throws IOException {
-    	queryInfo.setOrganIds(organizationService.getEmployeeOrgan(queryInfo.getOrganIds()));
+        queryInfo.setOrganIds(organizationService.getEmployeeOrgan(queryInfo.getOrganIds()));
         queryInfo.setPage(1);
         queryInfo.setRows(49999);
         List<StudentErrorLeaveDto> rows = studentManageService.queryStudentErrorLeaveList(queryInfo).getRows();