This commit is contained in:
zhuyy 2023-02-20 14:29:11 +08:00
parent c6643ee103
commit 013afd73fc
18 changed files with 310 additions and 20 deletions

View File

@ -40,6 +40,7 @@ public interface UrlConstant {
String PARTY_ORGANIZATION = API + "/party_organization"; String PARTY_ORGANIZATION = API + "/party_organization";
String DIRECTORS_SUPERVISORS = API + "/directors_supervisors"; String DIRECTORS_SUPERVISORS = API + "/directors_supervisors";
String PERSONNEL_INDICATORS = API + "/personnel_indicators"; String PERSONNEL_INDICATORS = API + "/personnel_indicators";
String PERSONNEL_REPORT = API + "/personnel_report";
String ALTERATION = API + "/alteration"; String ALTERATION = API + "/alteration";
String Attachment = API + "/attachment"; String Attachment = API + "/attachment";

View File

@ -1,6 +1,7 @@
package com.ydool.staff.controller; package com.ydool.staff.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.ydool.common.base.BaseController; import com.ydool.common.base.BaseController;
import com.ydool.common.constant.UrlConstant; import com.ydool.common.constant.UrlConstant;
import com.ydool.common.data.dto.AjaxResult; import com.ydool.common.data.dto.AjaxResult;
@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping(UrlConstant.DIRECTORS_SUPERVISORS) @RequestMapping(UrlConstant.DIRECTORS_SUPERVISORS)
@Api(tags = "董监任免申报", value = "董监任免申报") @Api(tags = "董监任免申报", value = "董监任免申报")
@ApiSupport(order = 19)
public class DirectorsSupervisorsController extends BaseController { public class DirectorsSupervisorsController extends BaseController {
@Autowired @Autowired
@ -45,7 +47,7 @@ public class DirectorsSupervisorsController extends BaseController {
} }
@PostMapping("/saveDirectorsSupervisors") @PostMapping("/saveDirectorsSupervisors")
@ApiOperation(value = "新增董监任免申报") @ApiOperation(value = "新增董监任免申报 auditState 0保存1送审")
public AjaxResult saveDirectorsSupervisors(@RequestBody @Validated DirectorsSupervisors directorsSupervisors) { public AjaxResult saveDirectorsSupervisors(@RequestBody @Validated DirectorsSupervisors directorsSupervisors) {
return directorsSupervisorsService.saveDirectorsSupervisors(directorsSupervisors); return directorsSupervisorsService.saveDirectorsSupervisors(directorsSupervisors);
} }

View File

@ -2,6 +2,7 @@ package com.ydool.staff.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter; import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters; import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
import com.ydool.common.base.BaseController; import com.ydool.common.base.BaseController;
@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping(UrlConstant.ORGANIZATION) @RequestMapping(UrlConstant.ORGANIZATION)
@Api(tags = "人员招聘登记人员指标申报列表", value = "人员招聘登记人员指标申报列表") @Api(tags = "人员招聘登记人员指标申报列表", value = "人员招聘登记人员指标申报列表")
@ApiSupport(order = 16)
public class OrganizationController extends BaseController { public class OrganizationController extends BaseController {
@Autowired @Autowired
@ -36,7 +38,7 @@ public class OrganizationController extends BaseController {
@PostMapping("/deleteOrganizationAndPersonnelIndicators") @PostMapping("/deleteOrganizationAndPersonnelIndicators")
@ApiOperation(value = "人员招聘登记人员指标申报删除") @ApiOperation(value = "人员招聘登记人员指标申报删除")
@ApiOperationSupport(order = 2) @ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = IdsRequest.class)}), order = 2)
public AjaxResult deleteOrganization(@RequestBody IdsRequest id) { public AjaxResult deleteOrganization(@RequestBody IdsRequest id) {
return organizationService.deleteOrganization(id); return organizationService.deleteOrganization(id);
} }

View File

@ -1,6 +1,7 @@
package com.ydool.staff.controller; package com.ydool.staff.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter; import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters; import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
import com.ydool.common.base.BaseController; import com.ydool.common.base.BaseController;
@ -26,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping(UrlConstant.PERSONNEL_INDICATORS) @RequestMapping(UrlConstant.PERSONNEL_INDICATORS)
@Api(tags = "人员指标申报", value = "人员指标申报") @Api(tags = "人员指标申报", value = "人员指标申报")
@ApiSupport(order = 18)
public class PersonnelIndicatorsController extends BaseController { public class PersonnelIndicatorsController extends BaseController {
@Autowired @Autowired
@ -33,14 +35,14 @@ public class PersonnelIndicatorsController extends BaseController {
@PostMapping("/savePersonnelIndicators") @PostMapping("/savePersonnelIndicators")
@ApiOperation(value = "人员指标申报登记") @ApiOperation(value = "人员指标申报登记")
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = PersonnelIndicatorsRequest.class)}), order = 2) @ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = PersonnelIndicatorsRequest.class)}), order = 1)
public AjaxResult savePersonnelIndicators(@RequestBody @Validated PersonnelIndicatorsRequest personnelIndicatorsRequest) { public AjaxResult savePersonnelIndicators(@RequestBody @Validated PersonnelIndicatorsRequest personnelIndicatorsRequest) {
return personnelIndicatorsService.savePersonnelIndicators(personnelIndicatorsRequest); return personnelIndicatorsService.savePersonnelIndicators(personnelIndicatorsRequest);
} }
@GetMapping("/selectPersonnelIndicatorsById") @GetMapping("/selectPersonnelIndicatorsById")
@ApiOperation(value = "人员指标申报详情") @ApiOperation(value = "人员指标申报详情")
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = PersonnelIndicatorsDto.class)}), order = 3) @ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = PersonnelIndicatorsDto.class)}), order = 2)
public AjaxResult selectPersonnelIndicatorsById(String id) { public AjaxResult selectPersonnelIndicatorsById(String id) {
return personnelIndicatorsService.selectPersonnelIndicatorsById(id); return personnelIndicatorsService.selectPersonnelIndicatorsById(id);
} }

View File

@ -0,0 +1,70 @@
package com.ydool.staff.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
import com.ydool.common.base.BaseController;
import com.ydool.common.constant.UrlConstant;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.dto.EnterpriseIndicatorsExportDto;
import com.ydool.staff.dto.PersonnelReportExportDto;
import com.ydool.staff.excel.EnterpriseIndicatorsExportVO;
import com.ydool.staff.excel.PersonnelReportExportVO;
import com.ydool.staff.service.ICompanyNameService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* @Author Zhuyy
* @ClassName PersonnelReport
* @Description TODO
* @date 2023/2/20 9:16
* @Version 1.0
*/
@RestController
@RequestMapping(UrlConstant.PERSONNEL_REPORT)
@Api(tags = "人事报表", value = "人事报表")
@ApiSupport(order = 20)
public class PersonnelReportController extends BaseController {
@Autowired
ICompanyNameService companyNameService;
@GetMapping("/personnelReport")
@ApiOperation(value = "企业人员综合信息")
@ApiImplicitParams({@ApiImplicitParam(value = "企业id", name = "companyId"), @ApiImplicitParam(value = "工作状态 入职/在职/离职/退休", name = "workState", required = true), @ApiImplicitParam(value = "在职时间", name = "hireDate")})
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = PersonnelReportExportVO.class)}), order = 1)
public AjaxResult getPersonnelReport(String companyId, String workState, String hireDate) {
return companyNameService.getPersonnelReport(companyId, workState, hireDate);
}
@PostMapping("/exportPersonnelReport")
@ApiOperation(value = "企业人员综合信息导出")
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = PersonnelReportExportVO.class)}), order = 2)
public void exportPersonnelReport(@RequestBody PersonnelReportExportDto personnelReportExportVO, HttpServletResponse response) {
companyNameService.exportPersonnelReport(personnelReportExportVO, response);
}
@GetMapping("/enterpriseIndicators")
@ApiOperation(value = "国有企业指标人数")
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = EnterpriseIndicatorsExportVO.class)}), order = 3)
@ApiImplicitParams({@ApiImplicitParam(value = "企业id", name = "companyId"), @ApiImplicitParam(value = "在职时间", name = "hireDate")})
public AjaxResult getEnterpriseIndicators(String companyId, String hireDate) {
return companyNameService.getEnterpriseIndicators(companyId, hireDate);
}
@PostMapping("/exportEnterpriseIndicators")
@ApiOperation(value = "国有企业指标人数导出")
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = EnterpriseIndicatorsExportVO.class)}), order = 4)
public void exportEnterpriseIndicators(@RequestBody EnterpriseIndicatorsExportDto enterpriseIndicatorsExportVO, HttpServletResponse response) {
companyNameService.exportEnterpriseIndicators(enterpriseIndicatorsExportVO, response);
}
}

View File

@ -1,6 +1,7 @@
package com.ydool.staff.controller; package com.ydool.staff.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter; import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters; import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
import com.ydool.common.base.BaseController; import com.ydool.common.base.BaseController;
@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping(UrlConstant.RECRUITMENT) @RequestMapping(UrlConstant.RECRUITMENT)
@Api(tags = "人员招聘登记", value = "人员招聘登记") @Api(tags = "人员招聘登记", value = "人员招聘登记")
@ApiSupport(order = 17)
public class RecruitmentController extends BaseController { public class RecruitmentController extends BaseController {
@Autowired @Autowired
@ -27,21 +29,21 @@ public class RecruitmentController extends BaseController {
@GetMapping("/selectCompanyNameById") @GetMapping("/selectCompanyNameById")
@ApiOperation(value = "人员招聘登记详情") @ApiOperation(value = "人员招聘登记详情")
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = RecruitmentDto.class)}), order = 2) @ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = RecruitmentDto.class)}), order = 1)
public AjaxResult selectCompanyNameById(String id) { public AjaxResult selectCompanyNameById(String id) {
return recruitmentService.selectRecruitmentById(id); return recruitmentService.selectRecruitmentById(id);
} }
@PostMapping("/insertRecruitment") @PostMapping("/insertRecruitment")
@ApiOperation(value = "人员招聘登记新增") @ApiOperation(value = "人员招聘登记新增")
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = RecruitmentRequest.class)}), order = 3) @ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = RecruitmentRequest.class)}), order = 2)
public AjaxResult insertRecruitment(@RequestBody @Validated RecruitmentRequest recruitmentRequest) { public AjaxResult insertRecruitment(@RequestBody @Validated RecruitmentRequest recruitmentRequest) {
return recruitmentService.saveRecruitment(recruitmentRequest); return recruitmentService.saveRecruitment(recruitmentRequest);
} }
@PostMapping("/deleteRecruitment") @PostMapping("/deleteRecruitment")
@ApiOperation(value = "人员招聘登记删除") @ApiOperation(value = "人员招聘登记删除")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 3)
public AjaxResult deleteRecruitment(@RequestBody IdsRequest id) { public AjaxResult deleteRecruitment(@RequestBody IdsRequest id) {
return recruitmentService.deleteRecruitment(id); return recruitmentService.deleteRecruitment(id);
} }

View File

@ -0,0 +1,21 @@
package com.ydool.staff.dto;
import com.ydool.staff.excel.EnterpriseIndicatorsExportVO;
import com.ydool.staff.excel.PersonnelReportExportVO;
import lombok.Data;
import java.util.List;
/**
* @Author Zhuyy
* @ClassName PersonnelReportExportDto
* @Description TODO
* @date 2023/2/20 10:05
* @Version 1.0
*/
@Data
public class EnterpriseIndicatorsExportDto {
private List<EnterpriseIndicatorsExportVO> enterpriseIndicatorsExportVO;
}

View File

@ -0,0 +1,20 @@
package com.ydool.staff.dto;
import com.ydool.staff.excel.PersonnelReportExportVO;
import lombok.Data;
import java.util.List;
/**
* @Author Zhuyy
* @ClassName PersonnelReportExportDto
* @Description TODO
* @date 2023/2/20 10:05
* @Version 1.0
*/
@Data
public class PersonnelReportExportDto {
private List<PersonnelReportExportVO> personnelReportExportVOList;
}

View File

@ -47,6 +47,9 @@ public class CompanyName extends BaseEntity {
@ApiModelProperty(value = "本次核定总人数") @ApiModelProperty(value = "本次核定总人数")
private Long thisApprovalNumber; private Long thisApprovalNumber;
@ApiModelProperty(value = "类型 登记organization 申报personnel_indicators")
private String type;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remarks; private String remarks;

View File

@ -112,7 +112,7 @@ public class DirectorsSupervisors extends BaseEntity {
@ApiModelProperty(value = "终审意见") @ApiModelProperty(value = "终审意见")
private String lastInstance; private String lastInstance;
@ApiModelProperty(value = "审批状态 0 未审批 1 待审批2已通过3已拒绝\n") @ApiModelProperty(value = "审批状态 0 未审批 1 待审批2已通过3已拒绝")
private Integer auditState; private Integer auditState;
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")

View File

@ -0,0 +1,53 @@
package com.ydool.staff.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import java.io.Serializable;
/**
* @Author Zhuyy
* @ClassName PersonnelReportExportVO
* @Description TODO
* @date 2023/2/20 9:50
* @Version 1.0
*/
@Data
@HeadRowHeight(20)
@ColumnWidth(30)
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@ContentStyle(verticalAlignment = VerticalAlignment.CENTER)
public class EnterpriseIndicatorsExportVO implements Serializable {
@ExcelProperty({"国有企业指标人数", "国有企业名称"})
@ApiModelProperty(value = "国有企业名称")
private String companyName;
@ExcelProperty({"国有企业指标人数", "统一社会信用代码"})
@ApiModelProperty(value = "统一社会信用代码")
private String creditCode;
@ExcelProperty({"国有企业指标人数", "指标人数"})
@ApiModelProperty(value = "指标人数")
private String checkNumber;
@ExcelProperty({"国有企业指标人数", "指标内在职人数"})
@ApiModelProperty(value = "指标内在职人数")
private String targetInner;
@ExcelProperty({"国有企业指标人数", "指标剩余人数"})
@ApiModelProperty(value = "指标剩余人数")
private String residueNumber;
@ExcelProperty({"国有企业指标人数", "指标外在职人数"})
@ApiModelProperty(value = "指标外在职人数")
private String targetOuter;
}

View File

@ -0,0 +1,45 @@
package com.ydool.staff.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import java.io.Serializable;
/**
* @Author Zhuyy
* @ClassName PersonnelReportExportVO
* @Description TODO
* @date 2023/2/20 9:50
* @Version 1.0
*/
@Data
@HeadRowHeight(20)
@ColumnWidth(30)
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER)
@ContentStyle(verticalAlignment = VerticalAlignment.CENTER)
public class PersonnelReportExportVO implements Serializable {
@ExcelProperty({"企业人员综合信息", "国有企业名称"})
@ApiModelProperty(value = "国有企业名称")
private String companyName;
@ExcelProperty({"企业人员综合信息", "统一社会信用代码"})
@ApiModelProperty(value = "统一社会信用代码")
private String creditCode;
@ExcelProperty({"企业人员综合信息", "指标内在职人数"})
@ApiModelProperty(value = "指标内在职人数")
private String targetInner;
@ExcelProperty({"企业人员综合信息", "指标外在职人数"})
@ApiModelProperty(value = "指标外在职人数")
private String targetOuter;
}

View File

@ -31,11 +31,9 @@ public class OrganizationRequest implements Serializable {
private Long residualNumber; private Long residualNumber;
@ApiModelProperty(value = "类型 登记organization 申报personnel_indicators") @ApiModelProperty(value = "类型 登记organization 申报personnel_indicators")
@NotBlank(message = "类型不能为空")
private String type; private String type;
@ApiModelProperty(value = "单据状态 默认国资审核,送审") @ApiModelProperty(value = "单据状态 默认国资审核,送审")
@NotBlank(message = "单据状态不能为空")
private String documentStatus; private String documentStatus;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")

View File

@ -1,6 +1,12 @@
package com.ydool.staff.service; package com.ydool.staff.service;
import com.ydool.common.data.dto.AjaxResult; import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.dto.EnterpriseIndicatorsExportDto;
import com.ydool.staff.dto.PersonnelReportExportDto;
import com.ydool.staff.excel.EnterpriseIndicatorsExportVO;
import com.ydool.staff.excel.PersonnelReportExportVO;
import javax.servlet.http.HttpServletResponse;
/** /**
* <p> * <p>
@ -17,5 +23,13 @@ public interface ICompanyNameService {
AjaxResult companyName(String companyName); AjaxResult companyName(String companyName);
AjaxResult selectCompanyNameById(String id); AjaxResult selectCompanyNameById(String id);
AjaxResult getPersonnelReport(String companyId, String workState, String hireDate);
void exportPersonnelReport(PersonnelReportExportDto personnelReportExportDto, HttpServletResponse response);
AjaxResult getEnterpriseIndicators(String companyId, String hireDate);
void exportEnterpriseIndicators(EnterpriseIndicatorsExportDto enterpriseIndicatorsExportVO, HttpServletResponse response);
} }

View File

@ -1,12 +1,20 @@
package com.ydool.staff.service.impl; package com.ydool.staff.service.impl;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.yulichang.query.MPJQueryWrapper;
import com.ydool.common.base.BaseService; import com.ydool.common.base.BaseService;
import com.ydool.common.data.dto.AjaxResult; import com.ydool.common.data.dto.AjaxResult;
import com.ydool.common.utils.EasyExcelAlibabaUtil;
import com.ydool.staff.dto.EnterpriseIndicatorsExportDto;
import com.ydool.staff.dto.PersonnelReportExportDto;
import com.ydool.staff.entity.CompanyName; import com.ydool.staff.entity.CompanyName;
import com.ydool.staff.entity.Personnel; import com.ydool.staff.entity.Personnel;
import com.ydool.staff.entity.Recruitment; import com.ydool.staff.entity.Recruitment;
import com.ydool.staff.excel.EnterpriseIndicatorsExportVO;
import com.ydool.staff.excel.ExcelPersonnel;
import com.ydool.staff.excel.PersonnelReportExportVO;
import com.ydool.staff.mapper.CompanyNameMapper; import com.ydool.staff.mapper.CompanyNameMapper;
import com.ydool.staff.mapper.PersonnelMapper; import com.ydool.staff.mapper.PersonnelMapper;
import com.ydool.staff.mapper.RecruitmentMapper; import com.ydool.staff.mapper.RecruitmentMapper;
@ -16,6 +24,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
/** /**
@ -61,5 +70,52 @@ public class CompanyNameServiceImpl extends BaseService<CompanyNameMapper, Compa
return AjaxResult.ok().data(companyNameRequest); return AjaxResult.ok().data(companyNameRequest);
} }
/**
* ==============================企业人员综合信息====================================
*/
@Override
public AjaxResult getPersonnelReport(String companyId, String workState, String hireDate) {
MPJQueryWrapper<CompanyName> mpjQueryWrapper = new MPJQueryWrapper<>();
mpjQueryWrapper.select("t.company_name, t.credit_code ");
mpjQueryWrapper.select("SUM(IF( t1.work_state = '" + workState + "', IF ( t1.personnel_type = '指标内', 1, 0 ), 0 )) as target_inner ");
mpjQueryWrapper.select("SUM(IF( t1.personnel_type = '指标外', IF ( t1.work_state = '" + workState + "', 1, 0 ), 0 )) as target_outer ");
mpjQueryWrapper.leftJoin("t_lc_personnel t1 on t.id = t1.company_name ");
mpjQueryWrapper.eq(StrUtil.isNotBlank(companyId), "t.id", companyId);
mpjQueryWrapper.ge(StrUtil.isNotBlank(hireDate), "t1.hire_date", hireDate);
mpjQueryWrapper.groupBy("t.company_name, t.credit_code");
return AjaxResult.ok().data(companyNameMapper.selectMaps(mpjQueryWrapper));
}
@Override
public void exportPersonnelReport(PersonnelReportExportDto personnelReportDto, HttpServletResponse response) {
EasyExcelAlibabaUtil.download(PersonnelReportExportVO.class, personnelReportDto.getPersonnelReportExportVOList(), "企业人员综合信息.xlsx");
}
/**
* ==============================国有企业指标人数====================================
*/
@Override
public AjaxResult getEnterpriseIndicators(String companyId, String hireDate) {
MPJQueryWrapper<CompanyName> mpjQueryWrapper = new MPJQueryWrapper<>();
mpjQueryWrapper.select("t.company_name, t.credit_code ");
mpjQueryWrapper.select("t.check_number ");
mpjQueryWrapper.select("SUM(IF( t1.work_state = '在职', IF ( t1.personnel_type = '指标内', 1, 0 ), 0 )) as target_inner ");
mpjQueryWrapper.select("t.residue_number ");
mpjQueryWrapper.select("SUM(IF( t1.personnel_type = '指标外', IF ( t1.work_state = '在职', 1, 0 ), 0 )) as target_outer ");
mpjQueryWrapper.leftJoin("t_lc_personnel t1 on t.id = t1.company_name ");
mpjQueryWrapper.eq(StrUtil.isNotBlank(companyId), "t.id", companyId);
mpjQueryWrapper.ge(StrUtil.isNotBlank(hireDate), "t1.hire_date", hireDate);
mpjQueryWrapper.groupBy("t.company_name, t.credit_code");
return AjaxResult.ok().data(companyNameMapper.selectMaps(mpjQueryWrapper));
}
@Override
public void exportEnterpriseIndicators(EnterpriseIndicatorsExportDto enterpriseIndicatorsExportVO, HttpServletResponse response) {
EasyExcelAlibabaUtil.download(EnterpriseIndicatorsExportVO.class, enterpriseIndicatorsExportVO.getEnterpriseIndicatorsExportVO(), "国有企业指标人数.xlsx");
}
} }

View File

@ -12,10 +12,12 @@ import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.dto.AttachmentDto; import com.ydool.staff.dto.AttachmentDto;
import com.ydool.staff.dto.DirectorsSupervisorsDto; import com.ydool.staff.dto.DirectorsSupervisorsDto;
import com.ydool.staff.entity.Attachment; import com.ydool.staff.entity.Attachment;
import com.ydool.staff.entity.Audit;
import com.ydool.staff.entity.CompanyName; import com.ydool.staff.entity.CompanyName;
import com.ydool.staff.entity.DirectorsSupervisors; import com.ydool.staff.entity.DirectorsSupervisors;
import com.ydool.common.base.BaseService; import com.ydool.common.base.BaseService;
import com.ydool.staff.mapper.AttachmentMapper; import com.ydool.staff.mapper.AttachmentMapper;
import com.ydool.staff.mapper.AuditMapper;
import com.ydool.staff.mapper.CompanyNameMapper; import com.ydool.staff.mapper.CompanyNameMapper;
import com.ydool.staff.mapper.DirectorsSupervisorsMapper; import com.ydool.staff.mapper.DirectorsSupervisorsMapper;
import com.ydool.staff.service.IDirectorsSupervisorsService; import com.ydool.staff.service.IDirectorsSupervisorsService;
@ -47,6 +49,8 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
AttachmentMapper attachmentMapper; AttachmentMapper attachmentMapper;
@Autowired @Autowired
CompanyNameMapper companyNameMapper; CompanyNameMapper companyNameMapper;
@Autowired
AuditMapper auditMapper;
@Override @Override
public AjaxResult selectDirectorsSupervisorsList(Page<DirectorsSupervisors> page, DirectorsSupervisorsDto directorsSupervisorsDto) { public AjaxResult selectDirectorsSupervisorsList(Page<DirectorsSupervisors> page, DirectorsSupervisorsDto directorsSupervisorsDto) {
@ -123,6 +127,9 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
@Override @Override
public AjaxResult selectDirectorsSupervisorsFile(Page<Attachment> page, String id) { public AjaxResult selectDirectorsSupervisorsFile(Page<Attachment> page, String id) {
if (StrUtil.isBlank(id)) {
return AjaxResult.fail().msg("id不能为空");
}
Page<Attachment> attachmentPage = attachmentMapper.selectPage(page, new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, id).eq(Attachment::getTargetType, ArgsConst.DIRECTORS)); Page<Attachment> attachmentPage = attachmentMapper.selectPage(page, new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, id).eq(Attachment::getTargetType, ArgsConst.DIRECTORS));
return AjaxResult.ok().data(attachmentPage); return AjaxResult.ok().data(attachmentPage);
} }

View File

@ -44,7 +44,7 @@ public class PersonnelIndicatorsServiceImpl extends BaseService<PersonnelIndicat
public AjaxResult savePersonnelIndicators(PersonnelIndicatorsRequest personnelIndicatorsRequest) { public AjaxResult savePersonnelIndicators(PersonnelIndicatorsRequest personnelIndicatorsRequest) {
OrganizationRequest organizationRequest = personnelIndicatorsRequest.getOrganizationRequest(); OrganizationRequest organizationRequest = personnelIndicatorsRequest.getOrganizationRequest();
Organization organization = BeanUtil.copyProperties(organizationRequest, Organization.class); Organization organization = BeanUtil.copyProperties(organizationRequest, Organization.class);
// organization.setType("personnel_indicators"); organization.setType("personnel_indicators");
// organization.setDocumentStatus("国资审核"); // organization.setDocumentStatus("国资审核");
int i = organizationMapper.insert(organization); int i = organizationMapper.insert(organization);
if (i > 0) { if (i > 0) {

View File

@ -43,18 +43,12 @@ public class RecruitmentServiceImpl extends BaseService<RecruitmentMapper, Recru
@Autowired @Autowired
OrganizationMapper organizationMapper; OrganizationMapper organizationMapper;
/**
* 人员招聘登记
*
* @param recruitmentRequest
* @return
*/
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult saveRecruitment(RecruitmentRequest recruitmentRequest) { public AjaxResult saveRecruitment(RecruitmentRequest recruitmentRequest) {
OrganizationRequest organizationRequest = recruitmentRequest.getOrganizationRequest(); OrganizationRequest organizationRequest = recruitmentRequest.getOrganizationRequest();
Organization organization = BeanUtil.copyProperties(organizationRequest, Organization.class); Organization organization = BeanUtil.copyProperties(organizationRequest, Organization.class);
// organization.setType("organization"); organization.setType("organization");
// organization.setDocumentStatus("国资审核"); // organization.setDocumentStatus("国资审核");
int i = organizationMapper.insert(organization); int i = organizationMapper.insert(organization);
if (i > 0) { if (i > 0) {