内设机构
This commit is contained in:
parent
3852f86f68
commit
cd66b4b0f5
|
@ -25,6 +25,11 @@ public interface UrlConstant {
|
||||||
|
|
||||||
String COMPANY = API + "/company";
|
String COMPANY = API + "/company";
|
||||||
|
|
||||||
|
String RECRUITMENT = API + "/recruitment";
|
||||||
|
String MECHANISM = API + "/mechanism";
|
||||||
|
String ORGANIZATION = API + "/organization";
|
||||||
|
String PARTY_ORGANIZATION = API + "/party_organization";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,8 +4,10 @@ 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;
|
||||||
import com.ydool.staff.service.impl.CompanyNameServiceImpl;
|
import com.ydool.staff.service.ICompanyNameService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -18,11 +20,20 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
@ApiSupport(order = 1)
|
@ApiSupport(order = 1)
|
||||||
public class CompanyNameController extends BaseController {
|
public class CompanyNameController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
// @Autowired
|
||||||
CompanyNameServiceImpl companyNameService;
|
// ICompanyNameService companyNameService;
|
||||||
|
|
||||||
|
// @GetMapping("/companyList")
|
||||||
|
// @ApiOperation(value = "企业名称列表")
|
||||||
|
// public AjaxResult companyList() {
|
||||||
|
// return companyNameService.companyList();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @GetMapping("/companyName")
|
||||||
|
// @ApiOperation(value = "根据企业名称查企业信息")
|
||||||
|
// @ApiImplicitParam(value = "企业名称", name = "companyName", required = true)
|
||||||
|
// public AjaxResult companyName(String companyName) {
|
||||||
|
// return companyNameService.companyName(companyName);
|
||||||
|
// }
|
||||||
|
|
||||||
@GetMapping("/tree")
|
|
||||||
public AjaxResult tree(){
|
|
||||||
return companyNameService.companyNameTree();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.ydool.staff.controller;
|
||||||
|
|
||||||
|
import com.ydool.common.base.BaseController;
|
||||||
|
import com.ydool.common.constant.UrlConstant;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.Mechanism;
|
||||||
|
import com.ydool.staff.service.IMechanismService;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(UrlConstant.MECHANISM)
|
||||||
|
@Api(tags = "机构信息", value = "机构信息")
|
||||||
|
public class MechanismController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IMechanismService mechanismService;
|
||||||
|
|
||||||
|
@PostMapping("/saveMechanism")
|
||||||
|
@ApiOperation(value = "新增机构信息")
|
||||||
|
public AjaxResult saveMechanism(@RequestBody Mechanism mechanism) {
|
||||||
|
return mechanismService.saveMechanism(mechanism);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/deleteMechanism")
|
||||||
|
@ApiOperation(value = "删除机构信息")
|
||||||
|
public AjaxResult deleteMechanism(@RequestBody IdsRequest id) {
|
||||||
|
return mechanismService.deleteMechanism(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.ydool.staff.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ydool.common.base.BaseController;
|
||||||
|
import com.ydool.common.constant.UrlConstant;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.service.IOrganizationService;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(UrlConstant.ORGANIZATION)
|
||||||
|
@Api(tags = "内设机构登记", value = "内设机构登记")
|
||||||
|
public class OrganizationController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IOrganizationService organizationService;
|
||||||
|
|
||||||
|
@GetMapping("/selectOrganizationList")
|
||||||
|
@ApiOperation(value = "内设机构登记列表")
|
||||||
|
@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("/selectOrganizationByMechanism")
|
||||||
|
@ApiOperation(value = "内设机构登记详情")
|
||||||
|
@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "企业Id")})
|
||||||
|
public AjaxResult selectOrganizationByMechanism(String id) {
|
||||||
|
return organizationService.selectOrganizationByMechanism(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/deleteOrganization")
|
||||||
|
@ApiOperation(value = "删除内设机构")
|
||||||
|
public AjaxResult deleteOrganization(@RequestBody IdsRequest id) {
|
||||||
|
return organizationService.deleteOrganization(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.ydool.staff.controller;
|
||||||
|
|
||||||
|
import com.ydool.common.base.BaseController;
|
||||||
|
import com.ydool.common.constant.UrlConstant;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.PartyOrganization;
|
||||||
|
import com.ydool.staff.service.IPartyOrganizationService;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(UrlConstant.PARTY_ORGANIZATION)
|
||||||
|
@Api(tags = "党组织信息", value = "党组织信息")
|
||||||
|
public class PartyOrganizationController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
IPartyOrganizationService partyOrganizationService;
|
||||||
|
|
||||||
|
@PostMapping("/savePartyOrganization")
|
||||||
|
@ApiOperation(value = "新增党组织信息")
|
||||||
|
public AjaxResult savePartyOrganization(@RequestBody PartyOrganization partyOrganization) {
|
||||||
|
return partyOrganizationService.savePartyOrganization(partyOrganization);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/deletePartyOrganization")
|
||||||
|
@ApiOperation(value = "删除党组织信息")
|
||||||
|
public AjaxResult deletePartyOrganization(@RequestBody IdsRequest id) {
|
||||||
|
return partyOrganizationService.deletePartyOrganization(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.ydool.staff.controller;
|
||||||
|
|
||||||
|
import com.ydool.common.constant.UrlConstant;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.request.RecruitmentRequest;
|
||||||
|
import com.ydool.staff.service.ICompanyNameService;
|
||||||
|
import com.ydool.staff.service.IRecruitmentService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(UrlConstant.RECRUITMENT)
|
||||||
|
@Api(tags = "员工登记", value = "员工登记")
|
||||||
|
public class RecruitmentController {
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// IRecruitmentService recruitmentService;
|
||||||
|
// @Autowired
|
||||||
|
// ICompanyNameService companyNameService;
|
||||||
|
|
||||||
|
// @GetMapping("/RecruitmentList")
|
||||||
|
// @ApiOperation(value = "人员登记列表")
|
||||||
|
// public AjaxResult recruitmentList() {
|
||||||
|
// return recruitmentService.recruitmentList();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @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")
|
||||||
|
// @ApiOperation(value = "人员招聘详情")
|
||||||
|
// public AjaxResult selectCompanyNameById(String id) {
|
||||||
|
// return companyNameService.selectCompanyNameById(id);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @PostMapping("/recruitmentSaveBatch")
|
||||||
|
// @ApiOperation(value = "批量人员登记")
|
||||||
|
// public AjaxResult recruitmentSaveBatch(@RequestBody @Validated RecruitmentDto recruitmentDto){
|
||||||
|
// return recruitmentService.recruitmentSaveBatch(recruitmentDto.getRecruitment());
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.ydool.staff.dto;
|
||||||
|
|
||||||
|
import com.ydool.staff.request.RecruitmentRequest;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RecruitmentDto implements Serializable {
|
||||||
|
|
||||||
|
@NotEmpty(message = "不能为空")
|
||||||
|
@ApiModelProperty(value = "批量人员登记")
|
||||||
|
private List<RecruitmentRequest> recruitment;
|
||||||
|
}
|
|
@ -1,12 +1,14 @@
|
||||||
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 com.ydool.common.base.TreeEntity;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
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>
|
||||||
*
|
*
|
||||||
|
@ -19,17 +21,30 @@ import lombok.experimental.Accessors;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("t_lc_company_name")
|
@TableName("t_lc_company_name")
|
||||||
@ApiModel(value="CompanyName对象", description="")
|
@ApiModel(value = "CompanyName对象", description = "")
|
||||||
public class CompanyName extends TreeEntity {
|
public class CompanyName extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private String name;
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "统一信用代码")
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批单号")
|
||||||
|
private String approvalNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "核定指标人数")
|
||||||
|
private Integer checkNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "在职人数")
|
||||||
|
private Integer activeStaff;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "剩余指标人数")
|
||||||
|
private Integer residueNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getNamed() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.ydool.staff.entity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ydool.common.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 内设机构信息
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("t_lc_mechanism")
|
||||||
|
@ApiModel(value="Mechanism对象", description="内设机构信息")
|
||||||
|
public class Mechanism extends BaseEntity{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业id")
|
||||||
|
private String organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机构名称")
|
||||||
|
private String mechanismName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机构职能")
|
||||||
|
private String mechanismFunction;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "负责人")
|
||||||
|
private String responsiblePerson;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.ydool.staff.entity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ydool.common.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 内设机构登记
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("t_lc_organization")
|
||||||
|
@ApiModel(value="Organization对象", description="内设机构登记")
|
||||||
|
public class Organization extends BaseEntity{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "信用代码")
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "相关附件")
|
||||||
|
private String attachment;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.ydool.staff.entity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ydool.common.base.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 党组织信息
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("t_lc_party_organization")
|
||||||
|
@ApiModel(value="PartyOrganization对象", description="党组织信息")
|
||||||
|
public class PartyOrganization extends BaseEntity{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业Id")
|
||||||
|
private String organizationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "职务")
|
||||||
|
private String job;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.ydool.staff.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.ydool.common.base.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 人员招聘登记
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("t_lc_recruitment")
|
||||||
|
@ApiModel(value = "Recruitment对象", description = "人员招聘登记")
|
||||||
|
public class Recruitment extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
private String companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门")
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位职务")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名额")
|
||||||
|
private Long places;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "条件要求")
|
||||||
|
private String requirements;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批")
|
||||||
|
private Integer approval;
|
||||||
|
|
||||||
|
}
|
|
@ -1,8 +1,10 @@
|
||||||
package com.ydool.staff.mapper;
|
package com.ydool.staff.mapper;
|
||||||
|
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.staff.entity.CompanyName;
|
import com.ydool.staff.entity.CompanyName;
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -15,4 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface CompanyNameMapper extends MPJBaseMapper<CompanyName> {
|
public interface CompanyNameMapper extends MPJBaseMapper<CompanyName> {
|
||||||
|
|
||||||
|
@Select("select c.id,c.company_name,c.check_number,c.active_staff,c.residue_number,r.informant,r.informant_time,r.`first`,r.first_time,r.last,r.last_time,r.invoices_status,r.updated_name,r.updated_time \n"
|
||||||
|
+ "from t_lc_company_name c ,t_lc_recruitment r where c.id = r.company_id")
|
||||||
|
AjaxResult list();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.ydool.staff.mapper;
|
||||||
|
|
||||||
|
import com.ydool.staff.entity.Mechanism;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 内设机构信息 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MechanismMapper extends MPJBaseMapper<Mechanism> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.ydool.staff.mapper;
|
||||||
|
|
||||||
|
import com.ydool.staff.entity.Organization;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 内设机构登记 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface OrganizationMapper extends MPJBaseMapper<Organization> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.ydool.staff.mapper;
|
||||||
|
|
||||||
|
import com.ydool.staff.entity.PartyOrganization;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 党组织信息 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface PartyOrganizationMapper extends MPJBaseMapper<PartyOrganization> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.ydool.staff.mapper;
|
||||||
|
|
||||||
|
import com.ydool.staff.entity.Recruitment;
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import com.ydool.staff.request.CompanyNameRequest;
|
||||||
|
import com.ydool.staff.request.RecruitmentRequest;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 人员招聘登记 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-01
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface RecruitmentMapper extends MPJBaseMapper<Recruitment> {
|
||||||
|
|
||||||
|
// @Select("select c.id,c.company_name,c.check_number,c.active_staff,c.residue_number,r.informant,r.informant_time,r.`first`,r.first_time,r.last,r.last_time,r.invoices_status,r.updated_name,r.updated_time \n"
|
||||||
|
// + "from t_lc_company_name c ,t_lc_recruitment r where c.id = r.company_id")
|
||||||
|
@Select("select c.id,c.company_name,c.check_number,c.active_staff,c.residue_number from t_lc_company_name c,t_lc_recruitment r where c.id = r.company_id")
|
||||||
|
List<CompanyNameRequest> recruitmentList();
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.ydool.staff.request;
|
||||||
|
|
||||||
|
import com.ydool.staff.entity.Recruitment;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CompanyNameRequest {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "统一信用代码")
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "审批单号")
|
||||||
|
private String approvalNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "核定指标人数")
|
||||||
|
private Integer checkNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "在职人数")
|
||||||
|
private Integer activeStaff;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "剩余指标人数")
|
||||||
|
private Integer residueNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "人员登记")
|
||||||
|
List<Recruitment> recruitments;
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.ydool.staff.request;
|
||||||
|
|
||||||
|
import com.ydool.staff.entity.Mechanism;
|
||||||
|
import com.ydool.staff.entity.Organization;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OrganizationRequest implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机构")
|
||||||
|
private Organization organization;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "机构信息")
|
||||||
|
private List<Mechanism> mechanismList;
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.ydool.staff.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RecruitmentRequest implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
@NotBlank(message = "企业名称不能为空")
|
||||||
|
private String companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "部门")
|
||||||
|
@NotBlank(message = "部门不能为空")
|
||||||
|
private String deptId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "岗位职务")
|
||||||
|
@NotBlank(message = "岗位职务不能为空")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名额")
|
||||||
|
@NotNull(message = "名额不能为空")
|
||||||
|
private Integer places;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "条件要求")
|
||||||
|
private String requirements;
|
||||||
|
}
|
|
@ -12,6 +12,10 @@ import com.ydool.common.data.dto.AjaxResult;
|
||||||
*/
|
*/
|
||||||
public interface ICompanyNameService {
|
public interface ICompanyNameService {
|
||||||
|
|
||||||
AjaxResult companyNameTree();
|
AjaxResult companyList();
|
||||||
|
|
||||||
|
AjaxResult companyName(String companyName);
|
||||||
|
|
||||||
|
AjaxResult selectCompanyNameById(String id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.ydool.staff.service;
|
||||||
|
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.Mechanism;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 内设机构信息 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
public interface IMechanismService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增机构
|
||||||
|
* @param mechanism
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult saveMechanism(Mechanism mechanism);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除机构
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult deleteMechanism(IdsRequest id);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ydool.staff.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.Organization;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 内设机构登记 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
public interface IOrganizationService {
|
||||||
|
|
||||||
|
AjaxResult selectOrganizationList(Page<Organization> page, String companyName);
|
||||||
|
|
||||||
|
AjaxResult selectOrganizationByMechanism(String id);
|
||||||
|
|
||||||
|
AjaxResult deleteOrganization(IdsRequest id);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.ydool.staff.service;
|
||||||
|
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.PartyOrganization;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 党组织信息 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
public interface IPartyOrganizationService {
|
||||||
|
|
||||||
|
AjaxResult savePartyOrganization(PartyOrganization partyOrganization);
|
||||||
|
|
||||||
|
AjaxResult deletePartyOrganization(IdsRequest id);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.ydool.staff.service;
|
||||||
|
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.request.RecruitmentRequest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IRecruitmentService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult recruitmentList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员
|
||||||
|
* @param recruitmentRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult saveRecruitment(RecruitmentRequest recruitmentRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除人员
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult deleteRecruitment(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult selectRecruitmentById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增人员
|
||||||
|
* @param recruitmentRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult recruitmentSaveBatch(List<RecruitmentRequest> recruitmentRequest);
|
||||||
|
}
|
|
@ -1,32 +1,56 @@
|
||||||
package com.ydool.staff.service.impl;
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
import com.ydool.common.base.BaseTreeService;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.ydool.common.base.BaseService;
|
||||||
import com.ydool.common.data.dto.AjaxResult;
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
import com.ydool.common.data.dto.OptionResult;
|
|
||||||
import com.ydool.common.utils.TreeSorterUtil;
|
|
||||||
import com.ydool.staff.entity.CompanyName;
|
import com.ydool.staff.entity.CompanyName;
|
||||||
|
import com.ydool.staff.entity.Recruitment;
|
||||||
import com.ydool.staff.mapper.CompanyNameMapper;
|
import com.ydool.staff.mapper.CompanyNameMapper;
|
||||||
|
import com.ydool.staff.mapper.RecruitmentMapper;
|
||||||
|
import com.ydool.staff.request.CompanyNameRequest;
|
||||||
import com.ydool.staff.service.ICompanyNameService;
|
import com.ydool.staff.service.ICompanyNameService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 服务类
|
* 服务类
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author msf
|
* @author msf
|
||||||
* @since 2023-02-01
|
* @since 2023-02-01
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class CompanyNameServiceImpl extends BaseTreeService<CompanyNameMapper, CompanyName> implements ICompanyNameService {
|
public class CompanyNameServiceImpl extends BaseService<CompanyNameMapper, CompanyName> implements ICompanyNameService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
CompanyNameMapper companyNameMapper;
|
||||||
|
@Autowired
|
||||||
|
RecruitmentMapper recruitmentMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult companyNameTree() {
|
public AjaxResult companyList() {
|
||||||
List<CompanyName> deptList = treeList();
|
return AjaxResult.ok().data(companyNameMapper.selectList(null));
|
||||||
List<OptionResult> optionResultList = TreeSorterUtil.optionTree(deptList);
|
}
|
||||||
return AjaxResult.ok().data(optionResultList);
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult companyName(String companyName) {
|
||||||
|
LambdaQueryWrapper<CompanyName> companyNameLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
companyNameLambdaQueryWrapper.eq(CompanyName::getCompanyName, companyName);
|
||||||
|
return AjaxResult.ok().data(companyNameMapper.selectOne(companyNameLambdaQueryWrapper));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult selectCompanyNameById(String id) {
|
||||||
|
CompanyName companyName = companyNameMapper.selectById(id);
|
||||||
|
List<Recruitment> recruitments = recruitmentMapper.selectList(new LambdaQueryWrapper<Recruitment>().eq(Recruitment::getCompanyId, companyName.getId()));
|
||||||
|
CompanyNameRequest companyNameRequest = new CompanyNameRequest();
|
||||||
|
companyNameRequest.setRecruitments(recruitments);
|
||||||
|
BeanUtils.copyProperties(companyName, companyNameRequest);
|
||||||
|
return AjaxResult.ok().data(companyNameRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.Mechanism;
|
||||||
|
import com.ydool.common.base.BaseService;
|
||||||
|
import com.ydool.staff.mapper.MechanismMapper;
|
||||||
|
import com.ydool.staff.service.IMechanismService;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 内设机构信息 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MechanismServiceImpl extends BaseService<MechanismMapper, Mechanism> implements IMechanismService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
MechanismMapper mechanismMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult saveMechanism(Mechanism mechanism) {
|
||||||
|
int i = mechanismMapper.insert(mechanism);
|
||||||
|
return i > 0 ? AjaxResult.ok().msg("新增成功!") : AjaxResult.fail().msg("新增失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult deleteMechanism(IdsRequest id) {
|
||||||
|
if (CollectionUtil.isEmpty(Arrays.asList(id.getIds()))) {
|
||||||
|
return AjaxResult.fail().msg("Id不能为空!");
|
||||||
|
} else {
|
||||||
|
int i = mechanismMapper.deleteBatchIds(Arrays.asList(id.getIds()));
|
||||||
|
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
||||||
|
}
|
||||||
|
// Mechanism mechanism = mechanismMapper.selectById(id);
|
||||||
|
// if (ObjectUtil.isNull(mechanism)) {
|
||||||
|
// return AjaxResult.fail().msg("未找到相关信息!");
|
||||||
|
// } else {
|
||||||
|
// int i = mechanismMapper.deleteById(mechanism.getId());
|
||||||
|
// return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
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.staff.entity.Mechanism;
|
||||||
|
import com.ydool.staff.entity.Organization;
|
||||||
|
import com.ydool.common.base.BaseService;
|
||||||
|
import com.ydool.staff.mapper.MechanismMapper;
|
||||||
|
import com.ydool.staff.mapper.OrganizationMapper;
|
||||||
|
import com.ydool.staff.request.OrganizationRequest;
|
||||||
|
import com.ydool.staff.service.IOrganizationService;
|
||||||
|
import com.ydool.system.mapper.UserMapper;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 内设机构登记 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Organization> implements IOrganizationService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
OrganizationMapper organizationMapper;
|
||||||
|
@Autowired
|
||||||
|
MechanismMapper mechanismMapper;
|
||||||
|
@Autowired
|
||||||
|
UserMapper userMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult selectOrganizationList(Page<Organization> page, String companyName) {
|
||||||
|
LambdaQueryWrapper<Organization> organizationLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
organizationLambdaQueryWrapper.eq(StrUtil.isNotBlank(companyName), Organization::getCompanyName, companyName);
|
||||||
|
Page<Organization> selectPage = organizationMapper.selectPage(page, organizationLambdaQueryWrapper);
|
||||||
|
for (Organization record : selectPage.getRecords()) {
|
||||||
|
record.setUpdatedId(userMapper.selectById(record.getUpdatedId()).getUserName());
|
||||||
|
}
|
||||||
|
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()));
|
||||||
|
OrganizationRequest organizationRequest = new OrganizationRequest();
|
||||||
|
organizationRequest.setOrganization(organization);
|
||||||
|
organizationRequest.setMechanismList(mechanismList);
|
||||||
|
return AjaxResult.ok().data(organizationRequest);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult deleteOrganization(IdsRequest id) {
|
||||||
|
if (CollectionUtil.isEmpty(Arrays.asList(id.getIds()))) {
|
||||||
|
return AjaxResult.fail().msg("Id不能为空!");
|
||||||
|
} else {
|
||||||
|
int i = organizationMapper.deleteBatchIds(Arrays.asList(id.getIds()));
|
||||||
|
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.PartyOrganization;
|
||||||
|
import com.ydool.common.base.BaseService;
|
||||||
|
import com.ydool.staff.mapper.PartyOrganizationMapper;
|
||||||
|
import com.ydool.staff.service.IPartyOrganizationService;
|
||||||
|
import com.ydool.system.request.IdsRequest;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 党组织信息 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-02
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PartyOrganizationServiceImpl extends BaseService<PartyOrganizationMapper, PartyOrganization> implements IPartyOrganizationService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
PartyOrganizationMapper partyOrganizationMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult savePartyOrganization(PartyOrganization partyOrganization) {
|
||||||
|
int i = partyOrganizationMapper.insert(partyOrganization);
|
||||||
|
return i > 0 ? AjaxResult.ok().msg("新增成功!") : AjaxResult.fail().msg("新增失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult deletePartyOrganization(IdsRequest id) {
|
||||||
|
if (CollectionUtil.isEmpty(Arrays.asList(id.getIds()))) {
|
||||||
|
return AjaxResult.fail().msg("Id不能为空!");
|
||||||
|
} else {
|
||||||
|
int i = partyOrganizationMapper.deleteBatchIds(Arrays.asList(id.getIds()));
|
||||||
|
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.ydool.common.data.dto.AjaxResult;
|
||||||
|
import com.ydool.staff.entity.Recruitment;
|
||||||
|
import com.ydool.common.base.BaseService;
|
||||||
|
import com.ydool.staff.mapper.CompanyNameMapper;
|
||||||
|
import com.ydool.staff.mapper.RecruitmentMapper;
|
||||||
|
import com.ydool.staff.request.RecruitmentRequest;
|
||||||
|
import com.ydool.staff.service.IRecruitmentService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 人员招聘登记 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author msf
|
||||||
|
* @since 2023-02-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class RecruitmentServiceImpl extends BaseService<RecruitmentMapper, Recruitment> implements IRecruitmentService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
RecruitmentMapper recruitmentMapper;
|
||||||
|
@Autowired
|
||||||
|
CompanyNameMapper companyNameMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult recruitmentList() {
|
||||||
|
return AjaxResult.ok().data(recruitmentMapper.recruitmentList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult saveRecruitment(RecruitmentRequest recruitmentRequest) {
|
||||||
|
Recruitment recruitment = BeanUtil.copyProperties(recruitmentRequest, Recruitment.class);
|
||||||
|
int i = recruitmentMapper.insert(recruitment);
|
||||||
|
return i > 0 ? AjaxResult.ok().msg("添加成功!") : AjaxResult.fail().msg("添加失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult deleteRecruitment(String id) {
|
||||||
|
Recruitment recruitment = recruitmentMapper.selectById(id);
|
||||||
|
if (ObjectUtil.isNull(recruitment)) {
|
||||||
|
return AjaxResult.fail().msg("未找到相关信息!");
|
||||||
|
} else {
|
||||||
|
int i = recruitmentMapper.deleteById(recruitment.getId());
|
||||||
|
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult selectRecruitmentById(String id) {
|
||||||
|
return AjaxResult.ok().data(recruitmentMapper.selectById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@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