parent
6379b420e1
commit
d12efa91bd
@ -0,0 +1,251 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbCompanyVerification;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbVerificationUserDetails;
|
||||
import com.ruoyi.business.anHuiEnterprise.service.ITbCompanyVerificationService;
|
||||
import com.ruoyi.business.anHuiEnterprise.service.ITbVerificationUserDetailsService;
|
||||
import com.ruoyi.business.companyInformationReporting.domain.TbCompanyInformationReporting;
|
||||
import com.ruoyi.business.companyInformationReporting.domain.TbCompanyInformationReportingDetails;
|
||||
import com.ruoyi.common.constant.HttpStatus;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 人员审核相关Controller
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
@Api(tags = "安商惠企人员审核相关")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/verification")
|
||||
public class TbCompanyVerificationController extends BaseController {
|
||||
|
||||
|
||||
private final ITbCompanyVerificationService tbCompanyVerificationService;
|
||||
private final ITbVerificationUserDetailsService tbVerificationUserDetailsService;
|
||||
|
||||
/**
|
||||
* 查询人员审核相关列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询人员审核相关结果列表 在pc消息中心")
|
||||
@ApiOperationSupport(author = "张二富", order = 1)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", dataType = "Date", dataTypeClass = Date.class),
|
||||
@ApiImplicitParam(name = "beginTime", value = "开始时间", dataType = "Date", dataTypeClass = Date.class),
|
||||
@ApiImplicitParam(name = "verificationType", value = "审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询", dataType = "String", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "readState", value = "读取状态 0已读 1未读", dataType = "String", dataTypeClass = String.class)
|
||||
})
|
||||
public TableDataInfo list(TbCompanyVerification tbCompanyVerification) {
|
||||
startPage();
|
||||
if(tbCompanyVerification.getBeginTime()!=null&&tbCompanyVerification.getEndTime()!=null){
|
||||
if(tbCompanyVerification.getBeginTime().after(tbCompanyVerification.getEndTime())){
|
||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||
tableDataInfo.setCode(HttpStatus.ERROR);
|
||||
tableDataInfo.setMsg("开始时间不能大于结束时间 请核查");
|
||||
return tableDataInfo;
|
||||
}
|
||||
}
|
||||
List<TbCompanyVerification> list = tbCompanyVerificationService.selectTbCompanyVerificationList(tbCompanyVerification);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取人员审核相关详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("查询人员审核相关结果详情 在pc消息中心")
|
||||
@ApiOperationSupport(author = "张二富", order = 5)
|
||||
@ApiImplicitParam(name = "id", value = "人员审核相关id 列表返回的id", required = true)
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(tbCompanyVerificationService.selectTbCompanyVerificationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员审核相关
|
||||
*/
|
||||
@Log(title = "人员审核相关", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增人员审核相关")
|
||||
@ApiOperationSupport(author = "张二富", order = 10)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "companyId", value = "公司id", dataType = "String", dataTypeClass = String.class ,required = true),
|
||||
@ApiImplicitParam(name = "companyName", value = "公司名称", dataType = "String", dataTypeClass = String.class,required = true),
|
||||
@ApiImplicitParam(name = "verificationType", value = "审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询", dataType = "String", dataTypeClass = String.class,required = true),
|
||||
@ApiImplicitParam(name = "details", value = "人员审核详情信息 参数均为必填", dataType = "List<TbVerificationUserDetails>", dataTypeClass = TbVerificationUserDetails.class,required = true)
|
||||
})
|
||||
public AjaxResult add(@RequestBody TbCompanyVerification tbCompanyVerification) {
|
||||
//生成批次id
|
||||
String batchId =UUID.randomUUID().toString().replace("-", "");
|
||||
if(tbCompanyVerification==null){
|
||||
return error("入参为空");
|
||||
}
|
||||
tbCompanyVerification.setBatchId(batchId);
|
||||
tbCompanyVerification.setReadState("1");
|
||||
tbCompanyVerification.setAuditState("1");
|
||||
tbCompanyVerification.setIsDel("1");
|
||||
if(tbCompanyVerification.getCompanyId()==null|| StringUtils.isBlank(tbCompanyVerification.getCompanyName())||StringUtils.isBlank(tbCompanyVerification.getVerificationType())){
|
||||
return error("参数异常 请检查 企业id 企业名称 类型 是否为空");
|
||||
}
|
||||
Boolean saveBatch=null;
|
||||
if(tbCompanyVerification.getVerificationType().equals("1")||tbCompanyVerification.getVerificationType().equals("2")) {
|
||||
if (tbCompanyVerification.getDetails() == null || tbCompanyVerification.getDetails().size() < 1) {
|
||||
return error("人员审核详情信息不能都为空");
|
||||
}
|
||||
List<TbVerificationUserDetails> details = tbCompanyVerification.getDetails();
|
||||
boolean sing=false;
|
||||
|
||||
for (TbVerificationUserDetails detail : details) {
|
||||
detail.setBatchId(batchId);
|
||||
detail.setCreateTime(DateUtils.getNowDate());
|
||||
if(StringUtils.isBlank(detail.getVerificationType())){
|
||||
detail.setVerificationType(tbCompanyVerification.getVerificationType());
|
||||
}
|
||||
if(detail.getCompanyId()==null||detail.getCompanyId()==0){
|
||||
detail.setCompanyId(tbCompanyVerification.getCompanyId());
|
||||
}
|
||||
if(StringUtils.isBlank(detail.getCompanyName())){
|
||||
detail.setCompanyName(tbCompanyVerification.getCompanyName());
|
||||
}
|
||||
if(StringUtils.isBlank(detail.getUsername())||StringUtils.isBlank(detail.getPicUrl())||StringUtils.isBlank(detail.getCardId())||StringUtils.isBlank(detail.getAuditReason())){
|
||||
sing=true;
|
||||
}
|
||||
}
|
||||
if(sing){
|
||||
return error("详情集合中的 姓名 照片路径 身份证 审核原因 可能为空");
|
||||
}
|
||||
saveBatch = tbVerificationUserDetailsService.saveBatch(details);
|
||||
}else {
|
||||
if(StringUtils.isBlank(tbCompanyVerification.getGeneral1())||StringUtils.isBlank(tbCompanyVerification.getGeneral2())||StringUtils.isBlank(tbCompanyVerification.getGeneral3())){
|
||||
return error("咨询相关参数缺失");
|
||||
}
|
||||
}
|
||||
int i = tbCompanyVerificationService.insertTbCompanyVerification(tbCompanyVerification);
|
||||
if(saveBatch!=null&&!saveBatch){
|
||||
i=0;
|
||||
}
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员审核相关
|
||||
*/
|
||||
@Log(title = "人员审核相关", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
// @ApiOperation("修改人员审核相关")
|
||||
// @ApiOperationSupport(author = "张二富", order = 15)
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "id", value = "人员审核主表id", dataType = "Long", dataTypeClass = Long.class ,required = true),
|
||||
// @ApiImplicitParam(name = "companyId", value = "公司id", dataType = "String", dataTypeClass = String.class ,required = true),
|
||||
// @ApiImplicitParam(name = "companyName", value = "公司名称", dataType = "String", dataTypeClass = String.class,required = true),
|
||||
// @ApiImplicitParam(name = "verificationType", value = "审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询", dataType = "String", dataTypeClass = String.class,required = true),
|
||||
// @ApiImplicitParam(name = "details", value = "人员审核详情信息 参数均为必填", dataType = "List<TbVerificationUserDetails>", dataTypeClass = TbVerificationUserDetails.class,required = true)
|
||||
// })
|
||||
public AjaxResult edit(@RequestBody TbCompanyVerification tbCompanyVerification) {
|
||||
if(tbCompanyVerification==null){
|
||||
return error("入参为空");
|
||||
}
|
||||
if(tbCompanyVerification.getId()==null){
|
||||
return error("参数人员审核主表id为空");
|
||||
}
|
||||
if(tbCompanyVerification.getCompanyId()==null|| StringUtils.isBlank(tbCompanyVerification.getCompanyName())||StringUtils.isBlank(tbCompanyVerification.getVerificationType())){
|
||||
return error("参数异常 请检查 企业id 企业名称 类型 是否为空");
|
||||
}
|
||||
Boolean batchById=null;
|
||||
if(tbCompanyVerification.getVerificationType().equals("1")||tbCompanyVerification.getVerificationType().equals("2")) {
|
||||
if (tbCompanyVerification.getDetails() == null || tbCompanyVerification.getDetails().size() < 1) {
|
||||
return error("人员审核详情信息不能都为空");
|
||||
}
|
||||
List<TbVerificationUserDetails> details = tbCompanyVerification.getDetails();
|
||||
boolean sing=false;
|
||||
|
||||
for (TbVerificationUserDetails detail : details) {
|
||||
|
||||
detail.setUpdateTime(DateUtils.getNowDate());
|
||||
if(StringUtils.isBlank(detail.getVerificationType())){
|
||||
detail.setVerificationType(tbCompanyVerification.getVerificationType());
|
||||
}
|
||||
if(detail.getCompanyId()==null||detail.getCompanyId()==0){
|
||||
detail.setCompanyId(tbCompanyVerification.getCompanyId());
|
||||
}
|
||||
if(StringUtils.isBlank(detail.getCompanyName())){
|
||||
detail.setCompanyName(tbCompanyVerification.getCompanyName());
|
||||
}
|
||||
if(StringUtils.isBlank(detail.getAuditResult())||detail.getId()==null||StringUtils.isBlank(detail.getUsername())||StringUtils.isBlank(detail.getPicUrl())||StringUtils.isBlank(detail.getCardId())||StringUtils.isBlank(detail.getAuditReason())){
|
||||
sing=true;
|
||||
}
|
||||
}
|
||||
if(sing){
|
||||
return error("详情集合中的 id 姓名 照片路径 身份证 审核原因 审查结果 可能为空");
|
||||
}
|
||||
|
||||
batchById = tbVerificationUserDetailsService.updateBatchById(details);
|
||||
}else {
|
||||
if(StringUtils.isBlank(tbCompanyVerification.getConsultResult())||StringUtils.isBlank(tbCompanyVerification.getGeneral1())||StringUtils.isBlank(tbCompanyVerification.getGeneral2())||StringUtils.isBlank(tbCompanyVerification.getGeneral3())){
|
||||
return error("咨询结果或咨询相关参数缺失");
|
||||
}
|
||||
}
|
||||
int i = tbCompanyVerificationService.updateTbCompanyVerification(tbCompanyVerification);
|
||||
if(batchById!=null&&!batchById){
|
||||
i=0;
|
||||
}
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
@PutMapping("/changeReadState")
|
||||
@ApiOperation("标记为已读")
|
||||
@ApiOperationSupport(author = "张二富", order = 20)
|
||||
@ApiImplicitParam(name = "id", value = "人员审核相关id 列表返回的id", required = true)
|
||||
public AjaxResult changeReadState(@RequestBody TbCompanyVerification tbCompanyVerification) {
|
||||
UpdateWrapper<TbCompanyVerification> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.id), tbCompanyVerification.getId());
|
||||
updateWrapper.set(StringUtils.camelToUnderline(TbCompanyVerification.Fields.readState), "0");
|
||||
return toAjax(tbCompanyVerificationService.update(updateWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除人员审核相关
|
||||
*/
|
||||
@Log(title = "人员审核相关", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除人员审核相关")
|
||||
@ApiOperationSupport(author = "张二富", order = 25)
|
||||
@ApiImplicitParam(name = "id", value = "人员审核相关id 列表返回的id /1,2,3", required = true,dataType = "Long", dataTypeClass = Long.class)
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(tbCompanyVerificationService.deleteTbCompanyVerificationByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbVerificationUserDetails;
|
||||
import com.ruoyi.business.anHuiEnterprise.service.ITbVerificationUserDetailsService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 人员审核详情Controller
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/details")
|
||||
public class TbVerificationUserDetailsController extends BaseController {
|
||||
|
||||
}
|
@ -0,0 +1,165 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人员审核相关对象 tb_company_verification
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "tb_company_verification")
|
||||
@Accessors
|
||||
@FieldNameConstants
|
||||
public class TbCompanyVerification extends BaseEntity {
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id", position = 1)
|
||||
private Long id;
|
||||
|
||||
/** 批次id */
|
||||
@Excel(name = "批次id")
|
||||
@ApiModelProperty(value = "批次id", position = 5)
|
||||
private String batchId;
|
||||
|
||||
/** 审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询 */
|
||||
@Excel(name = "审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询")
|
||||
@ApiModelProperty(value = "审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询", position = 10)
|
||||
private String verificationType;
|
||||
|
||||
/** 企业id */
|
||||
@Excel(name = "企业id")
|
||||
@ApiModelProperty(value = "企业id", position = 15)
|
||||
private Long companyId;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
@ApiModelProperty(value = "公司名称", position = 20)
|
||||
private String companyName;
|
||||
|
||||
/** 详细描述 */
|
||||
@Excel(name = "详细描述")
|
||||
@ApiModelProperty(value = "详细描述", position = 25)
|
||||
private String detailTracing;
|
||||
|
||||
/** 读取状态 0已读 1未读 */
|
||||
@Excel(name = "读取状态 0已读 1未读")
|
||||
@ApiModelProperty(value = "读取状态 0已读 1未读", position = 30)
|
||||
private String readState;
|
||||
|
||||
/** 审核状态 0已审核 1未审核 */
|
||||
@Excel(name = "审核状态 0已审核 1未审核")
|
||||
@ApiModelProperty(value = "审核状态 0已审核 1未审核", position = 35)
|
||||
private String auditState;
|
||||
|
||||
/** 是否删除 0是 1否 */
|
||||
@Excel(name = "是否删除 0是 1否")
|
||||
@ApiModelProperty(value = "是否删除 0是 1否", position = 40)
|
||||
private String isDel;
|
||||
|
||||
/** 通用1 (咨询主题or法律咨询类型) */
|
||||
@Excel(name = "通用1 (咨询主题or法律咨询类型)")
|
||||
@ApiModelProperty(value = "通用1 (咨询主题or法律咨询类型)", position = 45)
|
||||
private String general1;
|
||||
|
||||
/** 通用2 (咨询类型or关联对象) */
|
||||
@Excel(name = "通用2 (咨询类型or关联对象)")
|
||||
@ApiModelProperty(value = "通用2 (咨询类型or关联对象)", position = 50)
|
||||
private String general2;
|
||||
|
||||
/** 通用3 (咨询内容or法律咨询内容) */
|
||||
@Excel(name = "通用3 (咨询内容or法律咨询内容)")
|
||||
@ApiModelProperty(value = "通用3 (咨询内容or法律咨询内容)", position = 55)
|
||||
private String general3;
|
||||
|
||||
/** 咨询结果 */
|
||||
@Excel(name = "咨询结果")
|
||||
@ApiModelProperty(value = "咨询结果", position = 60)
|
||||
private String consultResult;
|
||||
|
||||
/** 附件路径1 */
|
||||
@Excel(name = "附件路径1")
|
||||
@ApiModelProperty(value = "附件路径1", position = 65)
|
||||
private String url1;
|
||||
|
||||
/** 附件路径2 */
|
||||
@Excel(name = "附件路径2")
|
||||
@ApiModelProperty(value = "附件路径2", position = 70)
|
||||
private String url2;
|
||||
|
||||
/** 人员审核详情 */
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "人员审核详情", position = 75)
|
||||
private List<TbVerificationUserDetails> details;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "开始时间", position = 80)
|
||||
private Date beginTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "结束时间", position = 85)
|
||||
private Date endTime;
|
||||
|
||||
/** 审核结果正常列表 */
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "审核结果正常列表", position = 90)
|
||||
private List<TbVerificationUserDetails> detailsByAuditResultTrue;
|
||||
|
||||
/** 审核结果异常列表 */
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "审核结果正常列表", position = 95)
|
||||
private List<TbVerificationUserDetails> detailsByAuditResultFalse;
|
||||
|
||||
/** 0:不活跃,1:活跃 */
|
||||
@Excel(name = "0:不活跃,1:活跃")
|
||||
@ApiModelProperty(value = "0:不活跃,1:活跃", position = 100)
|
||||
private String isActive;
|
||||
|
||||
/** 扩展字段c1 */
|
||||
@Excel(name = "扩展字段c1")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c1;
|
||||
|
||||
/** 扩展字段c2 */
|
||||
@Excel(name = "扩展字段c2")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c2;
|
||||
|
||||
/** 扩展字段c3 */
|
||||
@Excel(name = "扩展字段c3")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c3;
|
||||
|
||||
/** 扩展字段c4 */
|
||||
@Excel(name = "扩展字段c4")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c4;
|
||||
|
||||
/** 扩展字段c5 */
|
||||
@Excel(name = "扩展字段c5")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c5;
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import lombok.experimental.FieldNameConstants;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 人员审核详情对象 tb_verification_user_details
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "tb_verification_user_details")
|
||||
@Accessors
|
||||
@FieldNameConstants
|
||||
public class TbVerificationUserDetails extends BaseEntity {
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id", position = 1)
|
||||
private Long id;
|
||||
|
||||
/** 批次id */
|
||||
@Excel(name = "批次id")
|
||||
@ApiModelProperty(value = "批次id", position = 5)
|
||||
private String batchId;
|
||||
|
||||
/** 审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询 */
|
||||
@Excel(name = "审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询")
|
||||
@ApiModelProperty(value = "审核类型 1人员背景审核 2重点岗位审查 3业务咨询 4法律咨询", position = 10)
|
||||
private String verificationType;
|
||||
|
||||
/** 企业id */
|
||||
@Excel(name = "企业id")
|
||||
@ApiModelProperty(value = "企业id", position = 15)
|
||||
private Long companyId;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
@ApiModelProperty(value = "公司名称", position = 20)
|
||||
private String companyName;
|
||||
|
||||
/** 姓名 */
|
||||
@Excel(name = "姓名")
|
||||
@ApiModelProperty(value = "姓名", position = 25)
|
||||
private String username;
|
||||
|
||||
/** 照片路径 */
|
||||
@Excel(name = "照片路径")
|
||||
@ApiModelProperty(value = "照片路径", position = 30)
|
||||
private String picUrl;
|
||||
|
||||
/** 身份证号码 */
|
||||
@Excel(name = "身份证号码")
|
||||
@ApiModelProperty(value = "身份证号码", position = 35)
|
||||
private String cardId;
|
||||
|
||||
/** 审核原因 */
|
||||
@Excel(name = "审核原因")
|
||||
@ApiModelProperty(value = "审核原因", position = 40)
|
||||
private String auditReason;
|
||||
|
||||
/** 审查结果 */
|
||||
@Excel(name = "审查结果")
|
||||
@ApiModelProperty(value = "审查结果", position = 45)
|
||||
private String auditResult;
|
||||
|
||||
/** 0:不活跃,1:活跃 */
|
||||
@Excel(name = "0:不活跃,1:活跃")
|
||||
@ApiModelProperty(value = "0:不活跃,1:活跃", position = 50)
|
||||
private String isActive;
|
||||
|
||||
/** 扩展字段c1 */
|
||||
@Excel(name = "扩展字段c1")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c1;
|
||||
|
||||
/** 扩展字段c2 */
|
||||
@Excel(name = "扩展字段c2")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c2;
|
||||
|
||||
/** 扩展字段c3 */
|
||||
@Excel(name = "扩展字段c3")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c3;
|
||||
|
||||
/** 扩展字段c4 */
|
||||
@Excel(name = "扩展字段c4")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c4;
|
||||
|
||||
/** 扩展字段c5 */
|
||||
@Excel(name = "扩展字段c5")
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String c5;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbCompanyVerification;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 人员审核相关Mapper接口
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
public interface TbCompanyVerificationMapper extends BaseMapper<TbCompanyVerification> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbVerificationUserDetails;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 人员审核详情Mapper接口
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
public interface TbVerificationUserDetailsMapper extends BaseMapper<TbVerificationUserDetails> {
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbCompanyVerification;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 人员审核相关Service接口
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
public interface ITbCompanyVerificationService extends IService<TbCompanyVerification>
|
||||
{
|
||||
/**
|
||||
* 查询人员审核相关
|
||||
*
|
||||
* @param id 人员审核相关主键
|
||||
* @return 人员审核相关
|
||||
*/
|
||||
public TbCompanyVerification selectTbCompanyVerificationById(Long id);
|
||||
|
||||
/**
|
||||
* 查询人员审核相关列表
|
||||
*
|
||||
* @param tbCompanyVerification 人员审核相关
|
||||
* @return 人员审核相关集合
|
||||
*/
|
||||
public List<TbCompanyVerification> selectTbCompanyVerificationList(TbCompanyVerification tbCompanyVerification);
|
||||
|
||||
/**
|
||||
* 新增人员审核相关
|
||||
*
|
||||
* @param tbCompanyVerification 人员审核相关
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTbCompanyVerification(TbCompanyVerification tbCompanyVerification);
|
||||
|
||||
/**
|
||||
* 修改人员审核相关
|
||||
*
|
||||
* @param tbCompanyVerification 人员审核相关
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbCompanyVerification(TbCompanyVerification tbCompanyVerification);
|
||||
|
||||
/**
|
||||
* 批量删除人员审核相关
|
||||
*
|
||||
* @param ids 需要删除的人员审核相关主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean deleteTbCompanyVerificationByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除人员审核相关信息
|
||||
*
|
||||
* @param id 人员审核相关主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTbCompanyVerificationById(Long id);
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbVerificationUserDetails;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 人员审核详情Service接口
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
public interface ITbVerificationUserDetailsService extends IService<TbVerificationUserDetails> {
|
||||
|
||||
/**
|
||||
* 修改人员审核详情
|
||||
*
|
||||
* @param tbVerificationUserDetails 人员审核详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTbVerificationUserDetails(TbVerificationUserDetails tbVerificationUserDetails);
|
||||
|
||||
}
|
@ -0,0 +1,152 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbCompanyVerification;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbVerificationUserDetails;
|
||||
import com.ruoyi.business.anHuiEnterprise.mapper.TbCompanyVerificationMapper;
|
||||
import com.ruoyi.business.anHuiEnterprise.mapper.TbVerificationUserDetailsMapper;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ruoyi.business.anHuiEnterprise.service.ITbCompanyVerificationService;
|
||||
|
||||
/**
|
||||
* 人员审核相关Service业务层处理
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class TbCompanyVerificationServiceImpl extends ServiceImpl<TbCompanyVerificationMapper, TbCompanyVerification> implements ITbCompanyVerificationService {
|
||||
|
||||
private final TbCompanyVerificationMapper tbCompanyVerificationMapper;
|
||||
private final TbVerificationUserDetailsMapper tbVerificationUserDetailsMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询人员审核相关
|
||||
*
|
||||
* @param id 人员审核相关主键
|
||||
* @return 人员审核相关
|
||||
*/
|
||||
@Override
|
||||
public TbCompanyVerification selectTbCompanyVerificationById(Long id) {
|
||||
|
||||
TbCompanyVerification tbCompanyVerification = this.getById(id);
|
||||
QueryWrapper<TbVerificationUserDetails> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(StringUtils.camelToUnderline(TbVerificationUserDetails.Fields.verificationType),tbCompanyVerification.getVerificationType());
|
||||
wrapper.eq(StringUtils.camelToUnderline(TbVerificationUserDetails.Fields.batchId),tbCompanyVerification.getBatchId());
|
||||
wrapper.eq(StringUtils.camelToUnderline(TbVerificationUserDetails.Fields.companyId),tbCompanyVerification.getCompanyId());
|
||||
List<TbVerificationUserDetails> tbVerificationUserDetails = tbVerificationUserDetailsMapper.selectList(wrapper);
|
||||
if(tbVerificationUserDetails!=null&&tbVerificationUserDetails.size()>0){
|
||||
List<TbVerificationUserDetails> auditResultTrue = tbVerificationUserDetails.stream().filter(details -> details.getAuditResult().equals("0")).collect(Collectors.toList());
|
||||
List<TbVerificationUserDetails> auditResultFalse = tbVerificationUserDetails.stream().filter(details -> details.getAuditResult().equals("1")).collect(Collectors.toList());
|
||||
tbCompanyVerification.setDetailsByAuditResultTrue(auditResultTrue);
|
||||
tbCompanyVerification.setDetailsByAuditResultFalse(auditResultFalse);
|
||||
}
|
||||
tbCompanyVerification.setDetails(tbVerificationUserDetails);
|
||||
return tbCompanyVerification;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员审核相关列表
|
||||
*
|
||||
* @param tbCompanyVerification 人员审核相关
|
||||
* @return 人员审核相关
|
||||
*/
|
||||
@Override
|
||||
public List<TbCompanyVerification> selectTbCompanyVerificationList(TbCompanyVerification tbCompanyVerification) {
|
||||
QueryWrapper<TbCompanyVerification> tbCompanyVerificationQueryWrapper = new QueryWrapper<>();
|
||||
tbCompanyVerificationQueryWrapper.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.isDel),"1");
|
||||
tbCompanyVerificationQueryWrapper.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.auditState),"0");
|
||||
Optional.ofNullable(tbCompanyVerification.getVerificationType())
|
||||
.ifPresent(verificationType->{
|
||||
tbCompanyVerificationQueryWrapper.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.verificationType),verificationType);
|
||||
});
|
||||
Optional.ofNullable(tbCompanyVerification.getReadState())
|
||||
.ifPresent(r->{
|
||||
tbCompanyVerificationQueryWrapper.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.readState),r);
|
||||
});
|
||||
if(tbCompanyVerification.getBeginTime()!=null&&tbCompanyVerification.getEndTime()!=null) {
|
||||
// Optional.ofNullable(tbCompanyVerification.getBeginTime())
|
||||
// .ifPresent(beginTime -> {
|
||||
// tbCompanyVerificationQueryWrapper.gt("update_time", beginTime);
|
||||
// });
|
||||
// Optional.ofNullable(tbCompanyVerification.getEndTime())
|
||||
// .ifPresent(endTime -> {
|
||||
// tbCompanyVerificationQueryWrapper.le("update_time", endTime);
|
||||
// });
|
||||
tbCompanyVerificationQueryWrapper.between("update_time",tbCompanyVerification.getBeginTime(),tbCompanyVerification.getEndTime());
|
||||
}
|
||||
return tbCompanyVerificationMapper.selectList(tbCompanyVerificationQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员审核相关
|
||||
*
|
||||
* @param tbCompanyVerification 人员审核相关
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTbCompanyVerification(TbCompanyVerification tbCompanyVerification) {
|
||||
tbCompanyVerification.setCreateTime(DateUtils.getNowDate());
|
||||
return tbCompanyVerificationMapper.insert(tbCompanyVerification);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员审核相关
|
||||
*
|
||||
* @param tbCompanyVerification 人员审核相关
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTbCompanyVerification(TbCompanyVerification tbCompanyVerification)
|
||||
{
|
||||
tbCompanyVerification.setAuditState("0");
|
||||
tbCompanyVerification.setUpdateTime(DateUtils.getNowDate());
|
||||
return tbCompanyVerificationMapper.updateById(tbCompanyVerification);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除人员审核相关
|
||||
*
|
||||
* @param ids 需要删除的人员审核相关主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteTbCompanyVerificationByIds(Long[] ids) {
|
||||
|
||||
List<Long> collect = Arrays.stream(ids).collect(Collectors.toList());
|
||||
|
||||
for (Long aLong : collect) {
|
||||
UpdateWrapper<TbCompanyVerification> updateWrapper =new UpdateWrapper<>();
|
||||
updateWrapper.set(StringUtils.camelToUnderline(TbCompanyVerification.Fields.isDel),"0");
|
||||
updateWrapper.eq(StringUtils.camelToUnderline(TbCompanyVerification.Fields.id),aLong);
|
||||
this.update(updateWrapper);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除人员审核相关信息
|
||||
*
|
||||
* @param id 人员审核相关主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTbCompanyVerificationById(Long id) {
|
||||
return tbCompanyVerificationMapper.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.ruoyi.business.anHuiEnterprise.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbCompanyVerification;
|
||||
import com.ruoyi.business.anHuiEnterprise.domain.TbVerificationUserDetails;
|
||||
import com.ruoyi.business.anHuiEnterprise.mapper.TbCompanyVerificationMapper;
|
||||
import com.ruoyi.business.anHuiEnterprise.mapper.TbVerificationUserDetailsMapper;
|
||||
import com.ruoyi.business.companyInformationReporting.mapper.TbCompanyInformationReportingMapper;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ruoyi.business.anHuiEnterprise.service.ITbVerificationUserDetailsService;
|
||||
|
||||
/**
|
||||
* 人员审核详情Service业务层处理
|
||||
*
|
||||
* @author 张二富
|
||||
* @date 2024-07-03
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class TbVerificationUserDetailsServiceImpl extends ServiceImpl<TbVerificationUserDetailsMapper, TbVerificationUserDetails> implements ITbVerificationUserDetailsService {
|
||||
|
||||
private final TbCompanyVerificationMapper tbCompanyVerificationMapper;
|
||||
private final TbVerificationUserDetailsMapper tbVerificationUserDetailsMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改人员审核详情
|
||||
*
|
||||
* @param tbVerificationUserDetails 人员审核详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTbVerificationUserDetails(TbVerificationUserDetails tbVerificationUserDetails)
|
||||
{
|
||||
tbVerificationUserDetails.setUpdateTime(DateUtils.getNowDate());
|
||||
return tbVerificationUserDetailsMapper.updateById(tbVerificationUserDetails);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?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.ruoyi.business.anHuiEnterprise.mapper.TbCompanyVerificationMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?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.ruoyi.business.anHuiEnterprise.mapper.TbVerificationUserDetailsMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue