|
|
@@ -2,6 +2,7 @@ package com.jpsoft.employment.modules.base.controller;
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.employment.config.OSSConfig;
|
|
|
+import com.jpsoft.employment.modules.base.dto.ImageDTO;
|
|
|
import com.jpsoft.employment.modules.base.entity.EnterpriseInfo;
|
|
|
import com.jpsoft.employment.modules.base.service.EnterpriseInfoService;
|
|
|
import com.jpsoft.employment.modules.base.service.RecruitPersonRelationService;
|
|
|
@@ -16,6 +17,8 @@ import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import net.sf.json.JSONArray;
|
|
|
+import net.sf.json.JSONObject;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
import org.apache.poi.ss.usermodel.Cell;
|
|
|
@@ -53,14 +56,16 @@ public class RecruitInformationInfoController {
|
|
|
|
|
|
@Autowired
|
|
|
private OSSConfig ossConfig;
|
|
|
-
|
|
|
-
|
|
|
- @ApiOperation(value="创建空记录")
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "创建空记录")
|
|
|
@GetMapping("create")
|
|
|
- public MessageResult<RecruitInformationInfo> create(){
|
|
|
+ public MessageResult<RecruitInformationInfo> create() {
|
|
|
MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
RecruitInformationInfo recruitInformationInfo = new RecruitInformationInfo();
|
|
|
+ List<ImageDTO> imageDTOList = new ArrayList<>();
|
|
|
+ recruitInformationInfo.setFileList(imageDTOList);
|
|
|
|
|
|
msgResult.setData(recruitInformationInfo);
|
|
|
msgResult.setResult(true);
|
|
|
@@ -68,14 +73,14 @@ public class RecruitInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="添加信息")
|
|
|
+ @ApiOperation(value = "添加信息")
|
|
|
@PostMapping("add")
|
|
|
- public MessageResult<RecruitInformationInfo> add(@RequestBody RecruitInformationInfo recruitInformationInfo,@RequestAttribute String subject){
|
|
|
+ public MessageResult<RecruitInformationInfo> add(@RequestBody RecruitInformationInfo recruitInformationInfo, @RequestAttribute String subject) {
|
|
|
MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
recruitInformationInfo.setId(UUID.randomUUID().toString());
|
|
|
- recruitInformationInfo.setDelFlag(false);
|
|
|
+ recruitInformationInfo.setDelFlag(false);
|
|
|
recruitInformationInfo.setCreateBy(subject);
|
|
|
recruitInformationInfo.setCreateTime(new Date());
|
|
|
recruitInformationInfo.setUpdateTime(new Date());
|
|
|
@@ -84,6 +89,22 @@ public class RecruitInformationInfoController {
|
|
|
recruitInformationInfo.setIsOnline(true);
|
|
|
recruitInformationInfo.setIsTopping(false);
|
|
|
|
|
|
+ if (recruitInformationInfo.getFileList() != null) {
|
|
|
+ JSONArray jsonArray = new JSONArray();
|
|
|
+
|
|
|
+ for (ImageDTO dto : recruitInformationInfo.getFileList()) {
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("name", dto.getName());
|
|
|
+ jsonObject.put("url", dto.getUrl());
|
|
|
+
|
|
|
+ jsonArray.add(jsonObject);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (jsonArray.size() > 0) {
|
|
|
+ recruitInformationInfo.setImages(jsonArray.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
int affectCount = recruitInformationInfoService.insert(recruitInformationInfo);
|
|
|
|
|
|
if (affectCount > 0) {
|
|
|
@@ -93,9 +114,8 @@ public class RecruitInformationInfoController {
|
|
|
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());
|
|
|
@@ -104,24 +124,43 @@ public class RecruitInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="获取信息")
|
|
|
+ @ApiOperation(value = "获取信息")
|
|
|
@GetMapping("edit/{id}")
|
|
|
- public MessageResult<RecruitInformationInfo> edit(@PathVariable("id") String id){
|
|
|
+ public MessageResult<RecruitInformationInfo> edit(@PathVariable("id") String id) {
|
|
|
MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(id);
|
|
|
|
|
|
if (recruitInformationInfo != null) {
|
|
|
+ List<ImageDTO> imageDTOList = new ArrayList<>();
|
|
|
+ if (StringUtils.isNotEmpty(recruitInformationInfo.getImages())) {
|
|
|
+ JSONArray jsonArray = JSONArray.fromObject(recruitInformationInfo.getImages());
|
|
|
+
|
|
|
+ for (Object object : jsonArray) {
|
|
|
+ JSONObject jsonObject = JSONObject.fromObject(object);
|
|
|
+ if (jsonObject != null) {
|
|
|
+ String name = jsonObject.get("name").toString();
|
|
|
+ String url = jsonObject.get("url").toString();
|
|
|
+
|
|
|
+ ImageDTO dto = new ImageDTO();
|
|
|
+ dto.setName(name);
|
|
|
+ dto.setUrl(url);
|
|
|
+ imageDTOList.add(dto);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ recruitInformationInfo.setFileList(imageDTOList);
|
|
|
+
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(recruitInformationInfo);
|
|
|
} else {
|
|
|
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());
|
|
|
@@ -130,15 +169,31 @@ public class RecruitInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="更新用户")
|
|
|
+ @ApiOperation(value = "更新用户")
|
|
|
@PostMapping("update")
|
|
|
- public MessageResult<RecruitInformationInfo> update(@RequestBody RecruitInformationInfo recruitInformationInfo,@RequestAttribute String subject){
|
|
|
+ public MessageResult<RecruitInformationInfo> update(@RequestBody RecruitInformationInfo recruitInformationInfo, @RequestAttribute String subject) {
|
|
|
MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
- recruitInformationInfo.setUpdateBy(subject);
|
|
|
+ recruitInformationInfo.setUpdateBy(subject);
|
|
|
recruitInformationInfo.setUpdateTime(new Date());
|
|
|
-
|
|
|
+
|
|
|
+ if (recruitInformationInfo.getFileList() != null) {
|
|
|
+ JSONArray jsonArray = new JSONArray();
|
|
|
+
|
|
|
+ for (ImageDTO dto : recruitInformationInfo.getFileList()) {
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ jsonObject.put("name", dto.getName());
|
|
|
+ jsonObject.put("url", dto.getUrl());
|
|
|
+
|
|
|
+ jsonArray.add(jsonObject);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (jsonArray.size() > 0) {
|
|
|
+ recruitInformationInfo.setImages(jsonArray.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
int affectCount = recruitInformationInfoService.update(recruitInformationInfo);
|
|
|
|
|
|
if (affectCount > 0) {
|
|
|
@@ -148,9 +203,8 @@ public class RecruitInformationInfoController {
|
|
|
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());
|
|
|
@@ -159,19 +213,19 @@ public class RecruitInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="删除用户")
|
|
|
+ @ApiOperation(value = "删除用户")
|
|
|
@PostMapping("delete/{id}")
|
|
|
- public MessageResult<RecruitInformationInfo> delete(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
+ public MessageResult<RecruitInformationInfo> delete(@PathVariable("id") String id, @RequestAttribute String subject) {
|
|
|
MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
-
|
|
|
- RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(id);
|
|
|
+
|
|
|
+ RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(id);
|
|
|
recruitInformationInfo.setDelFlag(true);
|
|
|
recruitInformationInfo.setUpdateBy(subject);
|
|
|
recruitInformationInfo.setUpdateTime(new Date());
|
|
|
-
|
|
|
- int affectCount = recruitInformationInfoService.update(recruitInformationInfo);
|
|
|
+
|
|
|
+ int affectCount = recruitInformationInfoService.update(recruitInformationInfo);
|
|
|
|
|
|
if (affectCount > 0) {
|
|
|
msgResult.setResult(true);
|
|
|
@@ -179,9 +233,8 @@ public class RecruitInformationInfoController {
|
|
|
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());
|
|
|
@@ -191,9 +244,9 @@ public class RecruitInformationInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @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 {
|
|
|
@@ -215,9 +268,8 @@ public class RecruitInformationInfoController {
|
|
|
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());
|
|
|
@@ -226,16 +278,16 @@ public class RecruitInformationInfoController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="列表")
|
|
|
- @RequestMapping(value = "pageList",method = RequestMethod.POST)
|
|
|
+ @ApiOperation(value = "列表")
|
|
|
+ @RequestMapping(value = "pageList", method = RequestMethod.POST)
|
|
|
public MessageResult<Object> pageList(
|
|
|
- String name,String positionName,String intendedIndustries,String method,
|
|
|
- String status,String workArea,String isOnline,String isTopping,
|
|
|
- @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
- @RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
+ String name, String positionName, String intendedIndustries, String method,
|
|
|
+ String status, String workArea, String isOnline, String isTopping,
|
|
|
+ @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");
|
|
|
+ HttpServletRequest request) {
|
|
|
+ String subject = (String) request.getAttribute("subject");
|
|
|
|
|
|
//当前用户ID
|
|
|
System.out.println(subject);
|
|
|
@@ -274,20 +326,18 @@ public class RecruitInformationInfoController {
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotEmpty(isOnline)) {
|
|
|
- if("0".equals(isOnline)){
|
|
|
+ if ("0".equals(isOnline)) {
|
|
|
searchParams.put("isOnline", false);
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
searchParams.put("isOnline", true);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotEmpty(isTopping)) {
|
|
|
- if("0".equals(isTopping)){
|
|
|
+ if ("0".equals(isTopping)) {
|
|
|
searchParams.put("isTopping", false);
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
searchParams.put("isTopping", true);
|
|
|
}
|
|
|
}
|
|
|
@@ -300,7 +350,7 @@ public class RecruitInformationInfoController {
|
|
|
for (RecruitInformationInfo recruitInformationInfo : page) {
|
|
|
Map map = new HashMap();
|
|
|
|
|
|
- String enterpriseName="";
|
|
|
+ String enterpriseName = "";
|
|
|
EnterpriseInfo enterpriseInfo = enterpriseInfoService.get(recruitInformationInfo.getEnterpriseId());
|
|
|
if (enterpriseInfo != null) {
|
|
|
enterpriseName = enterpriseInfo.getName();
|
|
|
@@ -321,20 +371,20 @@ public class RecruitInformationInfoController {
|
|
|
recruitInformationInfo.setIsReadNumber(isReadNumber);
|
|
|
|
|
|
|
|
|
- map.put("id",recruitInformationInfo.getId());
|
|
|
- map.put("enterpriseName",enterpriseName);
|
|
|
- map.put("industryN",industryN);
|
|
|
- map.put("settlementMethodN",settlementMethodN);
|
|
|
- map.put("positionName",recruitInformationInfo.getPositionName());
|
|
|
- map.put("salary",recruitInformationInfo.getSalary());
|
|
|
- map.put("recruitingNumbers",recruitInformationInfo.getRecruitingNumbers());
|
|
|
- map.put("contacts",recruitInformationInfo.getContacts());
|
|
|
- map.put("contactsPhone",recruitInformationInfo.getContactsPhone());
|
|
|
- map.put("workArea",recruitInformationInfo.getWorkArea());
|
|
|
- map.put("address",recruitInformationInfo.getAddress());
|
|
|
- map.put("browseNumber",recruitInformationInfo.getBrowseNumber());
|
|
|
- map.put("ageRequirement",recruitInformationInfo.getAgeRequirement());
|
|
|
- map.put("isTopping",recruitInformationInfo.getIsTopping());
|
|
|
+ map.put("id", recruitInformationInfo.getId());
|
|
|
+ map.put("enterpriseName", enterpriseName);
|
|
|
+ map.put("industryN", industryN);
|
|
|
+ map.put("settlementMethodN", settlementMethodN);
|
|
|
+ map.put("positionName", recruitInformationInfo.getPositionName());
|
|
|
+ map.put("salary", recruitInformationInfo.getSalary());
|
|
|
+ map.put("recruitingNumbers", recruitInformationInfo.getRecruitingNumbers());
|
|
|
+ map.put("contacts", recruitInformationInfo.getContacts());
|
|
|
+ map.put("contactsPhone", recruitInformationInfo.getContactsPhone());
|
|
|
+ map.put("workArea", recruitInformationInfo.getWorkArea());
|
|
|
+ map.put("address", recruitInformationInfo.getAddress());
|
|
|
+ map.put("browseNumber", recruitInformationInfo.getBrowseNumber());
|
|
|
+ map.put("ageRequirement", recruitInformationInfo.getAgeRequirement());
|
|
|
+ map.put("isTopping", recruitInformationInfo.getIsTopping());
|
|
|
|
|
|
String statusN;
|
|
|
if ("1".equals(recruitInformationInfo.getStatus())) {
|
|
|
@@ -342,8 +392,8 @@ public class RecruitInformationInfoController {
|
|
|
} else {
|
|
|
statusN = "未审核";
|
|
|
}
|
|
|
- map.put("status",recruitInformationInfo.getStatus());
|
|
|
- map.put("statusN",statusN);
|
|
|
+ map.put("status", recruitInformationInfo.getStatus());
|
|
|
+ map.put("statusN", statusN);
|
|
|
|
|
|
String isOnlineN;
|
|
|
if (recruitInformationInfo.getIsOnline()) {
|
|
|
@@ -351,9 +401,9 @@ public class RecruitInformationInfoController {
|
|
|
} else {
|
|
|
isOnlineN = "下架";
|
|
|
}
|
|
|
- map.put("isOnline",recruitInformationInfo.getIsOnline());
|
|
|
- map.put("isOnlineN",isOnlineN);
|
|
|
- map.put("isReadNumber",isReadNumber);
|
|
|
+ map.put("isOnline", recruitInformationInfo.getIsOnline());
|
|
|
+ map.put("isOnlineN", isOnlineN);
|
|
|
+ map.put("isReadNumber", isReadNumber);
|
|
|
mapList.add(map);
|
|
|
|
|
|
}
|
|
|
@@ -369,8 +419,7 @@ public class RecruitInformationInfoController {
|
|
|
}
|
|
|
|
|
|
msgResult.setResult(true);
|
|
|
- }
|
|
|
- catch (Exception ex) {
|
|
|
+ } catch (Exception ex) {
|
|
|
logger.error(ex.getMessage(), ex);
|
|
|
msgResult.setResult(false);
|
|
|
}
|
|
|
@@ -389,8 +438,8 @@ public class RecruitInformationInfoController {
|
|
|
Row rowTitle = sheet.createRow(0);
|
|
|
|
|
|
String[] titles = new String[]{"序号", "企业名称", "行业",
|
|
|
- "职位名称", "薪资待遇","结算方式","年龄要求","招聘人数",
|
|
|
- "联系人","联系电话","工作地区","详细地址","浏览次数","审核状态","是否上架"};
|
|
|
+ "职位名称", "薪资待遇", "结算方式", "年龄要求", "招聘人数",
|
|
|
+ "联系人", "联系电话", "工作地区", "详细地址", "浏览次数", "审核状态", "是否上架"};
|
|
|
|
|
|
for (int i = 0; i < titles.length; i++) {
|
|
|
Cell cell = rowTitle.createCell(i);
|
|
|
@@ -438,9 +487,9 @@ public class RecruitInformationInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="审核信息")
|
|
|
+ @ApiOperation(value = "审核信息")
|
|
|
@PostMapping("check/{id}")
|
|
|
- public MessageResult<RecruitInformationInfo> check(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
+ public MessageResult<RecruitInformationInfo> check(@PathVariable("id") String id, @RequestAttribute String subject) {
|
|
|
MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
@@ -458,9 +507,8 @@ public class RecruitInformationInfoController {
|
|
|
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());
|
|
|
@@ -470,9 +518,9 @@ public class RecruitInformationInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="修改是否在线")
|
|
|
+ @ApiOperation(value = "修改是否在线")
|
|
|
@PostMapping("changeIsOnline/{id}")
|
|
|
- public MessageResult<RecruitInformationInfo> changeIsOnline(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
+ public MessageResult<RecruitInformationInfo> changeIsOnline(@PathVariable("id") String id, @RequestAttribute String subject) {
|
|
|
MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
@@ -481,10 +529,9 @@ public class RecruitInformationInfoController {
|
|
|
recruitInformationInfo.setUpdateBy(subject);
|
|
|
recruitInformationInfo.setUpdateTime(new Date());
|
|
|
|
|
|
- if(recruitInformationInfo.getIsOnline()){
|
|
|
+ if (recruitInformationInfo.getIsOnline()) {
|
|
|
recruitInformationInfo.setIsOnline(false);
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
recruitInformationInfo.setIsOnline(true);
|
|
|
}
|
|
|
|
|
|
@@ -496,9 +543,8 @@ public class RecruitInformationInfoController {
|
|
|
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());
|
|
|
@@ -508,9 +554,9 @@ public class RecruitInformationInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @ApiOperation(value="修改是否置顶")
|
|
|
+ @ApiOperation(value = "修改是否置顶")
|
|
|
@PostMapping("changeTopping/{id}")
|
|
|
- public MessageResult<RecruitInformationInfo> changeTopping(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
+ public MessageResult<RecruitInformationInfo> changeTopping(@PathVariable("id") String id, @RequestAttribute String subject) {
|
|
|
MessageResult<RecruitInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
|
@@ -519,10 +565,9 @@ public class RecruitInformationInfoController {
|
|
|
recruitInformationInfo.setUpdateBy(subject);
|
|
|
recruitInformationInfo.setUpdateTime(new Date());
|
|
|
|
|
|
- if(recruitInformationInfo.getIsTopping()!=null&&recruitInformationInfo.getIsTopping()){
|
|
|
+ if (recruitInformationInfo.getIsTopping() != null && recruitInformationInfo.getIsTopping()) {
|
|
|
recruitInformationInfo.setIsTopping(false);
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
recruitInformationInfo.setIsTopping(true);
|
|
|
}
|
|
|
|
|
|
@@ -534,9 +579,8 @@ public class RecruitInformationInfoController {
|
|
|
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());
|
|
|
@@ -546,7 +590,6 @@ public class RecruitInformationInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
@ApiOperation(value = "导入招聘信息")
|
|
|
@PostMapping("importXls")
|
|
|
@ApiImplicitParams({
|
|
|
@@ -649,23 +692,22 @@ public class RecruitInformationInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
EnterpriseInfo enterpriseInfo = enterpriseInfoService.findByName(enterpriseName);
|
|
|
- if(enterpriseInfo==null){
|
|
|
+ if (enterpriseInfo == null) {
|
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("填写的企业名称在系统中不存在,请检查企业名称!");
|
|
|
failCount++;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- String industryValue = dataDictionaryService.findValueByCatalogNameAndName("意向行业",industry);
|
|
|
- if(StringUtils.isEmpty(industryValue)){
|
|
|
+ String industryValue = dataDictionaryService.findValueByCatalogNameAndName("意向行业", industry);
|
|
|
+ if (StringUtils.isEmpty(industryValue)) {
|
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("填写的行业在系统中不存在,请检查行业!");
|
|
|
failCount++;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- String settlementMethodValue = dataDictionaryService.findValueByCatalogNameAndName("结算方式",settlementMethod);
|
|
|
- if(StringUtils.isEmpty(settlementMethodValue)){
|
|
|
+ String settlementMethodValue = dataDictionaryService.findValueByCatalogNameAndName("结算方式", settlementMethod);
|
|
|
+ if (StringUtils.isEmpty(settlementMethodValue)) {
|
|
|
sheet1.getRow(rowIndex).createCell(validateColIndex).setCellValue("填写的结算方式在系统中不存在,请检查结算方式!");
|
|
|
failCount++;
|
|
|
continue;
|