企业审核
This commit is contained in:
@@ -0,0 +1,76 @@
|
|||||||
|
package com.newyetai.recruit.company.controller;
|
||||||
|
|
||||||
|
import com.newyetai.common.validation.Create;
|
||||||
|
import com.newyetai.common.validation.Update;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.newyetai.common.AlitaResult;
|
||||||
|
import com.newyetai.tkmybatis.pojo.Page;
|
||||||
|
import com.newyetai.recruit.company.dto.*;
|
||||||
|
import com.newyetai.recruit.company.service.HrCompanyAuditService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Api(tags = "企业审核表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/hr/company_audit")
|
||||||
|
public class HrCompanyAuditController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HrCompanyAuditService hrCompanyAuditService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@ApiOperation("企业审核表-创建")
|
||||||
|
public AlitaResult<HrCompanyAuditDTO> create(@RequestBody @Validated(Create.class) HrCompanyAuditOperatorDTO operatorDTO) {
|
||||||
|
return AlitaResult.success(hrCompanyAuditService.create(operatorDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/modify")
|
||||||
|
@ApiOperation("企业审核表-修改")
|
||||||
|
public AlitaResult<Void> modify(@RequestBody @Validated(Update.class) HrCompanyAuditOperatorDTO operatorDTO) {
|
||||||
|
hrCompanyAuditService.modify(operatorDTO);
|
||||||
|
return AlitaResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/remove/{id}")
|
||||||
|
@ApiOperation("企业审核表-删除")
|
||||||
|
public AlitaResult<HrCompanyAuditDTO> remove(@PathVariable("id") Long id) {
|
||||||
|
return AlitaResult.success(hrCompanyAuditService.remove(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public AlitaResult<HrCompanyAuditDTO> findById(@PathVariable("id") Long id) {
|
||||||
|
return AlitaResult.success(hrCompanyAuditService.findById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
@ApiOperation("企业审核表-列表查询")
|
||||||
|
public AlitaResult<List<HrCompanyAuditDTO>> list(HrCompanyAuditPageQueryDTO queryDTO) {
|
||||||
|
return AlitaResult.success(hrCompanyAuditService.list(queryDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("page")
|
||||||
|
@ApiOperation("企业审核表-分页查询")
|
||||||
|
public AlitaResult<Page<HrCompanyAuditDTO>> page(HrCompanyAuditPageQueryDTO queryDTO) {
|
||||||
|
hrCompanyAuditService.page(queryDTO);
|
||||||
|
return AlitaResult.success(queryDTO.getPageResult());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/audit")
|
||||||
|
@ApiOperation("企业审核表-审核")
|
||||||
|
public AlitaResult<Void> audit(@RequestBody @Validated HrCompanyAuditReqDTO reqDTO) {
|
||||||
|
hrCompanyAuditService.audit(reqDTO);
|
||||||
|
return AlitaResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -98,5 +98,16 @@ public class HrCompanyController {
|
|||||||
public AlitaResult<HrCompany> findById(@PathVariable("id") Long id) {
|
public AlitaResult<HrCompany> findById(@PathVariable("id") Long id) {
|
||||||
return AlitaResult.success(companyService.findById(id));
|
return AlitaResult.success(companyService.findById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询-审核表的数据
|
||||||
|
*/
|
||||||
|
@GetMapping("/audit_page")
|
||||||
|
@ApiOperation("分页查询")
|
||||||
|
public AlitaResult<Page<HrCompanyDTO>> auditPage(@Validated HrCompanyPageQueryDTO queryDTO) {
|
||||||
|
queryDTO.check();
|
||||||
|
companyService.auditPage(queryDTO);
|
||||||
|
return AlitaResult.success(queryDTO.getPageResult());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.newyetai.recruit.company.controller;
|
||||||
|
|
||||||
|
import com.newyetai.common.exception.util.Assert;
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompanyFile;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import com.newyetai.common.AlitaResult;
|
||||||
|
import com.newyetai.tkmybatis.pojo.Page;
|
||||||
|
import com.newyetai.recruit.company.dto.*;
|
||||||
|
import com.newyetai.recruit.company.service.HrCompanyFileService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Api(tags = "企业文件表")
|
||||||
|
@RestController
|
||||||
|
public class HrCompanyFileController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HrCompanyFileService hrCompanyFileService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("anon/hr/company_file/page")
|
||||||
|
@ApiOperation("分页查询企业文件")
|
||||||
|
public AlitaResult<Page<HrCompanyFileDTO>> userFilePage(HrCompanyFilePageQueryDTO queryDTO) {
|
||||||
|
Assert.notNull(queryDTO.getId(),"id不能为空");
|
||||||
|
hrCompanyFileService.filePage(queryDTO);
|
||||||
|
return AlitaResult.success(queryDTO.getPageResult());
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/hr/company_file/page")
|
||||||
|
@ApiOperation("分页查询企业文件")
|
||||||
|
public AlitaResult<Page<HrCompanyFileDTO>> filePage(HrCompanyFilePageQueryDTO queryDTO) {
|
||||||
|
hrCompanyFileService.filePage(queryDTO);
|
||||||
|
return AlitaResult.success(queryDTO.getPageResult());
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/hr/company_file/create")
|
||||||
|
@ApiOperation("创建企业文件信息")
|
||||||
|
public AlitaResult<HrCompanyFile> create(@RequestBody HrCompanyFileDTO queryDTO) {
|
||||||
|
return AlitaResult.success(hrCompanyFileService.create(queryDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/hr/company_file/update")
|
||||||
|
@ApiOperation("修改企业文件信息")
|
||||||
|
public AlitaResult<Void> update(@RequestBody HrCompanyFileDTO queryDTO) {
|
||||||
|
hrCompanyFileService.update(queryDTO);
|
||||||
|
return AlitaResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/hr/company_file/delete/{id}")
|
||||||
|
@ApiOperation("根据文件Id删除企业文件信息")
|
||||||
|
public AlitaResult<Void> delete(@PathVariable("id") Long id) {
|
||||||
|
hrCompanyFileService.delete(id);
|
||||||
|
return AlitaResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/hr/company_file/setDefault/{id}")
|
||||||
|
@ApiOperation("设置为默认")
|
||||||
|
public AlitaResult<Void> setDefault(@PathVariable("id") Long id) {
|
||||||
|
hrCompanyFileService.setDefault(id);
|
||||||
|
return AlitaResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.newyetai.recruit.company.dao;
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.dto.*;
|
||||||
|
import com.newyetai.tkmybatis.mybatis.MyMapper;
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompanyAudit;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface HrCompanyAuditMapper extends MyMapper<HrCompanyAudit> {
|
||||||
|
|
||||||
|
List<HrCompanyAuditDTO> page(@Param("param") HrCompanyAuditPageQueryDTO queryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取企业最大的审核记录id
|
||||||
|
*/
|
||||||
|
Long maxIdByCompanyId(@Param("companyId") Long companyId);
|
||||||
|
|
||||||
|
int modifyById(@Param("param") HrCompanyAudit hrCompanyAudit);
|
||||||
|
|
||||||
|
int audit(@Param("param") HrCompanyAuditReqDTO reqDTO);
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.newyetai.recruit.company.dao;
|
||||||
|
|
||||||
|
import com.newyetai.tkmybatis.mybatis.MyMapper;
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompanyFile;
|
||||||
|
import com.newyetai.recruit.company.dto.HrCompanyFileDTO;
|
||||||
|
import com.newyetai.recruit.company.dto.HrCompanyFilePageQueryDTO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface HrCompanyFileMapper extends MyMapper<HrCompanyFile> {
|
||||||
|
|
||||||
|
List<HrCompanyFileDTO> page(@Param("param") HrCompanyFilePageQueryDTO queryDTO);
|
||||||
|
|
||||||
|
List<HrCompanyFileDTO> filePage(HrCompanyFilePageQueryDTO queryDTO);
|
||||||
|
|
||||||
|
void setDefault(@Param("companyId") Long companyId, @Param("id") Long id);
|
||||||
|
}
|
||||||
@@ -21,5 +21,6 @@ import java.util.List;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface HrCompanyMapper extends MyMapper<HrCompany> {
|
public interface HrCompanyMapper extends MyMapper<HrCompany> {
|
||||||
List<HrCompanyDTO> page(HrCompanyPageQueryDTO hrCompanyPageQueryDTO);
|
List<HrCompanyDTO> page(HrCompanyPageQueryDTO hrCompanyPageQueryDTO);
|
||||||
|
List<HrCompanyDTO> auditPage(HrCompanyPageQueryDTO hrCompanyPageQueryDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import com.newyetai.common.dto.BaseDTO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@ApiModel("企业审核表")
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class HrCompanyAuditDTO extends BaseDTO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业ID")
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("机构ID")
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业LOGO;FileRecord")
|
||||||
|
private String companyLogo;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系人")
|
||||||
|
private String contactPerson;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系方式")
|
||||||
|
private String contactWay;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司简介")
|
||||||
|
private String companyProfile;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司描述")
|
||||||
|
private String companyDescription;
|
||||||
|
|
||||||
|
@ApiModelProperty("行业 数据字典)")
|
||||||
|
private String companyIndustry;
|
||||||
|
|
||||||
|
@ApiModelProperty("规模 ;数据字典)")
|
||||||
|
private String companySize;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司注册地址")
|
||||||
|
private String companyRegisterAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("省份 ;数据字典)")
|
||||||
|
private Integer province;
|
||||||
|
|
||||||
|
@ApiModelProperty("市 ;数据字典)")
|
||||||
|
private Integer city;
|
||||||
|
|
||||||
|
@ApiModelProperty("区 ;数据字典)")
|
||||||
|
private Integer district;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态 1:待审核 2.审核成功 3.审核失败")
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核失败原因")
|
||||||
|
private String auditFailMsg;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件json")
|
||||||
|
private String fileJson;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@ApiModelProperty("类型(数据字典 1.客户 2.供应商)")
|
||||||
|
private String companyType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import com.newyetai.common.dto.BaseOperateDTO;
|
||||||
|
import com.newyetai.common.validation.Create;
|
||||||
|
import com.newyetai.common.validation.Update;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@ApiModel("企业审核表")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class HrCompanyAuditOperatorDTO extends BaseOperateDTO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@NotNull(message = "id不能为空", groups = {Update.class})
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业LOGO;FileRecord")
|
||||||
|
private String companyLogo;
|
||||||
|
|
||||||
|
@NotBlank(message = "请输入客户名称", groups = {Create.class, Update.class})
|
||||||
|
@ApiModelProperty("公司名称")
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@NotBlank(message = "请输入联系人", groups = {Create.class, Update.class})
|
||||||
|
@ApiModelProperty("联系人")
|
||||||
|
private String contactPerson;
|
||||||
|
|
||||||
|
@NotBlank(message = "请输入联系电话", groups = {Create.class, Update.class})
|
||||||
|
@ApiModelProperty("联系方式")
|
||||||
|
private String contactWay;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司简介")
|
||||||
|
private String companyProfile;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司描述")
|
||||||
|
private String companyDescription;
|
||||||
|
|
||||||
|
@NotBlank(message = "请选择行业", groups = {Create.class, Update.class})
|
||||||
|
@ApiModelProperty("行业 数据字典)")
|
||||||
|
private String companyIndustry;
|
||||||
|
|
||||||
|
@NotBlank(message = "请选择规模", groups = {Create.class, Update.class})
|
||||||
|
@ApiModelProperty("规模 ;数据字典)")
|
||||||
|
private String companySize;
|
||||||
|
|
||||||
|
@NotBlank(message = "请输入企业地址", groups = {Create.class, Update.class})
|
||||||
|
@ApiModelProperty("公司注册地址")
|
||||||
|
private String companyRegisterAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("省份 ;数据字典)")
|
||||||
|
private Integer province;
|
||||||
|
|
||||||
|
@ApiModelProperty("市 ;数据字典)")
|
||||||
|
private Integer city;
|
||||||
|
|
||||||
|
@ApiModelProperty("区 ;数据字典)")
|
||||||
|
private Integer district;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件json")
|
||||||
|
private String fileJson;
|
||||||
|
|
||||||
|
|
||||||
|
@NotBlank(message = "请输入类型", groups = {Create.class})
|
||||||
|
@ApiModelProperty("类型(数据字典 1.客户 2.供应商)")
|
||||||
|
private String companyType;
|
||||||
|
|
||||||
|
@NotNull(message = "企业id不能为空",groups = {Update.class})
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
|
||||||
|
@NotNull(message = "版本号不能为空",groups = {Update.class})
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import com.newyetai.common.dto.PageQueryDTO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("企业审核表")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class HrCompanyAuditPageQueryDTO extends PageQueryDTO<HrCompanyAuditDTO> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业ID")
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("机构ID")
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
|
private Set<Long> orgIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业LOGO;FileRecord")
|
||||||
|
private String companyLogo;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司名称 (模糊匹配)")
|
||||||
|
private String companyNameLike;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系人")
|
||||||
|
private String contactPerson;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系方式")
|
||||||
|
private String contactWay;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司简介")
|
||||||
|
private String companyProfile;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司描述")
|
||||||
|
private String companyDescription;
|
||||||
|
|
||||||
|
@ApiModelProperty("行业 数据字典)")
|
||||||
|
private String companyIndustry;
|
||||||
|
|
||||||
|
@ApiModelProperty("规模 ;数据字典)")
|
||||||
|
private String companySize;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司注册地址")
|
||||||
|
private String companyRegisterAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("省份 ;数据字典)")
|
||||||
|
private Integer province;
|
||||||
|
|
||||||
|
@ApiModelProperty("市 ;数据字典)")
|
||||||
|
private Integer city;
|
||||||
|
|
||||||
|
@ApiModelProperty("区 ;数据字典)")
|
||||||
|
private Integer district;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态 1:待审核 2.审核成功 3.审核失败")
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核失败原因")
|
||||||
|
private String auditFailMsg;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件json")
|
||||||
|
private String fileJson;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTimeStart;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTimeStart;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty("类型(数据字典 1.客户 2.供应商)")
|
||||||
|
private String companyType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@ApiModel("企业审核表")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class HrCompanyAuditQueryDTO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业ID")
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("机构ID")
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
|
@ApiModelProperty("统一社会信用代码")
|
||||||
|
private String creditCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业LOGO;FileRecord")
|
||||||
|
private String companyLogo;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司名称 (模糊匹配)")
|
||||||
|
private String companyNameLike;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系人")
|
||||||
|
private String contactPerson;
|
||||||
|
|
||||||
|
@ApiModelProperty("联系方式")
|
||||||
|
private String contactWay;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司简介")
|
||||||
|
private String companyProfile;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司描述")
|
||||||
|
private String companyDescription;
|
||||||
|
|
||||||
|
@ApiModelProperty("行业 数据字典)")
|
||||||
|
private String companyIndustry;
|
||||||
|
|
||||||
|
@ApiModelProperty("规模 ;数据字典)")
|
||||||
|
private String companySize;
|
||||||
|
|
||||||
|
@ApiModelProperty("公司注册地址")
|
||||||
|
private String companyRegisterAddress;
|
||||||
|
|
||||||
|
@ApiModelProperty("省份 ;数据字典)")
|
||||||
|
private Integer province;
|
||||||
|
|
||||||
|
@ApiModelProperty("市 ;数据字典)")
|
||||||
|
private Integer city;
|
||||||
|
|
||||||
|
@ApiModelProperty("区 ;数据字典)")
|
||||||
|
private Integer district;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态 1:待审核 2.审核成功 3.审核失败")
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核失败原因")
|
||||||
|
private String auditFailMsg;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件json")
|
||||||
|
private String fileJson;
|
||||||
|
|
||||||
|
@ApiModelProperty("版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTimeStart;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTimeStart;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty("类型(数据字典 1.客户 2.供应商)")
|
||||||
|
private String companyType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: guixinman
|
||||||
|
* @create: 2024-07-05 15:39
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class HrCompanyAuditReqDTO implements Serializable {
|
||||||
|
|
||||||
|
@NotNull(message = "id不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@NotBlank(message = "请选择审核状态")
|
||||||
|
@ApiModelProperty("审核状态 1:待审核 2.审核成功 3.审核失败")
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核失败原因")
|
||||||
|
private String auditFailMsg;
|
||||||
|
|
||||||
|
@NotNull(message = "版本号不能为空")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
private Long updateBy;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -29,6 +29,8 @@ public class HrCompanyDTO extends BaseDTO {
|
|||||||
|
|
||||||
private static final long serialVersionUID = -2216352275325005059L;
|
private static final long serialVersionUID = -2216352275325005059L;
|
||||||
|
|
||||||
|
private Long companyAuditId;
|
||||||
|
|
||||||
@ApiModelProperty("机构ID")
|
@ApiModelProperty("机构ID")
|
||||||
private Long orgId;
|
private Long orgId;
|
||||||
|
|
||||||
@@ -43,9 +45,6 @@ public class HrCompanyDTO extends BaseDTO {
|
|||||||
@Length(max = 32,message = "名称超长", groups = {Create.class, Update.class})
|
@Length(max = 32,message = "名称超长", groups = {Create.class, Update.class})
|
||||||
private String companyName;
|
private String companyName;
|
||||||
|
|
||||||
@ApiModelProperty("机构名称")
|
|
||||||
private String orgName;
|
|
||||||
|
|
||||||
@ApiModelProperty("联系人")
|
@ApiModelProperty("联系人")
|
||||||
@Length(max = 20,message = "联系人长度超长", groups = {Create.class, Update.class})
|
@Length(max = 20,message = "联系人长度超长", groups = {Create.class, Update.class})
|
||||||
private String contactPerson;
|
private String contactPerson;
|
||||||
@@ -85,4 +84,21 @@ public class HrCompanyDTO extends BaseDTO {
|
|||||||
*/
|
*/
|
||||||
@NotNull(message = "类型不能为空", groups = {Create.class, Update.class})
|
@NotNull(message = "类型不能为空", groups = {Create.class, Update.class})
|
||||||
private String companyType;
|
private String companyType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CompanyAuditStatusEnum
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
private String auditFailMsg;
|
||||||
|
|
||||||
|
private String fileJson;
|
||||||
|
|
||||||
|
private String version;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 :1开启 2关闭
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import com.newyetai.common.dto.BaseDTO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@ApiModel("企业文件表")
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class HrCompanyFileDTO extends BaseDTO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业id")
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件编码")
|
||||||
|
private String fileCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("附件名称")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
@ApiModelProperty("分类(1-图片 2-视频 3-其它)")
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件后缀;文件后缀")
|
||||||
|
private String fileSuffix;
|
||||||
|
|
||||||
|
@ApiModelProperty("默认展示")
|
||||||
|
private Boolean defaultShow;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件描述(前台照片,公司介绍视频等)")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import com.newyetai.common.dto.BaseOperateDTO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@ApiModel("企业文件表")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class HrCompanyFileOperatorDTO extends BaseOperateDTO {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业id")
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件编码")
|
||||||
|
private String fileCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("附件名称")
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
@ApiModelProperty("分类(1-图片 2-视频 3-其它)")
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件后缀;文件后缀")
|
||||||
|
private String fileSuffix;
|
||||||
|
|
||||||
|
@ApiModelProperty("默认展示")
|
||||||
|
private Boolean defaultShow;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件描述(前台照片,公司介绍视频等)")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import com.newyetai.common.dto.PageQueryDTO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ApiModel("企业文件表")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class HrCompanyFilePageQueryDTO extends PageQueryDTO<HrCompanyFileDTO> {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业id")
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件编码")
|
||||||
|
private String fileCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("附件名称 (模糊匹配)")
|
||||||
|
private String fileNameLike;
|
||||||
|
|
||||||
|
@ApiModelProperty("分类(1-图片 2-视频 3-其它)")
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件后缀;文件后缀")
|
||||||
|
private String fileSuffix;
|
||||||
|
|
||||||
|
@ApiModelProperty("默认展示")
|
||||||
|
private Boolean defaultShow;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件描述(前台照片,公司介绍视频等)")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTimeStart;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTimeStart;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTimeEnd;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.newyetai.recruit.company.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@ApiModel("企业文件表")
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class HrCompanyFileQueryDTO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("企业id")
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件编码")
|
||||||
|
private String fileCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("附件名称 (模糊匹配)")
|
||||||
|
private String fileNameLike;
|
||||||
|
|
||||||
|
@ApiModelProperty("分类(1-图片 2-视频 3-其它)")
|
||||||
|
private String fileType;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件后缀;文件后缀")
|
||||||
|
private String fileSuffix;
|
||||||
|
|
||||||
|
@ApiModelProperty("默认展示")
|
||||||
|
private Boolean defaultShow;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
@ApiModelProperty("文件描述(前台照片,公司介绍视频等)")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTimeStart;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTimeEnd;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间起,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTimeStart;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间止,格式 (yyyy-MM-dd HH:mm:ss)")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTimeEnd;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -99,4 +99,9 @@ public class HrCompany extends BaseEntity {
|
|||||||
* 类型(数据字典 1.客户 2.供应商)
|
* 类型(数据字典 1.客户 2.供应商)
|
||||||
*/
|
*/
|
||||||
private String companyType;
|
private String companyType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 :1开启 2关闭
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package com.newyetai.recruit.company.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.newyetai.common.entity.BaseEntity;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@TableName(value = "hr_company_audit")
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class HrCompanyAudit extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业ID
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
/**
|
||||||
|
* 机构ID
|
||||||
|
*/
|
||||||
|
private Long orgId;
|
||||||
|
/**
|
||||||
|
* 统一社会信用代码
|
||||||
|
*/
|
||||||
|
private String creditCode;
|
||||||
|
/**
|
||||||
|
* 企业LOGO;FileRecord
|
||||||
|
*/
|
||||||
|
private String companyLogo;
|
||||||
|
/**
|
||||||
|
* 公司名称
|
||||||
|
*/
|
||||||
|
private String companyName;
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String contactPerson;
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
private String contactWay;
|
||||||
|
/**
|
||||||
|
* 公司简介
|
||||||
|
*/
|
||||||
|
private String companyProfile;
|
||||||
|
/**
|
||||||
|
* 公司描述
|
||||||
|
*/
|
||||||
|
private String companyDescription;
|
||||||
|
/**
|
||||||
|
* 行业 数据字典)
|
||||||
|
*/
|
||||||
|
private String companyIndustry;
|
||||||
|
/**
|
||||||
|
* 规模 ;数据字典)
|
||||||
|
*/
|
||||||
|
private String companySize;
|
||||||
|
/**
|
||||||
|
* 公司注册地址
|
||||||
|
*/
|
||||||
|
private String companyRegisterAddress;
|
||||||
|
/**
|
||||||
|
* 省份 ;数据字典)
|
||||||
|
*/
|
||||||
|
private Integer province;
|
||||||
|
/**
|
||||||
|
* 市 ;数据字典)
|
||||||
|
*/
|
||||||
|
private Integer city;
|
||||||
|
/**
|
||||||
|
* 区 ;数据字典)
|
||||||
|
*/
|
||||||
|
private Integer district;
|
||||||
|
/**
|
||||||
|
* 审核状态 1:待审核 2.审核成功 3.审核失败
|
||||||
|
*/
|
||||||
|
private String auditStatus;
|
||||||
|
/**
|
||||||
|
* 审核失败原因
|
||||||
|
*/
|
||||||
|
private String auditFailMsg;
|
||||||
|
/**
|
||||||
|
* 文件json
|
||||||
|
*/
|
||||||
|
private String fileJson;
|
||||||
|
/**
|
||||||
|
* 版本号
|
||||||
|
*/
|
||||||
|
private Integer version;
|
||||||
|
/**
|
||||||
|
* 类型(数据字典 1.客户 2.供应商)
|
||||||
|
*/
|
||||||
|
private String companyType;
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.newyetai.recruit.company.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.newyetai.common.entity.BaseEntity;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@TableName(value = "hr_company_file")
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class HrCompanyFile extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业id
|
||||||
|
*/
|
||||||
|
private Long companyId;
|
||||||
|
/**
|
||||||
|
* 文件编码
|
||||||
|
*/
|
||||||
|
private String fileCode;
|
||||||
|
/**
|
||||||
|
* 附件名称
|
||||||
|
*/
|
||||||
|
private String fileName;
|
||||||
|
/**
|
||||||
|
* 分类(1-图片 2-视频 3-其它)
|
||||||
|
*/
|
||||||
|
private String fileType;
|
||||||
|
/**
|
||||||
|
* 文件后缀;文件后缀
|
||||||
|
*/
|
||||||
|
private String fileSuffix;
|
||||||
|
/**
|
||||||
|
* 默认展示
|
||||||
|
*/
|
||||||
|
private Boolean defaultShow;
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Long sort;
|
||||||
|
/**
|
||||||
|
* 文件描述(前台照片,公司介绍视频等)
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.newyetai.recruit.company.enums;
|
||||||
|
|
||||||
|
public enum HrCompanyAuditStatusEnum {
|
||||||
|
|
||||||
|
INIT("1", "待审核"),
|
||||||
|
SUCCESS("2", "审核成功"),
|
||||||
|
FAIL("3", "审核失败");
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 类型描述
|
||||||
|
*/
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
|
||||||
|
HrCompanyAuditStatusEnum(String status, String desc) {
|
||||||
|
this.status = status;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.newyetai.recruit.company.enums;
|
||||||
|
|
||||||
|
public enum HrCompanyStatusEnum {
|
||||||
|
OPEN("1", "开启"),
|
||||||
|
CLOSE("2", "关闭")
|
||||||
|
;
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 类型描述
|
||||||
|
*/
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
|
||||||
|
HrCompanyStatusEnum(String status, String desc) {
|
||||||
|
this.status = status;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.newyetai.recruit.company.dao.HrCompanyAuditMapper">
|
||||||
|
<update id="modifyById">
|
||||||
|
update hr_company_audit
|
||||||
|
set
|
||||||
|
credit_code = #{param.creditCode},
|
||||||
|
company_logo = #{param.companyLogo},
|
||||||
|
company_name = #{param.companyName},
|
||||||
|
contact_person = #{param.contactPerson},
|
||||||
|
contact_way = #{param.contactWay},
|
||||||
|
company_profile = #{param.companyProfile},
|
||||||
|
company_description = #{param.companyDescription},
|
||||||
|
company_industry = #{param.companyIndustry},
|
||||||
|
company_size = #{param.companySize},
|
||||||
|
company_register_address = #{param.companyRegisterAddress},
|
||||||
|
province = #{param.province},
|
||||||
|
city = #{param.city},
|
||||||
|
district = #{param.district},
|
||||||
|
file_json = #{param.fileJson},
|
||||||
|
<if test="param.auditStatus != null">
|
||||||
|
audit_status = #{param.auditStatus},
|
||||||
|
</if>
|
||||||
|
version = version + 1,
|
||||||
|
update_by = #{param.updateBy},
|
||||||
|
update_time = now()
|
||||||
|
where
|
||||||
|
id = #{param.id}
|
||||||
|
and company_id = #{param.companyId}
|
||||||
|
and deleted = 0
|
||||||
|
and version = #{param.version}
|
||||||
|
and audit_status = 1
|
||||||
|
</update>
|
||||||
|
<update id="audit">
|
||||||
|
update hr_company_audit
|
||||||
|
set version = version + 1,
|
||||||
|
update_by = #{param.updateBy},
|
||||||
|
update_time = now(),
|
||||||
|
audit_status = #{param.auditStatus},
|
||||||
|
audit_fail_msg = #{param.auditFailMsg}
|
||||||
|
where deleted = 0
|
||||||
|
and id = #{param.id}
|
||||||
|
and version = #{param.version}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="page" resultType="com.newyetai.recruit.company.dto.HrCompanyAuditDTO">
|
||||||
|
SELECT
|
||||||
|
a.*
|
||||||
|
FROM hr_company_audit a
|
||||||
|
INNER JOIN (SELECT max(id) id FROM hr_company_audit WHERE deleted = 0 GROUP BY company_id) b ON a.id = b.id
|
||||||
|
|
||||||
|
WHERE a.deleted = 0
|
||||||
|
<if test='param.id != null'>
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyNameLike != null and param.companyNameLike.trim() != ""'>
|
||||||
|
<bind name="companyNameLike" value="'%' + param.companyNameLike + '%'"/>
|
||||||
|
AND a.company_name like #{companyNameLike}
|
||||||
|
</if>
|
||||||
|
<if test='param.orgId != null'>
|
||||||
|
AND a.org_id = #{param.orgId}
|
||||||
|
</if>
|
||||||
|
<if test="param.orgIds != null and param.orgIds.size() != 0">
|
||||||
|
AND a.org_id IN
|
||||||
|
<foreach collection="param.orgIds" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test='param.auditStatus != null and param.auditStatus.trim() != ""'>
|
||||||
|
AND a.audit_status = #{param.auditStatus}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyType != null and param.companyType.trim() != ""'>
|
||||||
|
AND a.company_type = #{param.companyType}
|
||||||
|
</if>
|
||||||
|
<if test='param.createTimeStart != null'>
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test='param.createTimeEnd != null'>
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
ORDER BY a.id DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="maxIdByCompanyId" resultType="java.lang.Long">
|
||||||
|
select max(id) from hr_company_audit where deleted = 0 and company_id = #{companyId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<sql id="queryFromSql">
|
||||||
|
FROM
|
||||||
|
hr_company_audit t
|
||||||
|
WHERE t.deleted = 0
|
||||||
|
<if test='param.id != null'>
|
||||||
|
AND t.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyId != null'>
|
||||||
|
AND t.company_id = #{param.companyId}
|
||||||
|
</if>
|
||||||
|
<if test='param.orgId != null'>
|
||||||
|
AND t.org_id = #{param.orgId}
|
||||||
|
</if>
|
||||||
|
<if test='param.creditCode != null and param.creditCode.trim() != ""'>
|
||||||
|
AND t.credit_code = #{param.creditCode}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyLogo != null and param.companyLogo.trim() != ""'>
|
||||||
|
AND t.company_logo = #{param.companyLogo}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyNameLike != null and param.companyNameLike.trim() != ""'>
|
||||||
|
<bind name="companyNameLike" value="'%' + param.companyNameLike + '%'"/>
|
||||||
|
AND t.company_name like #{companyNameLike}
|
||||||
|
</if>
|
||||||
|
<if test='param.contactPerson != null and param.contactPerson.trim() != ""'>
|
||||||
|
AND t.contact_person = #{param.contactPerson}
|
||||||
|
</if>
|
||||||
|
<if test='param.contactWay != null and param.contactWay.trim() != ""'>
|
||||||
|
AND t.contact_way = #{param.contactWay}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyProfile != null and param.companyProfile.trim() != ""'>
|
||||||
|
AND t.company_profile = #{param.companyProfile}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyDescription != null and param.companyDescription.trim() != ""'>
|
||||||
|
AND t.company_description = #{param.companyDescription}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyIndustry != null and param.companyIndustry.trim() != ""'>
|
||||||
|
AND t.company_industry = #{param.companyIndustry}
|
||||||
|
</if>
|
||||||
|
<if test='param.companySize != null and param.companySize.trim() != ""'>
|
||||||
|
AND t.company_size = #{param.companySize}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyRegisterAddress != null and param.companyRegisterAddress.trim() != ""'>
|
||||||
|
AND t.company_register_address = #{param.companyRegisterAddress}
|
||||||
|
</if>
|
||||||
|
<if test='param.province != null'>
|
||||||
|
AND t.province = #{param.province}
|
||||||
|
</if>
|
||||||
|
<if test='param.city != null'>
|
||||||
|
AND t.city = #{param.city}
|
||||||
|
</if>
|
||||||
|
<if test='param.district != null'>
|
||||||
|
AND t.district = #{param.district}
|
||||||
|
</if>
|
||||||
|
<if test='param.auditStatus != null and param.auditStatus.trim() != ""'>
|
||||||
|
AND t.audit_status = #{param.auditStatus}
|
||||||
|
</if>
|
||||||
|
<if test='param.auditFailMsg != null and param.auditFailMsg.trim() != ""'>
|
||||||
|
AND t.audit_fail_msg = #{param.auditFailMsg}
|
||||||
|
</if>
|
||||||
|
<if test='param.fileJson != null and param.fileJson.trim() != ""'>
|
||||||
|
AND t.file_json = #{param.fileJson}
|
||||||
|
</if>
|
||||||
|
<if test='param.version != null'>
|
||||||
|
AND t.version = #{param.version}
|
||||||
|
</if>
|
||||||
|
<if test='param.createTimeStart != null'>
|
||||||
|
AND t.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test='param.createTimeEnd != null'>
|
||||||
|
AND t.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test='param.updateTimeStart != null'>
|
||||||
|
AND t.update_time >= #{param.updateTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test='param.updateTimeEnd != null'>
|
||||||
|
AND t.update_time <= #{param.updateTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyType != null and param.companyType.trim() != ""'>
|
||||||
|
AND t.company_type = #{param.companyType}
|
||||||
|
</if>
|
||||||
|
ORDER BY t.id DESC
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.newyetai.recruit.company.dao.HrCompanyFileMapper">
|
||||||
|
<update id="setDefault">
|
||||||
|
UPDATE hr_company_file
|
||||||
|
SET default_show =
|
||||||
|
CASE
|
||||||
|
|
||||||
|
WHEN default_show = 1 THEN
|
||||||
|
0
|
||||||
|
ELSE 1
|
||||||
|
END,
|
||||||
|
update_time = NOW()
|
||||||
|
WHERE deleted = 0
|
||||||
|
AND file_type = '1'
|
||||||
|
AND company_id = #{companyId}
|
||||||
|
AND (
|
||||||
|
id = #{id}
|
||||||
|
OR default_show = 1)
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.newyetai.recruit.company.dto.HrCompanyFileDTO">
|
||||||
|
SELECT t.*
|
||||||
|
<include refid="queryFromSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="filePage" resultType="com.newyetai.recruit.company.dto.HrCompanyFileDTO">
|
||||||
|
SELECT
|
||||||
|
cf.*
|
||||||
|
FROM
|
||||||
|
hr_company_file cf
|
||||||
|
WHERE
|
||||||
|
cf.deleted = 0 AND cf.company_id = #{companyId}
|
||||||
|
<if test='fileType != null and fileType != 0'>
|
||||||
|
and cf.file_type = #{fileType}
|
||||||
|
</if>
|
||||||
|
ORDER BY cf.sort DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<sql id="queryFromSql">
|
||||||
|
FROM
|
||||||
|
hr_company_file t
|
||||||
|
WHERE t.deleted = 0
|
||||||
|
<if test='param.id != null'>
|
||||||
|
AND t.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test='param.companyId != null'>
|
||||||
|
AND t.company_id = #{param.companyId}
|
||||||
|
</if>
|
||||||
|
<if test='param.fileCode != null and param.fileCode.trim() != ""'>
|
||||||
|
AND t.file_code = #{param.fileCode}
|
||||||
|
</if>
|
||||||
|
<if test='param.fileNameLike != null and param.fileNameLike.trim() != ""'>
|
||||||
|
<bind name="fileNameLike" value="'%' + param.fileNameLike + '%'"/>
|
||||||
|
AND t.file_name like #{fileNameLike}
|
||||||
|
</if>
|
||||||
|
<if test='param.fileType != null and param.fileType.trim() != ""'>
|
||||||
|
AND t.file_type = #{param.fileType}
|
||||||
|
</if>
|
||||||
|
<if test='param.fileSuffix != null and param.fileSuffix.trim() != ""'>
|
||||||
|
AND t.file_suffix = #{param.fileSuffix}
|
||||||
|
</if>
|
||||||
|
<if test='param.defaultShow != null'>
|
||||||
|
AND t.default_show = #{param.defaultShow}
|
||||||
|
</if>
|
||||||
|
<if test='param.sort != null'>
|
||||||
|
AND t.sort = #{param.sort}
|
||||||
|
</if>
|
||||||
|
<if test='param.description != null and param.description.trim() != ""'>
|
||||||
|
AND t.description = #{param.description}
|
||||||
|
</if>
|
||||||
|
<if test='param.createTimeStart != null'>
|
||||||
|
AND t.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test='param.createTimeEnd != null'>
|
||||||
|
AND t.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test='param.updateTimeStart != null'>
|
||||||
|
AND t.update_time >= #{param.updateTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test='param.updateTimeEnd != null'>
|
||||||
|
AND t.update_time <= #{param.updateTimeEnd}
|
||||||
|
</if>
|
||||||
|
ORDER BY t.id DESC
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
@@ -58,5 +58,76 @@
|
|||||||
</if>
|
</if>
|
||||||
order by hc.company_type desc, hc.id desc
|
order by hc.company_type desc, hc.id desc
|
||||||
</select>
|
</select>
|
||||||
|
<select id="auditPage" resultType="com.newyetai.recruit.company.dto.HrCompanyDTO">
|
||||||
|
select
|
||||||
|
hc.id,
|
||||||
|
o.org_name,
|
||||||
|
hca.id companyAuditId,
|
||||||
|
hca.org_id,
|
||||||
|
hca.credit_code,
|
||||||
|
hca.company_logo,
|
||||||
|
hca.company_name,
|
||||||
|
hca.contact_person,
|
||||||
|
hca.contact_way,
|
||||||
|
hca.company_profile,
|
||||||
|
hca.company_description,
|
||||||
|
hca.company_industry,
|
||||||
|
hca.company_size,
|
||||||
|
hca.company_register_address,
|
||||||
|
hca.province,
|
||||||
|
hca.city,
|
||||||
|
hca.district,
|
||||||
|
hca.audit_status,
|
||||||
|
hca.audit_fail_msg,
|
||||||
|
hca.file_json,
|
||||||
|
hca.version,
|
||||||
|
hca.deleted,
|
||||||
|
hca.create_by,
|
||||||
|
hca.create_time,
|
||||||
|
hca.update_by,
|
||||||
|
hca.update_time,
|
||||||
|
hca.proxy_by,
|
||||||
|
hca.company_type
|
||||||
|
from
|
||||||
|
hr_company hc
|
||||||
|
inner join hr_company_audit hca on hc.id = hca.company_id and hca.deleted = 0 and hca.id = (select max(id) from hr_company_audit where deleted = 0 and company_id = hc.id )
|
||||||
|
left join xs_org o on o.id = hc.org_id and o.deleted = 0
|
||||||
|
where hc.deleted = 0
|
||||||
|
<if test='id != null'>
|
||||||
|
AND hc.id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test='orgId != null'>
|
||||||
|
AND hc.org_id = #{orgId}
|
||||||
|
</if>
|
||||||
|
<if test='companyName != null and companyName.trim() != ""'>
|
||||||
|
<bind name="companyNameLike" value="'%' + companyName + '%'"/>
|
||||||
|
AND hca.company_name like #{companyNameLike}
|
||||||
|
</if>
|
||||||
|
<if test='companySize != null and companySize.trim() != ""'>
|
||||||
|
AND hca.company_size = #{companySize}
|
||||||
|
</if>
|
||||||
|
<if test='contactPerson != null and contactPerson.trim() != ""'>
|
||||||
|
AND hca.contact_person = #{contactPerson}
|
||||||
|
</if>
|
||||||
|
<if test='companyIndustry != null and companyIndustry.trim() != ""'>
|
||||||
|
AND hca.company_industry = #{companyIndustry}
|
||||||
|
</if>
|
||||||
|
<if test='createTimeStart != null'>
|
||||||
|
AND hca.create_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test='createTimeEnd != null'>
|
||||||
|
AND hca.create_time <= #{createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test='companyType != null and companyType.trim() != ""'>
|
||||||
|
AND hca.company_type = #{companyType}
|
||||||
|
</if>
|
||||||
|
<if test="companyTypes != null and companyTypes.size()>0">
|
||||||
|
AND hc.company_type in
|
||||||
|
<foreach collection="companyTypes" open="(" separator="," close=")" item="item">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
order by hc.company_type desc, hc.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.newyetai.recruit.company.mapstruct;
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompanyAudit;
|
||||||
|
import com.newyetai.recruit.company.dto.HrCompanyAuditDTO;
|
||||||
|
import com.newyetai.recruit.company.dto.HrCompanyAuditOperatorDTO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface HrCompanyAuditMapMapper {
|
||||||
|
HrCompanyAuditMapMapper INSTANCE = Mappers.getMapper(HrCompanyAuditMapMapper.class);
|
||||||
|
|
||||||
|
HrCompanyAudit convert(HrCompanyAuditDTO dto);
|
||||||
|
|
||||||
|
HrCompanyAuditDTO convert(HrCompanyAudit entity);
|
||||||
|
|
||||||
|
HrCompanyAudit convert(HrCompanyAuditOperatorDTO dto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.newyetai.recruit.company.mapstruct;
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompanyFile;
|
||||||
|
import com.newyetai.recruit.company.dto.HrCompanyFileDTO;
|
||||||
|
import com.newyetai.recruit.company.dto.HrCompanyFileOperatorDTO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface HrCompanyFileMapMapper {
|
||||||
|
HrCompanyFileMapMapper INSTANCE = Mappers.getMapper(HrCompanyFileMapMapper.class);
|
||||||
|
|
||||||
|
HrCompanyFile convert(HrCompanyFileDTO dto);
|
||||||
|
|
||||||
|
HrCompanyFileDTO convert(HrCompanyFile entity);
|
||||||
|
|
||||||
|
HrCompanyFile convert(HrCompanyFileOperatorDTO dto);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.newyetai.recruit.company.mapstruct;
|
package com.newyetai.recruit.company.mapstruct;
|
||||||
|
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.dto.HrCompanyAuditOperatorDTO;
|
||||||
import com.newyetai.recruit.company.dto.HrCompanyDTO;
|
import com.newyetai.recruit.company.dto.HrCompanyDTO;
|
||||||
import com.newyetai.recruit.company.entity.HrCompany;
|
import com.newyetai.recruit.company.entity.HrCompany;
|
||||||
|
|
||||||
@@ -20,4 +21,6 @@ public interface HrCompanyMapMapper {
|
|||||||
HrCompanyDTO exchange(HrCompany company);
|
HrCompanyDTO exchange(HrCompany company);
|
||||||
|
|
||||||
HrCompany exchange(HrCompanyDTO hrCompanyDTO);
|
HrCompany exchange(HrCompanyDTO hrCompanyDTO);
|
||||||
|
|
||||||
|
HrCompanyDTO convert(HrCompanyAuditOperatorDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.newyetai.recruit.company.service;
|
||||||
|
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.groups.Default;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.dto.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Validated(Default.class)
|
||||||
|
public interface HrCompanyAuditService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表 - 创建
|
||||||
|
*
|
||||||
|
* @param operatorDto 操作dto
|
||||||
|
* @return {@link HrCompanyAuditDTO}
|
||||||
|
*/
|
||||||
|
HrCompanyAuditDTO create(@Valid HrCompanyAuditOperatorDTO operatorDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表 - 修改
|
||||||
|
*
|
||||||
|
* @param operatorDto 操作dto
|
||||||
|
* @return {@link HrCompanyAuditDTO}
|
||||||
|
*/
|
||||||
|
void modify(@Valid HrCompanyAuditOperatorDTO operatorDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表 - 删除
|
||||||
|
*
|
||||||
|
* @param id id
|
||||||
|
* @return {@link HrCompanyAuditDTO}
|
||||||
|
*/
|
||||||
|
HrCompanyAuditDTO remove(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表 - 查询单个
|
||||||
|
*
|
||||||
|
* @return {@link HrCompanyAuditDTO}
|
||||||
|
*/
|
||||||
|
HrCompanyAuditDTO findById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表 - 列表查询
|
||||||
|
*
|
||||||
|
* @param queryDTO 列表查询dto
|
||||||
|
* @return {@link List}<{@link HrCompanyAuditDTO}>
|
||||||
|
*/
|
||||||
|
List<HrCompanyAuditDTO> list(HrCompanyAuditPageQueryDTO queryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表 - 分页查询
|
||||||
|
*
|
||||||
|
* @param queryDTO 分页查询dto
|
||||||
|
* @return {@link HrCompanyAuditDTO}
|
||||||
|
*/
|
||||||
|
List<HrCompanyAuditDTO> page(HrCompanyAuditPageQueryDTO queryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 审核
|
||||||
|
* @return:
|
||||||
|
* @author: guixinman
|
||||||
|
* @param:
|
||||||
|
*/
|
||||||
|
void audit(HrCompanyAuditReqDTO reqDTO);
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.newyetai.recruit.company.service;
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompanyFile;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.validation.groups.Default;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.dto.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Validated(Default.class)
|
||||||
|
public interface HrCompanyFileService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件列表
|
||||||
|
*
|
||||||
|
* @param queryDTO 查询dto
|
||||||
|
* @return {@link List}<{@link HrCompanyFileDTO}>
|
||||||
|
*/
|
||||||
|
List<HrCompanyFileDTO> filePage(HrCompanyFilePageQueryDTO queryDTO);
|
||||||
|
|
||||||
|
HrCompanyFile create(HrCompanyFileDTO queryDTO);
|
||||||
|
|
||||||
|
void update(HrCompanyFileDTO dto);
|
||||||
|
|
||||||
|
void delete(Long id);
|
||||||
|
void deleteByCompanyId(Long companyId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置默认展示 (封面)
|
||||||
|
*
|
||||||
|
* @param id id
|
||||||
|
*/
|
||||||
|
void setDefault(Long id);
|
||||||
|
}
|
||||||
@@ -24,7 +24,7 @@ public interface IHrCompanyService {
|
|||||||
* @return {@link HrCompanyDTO}
|
* @return {@link HrCompanyDTO}
|
||||||
* @throws RuntimeException 运行时异常
|
* @throws RuntimeException 运行时异常
|
||||||
*/
|
*/
|
||||||
void create(HrCompanyDTO hrCompanyDTO);
|
Long create(HrCompanyDTO hrCompanyDTO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
@@ -61,4 +61,17 @@ public interface IHrCompanyService {
|
|||||||
HrCompany findById(Long id);
|
HrCompany findById(Long id);
|
||||||
|
|
||||||
HrCompanyDTO find(HrCompanyPageQueryDTO pageQueryDTO);
|
HrCompanyDTO find(HrCompanyPageQueryDTO pageQueryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param pageQueryDTO 页面查询dto
|
||||||
|
* @return {@link List< HrCompanyDTO >}
|
||||||
|
*/
|
||||||
|
List<HrCompanyDTO> auditPage(HrCompanyPageQueryDTO pageQueryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改状态
|
||||||
|
*/
|
||||||
|
void updateStatus(Long id, String status);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,255 @@
|
|||||||
|
package com.newyetai.recruit.company.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.newyetai.common.constant.CommonConstants;
|
||||||
|
import com.newyetai.common.exception.BusinessException;
|
||||||
|
import com.newyetai.common.exception.util.Assert;
|
||||||
|
import com.newyetai.common.util.JsonUtils;
|
||||||
|
import com.newyetai.config.entity.Config;
|
||||||
|
import com.newyetai.config.service.ConfigService;
|
||||||
|
import com.newyetai.frame.redis.aop.annotation.AutoUnLock;
|
||||||
|
import com.newyetai.frame.redis.dto.LockDTO;
|
||||||
|
import com.newyetai.frame.redis.redisson.RedissonUtils;
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompany;
|
||||||
|
import com.newyetai.recruit.company.enums.HrCompanyAuditStatusEnum;
|
||||||
|
import com.newyetai.recruit.company.enums.HrCompanyStatusEnum;
|
||||||
|
import com.newyetai.recruit.company.mapstruct.HrCompanyAuditMapMapper;
|
||||||
|
import com.newyetai.recruit.company.mapstruct.HrCompanyMapMapper;
|
||||||
|
import com.newyetai.recruit.company.service.HrCompanyFileService;
|
||||||
|
import com.newyetai.recruit.company.service.IHrCompanyService;
|
||||||
|
import com.newyetai.usercenter.org.service.OrgService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompanyAudit;
|
||||||
|
import com.newyetai.recruit.company.dto.*;
|
||||||
|
import com.newyetai.recruit.company.dao.HrCompanyAuditMapper;
|
||||||
|
import com.newyetai.recruit.company.service.HrCompanyAuditService;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.newyetai.common.util.UserContextHolder;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业审核表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class HrCompanyAuditServiceImpl implements HrCompanyAuditService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private HrCompanyAuditMapper hrCompanyAuditMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IHrCompanyService hrCompanyService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConfigService configService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HrCompanyFileService hrCompanyFileService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrgService orgService;
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public HrCompanyAuditDTO create(HrCompanyAuditOperatorDTO operatorDto) {
|
||||||
|
HrCompanyDTO hrCompanyDTO = HrCompanyMapMapper.INSTANCE.convert(operatorDto);
|
||||||
|
Long companyId = hrCompanyService.create(hrCompanyDTO);
|
||||||
|
|
||||||
|
HrCompanyAudit hrCompanyAudit = HrCompanyAuditMapMapper.INSTANCE.convert(operatorDto);
|
||||||
|
hrCompanyAudit.setId(null);
|
||||||
|
hrCompanyAudit.setCompanyId(companyId);
|
||||||
|
hrCompanyAudit.setOrgId(UserContextHolder.getLoginOrgId());
|
||||||
|
hrCompanyAudit.setVersion(1);
|
||||||
|
|
||||||
|
|
||||||
|
Config config = configService.getConfig("company_audit_enable", CommonConstants.PLATFORM_ORG_ID, true);
|
||||||
|
if (Objects.nonNull(config)) {
|
||||||
|
hrCompanyAudit.setAuditStatus(HrCompanyAuditStatusEnum.INIT.getStatus());
|
||||||
|
} else {
|
||||||
|
hrCompanyAudit.setAuditStatus(HrCompanyAuditStatusEnum.SUCCESS.getStatus());
|
||||||
|
//回写企业表。开启
|
||||||
|
hrCompanyService.updateStatus(companyId, HrCompanyStatusEnum.OPEN.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
hrCompanyAuditMapper.saveEntity(hrCompanyAudit);
|
||||||
|
return HrCompanyAuditMapMapper.INSTANCE.convert(hrCompanyAudit);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AutoUnLock
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void modify(HrCompanyAuditOperatorDTO operatorDto) {
|
||||||
|
//对审核表id加锁
|
||||||
|
Assert.isTrue(
|
||||||
|
RedissonUtils.tryLockAutomatically(
|
||||||
|
LockDTO.builder()
|
||||||
|
.tryLockWaitTime(0L)
|
||||||
|
.lockTimeout(60 * 5L)
|
||||||
|
.arg(operatorDto.getId() + "")
|
||||||
|
.methodName("company:audit:modify")
|
||||||
|
.build()
|
||||||
|
),
|
||||||
|
"客户编辑正在处理, 请稍后再试");
|
||||||
|
|
||||||
|
HrCompany hrCompany = hrCompanyService.findById(operatorDto.getCompanyId());
|
||||||
|
Assert.notNull(hrCompany, "未查询的对应客户信息");
|
||||||
|
HrCompanyAuditDTO hrCompanyAuditDTO = this.findById(operatorDto.getId());
|
||||||
|
Assert.notNull(hrCompanyAuditDTO, "未查询到对应的客户审核信息");
|
||||||
|
|
||||||
|
//获取最新的审核id。如果和前端传递过来的不一致。代表需要用户刷新页面重新操作
|
||||||
|
Long maxAuditId = hrCompanyAuditMapper.maxIdByCompanyId(operatorDto.getCompanyId());
|
||||||
|
Assert.notNull(maxAuditId, "网络异常,请刷新页面重试");
|
||||||
|
Assert.isTrue(maxAuditId.longValue() == operatorDto.getId().longValue(), "该页面信息已被变更,请刷新页面重试!");
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 修改先进审核表。审核通过后反向更新企业表。
|
||||||
|
* 1.如果审核状态是 成功or失败。就新增一条 审核表的记录(看配置对应的状态)
|
||||||
|
2.如果审核状态是 待审核 ,就修改审核表的记录,如果配置是不审核就修改审核状态是 成功
|
||||||
|
*/
|
||||||
|
|
||||||
|
HrCompanyAudit hrCompanyAudit = HrCompanyAuditMapMapper.INSTANCE.convert(operatorDto);
|
||||||
|
hrCompanyAudit.setId(operatorDto.getId());
|
||||||
|
hrCompanyAudit.setCompanyId(operatorDto.getCompanyId());
|
||||||
|
hrCompanyAudit.setOrgId(hrCompany.getOrgId());
|
||||||
|
hrCompanyAudit.setCompanyType(hrCompany.getCompanyType());
|
||||||
|
|
||||||
|
Config config = configService.getConfig("company_audit_enable", CommonConstants.PLATFORM_ORG_ID, true);
|
||||||
|
if (Objects.nonNull(config)) {
|
||||||
|
hrCompanyAudit.setAuditStatus(HrCompanyAuditStatusEnum.INIT.getStatus());
|
||||||
|
} else {
|
||||||
|
hrCompanyAudit.setAuditStatus(HrCompanyAuditStatusEnum.SUCCESS.getStatus());
|
||||||
|
//回写企业表。
|
||||||
|
HrCompanyDTO hrCompanyDTO = new HrCompanyDTO();
|
||||||
|
BeanUtils.copyProperties(operatorDto,hrCompanyDTO);
|
||||||
|
hrCompanyDTO.setId(operatorDto.getCompanyId());
|
||||||
|
hrCompanyDTO.setStatus(HrCompanyStatusEnum.OPEN.getStatus());
|
||||||
|
hrCompanyService.update(hrCompanyDTO);
|
||||||
|
//删除企业相册
|
||||||
|
hrCompanyFileService.deleteByCompanyId(operatorDto.getCompanyId());
|
||||||
|
//新增企业相册
|
||||||
|
if (StringUtils.isNotBlank(operatorDto.getFileJson())) {
|
||||||
|
List<HrCompanyFileDTO> hrCompanyFileDTOS = JsonUtils.toList(operatorDto.getFileJson(), HrCompanyFileDTO.class);
|
||||||
|
for (HrCompanyFileDTO hrCompanyFileDTO : hrCompanyFileDTOS) {
|
||||||
|
hrCompanyFileDTO.setId(null);
|
||||||
|
hrCompanyFileDTO.setCompanyId(operatorDto.getCompanyId());
|
||||||
|
hrCompanyFileService.create(hrCompanyFileDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (HrCompanyAuditStatusEnum.INIT.getStatus().equals(hrCompanyAuditDTO.getAuditStatus())) {
|
||||||
|
hrCompanyAudit.setUpdateBy(UserContextHolder.getExistLoginUserId());
|
||||||
|
int row = hrCompanyAuditMapper.modifyById(hrCompanyAudit);
|
||||||
|
if (row == 0) {
|
||||||
|
HrCompanyAuditDTO auditDTO = this.findById(operatorDto.getId());
|
||||||
|
if (!HrCompanyAuditStatusEnum.INIT.getStatus().equals(auditDTO.getAuditStatus())) {
|
||||||
|
hrCompanyAudit.setVersion(1);
|
||||||
|
hrCompanyAuditMapper.saveEntity(hrCompanyAudit);
|
||||||
|
} else {
|
||||||
|
if (operatorDto.getVersion().intValue() != auditDTO.getVersion().intValue()) {
|
||||||
|
throw new BusinessException("该页面信息已被变更,请刷新页面重试!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hrCompanyAudit.setVersion(1);
|
||||||
|
hrCompanyAuditMapper.saveEntity(hrCompanyAudit);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public HrCompanyAuditDTO remove(Long id) {
|
||||||
|
HrCompanyAuditDTO hrCompanyAuditDto = this.findById(id);
|
||||||
|
if (Objects.isNull(hrCompanyAuditDto)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
HrCompanyAudit hrCompanyAudit = HrCompanyAudit.builder().build();
|
||||||
|
hrCompanyAudit.setId(id);
|
||||||
|
hrCompanyAuditMapper.deleteEntity(hrCompanyAudit, UserContextHolder.getLoginUserId());
|
||||||
|
return hrCompanyAuditDto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HrCompanyAuditDTO findById(Long id) {
|
||||||
|
Assert.notNull(id, "参数缺失");
|
||||||
|
HrCompanyAuditPageQueryDTO queryDTO = new HrCompanyAuditPageQueryDTO();
|
||||||
|
queryDTO.disablePage();
|
||||||
|
queryDTO.setId(id);
|
||||||
|
List<HrCompanyAuditDTO> list = this.page(queryDTO);
|
||||||
|
return CollectionUtils.isNotEmpty(list) ? list.get(0) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HrCompanyAuditDTO> list(HrCompanyAuditPageQueryDTO queryDTO) {
|
||||||
|
queryDTO.disablePage();
|
||||||
|
return hrCompanyAuditMapper.page(queryDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HrCompanyAuditDTO> page(HrCompanyAuditPageQueryDTO queryDTO) {
|
||||||
|
if (!CommonConstants.PLATFORM_ORG_ID.equals(UserContextHolder.getExistLoginOrgId())) {
|
||||||
|
if (Objects.isNull(queryDTO.getOrgId())) {
|
||||||
|
queryDTO.setOrgIds(orgService.childrenOrgIdList(UserContextHolder.getLoginOrgId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hrCompanyAuditMapper.page(queryDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void audit(HrCompanyAuditReqDTO reqDTO) {
|
||||||
|
LambdaQueryWrapper<HrCompanyAudit> queryWrapper = new LambdaQueryWrapper<HrCompanyAudit>()
|
||||||
|
.eq(HrCompanyAudit::getDeleted, false)
|
||||||
|
.eq(HrCompanyAudit::getId, reqDTO.getId())
|
||||||
|
.eq(HrCompanyAudit::getVersion, reqDTO.getVersion());
|
||||||
|
|
||||||
|
HrCompanyAudit hrCompanyAudit = hrCompanyAuditMapper.selectOne(queryWrapper);
|
||||||
|
if (Objects.isNull(hrCompanyAudit)) {
|
||||||
|
throw new BusinessException("客户信息已更新,请刷新页面重新审核。");
|
||||||
|
}
|
||||||
|
reqDTO.setUpdateBy(UserContextHolder.getExistLoginUserId());
|
||||||
|
int row = hrCompanyAuditMapper.audit(reqDTO);
|
||||||
|
if (row == 0) {
|
||||||
|
throw new BusinessException("客户信息已更新,请刷新页面重新审核。");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (HrCompanyAuditStatusEnum.SUCCESS.getStatus().equals(reqDTO.getAuditStatus())) {
|
||||||
|
//需要修改岗位表 审核通过会更新岗位表。H5用的
|
||||||
|
HrCompanyDTO companyDTO = new HrCompanyDTO();
|
||||||
|
BeanUtils.copyProperties(hrCompanyAudit, companyDTO);
|
||||||
|
companyDTO.setStatus(HrCompanyStatusEnum.OPEN.getStatus());
|
||||||
|
companyDTO.setId(hrCompanyAudit.getCompanyId());
|
||||||
|
hrCompanyService.update(companyDTO);
|
||||||
|
|
||||||
|
//先删除岗位相册
|
||||||
|
hrCompanyFileService.deleteByCompanyId(hrCompanyAudit.getCompanyId());
|
||||||
|
if (StringUtils.isNotBlank(hrCompanyAudit.getFileJson())) {
|
||||||
|
List<HrCompanyFileDTO> hrCompanyFileDTOS = JsonUtils.toList(hrCompanyAudit.getFileJson(), HrCompanyFileDTO.class);
|
||||||
|
for (HrCompanyFileDTO hrCompanyFileDTO : hrCompanyFileDTOS) {
|
||||||
|
hrCompanyFileDTO.setId(null);
|
||||||
|
hrCompanyFileDTO.setCompanyId(hrCompanyAudit.getCompanyId());
|
||||||
|
hrCompanyFileService.create(hrCompanyFileDTO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.newyetai.recruit.company.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.newyetai.common.exception.util.Assert;
|
||||||
|
import com.newyetai.common.util.JsonUtils;
|
||||||
|
import com.newyetai.recruit.company.constant.CompanyConstants;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import com.newyetai.recruit.company.entity.HrCompanyFile;
|
||||||
|
import com.newyetai.recruit.company.dto.*;
|
||||||
|
import com.newyetai.recruit.company.dao.HrCompanyFileMapper;
|
||||||
|
import com.newyetai.recruit.company.service.HrCompanyFileService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.newyetai.common.util.UserContextHolder;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业文件表
|
||||||
|
*
|
||||||
|
* @author guixinman
|
||||||
|
* @since 1.0.0 2025-06-25
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class HrCompanyFileServiceImpl implements HrCompanyFileService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private HrCompanyFileMapper hrCompanyFileMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HrCompanyFileDTO> filePage(HrCompanyFilePageQueryDTO queryDTO) {
|
||||||
|
return hrCompanyFileMapper.filePage(queryDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HrCompanyFile create(HrCompanyFileDTO queryDTO) {
|
||||||
|
List<HrCompanyFileDTO> fileList = filePage(HrCompanyFilePageQueryDTO.builder()
|
||||||
|
.companyId(queryDTO.getCompanyId())
|
||||||
|
.fileType(queryDTO.getFileType()).build());
|
||||||
|
|
||||||
|
long maxFileOrder = 0;
|
||||||
|
if (fileList.size() > 0) {
|
||||||
|
maxFileOrder = fileList.stream().mapToLong(HrCompanyFileDTO::getSort).max().getAsLong();
|
||||||
|
}
|
||||||
|
|
||||||
|
HrCompanyFile hrCompanyFile = JsonUtils.toObject(JsonUtils.toJsonString(queryDTO), HrCompanyFile.class);
|
||||||
|
hrCompanyFile.setSort(maxFileOrder);
|
||||||
|
hrCompanyFileMapper.saveEntity(hrCompanyFile);
|
||||||
|
return hrCompanyFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(HrCompanyFileDTO dto) {
|
||||||
|
HrCompanyFile hrCompanyFile = JsonUtils.toObject(JsonUtils.toJsonString(dto), HrCompanyFile.class);
|
||||||
|
hrCompanyFileMapper.updateById(hrCompanyFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(Long id) {
|
||||||
|
HrCompanyFile hrCompanyFile = hrCompanyFileMapper.selectById(id);
|
||||||
|
Assert.notNull(hrCompanyFile, "未找到要删除的文件信息");
|
||||||
|
hrCompanyFileMapper.deleteEntity(hrCompanyFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteByCompanyId(Long companyId) {
|
||||||
|
HrCompanyFile hrCompanyFile = new HrCompanyFile();
|
||||||
|
hrCompanyFile.setDeleted(true);
|
||||||
|
hrCompanyFile.setUpdateBy(UserContextHolder.getExistLoginUserId());
|
||||||
|
hrCompanyFile.setUpdateTime(new Date());
|
||||||
|
hrCompanyFileMapper.update(hrCompanyFile,new LambdaQueryWrapper<HrCompanyFile>().eq(HrCompanyFile::getDeleted,false).eq(HrCompanyFile::getCompanyId,companyId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDefault(Long id) {
|
||||||
|
HrCompanyFile file = hrCompanyFileMapper.selectOne(new LambdaQueryWrapper<HrCompanyFile>()
|
||||||
|
.eq(HrCompanyFile::getDeleted, false)
|
||||||
|
.eq(HrCompanyFile::getId, id)
|
||||||
|
);
|
||||||
|
Assert.notNull(file, "文件不存在");
|
||||||
|
String fileType = file.getFileType();
|
||||||
|
Assert.isTrue(StrUtil.equals(fileType, CompanyConstants.COMPANY_FILE_TYPE_IMG), "只支持设置图片");
|
||||||
|
hrCompanyFileMapper.setDefault(file.getCompanyId(), file.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@ import com.newyetai.recruit.company.dto.HrCompanyDTO;
|
|||||||
import com.newyetai.recruit.company.dto.HrCompanyExportDTO;
|
import com.newyetai.recruit.company.dto.HrCompanyExportDTO;
|
||||||
import com.newyetai.recruit.company.dto.HrCompanyPageQueryDTO;
|
import com.newyetai.recruit.company.dto.HrCompanyPageQueryDTO;
|
||||||
import com.newyetai.recruit.company.entity.HrCompany;
|
import com.newyetai.recruit.company.entity.HrCompany;
|
||||||
|
import com.newyetai.recruit.company.enums.HrCompanyStatusEnum;
|
||||||
import com.newyetai.recruit.company.enums.HrCompanyEnum;
|
import com.newyetai.recruit.company.enums.HrCompanyEnum;
|
||||||
import com.newyetai.recruit.company.mapstruct.HrCompanyMapMapper;
|
import com.newyetai.recruit.company.mapstruct.HrCompanyMapMapper;
|
||||||
import com.newyetai.recruit.company.service.IHrCompanyService;
|
import com.newyetai.recruit.company.service.IHrCompanyService;
|
||||||
@@ -47,7 +48,7 @@ public class HrCompanyServiceImpl implements IHrCompanyService {
|
|||||||
private final HrCompanyMapper hrCompanyMapper;
|
private final HrCompanyMapper hrCompanyMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void create(HrCompanyDTO hrCompanyDTO) {
|
public Long create(HrCompanyDTO hrCompanyDTO) {
|
||||||
List<HrCompany> HrCompanyList = hrCompanyMapper.selectList(new LambdaQueryWrapper<HrCompany>()
|
List<HrCompany> HrCompanyList = hrCompanyMapper.selectList(new LambdaQueryWrapper<HrCompany>()
|
||||||
.eq(HrCompany::getOrgId, UserContextHolder.getLoginOrgId())
|
.eq(HrCompany::getOrgId, UserContextHolder.getLoginOrgId())
|
||||||
.eq(HrCompany::getCompanyName, hrCompanyDTO.getCompanyName())
|
.eq(HrCompany::getCompanyName, hrCompanyDTO.getCompanyName())
|
||||||
@@ -60,7 +61,9 @@ public class HrCompanyServiceImpl implements IHrCompanyService {
|
|||||||
|
|
||||||
HrCompany HrCompany = HrCompanyMapMapper.INSTANCE.exchange(hrCompanyDTO);
|
HrCompany HrCompany = HrCompanyMapMapper.INSTANCE.exchange(hrCompanyDTO);
|
||||||
HrCompany.setOrgId(UserContextHolder.getLoginOrgId());
|
HrCompany.setOrgId(UserContextHolder.getLoginOrgId());
|
||||||
|
HrCompany.setStatus(HrCompanyStatusEnum.CLOSE.getStatus());
|
||||||
hrCompanyMapper.saveEntity(HrCompany, UserContextHolder.getLoginUserId());
|
hrCompanyMapper.saveEntity(HrCompany, UserContextHolder.getLoginUserId());
|
||||||
|
return HrCompany.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -223,4 +226,22 @@ public class HrCompanyServiceImpl implements IHrCompanyService {
|
|||||||
}
|
}
|
||||||
return hrCompanyDTOS.get(0);
|
return hrCompanyDTOS.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HrCompanyDTO> auditPage(HrCompanyPageQueryDTO pageQueryDTO) {
|
||||||
|
if (pageQueryDTO.getOrgId() == null) {
|
||||||
|
if (!CommonConstants.PLATFORM_ORG_ID.equals(UserContextHolder.getExistLoginOrgId())) {
|
||||||
|
pageQueryDTO.setOrgId(UserContextHolder.getLoginOrgId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hrCompanyMapper.auditPage(pageQueryDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateStatus(Long id,String status) {
|
||||||
|
HrCompany hrCompany = new HrCompany();
|
||||||
|
hrCompany.setId(id);
|
||||||
|
hrCompany.setStatus(status);
|
||||||
|
hrCompanyMapper.updateEntitySelective(hrCompany, UserContextHolder.getLoginUserId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,8 +114,20 @@ public class OrgServiceImpl implements OrgService {
|
|||||||
.platformCode(EnvironmentUtils.getSystemCode()).parentId(orgCreateDTO.getParentId()).build());
|
.platformCode(EnvironmentUtils.getSystemCode()).parentId(orgCreateDTO.getParentId()).build());
|
||||||
// 用工企业类型-创建自己默认的用工企业
|
// 用工企业类型-创建自己默认的用工企业
|
||||||
if (orgTypeEnum == OrgTypeEnum.ORG_TYPE_SIMPLE || orgTypeEnum == OrgTypeEnum.ORG_TYPE_HR) {
|
if (orgTypeEnum == OrgTypeEnum.ORG_TYPE_SIMPLE || orgTypeEnum == OrgTypeEnum.ORG_TYPE_HR) {
|
||||||
companyMapper.saveEntity(HrCompany.builder().orgId(orgId).companyName(orgName)
|
companyMapper.saveEntity(HrCompany.builder()
|
||||||
.companyType(HrCompanyEnum.SELF.getType()).build());
|
.orgId(orgId)
|
||||||
|
.creditCode(orgCreateDTO.getCreditCode())
|
||||||
|
.companyLogo(orgCreateDTO.getOrgLogo())
|
||||||
|
.companyName(orgName)
|
||||||
|
.contactPerson(orgCreateDTO.getRealName())
|
||||||
|
.contactWay(orgCreateDTO.getPhone())
|
||||||
|
.companyProfile(orgCreateDTO.getDescription())
|
||||||
|
.companyDescription(orgCreateDTO.getDescription())
|
||||||
|
.companyIndustry(orgCreateDTO.getTrade())
|
||||||
|
.companySize(orgCreateDTO.getCompanySize())
|
||||||
|
.companyRegisterAddress(orgCreateDTO.getRegisteredAddress())
|
||||||
|
.companyType(HrCompanyEnum.SELF.getType())
|
||||||
|
.build());
|
||||||
}
|
}
|
||||||
return orgId;
|
return orgId;
|
||||||
}
|
}
|
||||||
@@ -155,8 +167,16 @@ public class OrgServiceImpl implements OrgService {
|
|||||||
.eq(HrCompany::getOrgId, orgModifyDTO.getId())
|
.eq(HrCompany::getOrgId, orgModifyDTO.getId())
|
||||||
);
|
);
|
||||||
if (Objects.nonNull(hrCompany)) {
|
if (Objects.nonNull(hrCompany)) {
|
||||||
hrCompany.setCompanyLogo(orgModifyDTO.getOrgLogo());
|
HrCompany hrCompanyModify = new HrCompany();
|
||||||
companyMapper.updateEntity(hrCompany);
|
hrCompanyModify.setId(hrCompany.getId());
|
||||||
|
hrCompanyModify.setCreditCode(orgModifyDTO.getCreditCode());
|
||||||
|
hrCompanyModify.setCompanyLogo(orgModifyDTO.getOrgLogo());
|
||||||
|
hrCompanyModify.setCompanyProfile(orgModifyDTO.getDescription());
|
||||||
|
hrCompanyModify.setCompanyDescription(orgModifyDTO.getDescription());
|
||||||
|
hrCompanyModify.setCompanyIndustry(orgModifyDTO.getTrade());
|
||||||
|
hrCompanyModify.setCompanySize(orgModifyDTO.getCompanySize());
|
||||||
|
hrCompanyModify.setCompanyRegisterAddress(orgModifyDTO.getRegisteredAddress());
|
||||||
|
companyMapper.updateEntitySelective(hrCompanyModify);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user