添加企业岗位归集统计的导出

This commit is contained in:
sh
2026-02-10 17:27:58 +08:00
parent 69c3113fc2
commit a2d17b0a6b
5 changed files with 229 additions and 20 deletions

View File

@@ -20,7 +20,6 @@ import com.ruoyi.common.core.domain.entity.Company;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.EncryptDecryptUtil;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
@@ -68,8 +67,6 @@ public class CmsJobController extends BaseController
private IJobApplyService iJobApplyService;
@Autowired
private IAppReviewJobService iAppReviewJobService;
@Autowired
private EncryptDecryptUtil encryptDecryptUtil;
/**
* 查询岗位列表
*/

View File

@@ -1,14 +1,19 @@
package com.ruoyi.cms.controller.cms;
import com.ruoyi.cms.domain.StaticsJob;
import com.ruoyi.cms.domain.query.Staticsquery;
import com.ruoyi.cms.service.StaticsqueryService;
import com.ruoyi.cms.util.excel.StaticsExcelUtil;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@RestController
@@ -112,4 +117,27 @@ public class StaticsController extends BaseController {
Map<String,Object> result = service.qygwtjCount(staticsquery);
return success(result);
}
@GetMapping("/qygwtjDownload")
public void qygwtjDownload(Staticsquery staticsquery, HttpServletResponse response) throws Exception {
if(staticsquery==null){
throw new Exception("参数为空!");
}
String timeRange="";
if(StringUtils.isBlank(staticsquery.getStartTime())){
timeRange= "全部";
}else{
timeRange= staticsquery.getStartTime()+""+staticsquery.getEndTime();
}
String[] statLabels = {"注册企业数", "求职者实名数", "归集岗位合计", "简历投递数", "零工岗位数", "零工招聘人数"};
Map<String,Object> result = service.qygwtjCount(staticsquery);
List<StaticsJob> regionList = (List<StaticsJob>) result.get("group");
StaticsJob staticsJob=(StaticsJob)result.get("hz");
Integer[] statValues = {Integer.valueOf(staticsJob.getZcqys()),Integer.valueOf(staticsJob.getQzzsms()),
Integer.valueOf(staticsJob.getGjgwhj()), Integer.valueOf(staticsJob.getJlsl()),
Integer.valueOf(staticsJob.getLggws()), Integer.valueOf(staticsJob.getLgzprs())};
StaticsExcelUtil<StaticsJob> excelUtil = new StaticsExcelUtil<>(StaticsJob.class);
excelUtil.exportEmploymentExcel(response, timeRange, statLabels, statValues, regionList,
"岗位归集统计", 12);
}
}