diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java index cec5006..879bcc6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java @@ -4,6 +4,10 @@ import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -27,6 +31,7 @@ import com.ruoyi.framework.config.ServerConfig; * @author ruoyi */ @RestController +@Api(tags = "通用工具") @RequestMapping("/common") public class CommonController { @@ -73,6 +78,8 @@ public class CommonController * 通用上传请求(单个) */ @PostMapping("/upload") + @ApiOperation("通用上传请求(单个)") + @ApiImplicitParam(name = "file", value = "文件", required = true) public AjaxResult uploadFile(MultipartFile file) throws Exception { try diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index e4a9b6b..f207782 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,7 +6,10 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://120.195.33.173:55306/nbzhpc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# url: jdbc:mysql://120.195.33.173:55306/nbzhpc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: root +# password: '!QAZ1qaz' + url: jdbc:mysql://1.94.45.26:10048/nbzhpc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: '!QAZ1qaz' # 从库数据源 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 97e2929..fe4eb9f 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -9,7 +9,7 @@ ruoyi: # 实例演示开关 demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/ruoyi/uploadPath + profile: /home/project/nbzhpc/pic # 获取ip地址开关 addressEnabled: false # 验证码类型 math 数组计算 char 字符验证 diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java index 7e3033c..cfa44fd 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java @@ -45,7 +45,7 @@ public class BaseEntity implements Serializable /** 更新时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @TableField(exist = false) +// @TableField(exist = false) @ApiModelProperty(hidden = true) private Date updateTime; diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbCompanyVerificationController.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbCompanyVerificationController.java new file mode 100644 index 0000000..ec36a5d --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbCompanyVerificationController.java @@ -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 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", 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 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", 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 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 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)); + } +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbVerificationUserDetailsController.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbVerificationUserDetailsController.java new file mode 100644 index 0000000..e7f819a --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/controller/TbVerificationUserDetailsController.java @@ -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 { + +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/domain/TbCompanyVerification.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/domain/TbCompanyVerification.java new file mode 100644 index 0000000..1849877 --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/domain/TbCompanyVerification.java @@ -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 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 detailsByAuditResultTrue; + + /** 审核结果异常列表 */ + @TableField(exist = false) + @ApiModelProperty(value = "审核结果正常列表", position = 95) + private List 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; +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/domain/TbVerificationUserDetails.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/domain/TbVerificationUserDetails.java new file mode 100644 index 0000000..e470b70 --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/domain/TbVerificationUserDetails.java @@ -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; +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/mapper/TbCompanyVerificationMapper.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/mapper/TbCompanyVerificationMapper.java new file mode 100644 index 0000000..93b957c --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/mapper/TbCompanyVerificationMapper.java @@ -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 { + +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/mapper/TbVerificationUserDetailsMapper.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/mapper/TbVerificationUserDetailsMapper.java new file mode 100644 index 0000000..d7f2239 --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/mapper/TbVerificationUserDetailsMapper.java @@ -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 { + +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/ITbCompanyVerificationService.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/ITbCompanyVerificationService.java new file mode 100644 index 0000000..5348794 --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/ITbCompanyVerificationService.java @@ -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 +{ + /** + * 查询人员审核相关 + * + * @param id 人员审核相关主键 + * @return 人员审核相关 + */ + public TbCompanyVerification selectTbCompanyVerificationById(Long id); + + /** + * 查询人员审核相关列表 + * + * @param tbCompanyVerification 人员审核相关 + * @return 人员审核相关集合 + */ + public List 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); +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/ITbVerificationUserDetailsService.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/ITbVerificationUserDetailsService.java new file mode 100644 index 0000000..68e2c8e --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/ITbVerificationUserDetailsService.java @@ -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 { + + /** + * 修改人员审核详情 + * + * @param tbVerificationUserDetails 人员审核详情 + * @return 结果 + */ + public int updateTbVerificationUserDetails(TbVerificationUserDetails tbVerificationUserDetails); + +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/impl/TbCompanyVerificationServiceImpl.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/impl/TbCompanyVerificationServiceImpl.java new file mode 100644 index 0000000..61635ee --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/impl/TbCompanyVerificationServiceImpl.java @@ -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 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 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 = tbVerificationUserDetailsMapper.selectList(wrapper); + if(tbVerificationUserDetails!=null&&tbVerificationUserDetails.size()>0){ + List auditResultTrue = tbVerificationUserDetails.stream().filter(details -> details.getAuditResult().equals("0")).collect(Collectors.toList()); + List 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 selectTbCompanyVerificationList(TbCompanyVerification tbCompanyVerification) { + QueryWrapper 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 collect = Arrays.stream(ids).collect(Collectors.toList()); + + for (Long aLong : collect) { + UpdateWrapper 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); + } +} diff --git a/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/impl/TbVerificationUserDetailsServiceImpl.java b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/impl/TbVerificationUserDetailsServiceImpl.java new file mode 100644 index 0000000..dd56efd --- /dev/null +++ b/ruoyi-safecompany/src/main/java/com/ruoyi/business/anHuiEnterprise/service/impl/TbVerificationUserDetailsServiceImpl.java @@ -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 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); + + } + + +} diff --git a/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyInformationReportingDetailsMapper.xml b/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyInformationReportingDetailsMapper.xml index 96a9509..fe91c17 100644 --- a/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyInformationReportingDetailsMapper.xml +++ b/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyInformationReportingDetailsMapper.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyInformationReportingMapper.xml b/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyInformationReportingMapper.xml index bb49c8b..b8756f6 100644 --- a/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyInformationReportingMapper.xml +++ b/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyInformationReportingMapper.xml @@ -2,6 +2,6 @@ - + \ No newline at end of file diff --git a/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyVerificationMapper.xml b/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyVerificationMapper.xml new file mode 100644 index 0000000..948ec03 --- /dev/null +++ b/ruoyi-safecompany/src/main/resources/mapper/system/TbCompanyVerificationMapper.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/ruoyi-safecompany/src/main/resources/mapper/system/TbVerificationUserDetailsMapper.xml b/ruoyi-safecompany/src/main/resources/mapper/system/TbVerificationUserDetailsMapper.xml new file mode 100644 index 0000000..fb76034 --- /dev/null +++ b/ruoyi-safecompany/src/main/resources/mapper/system/TbVerificationUserDetailsMapper.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file