|
@@ -5,9 +5,12 @@ import com.citu.framework.common.pojo.CommonResult;
|
|
|
import com.citu.framework.common.pojo.PageParam;
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
|
import com.citu.framework.common.util.object.BeanUtils;
|
|
|
+import com.citu.framework.dict.core.DictFrameworkUtils;
|
|
|
+import com.citu.framework.excel.core.convert.DictConvert;
|
|
|
import com.citu.framework.excel.core.util.ExcelUtils;
|
|
|
import com.citu.framework.security.core.annotations.PreAuthenticated;
|
|
|
import com.citu.framework.signature.core.annotation.ApiSignature;
|
|
|
+import com.citu.module.menduner.system.controller.admin.person.vo.PersonInfoRespExcelVO;
|
|
|
import com.citu.module.menduner.system.controller.base.person.PersonMapQueryReqVO;
|
|
|
import com.citu.module.menduner.system.controller.base.person.PersonQueryReqVO;
|
|
|
import com.citu.module.menduner.system.controller.base.person.PersonRecommendQueryReqVO;
|
|
@@ -20,6 +23,7 @@ import com.citu.module.menduner.system.service.person.info.PersonInfoService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -45,6 +49,7 @@ public class PersonInfoController {
|
|
|
@Resource
|
|
|
private PersonIntegrationService personIntegrationService;
|
|
|
|
|
|
+
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "创建人才信息-人才档案")
|
|
|
@PreAuthorize("@ss.hasPermission('menduner:system:person-info:create')")
|
|
@@ -100,10 +105,38 @@ public class PersonInfoController {
|
|
|
public void exportUserInfoExcel(@Valid PersonInfoPageReqVO pageReqVO,
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
- List<PersonInfoDO> list = personInfoService.getUserInfoPage(pageReqVO).getList();
|
|
|
+ List<PersonInfoRespExcelVO> list = BeanUtils.toBean(personInfoService.getUserInfoPage(pageReqVO).getList(), PersonInfoRespExcelVO.class);
|
|
|
+ for (PersonInfoRespExcelVO personInfoRespExcelVO : list) {
|
|
|
+ // 替换字典信息
|
|
|
+ if (StringUtils.isNotBlank(personInfoRespExcelVO.getJobType())) {
|
|
|
+ personInfoRespExcelVO.setJobType(DictFrameworkUtils.getDictDataLabel("menduner_job_type", personInfoRespExcelVO.getJobType()));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(personInfoRespExcelVO.getJobStatus())) {
|
|
|
+ personInfoRespExcelVO.setJobStatus(DictFrameworkUtils.getDictDataLabel("menduner_job_status", personInfoRespExcelVO.getJobStatus()));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(personInfoRespExcelVO.getSex())) {
|
|
|
+ personInfoRespExcelVO.setSex(DictFrameworkUtils.getDictDataLabel("sex", personInfoRespExcelVO.getSex()));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(personInfoRespExcelVO.getType())) {
|
|
|
+ personInfoRespExcelVO.setType(DictFrameworkUtils.getDictDataLabel("menduner_user_type",personInfoRespExcelVO.getType()));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(personInfoRespExcelVO.getEduType())) {
|
|
|
+ personInfoRespExcelVO.setEduType(DictFrameworkUtils.getDictDataLabel("menduner_education_type", personInfoRespExcelVO.getEduType()));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(personInfoRespExcelVO.getExpType())) {
|
|
|
+ personInfoRespExcelVO.setExpType(DictFrameworkUtils.getDictDataLabel("menduner_exp_type", personInfoRespExcelVO.getExpType()));
|
|
|
+ }
|
|
|
+ if(null!=personInfoRespExcelVO.getTagList() && !personInfoRespExcelVO.getTagList().isEmpty()){
|
|
|
+ personInfoRespExcelVO.setTagLists(StringUtils.join(personInfoRespExcelVO.getTagList(),","));
|
|
|
+ }
|
|
|
+ if(null!=personInfoRespExcelVO.getLastWorkExp()){
|
|
|
+ personInfoRespExcelVO.setWorkEnterpriseName(personInfoRespExcelVO.getLastWorkExp().getEnterpriseName());
|
|
|
+ personInfoRespExcelVO.setWorkJob(personInfoRespExcelVO.getLastWorkExp().getPositionName());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
// 导出 Excel
|
|
|
- ExcelUtils.write(response, "人才信息-人才档案.xls", "数据", PersonInfoRespVO.class,
|
|
|
- BeanUtils.toBean(list, PersonInfoRespVO.class));
|
|
|
+ ExcelUtils.write(response, "人才信息-人才档案.xls", "数据", PersonInfoRespExcelVO.class, list);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/sync/graph")
|