|
@@ -32,7 +32,7 @@ public class PostController {
|
|
|
@ResponseBody
|
|
|
@GetMapping("/getList")
|
|
|
public BaseResponse getList(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
|
|
|
- @RequestParam(required = false) String postID,
|
|
|
+ @RequestParam(required = false) List<String> postIDList,
|
|
|
@RequestParam(required = false) String postName,
|
|
|
@RequestParam(required = false) Integer minCount,
|
|
|
@RequestParam(required = false) Integer maxCount,
|
|
@@ -42,7 +42,7 @@ public class PostController {
|
|
|
@RequestParam(required = false) String companyID
|
|
|
) {
|
|
|
|
|
|
- PageInfo<PostVo> result = postService.getList(pageIndex, pageSize, postID, postName, minCount, maxCount, companyName, recordStatus, workName,companyID);
|
|
|
+ PageInfo<PostVo> result = postService.getList(pageIndex, pageSize, postIDList, postName, minCount, maxCount, companyName, recordStatus, workName,companyID);
|
|
|
return RespGenerstor.success(result);
|
|
|
}
|
|
|
|
|
@@ -88,6 +88,7 @@ public class PostController {
|
|
|
data.postID = UUID.randomUUID().toString();
|
|
|
data.startTime = new Date();
|
|
|
data.endTime = new Date();
|
|
|
+ data.recordStatus =1;
|
|
|
}
|
|
|
return RespGenerstor.success(data);
|
|
|
}
|
|
@@ -104,13 +105,14 @@ public class PostController {
|
|
|
@GetMapping("/export")
|
|
|
public BaseResponse export(HttpServletResponse response, @RequestParam(required = false) Boolean isExport,
|
|
|
@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,
|
|
|
+ @RequestParam(required = false) List<String> postIDList,
|
|
|
@RequestParam(required = false) String postName,
|
|
|
@RequestParam(required = false) Integer minCount,
|
|
|
@RequestParam(required = false) Integer maxCount,
|
|
|
@RequestParam(required = false) String companyName,
|
|
|
@RequestParam(required = false) String recordStatus,
|
|
|
@RequestParam(required = false) String workName) throws Exception {
|
|
|
- PageInfo<PostVo> result = postService.getList(pageIndex, pageSize, null, postName, minCount, maxCount, companyName, recordStatus, workName,null);
|
|
|
+ PageInfo<PostVo> result = postService.getList(pageIndex, pageSize, postIDList, postName, minCount, maxCount, companyName, recordStatus, workName,null);
|
|
|
|
|
|
if (isExport == null || !isExport) {
|
|
|
return RespGenerstor.success(result);
|
|
@@ -119,7 +121,7 @@ public class PostController {
|
|
|
ExcelHelper.ExcelData data = excelHelper.new ExcelData();
|
|
|
data.setTitles(Arrays.asList(new String[]{"序号", "岗位名称", "招聘人数","开始日期", "结束日期", "招聘企业", "岗位状态", "工种名称", "文化程度", "薪酬", "联系人", "联系电话"}));
|
|
|
int i = 0;
|
|
|
- List<List<Object>> rowDatas = new ArrayList();
|
|
|
+ List<List<Object>> rowsData = new ArrayList();
|
|
|
for (PostVo item : result.getList()) {
|
|
|
List<Object> row = new ArrayList();
|
|
|
++i;
|
|
@@ -127,7 +129,7 @@ public class PostController {
|
|
|
row.add(item.postName);
|
|
|
row.add(item.recruitCount);
|
|
|
row.add(dateUtils.dateToStr(item.startTime));
|
|
|
- row.add(item.endTime);
|
|
|
+ row.add(dateUtils.dateToStr(item.endTime));
|
|
|
row.add(item.companyName);
|
|
|
row.add(item.recordStatus == 1 ? "启用" : "停用");
|
|
|
row.add("");
|
|
@@ -135,9 +137,9 @@ public class PostController {
|
|
|
row.add(item.minSalary+"-"+item.maxSalary);
|
|
|
row.add(item.userName);
|
|
|
row.add(item.userMobile);
|
|
|
- rowDatas.add(row);
|
|
|
+ rowsData.add(row);
|
|
|
}
|
|
|
- data.setRows(rowDatas);
|
|
|
+ data.setRows(rowsData);
|
|
|
excelHelper.exportExcel(response, data);
|
|
|
return null;
|
|
|
}
|