update
This commit is contained in:
parent
b36e958ace
commit
b1a25a0d9f
|
@ -2,11 +2,13 @@ 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.DynamicParameter;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
|
||||||
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;
|
||||||
import com.ydool.staff.entity.PartyOrganization;
|
import com.ydool.staff.entity.Organization;
|
||||||
import com.ydool.staff.request.MechanismRequest;
|
import com.ydool.staff.request.OrganizationSearch;
|
||||||
import com.ydool.staff.service.*;
|
import com.ydool.staff.service.*;
|
||||||
import com.ydool.system.request.IdsRequest;
|
import com.ydool.system.request.IdsRequest;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
@ -14,94 +16,28 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(UrlConstant.ORGANIZATION)
|
@RequestMapping(UrlConstant.ORGANIZATION)
|
||||||
@Api(tags = "内设机构登记", value = "内设机构登记")
|
@Api(tags = "人员招聘登记人员指标申报列表", value = "人员招聘登记人员指标申报列表")
|
||||||
public class OrganizationController extends BaseController {
|
public class OrganizationController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
ICompanyNameService companyNameService;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IOrganizationService organizationService;
|
IOrganizationService organizationService;
|
||||||
@Autowired
|
|
||||||
IPartyOrganizationService partyOrganizationService;
|
|
||||||
@Autowired
|
|
||||||
IMechanismService mechanismService;
|
|
||||||
@Autowired
|
|
||||||
IAttachmentService attachmentService;
|
|
||||||
|
|
||||||
/**
|
@GetMapping("/selectOrganizationPersonnelIndicatorsList")
|
||||||
* =======================内设机构登记=========================
|
@ApiOperation(value = "人员招聘登记人员指标申报列表")
|
||||||
*
|
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = Organization.class)}), order = 1)
|
||||||
* @return
|
@ApiImplicitParams({@ApiImplicitParam(name = "type", value = "人员招聘登记organization/人员指标申报personnel_indicators", dataType = "String", required = true), @ApiImplicitParam(name = "current", value = "当前页", dataType = "Integer"), @ApiImplicitParam(name = "size", value = "每页条数", dataType = "Integer"),})
|
||||||
*/
|
public AjaxResult selectOrganizationList(OrganizationSearch organizationSearch) {
|
||||||
|
return organizationService.selectOrganizationList(new Page<Organization>(getPageNum(), getPageSize()), organizationSearch);
|
||||||
@GetMapping("/selectOrganizationList")
|
|
||||||
@ApiOperation(value = "内设机构登记列表")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = "companyName", value = "企业名称"), @ApiImplicitParam(name = "current", value = "当前页", dataType = "Integer"), @ApiImplicitParam(name = "size", value = "每页条数", dataType = "Integer"),})
|
|
||||||
public AjaxResult selectOrganizationList(String companyName) {
|
|
||||||
return organizationService.selectOrganizationList(new Page<>(getPageNum(), getPageSize()), companyName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/selectOrganizationFileList")
|
@PostMapping("/deleteOrganizationAndPersonnelIndicators")
|
||||||
|
@ApiOperation(value = "人员招聘登记人员指标申报删除")
|
||||||
@ApiOperationSupport(order = 2)
|
@ApiOperationSupport(order = 2)
|
||||||
@ApiOperation(value = "内设机构附件列表")
|
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "企业Id")})
|
|
||||||
public AjaxResult selectOrganizationFileList(String id) {
|
|
||||||
return attachmentService.selectOrganizationFileList(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/selectOrganizationByMechanism")
|
|
||||||
@ApiOperation(value = "内设机构登记详情")
|
|
||||||
@ApiOperationSupport(order = 4)
|
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "内设机构Id", required = true)})
|
|
||||||
public AjaxResult selectOrganizationByMechanism(String id) {
|
|
||||||
return organizationService.selectOrganizationByMechanism(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/deleteOrganization")
|
|
||||||
@ApiOperation(value = "内设机构删除")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
public AjaxResult deleteOrganization(@RequestBody IdsRequest id) {
|
public AjaxResult deleteOrganization(@RequestBody IdsRequest id) {
|
||||||
return organizationService.deleteOrganization(id);
|
return organizationService.deleteOrganization(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ===========================机构信息============================
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
|
|
||||||
@GetMapping("/selectCompanyNameByIdMechanismPartyOrganization")
|
|
||||||
@ApiOperation(value = "企业id查内设机构和党组织信息")
|
|
||||||
@ApiOperationSupport(order = 6)
|
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "企业Id")})
|
|
||||||
public AjaxResult selectCompanyNameByIdMechanismPartyOrganization(String id) {
|
|
||||||
return mechanismService.selectCompanyNameByIdMechanismPartyOrganization(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/saveMechanismPartyOrganization")
|
|
||||||
@ApiOperation(value = "机构信息和党组织信息新增")
|
|
||||||
@ApiOperationSupport(order = 7)
|
|
||||||
public AjaxResult saveMechanismPartyOrganization(@RequestBody @Validated MechanismRequest mechanismRequest) {
|
|
||||||
return mechanismService.saveMechanismPartyOrganization(mechanismRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ==========================党组织信息===========================
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @PostMapping("/savePartyOrganization")
|
|
||||||
// @ApiOperation(value = "党组织信息新增")
|
|
||||||
// @ApiOperationSupport(order = 7)
|
|
||||||
// public AjaxResult savePartyOrganization(@RequestBody @Validated PartyOrganization partyOrganization) {
|
|
||||||
// return partyOrganizationService.savePartyOrganization(partyOrganization);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
package com.ydool.staff.controller;
|
package com.ydool.staff.controller;
|
||||||
|
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
|
||||||
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;
|
||||||
|
import com.ydool.staff.dto.PersonnelIndicatorsDto;
|
||||||
import com.ydool.staff.request.PersonnelIndicatorsRequest;
|
import com.ydool.staff.request.PersonnelIndicatorsRequest;
|
||||||
import com.ydool.staff.service.IPersonnelIndicatorsService;
|
import com.ydool.staff.service.IPersonnelIndicatorsService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
@ -29,12 +33,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)
|
||||||
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)
|
||||||
public AjaxResult selectPersonnelIndicatorsById(String id) {
|
public AjaxResult selectPersonnelIndicatorsById(String id) {
|
||||||
return personnelIndicatorsService.selectPersonnelIndicatorsById(id);
|
return personnelIndicatorsService.selectPersonnelIndicatorsById(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
package com.ydool.staff.controller;
|
package com.ydool.staff.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
|
||||||
|
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
|
||||||
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;
|
||||||
|
import com.ydool.staff.dto.RecruitmentDto;
|
||||||
import com.ydool.staff.request.RecruitmentRequest;
|
import com.ydool.staff.request.RecruitmentRequest;
|
||||||
import com.ydool.staff.request.RecruitmentSearch;
|
|
||||||
import com.ydool.staff.service.ICompanyNameService;
|
|
||||||
import com.ydool.staff.service.IRecruitmentService;
|
import com.ydool.staff.service.IRecruitmentService;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -22,37 +24,26 @@ public class RecruitmentController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
IRecruitmentService recruitmentService;
|
IRecruitmentService recruitmentService;
|
||||||
// @Autowired
|
|
||||||
// ICompanyNameService companyNameService;
|
|
||||||
|
|
||||||
@GetMapping("/selectRecruitmentList")
|
|
||||||
@ApiOperation(value = "人员登记列表")
|
|
||||||
public AjaxResult selectRecruitmentList(@RequestBody RecruitmentSearch recruitmentSearch) {
|
|
||||||
return recruitmentService.selectRecruitmentList(new Page<>(getPageNum(), getPageSize()), recruitmentSearch);
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/insertRecruitment")
|
|
||||||
@ApiOperation(value = "人员招聘登记")
|
|
||||||
public AjaxResult insertRecruitment(@RequestBody @Validated RecruitmentRequest recruitmentRequest) {
|
|
||||||
return recruitmentService.saveRecruitment(recruitmentRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
// @DeleteMapping("/deleteRecruitment")
|
|
||||||
// @ApiOperation(value = "人员删除")
|
|
||||||
// public AjaxResult deleteRecruitment(String id) {
|
|
||||||
// return recruitmentService.deleteRecruitment(id);
|
|
||||||
// }
|
|
||||||
|
|
||||||
@GetMapping("/selectCompanyNameById")
|
@GetMapping("/selectCompanyNameById")
|
||||||
@ApiOperation(value = "人员招聘登记详情")
|
@ApiOperation(value = "人员招聘登记详情")
|
||||||
|
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = RecruitmentDto.class)}), order = 2)
|
||||||
public AjaxResult selectCompanyNameById(String id) {
|
public AjaxResult selectCompanyNameById(String id) {
|
||||||
return recruitmentService.selectRecruitmentById(id);
|
return recruitmentService.selectRecruitmentById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @PostMapping("/recruitmentSaveBatch")
|
@PostMapping("/insertRecruitment")
|
||||||
// @ApiOperation(value = "批量人员登记")
|
@ApiOperation(value = "人员招聘登记新增")
|
||||||
// public AjaxResult recruitmentSaveBatch(@RequestBody @Validated RecruitmentDto recruitmentDto){
|
@ApiOperationSupport(responses = @DynamicResponseParameters(properties = {@DynamicParameter(name = "data", dataTypeClass = RecruitmentRequest.class)}), order = 3)
|
||||||
// return recruitmentService.recruitmentSaveBatch(recruitmentDto.getRecruitment());
|
public AjaxResult insertRecruitment(@RequestBody @Validated RecruitmentRequest recruitmentRequest) {
|
||||||
// }
|
return recruitmentService.saveRecruitment(recruitmentRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/deleteRecruitment")
|
||||||
|
@ApiOperation(value = "人员招聘登记删除")
|
||||||
|
@ApiOperationSupport(order = 5)
|
||||||
|
public AjaxResult deleteRecruitment(@RequestBody IdsRequest id) {
|
||||||
|
return recruitmentService.deleteRecruitment(id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.ydool.staff.dto;
|
package com.ydool.staff.dto;
|
||||||
|
|
||||||
import com.ydool.staff.entity.CompanyName;
|
import com.ydool.staff.entity.Organization;
|
||||||
import com.ydool.staff.entity.PersonnelIndicators;
|
import com.ydool.staff.entity.PersonnelIndicators;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -19,7 +19,7 @@ import java.util.List;
|
||||||
public class PersonnelIndicatorsDto implements Serializable {
|
public class PersonnelIndicatorsDto implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业信息")
|
@ApiModelProperty(value = "企业信息")
|
||||||
private CompanyName companyName;
|
private Organization organization;
|
||||||
|
|
||||||
@ApiModelProperty(value = "人员指标申报")
|
@ApiModelProperty(value = "人员指标申报")
|
||||||
private List<PersonnelIndicators> personnelIndicators;
|
private List<PersonnelIndicators> personnelIndicators;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.ydool.staff.dto;
|
package com.ydool.staff.dto;
|
||||||
|
|
||||||
import com.ydool.staff.entity.CompanyName;
|
import com.ydool.staff.entity.Organization;
|
||||||
import com.ydool.staff.entity.Recruitment;
|
import com.ydool.staff.entity.Recruitment;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||||
public class RecruitmentDto implements Serializable {
|
public class RecruitmentDto implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业信息")
|
@ApiModelProperty(value = "企业信息")
|
||||||
private CompanyName companyName;
|
private Organization organization;
|
||||||
|
|
||||||
@ApiModelProperty(value = "人员招聘登记")
|
@ApiModelProperty(value = "人员招聘登记")
|
||||||
private List<Recruitment> recruitments;
|
private List<Recruitment> recruitments;
|
||||||
|
|
|
@ -36,13 +36,16 @@ public class CompanyName extends BaseEntity {
|
||||||
private String approvalNumber;
|
private String approvalNumber;
|
||||||
|
|
||||||
@ApiModelProperty(value = "核定指标人数")
|
@ApiModelProperty(value = "核定指标人数")
|
||||||
private Integer checkNumber;
|
private Long checkNumber;
|
||||||
|
|
||||||
@ApiModelProperty(value = "在职人数")
|
@ApiModelProperty(value = "在职人数")
|
||||||
private Integer activeStaff;
|
private Long activeStaff;
|
||||||
|
|
||||||
@ApiModelProperty(value = "剩余指标人数")
|
@ApiModelProperty(value = "剩余指标人数")
|
||||||
private Integer residueNumber;
|
private Long residueNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "本次核定总人数")
|
||||||
|
private Long thisApprovalNumber;
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
|
@ -106,6 +106,12 @@ public class DirectorsSupervisors extends BaseEntity {
|
||||||
@ApiModelProperty(value = "单据状态")
|
@ApiModelProperty(value = "单据状态")
|
||||||
private String documentStatus;
|
private String documentStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "初审意见")
|
||||||
|
private String firstTrial;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "终审意见")
|
||||||
|
private String lastInstance;
|
||||||
|
|
||||||
@ApiModelProperty(value = "附件")
|
@ApiModelProperty(value = "附件")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<AttachmentDto> attachmentDtoList;
|
private List<AttachmentDto> attachmentDtoList;
|
||||||
|
|
|
@ -34,19 +34,29 @@ public class Organization extends BaseEntity{
|
||||||
@ApiModelProperty(value = "信用代码")
|
@ApiModelProperty(value = "信用代码")
|
||||||
private String creditCode;
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批单号")
|
||||||
|
private String approvalNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "核定用工人数")
|
||||||
|
private Long checkNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "剩余指标人数")
|
||||||
|
private Long residualNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "在职人数")
|
||||||
|
private Long activeStaff;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "本次核定总人数")
|
||||||
|
private Long thisApprovalNumber;
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@ApiModelProperty(value = "相关附件")
|
@ApiModelProperty(value = "相关附件")
|
||||||
private String attachment;
|
private String attachment;
|
||||||
|
|
||||||
// @ApiModelProperty(value = "附件列表")
|
@ApiModelProperty(value = "类型")
|
||||||
// @TableField(exist = false)
|
private String type;
|
||||||
// private List<Attachment> attachments;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业名称")
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String companyName;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "修改人")
|
@ApiModelProperty(value = "修改人")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
package com.ydool.staff.entity;
|
package com.ydool.staff.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.ydool.common.base.BaseEntity;
|
import com.ydool.common.base.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
@ -6,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 人员指标申报
|
* 人员指标申报
|
||||||
|
@ -18,8 +20,8 @@ import lombok.experimental.Accessors;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("t_lc_personnel_indicators")
|
@TableName("t_lc_personnel_indicators")
|
||||||
@ApiModel(value="PersonnelIndicators对象", description="人员指标申报")
|
@ApiModel(value = "PersonnelIndicators对象", description = "人员指标申报")
|
||||||
public class PersonnelIndicators extends BaseEntity{
|
public class PersonnelIndicators extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -41,4 +43,13 @@ public class PersonnelIndicators extends BaseEntity{
|
||||||
@ApiModelProperty(value = "增加指标人数")
|
@ApiModelProperty(value = "增加指标人数")
|
||||||
private Long addNumber;
|
private Long addNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "初审意见")
|
||||||
|
private String firstTrial;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "国资意见")
|
||||||
|
private String stateOwned;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "编办意见")
|
||||||
|
private String arrangeFor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ydool.staff.entity;
|
package com.ydool.staff.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.ydool.common.base.BaseEntity;
|
import com.ydool.common.base.BaseEntity;
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ public class Recruitment extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业名称")
|
@ApiModelProperty(value = "企业id")
|
||||||
private String companyId;
|
private String companyId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "部门")
|
@ApiModelProperty(value = "部门")
|
||||||
|
@ -44,6 +45,15 @@ public class Recruitment extends BaseEntity {
|
||||||
private String requirements;
|
private String requirements;
|
||||||
|
|
||||||
@ApiModelProperty(value = "审批")
|
@ApiModelProperty(value = "审批")
|
||||||
private Integer approval;
|
private Long approval;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "初审意见")
|
||||||
|
private String firstTrial;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "终审意见")
|
||||||
|
private String lastInstance;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String companyName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,9 @@
|
||||||
package com.ydool.staff.request;
|
package com.ydool.staff.request;
|
||||||
|
|
||||||
import com.ydool.staff.dto.AttachmentDto;
|
|
||||||
import com.ydool.staff.entity.Attachment;
|
|
||||||
import com.ydool.staff.entity.Mechanism;
|
|
||||||
import com.ydool.staff.entity.Organization;
|
|
||||||
import com.ydool.staff.entity.PartyOrganization;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class OrganizationRequest implements Serializable {
|
public class OrganizationRequest implements Serializable {
|
||||||
|
@ -23,15 +14,24 @@ public class OrganizationRequest implements Serializable {
|
||||||
@ApiModelProperty(value = "信用代码")
|
@ApiModelProperty(value = "信用代码")
|
||||||
private String creditCode;
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批单号")
|
||||||
|
private String approvalNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "核定用工人数")
|
||||||
|
private String checkNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "在职人数")
|
||||||
|
private String activeStaff;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "本次核定总人数")
|
||||||
|
private String thisApprovalNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "剩余指标人数")
|
||||||
|
private String residualNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@ApiModelProperty(value = "附件列表")
|
|
||||||
private List<AttachmentDto> attachments;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "机构信息")
|
|
||||||
private List<Mechanism> mechanismList;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "党组织信息")
|
|
||||||
private List<PartyOrganization> partyList;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.ydool.staff.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author Zhuyy
|
||||||
|
* @ClassName OrganizationSearch
|
||||||
|
* @Description TODO
|
||||||
|
* @date 2023/2/13 16:16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OrganizationSearch {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批单号")
|
||||||
|
private String approvalNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
@NotBlank(message = "类型不能为空")
|
||||||
|
private String type;
|
||||||
|
}
|
|
@ -4,7 +4,6 @@ import com.ydool.staff.entity.PersonnelIndicators;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -18,9 +17,8 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
public class PersonnelIndicatorsRequest implements Serializable {
|
public class PersonnelIndicatorsRequest implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业id")
|
@ApiModelProperty(value = "人员指标")
|
||||||
@NotBlank(message = "企业id不能为空")
|
private OrganizationRequest organizationRequest;
|
||||||
private String companyId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "人员指标申报")
|
@ApiModelProperty(value = "人员指标申报")
|
||||||
private List<PersonnelIndicators> personnelIndicators;
|
private List<PersonnelIndicators> personnelIndicators;
|
||||||
|
|
|
@ -1,22 +1,17 @@
|
||||||
package com.ydool.staff.request;
|
package com.ydool.staff.request;
|
||||||
|
|
||||||
import com.ydool.staff.dto.RecruitmentDto;
|
|
||||||
import com.ydool.staff.entity.CompanyName;
|
|
||||||
import com.ydool.staff.entity.Recruitment;
|
import com.ydool.staff.entity.Recruitment;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class RecruitmentRequest implements Serializable {
|
public class RecruitmentRequest implements Serializable {
|
||||||
|
|
||||||
@ApiModelProperty(value = "企业id")
|
@ApiModelProperty(value = "招聘登记")
|
||||||
@NotBlank(message = "企业id不能为空")
|
private OrganizationRequest organizationRequest;
|
||||||
private String companyId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "人员招聘登记")
|
@ApiModelProperty(value = "人员招聘登记")
|
||||||
private List<Recruitment> recruitments;
|
private List<Recruitment> recruitments;
|
||||||
|
|
|
@ -26,6 +26,6 @@ public interface IAttachmentService {
|
||||||
|
|
||||||
AjaxResult deleteFile(IdsRequest ids);
|
AjaxResult deleteFile(IdsRequest ids);
|
||||||
|
|
||||||
AjaxResult selectOrganizationFileList(Page page,String id,String type);
|
AjaxResult selectOrganizationFileList(Page<Attachment> page,String id,String type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.ydool.staff.service;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.staff.entity.Organization;
|
import com.ydool.staff.entity.Organization;
|
||||||
|
import com.ydool.staff.request.OrganizationSearch;
|
||||||
import com.ydool.system.request.IdsRequest;
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,16 +16,10 @@ import com.ydool.system.request.IdsRequest;
|
||||||
*/
|
*/
|
||||||
public interface IOrganizationService {
|
public interface IOrganizationService {
|
||||||
|
|
||||||
AjaxResult selectOrganizationList(Page<Organization> page, String companyName);
|
AjaxResult selectOrganizationList(Page<Organization> page, OrganizationSearch organizationSearch);
|
||||||
|
|
||||||
AjaxResult selectOrganizationByMechanism(String id);
|
|
||||||
|
|
||||||
AjaxResult deleteOrganization(IdsRequest id);
|
AjaxResult deleteOrganization(IdsRequest id);
|
||||||
|
|
||||||
AjaxResult selectOrganizationByName(String companyName);
|
|
||||||
|
|
||||||
AjaxResult selectOrganization();
|
|
||||||
|
|
||||||
AjaxResult selectCompanyNameByOrganization(Page<Organization> page, String id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,5 +16,6 @@ public interface IPersonnelIndicatorsService {
|
||||||
AjaxResult savePersonnelIndicators(PersonnelIndicatorsRequest personnelIndicatorsRequest);
|
AjaxResult savePersonnelIndicators(PersonnelIndicatorsRequest personnelIndicatorsRequest);
|
||||||
|
|
||||||
AjaxResult selectPersonnelIndicatorsById(String id);
|
AjaxResult selectPersonnelIndicatorsById(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,17 +5,12 @@ import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.staff.entity.Recruitment;
|
import com.ydool.staff.entity.Recruitment;
|
||||||
import com.ydool.staff.request.RecruitmentRequest;
|
import com.ydool.staff.request.RecruitmentRequest;
|
||||||
import com.ydool.staff.request.RecruitmentSearch;
|
import com.ydool.staff.request.RecruitmentSearch;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface IRecruitmentService {
|
public interface IRecruitmentService {
|
||||||
|
|
||||||
/**
|
|
||||||
* 人员列表
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
AjaxResult selectRecruitmentList(Page<Recruitment> page, RecruitmentSearch recruitmentSearch);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增人员
|
* 新增人员
|
||||||
* @param recruitmentRequest
|
* @param recruitmentRequest
|
||||||
|
@ -28,7 +23,7 @@ public interface IRecruitmentService {
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult deleteRecruitment(String id);
|
AjaxResult deleteRecruitment(IdsRequest id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员详情
|
* 人员详情
|
||||||
|
@ -37,10 +32,4 @@ public interface IRecruitmentService {
|
||||||
*/
|
*/
|
||||||
AjaxResult selectRecruitmentById(String id);
|
AjaxResult selectRecruitmentById(String id);
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量新增人员
|
|
||||||
* @param recruitmentRequest
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
AjaxResult recruitmentSaveBatch(List<RecruitmentRequest> recruitmentRequest);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,21 @@
|
||||||
package com.ydool.staff.service.impl;
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ydool.common.constant.ArgsConst;
|
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.staff.dto.AttachmentDto;
|
|
||||||
import com.ydool.staff.entity.*;
|
import com.ydool.staff.entity.*;
|
||||||
import com.ydool.common.base.BaseService;
|
import com.ydool.common.base.BaseService;
|
||||||
import com.ydool.staff.mapper.*;
|
import com.ydool.staff.mapper.*;
|
||||||
import com.ydool.staff.request.OrganizationRequest;
|
import com.ydool.staff.request.OrganizationSearch;
|
||||||
import com.ydool.staff.service.IOrganizationService;
|
import com.ydool.staff.service.IOrganizationService;
|
||||||
import com.ydool.system.mapper.UserMapper;
|
import com.ydool.system.mapper.UserMapper;
|
||||||
import com.ydool.system.request.IdsRequest;
|
import com.ydool.system.request.IdsRequest;
|
||||||
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 org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.thymeleaf.util.StringUtils;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -40,49 +33,21 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
|
||||||
@Autowired
|
@Autowired
|
||||||
OrganizationMapper organizationMapper;
|
OrganizationMapper organizationMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
PartyOrganizationMapper partyOrganizationMapper;
|
|
||||||
@Autowired
|
|
||||||
MechanismMapper mechanismMapper;
|
|
||||||
@Autowired
|
|
||||||
CompanyNameMapper companyNameMapper;
|
|
||||||
@Autowired
|
|
||||||
UserMapper userMapper;
|
UserMapper userMapper;
|
||||||
@Autowired
|
|
||||||
AttachmentMapper attachmentMapper;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult selectOrganizationList(Page<Organization> page, String companyName) {
|
public AjaxResult selectOrganizationList(Page<Organization> page, OrganizationSearch organizationSearch) {
|
||||||
LambdaQueryWrapper<Organization> organizationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Organization> organizationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
organizationLambdaQueryWrapper.exists(StrUtil.isNotBlank(companyName), "select t2.id from t_lc_company_name t2 where t_lc_organization.company_id = t2.id and t2.company_name like '%" + companyName + "%'");
|
organizationLambdaQueryWrapper.exists(StrUtil.isNotBlank(organizationSearch.getCompanyName()), "select t2.id from t_lc_company_name t2 where t_lc_organization.company_id = t2.id and t2.company_name like '%" + organizationSearch.getCompanyName() + "%'");
|
||||||
|
organizationLambdaQueryWrapper.eq(StrUtil.isNotBlank(organizationSearch.getApprovalNumber()), Organization::getApprovalNumber, organizationSearch.getApprovalNumber());
|
||||||
|
organizationLambdaQueryWrapper.eq(Organization::getType, organizationSearch.getType());
|
||||||
Page<Organization> selectPage = organizationMapper.selectPage(page, organizationLambdaQueryWrapper);
|
Page<Organization> selectPage = organizationMapper.selectPage(page, organizationLambdaQueryWrapper);
|
||||||
for (Organization record : selectPage.getRecords()) {
|
for (Organization record : selectPage.getRecords()) {
|
||||||
record.setUpdatedName(userMapper.selectById(record.getUpdatedId()).getUserName());
|
record.setUpdatedName(userMapper.selectById(record.getUpdatedId()).getUserName());
|
||||||
record.setCompanyName(companyNameMapper.selectById(record.getCompanyId()).getCompanyName());
|
|
||||||
}
|
}
|
||||||
return AjaxResult.ok().data(selectPage);
|
return AjaxResult.ok().data(selectPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaxResult selectOrganizationByMechanism(String id) {
|
|
||||||
Organization organization = organizationMapper.selectById(id);
|
|
||||||
if (ObjectUtil.isNull(organization)) {
|
|
||||||
return AjaxResult.fail().msg("未找到相关信息!");
|
|
||||||
} else {
|
|
||||||
List<Mechanism> mechanismList = mechanismMapper.selectList(new LambdaQueryWrapper<Mechanism>().eq(Mechanism::getOrganizationId, organization.getId()));
|
|
||||||
List<Attachment> attachmentList = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, organization.getId()).eq(Attachment::getTargetType, ArgsConst.ORGANIZATION));
|
|
||||||
List<PartyOrganization> partyOrganizationList = partyOrganizationMapper.selectList(new LambdaQueryWrapper<PartyOrganization>().eq(PartyOrganization::getOrganizationId, organization.getId()));
|
|
||||||
List<AttachmentDto> toList = BeanUtil.copyToList(attachmentList, AttachmentDto.class);
|
|
||||||
OrganizationRequest organizationRequest = new OrganizationRequest();
|
|
||||||
organizationRequest.setRemark(organization.getRemark());
|
|
||||||
organizationRequest.setCreditCode(organization.getCreditCode());
|
|
||||||
organizationRequest.setCompanyId(companyNameMapper.selectById(organization.getCompanyId()).getCompanyName());
|
|
||||||
organizationRequest.setAttachments(toList);
|
|
||||||
organizationRequest.setPartyList(partyOrganizationList);
|
|
||||||
organizationRequest.setMechanismList(mechanismList);
|
|
||||||
return AjaxResult.ok().data(organizationRequest);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult deleteOrganization(IdsRequest id) {
|
public AjaxResult deleteOrganization(IdsRequest id) {
|
||||||
|
@ -94,21 +59,5 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
|
||||||
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaxResult selectOrganizationByName(String companyName) {
|
|
||||||
return AjaxResult.ok().data(companyNameMapper.selectOne(new LambdaQueryWrapper<CompanyName>().eq(CompanyName::getId, companyName)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaxResult selectOrganization() {
|
|
||||||
return AjaxResult.ok().data(organizationMapper.selectList(null));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaxResult selectCompanyNameByOrganization(Page<Organization> page, String id) {
|
|
||||||
Page<Organization> organizationPage = organizationMapper.selectPage(page, new LambdaQueryWrapper<Organization>().eq(Organization::getCompanyId, id));
|
|
||||||
return AjaxResult.ok().data(organizationPage);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
package com.ydool.staff.service.impl;
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.staff.dto.PersonnelIndicatorsDto;
|
import com.ydool.staff.dto.PersonnelIndicatorsDto;
|
||||||
import com.ydool.staff.entity.CompanyName;
|
import com.ydool.staff.entity.*;
|
||||||
import com.ydool.staff.entity.PersonnelIndicators;
|
|
||||||
import com.ydool.common.base.BaseService;
|
import com.ydool.common.base.BaseService;
|
||||||
import com.ydool.staff.mapper.CompanyNameMapper;
|
import com.ydool.staff.entity.PersonnelIndicators;
|
||||||
|
import com.ydool.staff.mapper.OrganizationMapper;
|
||||||
import com.ydool.staff.mapper.PersonnelIndicatorsMapper;
|
import com.ydool.staff.mapper.PersonnelIndicatorsMapper;
|
||||||
|
import com.ydool.staff.request.OrganizationRequest;
|
||||||
import com.ydool.staff.request.PersonnelIndicatorsRequest;
|
import com.ydool.staff.request.PersonnelIndicatorsRequest;
|
||||||
import com.ydool.staff.service.IPersonnelIndicatorsService;
|
import com.ydool.staff.service.IPersonnelIndicatorsService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -30,28 +32,35 @@ public class PersonnelIndicatorsServiceImpl extends BaseService<PersonnelIndicat
|
||||||
@Autowired
|
@Autowired
|
||||||
PersonnelIndicatorsMapper personnelIndicatorsMapper;
|
PersonnelIndicatorsMapper personnelIndicatorsMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
CompanyNameMapper companyNameMapper;
|
OrganizationMapper organizationMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult savePersonnelIndicators(PersonnelIndicatorsRequest personnelIndicatorsRequest) {
|
public AjaxResult savePersonnelIndicators(PersonnelIndicatorsRequest personnelIndicatorsRequest) {
|
||||||
|
OrganizationRequest organizationRequest = personnelIndicatorsRequest.getOrganizationRequest();
|
||||||
|
Organization organization = BeanUtil.copyProperties(organizationRequest, Organization.class);
|
||||||
|
organization.setType("personnel_indicators");
|
||||||
|
int i = organizationMapper.insert(organization);
|
||||||
|
if (i > 0) {
|
||||||
List<PersonnelIndicators> personnelIndicators = personnelIndicatorsRequest.getPersonnelIndicators();
|
List<PersonnelIndicators> personnelIndicators = personnelIndicatorsRequest.getPersonnelIndicators();
|
||||||
for (PersonnelIndicators personnelIndicator : personnelIndicators) {
|
for (PersonnelIndicators personnelIndicator : personnelIndicators) {
|
||||||
personnelIndicator.setOrganizationId(personnelIndicatorsRequest.getCompanyId());
|
personnelIndicator.setOrganizationId(organization.getId());
|
||||||
}
|
}
|
||||||
return saveBatch(personnelIndicators) ? AjaxResult.ok().msg("添加成功!") : AjaxResult.fail().msg("添加失败!");
|
boolean batch = saveBatch(personnelIndicators);
|
||||||
|
return batch ? AjaxResult.ok().msg("添加成功!") : AjaxResult.fail().msg("添加失败!");
|
||||||
|
}
|
||||||
|
return AjaxResult.fail().msg("添加失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult selectPersonnelIndicatorsById(String id) {
|
public AjaxResult selectPersonnelIndicatorsById(String id) {
|
||||||
PersonnelIndicators recruitment = personnelIndicatorsMapper.selectById(id);
|
Organization companyName = organizationMapper.selectById(id);
|
||||||
if (ObjectUtil.isNull(recruitment)) {
|
if (ObjectUtil.isNull(companyName)) {
|
||||||
return AjaxResult.fail().msg("未找到相关信息!");
|
return AjaxResult.fail().msg("未找到相关信息!");
|
||||||
}
|
}
|
||||||
CompanyName companyName = companyNameMapper.selectById(recruitment.getOrganizationId());
|
List<PersonnelIndicators> personnelIndicators = personnelIndicatorsMapper.selectList(new LambdaQueryWrapper<PersonnelIndicators>().eq(PersonnelIndicators::getOrganizationId, companyName.getId()));
|
||||||
List<PersonnelIndicators> recruitments = personnelIndicatorsMapper.selectList(new LambdaQueryWrapper<PersonnelIndicators>().eq(PersonnelIndicators::getOrganizationId, companyName.getId()));
|
|
||||||
PersonnelIndicatorsDto recruitmentRequest = new PersonnelIndicatorsDto();
|
PersonnelIndicatorsDto recruitmentRequest = new PersonnelIndicatorsDto();
|
||||||
recruitmentRequest.setCompanyName(companyName);
|
recruitmentRequest.setOrganization(companyName);
|
||||||
recruitmentRequest.setPersonnelIndicators(recruitments);
|
recruitmentRequest.setPersonnelIndicators(personnelIndicators);
|
||||||
return AjaxResult.ok().data(recruitmentRequest);
|
return AjaxResult.ok().data(recruitmentRequest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,26 @@
|
||||||
package com.ydool.staff.service.impl;
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
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.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.staff.dto.RecruitmentDto;
|
import com.ydool.staff.dto.RecruitmentDto;
|
||||||
import com.ydool.staff.entity.CompanyName;
|
import com.ydool.staff.entity.Organization;
|
||||||
import com.ydool.staff.entity.Recruitment;
|
import com.ydool.staff.entity.Recruitment;
|
||||||
import com.ydool.common.base.BaseService;
|
import com.ydool.common.base.BaseService;
|
||||||
import com.ydool.staff.mapper.CompanyNameMapper;
|
import com.ydool.staff.mapper.CompanyNameMapper;
|
||||||
|
import com.ydool.staff.mapper.OrganizationMapper;
|
||||||
import com.ydool.staff.mapper.RecruitmentMapper;
|
import com.ydool.staff.mapper.RecruitmentMapper;
|
||||||
|
import com.ydool.staff.request.OrganizationRequest;
|
||||||
import com.ydool.staff.request.RecruitmentRequest;
|
import com.ydool.staff.request.RecruitmentRequest;
|
||||||
import com.ydool.staff.request.RecruitmentSearch;
|
|
||||||
import com.ydool.staff.service.IRecruitmentService;
|
import com.ydool.staff.service.IRecruitmentService;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
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 org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,56 +38,57 @@ public class RecruitmentServiceImpl extends BaseService<RecruitmentMapper, Recru
|
||||||
RecruitmentMapper recruitmentMapper;
|
RecruitmentMapper recruitmentMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
CompanyNameMapper companyNameMapper;
|
CompanyNameMapper companyNameMapper;
|
||||||
|
@Autowired
|
||||||
|
OrganizationMapper organizationMapper;
|
||||||
|
|
||||||
@Override
|
/**
|
||||||
public AjaxResult selectRecruitmentList(Page<Recruitment> page, RecruitmentSearch recruitmentSearch) {
|
* 人员招聘登记
|
||||||
LambdaQueryWrapper<Recruitment> recruitmentLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
* @param recruitmentRequest
|
||||||
// recruitmentLambdaQueryWrapper.exists(StrUtil.isNotBlank(recruitmentSearch.getCompanyName()), "");
|
* @return
|
||||||
Page<Recruitment> recruitmentPage = recruitmentMapper.selectPage(page, recruitmentLambdaQueryWrapper);
|
*/
|
||||||
return AjaxResult.ok().data(recruitmentPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult saveRecruitment(RecruitmentRequest recruitmentRequest) {
|
public AjaxResult saveRecruitment(RecruitmentRequest recruitmentRequest) {
|
||||||
|
OrganizationRequest organizationRequest = recruitmentRequest.getOrganizationRequest();
|
||||||
|
Organization organization = BeanUtil.copyProperties(organizationRequest, Organization.class);
|
||||||
|
organization.setType("organization");
|
||||||
|
int i = organizationMapper.insert(organization);
|
||||||
|
if (i > 0) {
|
||||||
List<Recruitment> recruitments = recruitmentRequest.getRecruitments();
|
List<Recruitment> recruitments = recruitmentRequest.getRecruitments();
|
||||||
for (Recruitment recruitment : recruitments) {
|
for (Recruitment recruitment : recruitments) {
|
||||||
recruitment.setCompanyId(recruitment.getCompanyId());
|
recruitment.setCompanyId(organization.getId());
|
||||||
|
}
|
||||||
|
boolean batch = saveBatch(recruitments);
|
||||||
|
return batch ? AjaxResult.ok().msg("添加成功!") : AjaxResult.fail().msg("添加失败!");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.fail().msg("添加失败!");
|
||||||
}
|
}
|
||||||
return saveBatch(recruitments) ? AjaxResult.ok().msg("添加成功!") : AjaxResult.fail().msg("添加失败!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult deleteRecruitment(String id) {
|
public AjaxResult deleteRecruitment(IdsRequest ids) {
|
||||||
Recruitment recruitment = recruitmentMapper.selectById(id);
|
List<String> asList = Arrays.asList(ids.getIds());
|
||||||
if (ObjectUtil.isNull(recruitment)) {
|
if (CollectionUtil.isEmpty(asList)) {
|
||||||
return AjaxResult.fail().msg("未找到相关信息!");
|
return AjaxResult.fail().msg("Id不能为空!");
|
||||||
} else {
|
} else {
|
||||||
int i = recruitmentMapper.deleteById(recruitment.getId());
|
int i = recruitmentMapper.deleteBatchIds(asList);
|
||||||
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult selectRecruitmentById(String id) {
|
public AjaxResult selectRecruitmentById(String id) {
|
||||||
Recruitment recruitment = recruitmentMapper.selectById(id);
|
Organization recruitment = organizationMapper.selectById(id);
|
||||||
if (ObjectUtil.isNull(recruitment)) {
|
if (ObjectUtil.isNull(recruitment)) {
|
||||||
return AjaxResult.fail().msg("未找到相关信息!");
|
return AjaxResult.fail().msg("未找到相关信息!");
|
||||||
}
|
}
|
||||||
CompanyName companyName = companyNameMapper.selectById(recruitment.getCompanyId());
|
List<Recruitment> recruitments = recruitmentMapper.selectList(new LambdaQueryWrapper<Recruitment>().eq(Recruitment::getCompanyId, recruitment.getId()));
|
||||||
List<Recruitment> recruitments = recruitmentMapper.selectList(new LambdaQueryWrapper<Recruitment>().eq(Recruitment::getCompanyId, companyName.getId()));
|
|
||||||
RecruitmentDto recruitmentRequest = new RecruitmentDto();
|
RecruitmentDto recruitmentRequest = new RecruitmentDto();
|
||||||
recruitmentRequest.setCompanyName(companyName);
|
recruitmentRequest.setOrganization(recruitment);
|
||||||
recruitmentRequest.setRecruitments(recruitments);
|
recruitmentRequest.setRecruitments(recruitments);
|
||||||
return AjaxResult.ok().data(recruitmentRequest);
|
return AjaxResult.ok().data(recruitmentRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public AjaxResult recruitmentSaveBatch(List<RecruitmentRequest> recruitmentRequest) {
|
|
||||||
List<Recruitment> recruitments = BeanUtil.copyToList(recruitmentRequest, Recruitment.class);
|
|
||||||
return AjaxResult.ok().data(saveBatch(recruitments));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue