|
@@ -1,11 +1,13 @@
|
|
|
package com.jpsoft.employment.modules.base.controller;
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
|
+import com.jpsoft.employment.config.OSSConfig;
|
|
|
import com.jpsoft.employment.modules.base.entity.JobEnterpriseRelation;
|
|
|
import com.jpsoft.employment.modules.base.entity.PersonInfo;
|
|
|
import com.jpsoft.employment.modules.base.service.JobEnterpriseRelationService;
|
|
|
import com.jpsoft.employment.modules.base.service.PersonInfoService;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
|
+import com.jpsoft.employment.modules.common.utils.OSSUtil;
|
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
|
import com.jpsoft.employment.modules.base.entity.JobInformationInfo;
|
|
@@ -13,12 +15,19 @@ import com.jpsoft.employment.modules.base.service.JobInformationInfoService;
|
|
|
import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
+import org.apache.poi.ss.usermodel.Cell;
|
|
|
+import org.apache.poi.ss.usermodel.Row;
|
|
|
+import org.apache.poi.ss.usermodel.Sheet;
|
|
|
+import org.apache.poi.ss.usermodel.Workbook;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.io.ByteArrayInputStream;
|
|
|
+import java.io.ByteArrayOutputStream;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -38,11 +47,14 @@ public class JobInformationInfoController {
|
|
|
|
|
|
@Autowired
|
|
|
private JobEnterpriseRelationService jobEnterpriseRelationService;
|
|
|
-
|
|
|
-
|
|
|
- @ApiOperation(value="创建空记录")
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private OSSConfig ossConfig;
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "创建空记录")
|
|
|
@GetMapping("create")
|
|
|
- public MessageResult<JobInformationInfo> create(){
|
|
|
+ public MessageResult<JobInformationInfo> create() {
|
|
|
MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
JobInformationInfo jobInformationInfo = new JobInformationInfo();
|
|
@@ -53,14 +65,14 @@ public class JobInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="添加信息")
|
|
|
+ @ApiOperation(value = "添加信息")
|
|
|
@PostMapping("add")
|
|
|
- public MessageResult<JobInformationInfo> add(@RequestBody JobInformationInfo jobInformationInfo,@RequestAttribute String subject){
|
|
|
+ public MessageResult<JobInformationInfo> add(@RequestBody JobInformationInfo jobInformationInfo, @RequestAttribute String subject) {
|
|
|
MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
jobInformationInfo.setId(UUID.randomUUID().toString());
|
|
|
- jobInformationInfo.setDelFlag(false);
|
|
|
+ jobInformationInfo.setDelFlag(false);
|
|
|
jobInformationInfo.setCreateBy(subject);
|
|
|
jobInformationInfo.setCreateTime(new Date());
|
|
|
jobInformationInfo.setUpdateTime(new Date());
|
|
@@ -74,9 +86,8 @@ public class JobInformationInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库添加失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -85,9 +96,9 @@ public class JobInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="获取信息")
|
|
|
+ @ApiOperation(value = "获取信息")
|
|
|
@GetMapping("edit/{id}")
|
|
|
- public MessageResult<JobInformationInfo> edit(@PathVariable("id") String id){
|
|
|
+ public MessageResult<JobInformationInfo> edit(@PathVariable("id") String id) {
|
|
|
MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
@@ -100,9 +111,8 @@ public class JobInformationInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库不存在该记录!");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -111,15 +121,15 @@ public class JobInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="更新用户")
|
|
|
+ @ApiOperation(value = "更新用户")
|
|
|
@PostMapping("update")
|
|
|
- public MessageResult<JobInformationInfo> update(@RequestBody JobInformationInfo jobInformationInfo,@RequestAttribute String subject){
|
|
|
+ public MessageResult<JobInformationInfo> update(@RequestBody JobInformationInfo jobInformationInfo, @RequestAttribute String subject) {
|
|
|
MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
- jobInformationInfo.setUpdateBy(subject);
|
|
|
+ jobInformationInfo.setUpdateBy(subject);
|
|
|
jobInformationInfo.setUpdateTime(new Date());
|
|
|
-
|
|
|
+
|
|
|
int affectCount = jobInformationInfoService.update(jobInformationInfo);
|
|
|
|
|
|
if (affectCount > 0) {
|
|
@@ -129,9 +139,8 @@ public class JobInformationInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库更新失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -140,19 +149,19 @@ public class JobInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="删除用户")
|
|
|
+ @ApiOperation(value = "删除用户")
|
|
|
@PostMapping("delete/{id}")
|
|
|
- public MessageResult<JobInformationInfo> delete(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
+ public MessageResult<JobInformationInfo> delete(@PathVariable("id") String id, @RequestAttribute String subject) {
|
|
|
MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
-
|
|
|
- JobInformationInfo jobInformationInfo = jobInformationInfoService.get(id);
|
|
|
+
|
|
|
+ JobInformationInfo jobInformationInfo = jobInformationInfoService.get(id);
|
|
|
jobInformationInfo.setDelFlag(true);
|
|
|
jobInformationInfo.setUpdateBy(subject);
|
|
|
jobInformationInfo.setUpdateTime(new Date());
|
|
|
-
|
|
|
- int affectCount = jobInformationInfoService.update(jobInformationInfo);
|
|
|
+
|
|
|
+ int affectCount = jobInformationInfoService.update(jobInformationInfo);
|
|
|
|
|
|
if (affectCount > 0) {
|
|
|
msgResult.setResult(true);
|
|
@@ -160,9 +169,8 @@ public class JobInformationInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库删除失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -172,9 +180,9 @@ public class JobInformationInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="批量删除")
|
|
|
+ @ApiOperation(value = "批量删除")
|
|
|
@PostMapping("batchDelete")
|
|
|
- public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
|
|
|
+ public MessageResult<Integer> batchDelete(@RequestBody List<String> idList, @RequestAttribute String subject) {
|
|
|
MessageResult<Integer> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
@@ -196,9 +204,8 @@ public class JobInformationInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("删除失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|
|
@@ -207,101 +214,197 @@ public class JobInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="列表")
|
|
|
- @RequestMapping(value = "pageList",method = RequestMethod.POST)
|
|
|
- public MessageResult<Map> pageList(
|
|
|
- String name,String intendedIndustries,String intendedPosition,String method,
|
|
|
- String workExperience,String education,String status,
|
|
|
- @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
- @RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
- HttpServletRequest request){
|
|
|
- String subject = (String)request.getAttribute("subject");
|
|
|
+ @ApiOperation(value = "列表")
|
|
|
+ @RequestMapping(value = "pageList", method = RequestMethod.POST)
|
|
|
+ public MessageResult<Object> pageList(
|
|
|
+ String name, String intendedIndustries, String intendedPosition, String method,
|
|
|
+ String workExperience, String education, String status,
|
|
|
+ @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
|
|
|
+ @RequestParam(value = "exportFlag", defaultValue = "false") Boolean exportFlag,
|
|
|
+ HttpServletRequest request) {
|
|
|
+ String subject = (String) request.getAttribute("subject");
|
|
|
|
|
|
//当前用户ID
|
|
|
System.out.println(subject);
|
|
|
|
|
|
- MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+ MessageResult<Object> msgResult = new MessageResult<>();
|
|
|
|
|
|
- Map<String,Object> searchParams = new HashMap<>();
|
|
|
+ try {
|
|
|
|
|
|
- List<Sort> sortList = new ArrayList<>();
|
|
|
- sortList.add(new Sort("create_time","desc"));
|
|
|
+ Map<String, Object> searchParams = new HashMap<>();
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(name)) {
|
|
|
- searchParams.put("name","%" + name + "%");
|
|
|
- }
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("create_time", "desc"));
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(intendedPosition)) {
|
|
|
- searchParams.put("intendedPosition","%" + intendedPosition + "%");
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(name)) {
|
|
|
+ searchParams.put("name", "%" + name + "%");
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(intendedIndustries)) {
|
|
|
- searchParams.put("intendedIndustries",intendedIndustries);
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(intendedPosition)) {
|
|
|
+ searchParams.put("intendedPosition", "%" + intendedPosition + "%");
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(method)) {
|
|
|
- searchParams.put("method",method);
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(intendedIndustries)) {
|
|
|
+ searchParams.put("intendedIndustries", intendedIndustries);
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(workExperience)) {
|
|
|
- searchParams.put("workExperience",workExperience);
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(method)) {
|
|
|
+ searchParams.put("method", method);
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(education)) {
|
|
|
- searchParams.put("education",education);
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(workExperience)) {
|
|
|
+ searchParams.put("workExperience", workExperience);
|
|
|
+ }
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(status)) {
|
|
|
- searchParams.put("status",status);
|
|
|
- }
|
|
|
+ if (StringUtils.isNotEmpty(education)) {
|
|
|
+ searchParams.put("education", education);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(status)) {
|
|
|
+ searchParams.put("status", status);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- Page<JobInformationInfo> page = jobInformationInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
+ Page<JobInformationInfo> page = jobInformationInfoService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
|
|
|
|
|
|
- for (JobInformationInfo jobInformationInfo:page) {
|
|
|
- PersonInfo personInfo = personInfoService.get(jobInformationInfo.getPersonId());
|
|
|
- if(personInfo!=null){
|
|
|
- jobInformationInfo.setPersonName(personInfo.getRealName());
|
|
|
- }
|
|
|
+ List<Map> mapList = new ArrayList<>();
|
|
|
|
|
|
- String intendedIndustriesN = dataDictionaryService.findNameByCatalogNameAndValue("意向行业",jobInformationInfo.getIntendedIndustries());
|
|
|
- if(StringUtils.isNotEmpty(intendedIndustriesN)){
|
|
|
- jobInformationInfo.setIntendedIndustriesN(intendedIndustriesN);
|
|
|
- }
|
|
|
+ for (JobInformationInfo jobInformationInfo : page) {
|
|
|
+ Map map = new HashMap();
|
|
|
+ map.put("id", jobInformationInfo.getId());
|
|
|
+
|
|
|
+ String personName = "";
|
|
|
+ PersonInfo personInfo = personInfoService.get(jobInformationInfo.getPersonId());
|
|
|
+ if (personInfo != null) {
|
|
|
+ personName = personInfo.getRealName();
|
|
|
+ }
|
|
|
|
|
|
- String methodN = dataDictionaryService.findNameByCatalogNameAndValue("结算方式",jobInformationInfo.getMethod());
|
|
|
- if(StringUtils.isNotEmpty(methodN)){
|
|
|
- jobInformationInfo.setMethodN(methodN);
|
|
|
+ String intendedIndustriesN = dataDictionaryService.findNameByCatalogNameAndValue("意向行业", jobInformationInfo.getIntendedIndustries());
|
|
|
+ if (StringUtils.isNotEmpty(intendedIndustriesN)) {
|
|
|
+ jobInformationInfo.setIntendedIndustriesN(intendedIndustriesN);
|
|
|
+ }
|
|
|
+
|
|
|
+ String methodN = dataDictionaryService.findNameByCatalogNameAndValue("结算方式", jobInformationInfo.getMethod());
|
|
|
+ if (StringUtils.isNotEmpty(methodN)) {
|
|
|
+ jobInformationInfo.setMethodN(methodN);
|
|
|
+ }
|
|
|
+
|
|
|
+ String workExperienceN = dataDictionaryService.findNameByCatalogNameAndValue("工作经验", jobInformationInfo.getWorkExperience());
|
|
|
+ if (StringUtils.isNotEmpty(workExperienceN)) {
|
|
|
+ jobInformationInfo.setWorkExperienceN(workExperienceN);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ String educationN = dataDictionaryService.findNameByCatalogNameAndValue("学历", jobInformationInfo.getEducation());
|
|
|
+ if (StringUtils.isNotEmpty(educationN)) {
|
|
|
+ jobInformationInfo.setEducationN(educationN);
|
|
|
+ }
|
|
|
+
|
|
|
+ Integer isReadNumber = jobEnterpriseRelationService.countByJobInformationId(jobInformationInfo.getId());
|
|
|
+
|
|
|
+ jobInformationInfo.setIsReadNumber(isReadNumber);
|
|
|
+
|
|
|
+
|
|
|
+ map.put("personName", personName);
|
|
|
+ map.put("serviceDesc", jobInformationInfo.getServiceDesc());
|
|
|
+ map.put("intendedIndustriesN", intendedIndustriesN);
|
|
|
+ map.put("intendedPosition", jobInformationInfo.getIntendedPosition());
|
|
|
+ map.put("hopeSalary", jobInformationInfo.getHopeSalary());
|
|
|
+ map.put("methodN", jobInformationInfo.getMethod());
|
|
|
+ map.put("address", jobInformationInfo.getAddress());
|
|
|
+ map.put("educationN", educationN);
|
|
|
+ map.put("status", jobInformationInfo.getStatus());
|
|
|
+
|
|
|
+ String statusN = "";
|
|
|
+ if (jobInformationInfo.getStatus() != null && "1".equals(jobInformationInfo.getStatus())) {
|
|
|
+ statusN = "未审核";
|
|
|
+ } else {
|
|
|
+ statusN = "已审核";
|
|
|
+ }
|
|
|
+ map.put("statusN", statusN);
|
|
|
+ map.put("isReadNumber", isReadNumber);
|
|
|
+
|
|
|
+ mapList.add(map);
|
|
|
}
|
|
|
|
|
|
- String workExperienceN = dataDictionaryService.findNameByCatalogNameAndValue("工作经验",jobInformationInfo.getWorkExperience());
|
|
|
- if(StringUtils.isNotEmpty(workExperienceN)){
|
|
|
- jobInformationInfo.setWorkExperienceN(workExperienceN);
|
|
|
+ if (exportFlag) {
|
|
|
+ String filePath = exportXls(mapList);
|
|
|
+ msgResult.setData(filePath);
|
|
|
+ } else {
|
|
|
+ Map<String, Object> dataMap = PojoUtils.pageWrapper(page);
|
|
|
+ dataMap.put("data", mapList);
|
|
|
+ msgResult.setData(dataMap);
|
|
|
}
|
|
|
|
|
|
+ msgResult.setResult(true);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
+ msgResult.setResult(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
|
|
|
- String educationN = dataDictionaryService.findNameByCatalogNameAndValue("学历",jobInformationInfo.getEducation());
|
|
|
- if(StringUtils.isNotEmpty(educationN)){
|
|
|
- jobInformationInfo.setEducationN(educationN);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- Integer isReadNumber = jobEnterpriseRelationService.countByJobInformationId(jobInformationInfo.getId());
|
|
|
|
|
|
- jobInformationInfo.setIsReadNumber(isReadNumber);
|
|
|
+ private String exportXls(List<Map> mapList) {
|
|
|
+ String downloadUrl = "";
|
|
|
+
|
|
|
+ Workbook workbook = new HSSFWorkbook();
|
|
|
+ Sheet sheet = workbook.createSheet();
|
|
|
+
|
|
|
+ //表头
|
|
|
+ Row rowTitle = sheet.createRow(0);
|
|
|
+
|
|
|
+ String[] titles = new String[]{"序号", "求职人员", "服务描述",
|
|
|
+ "意向行业", "意向岗位", "期望薪资", "结算方式", "居住地",
|
|
|
+ "最高学历", "审核状态"};
|
|
|
+
|
|
|
+ for (int i = 0; i < titles.length; i++) {
|
|
|
+ Cell cell = rowTitle.createCell(i);
|
|
|
+ cell.setCellValue(titles[i]);
|
|
|
}
|
|
|
|
|
|
+ for (int i = 0; i < mapList.size(); i++) {
|
|
|
+ Map<String, Object> map = mapList.get(i);
|
|
|
|
|
|
- msgResult.setResult(true);
|
|
|
- msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+ Row row = sheet.createRow(i + 1);
|
|
|
|
|
|
- return msgResult;
|
|
|
- }
|
|
|
+ int colIndex = 0;
|
|
|
+ row.createCell(colIndex++).setCellValue(i + 1);
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("personName"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("serviceDesc"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("intendedIndustriesN"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("intendedPosition"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("hopeSalary"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("methodN"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("address"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("educationN"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("statusN"), ""));
|
|
|
|
|
|
+ }
|
|
|
|
|
|
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
|
|
|
|
|
|
- @ApiOperation(value="审核信息")
|
|
|
+ try {
|
|
|
+ workbook.write(output);
|
|
|
+
|
|
|
+ byte[] buffer = output.toByteArray();
|
|
|
+ ByteArrayInputStream input = new ByteArrayInputStream(buffer);
|
|
|
+
|
|
|
+ downloadUrl = OSSUtil.upload(ossConfig, "jobInformationList", "求职信息列表.xls", input);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
+ }
|
|
|
+
|
|
|
+ return downloadUrl;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "审核信息")
|
|
|
@PostMapping("check/{id}")
|
|
|
- public MessageResult<JobInformationInfo> check(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
+ public MessageResult<JobInformationInfo> check(@PathVariable("id") String id, @RequestAttribute String subject) {
|
|
|
MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
@@ -319,9 +422,8 @@ public class JobInformationInfoController {
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage("数据库审核失败");
|
|
|
}
|
|
|
- }
|
|
|
- catch(Exception ex){
|
|
|
- logger.error(ex.getMessage(),ex);
|
|
|
+ } catch (Exception ex) {
|
|
|
+ logger.error(ex.getMessage(), ex);
|
|
|
|
|
|
msgResult.setResult(false);
|
|
|
msgResult.setMessage(ex.getMessage());
|