员工申请加入机构流程

This commit is contained in:
1378012178@qq.com 2025-09-09 16:37:21 +08:00
parent 5200d5cc8e
commit c7b3a7d076
30 changed files with 1155 additions and 91 deletions

View File

@ -1,39 +1,22 @@
package com.nu.modules.bizEmployeesInfo.controller;
package com.nu.modules.employeesInfo.controller;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.util.oConvertUtils;
import com.nu.modules.bizEmployeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.bizEmployeesInfo.service.IBizEmployeesInfoService;
import com.nu.modules.employeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.employeesInfo.service.IBizEmployeesInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;

View File

@ -1,39 +1,22 @@
package com.nu.modules.bizEmployeesInfo.controller;
package com.nu.modules.employeesInfo.controller;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.util.oConvertUtils;
import com.nu.modules.bizEmployeesInfo.entity.NuBizEmployeesServcieTags;
import com.nu.modules.bizEmployeesInfo.service.INuBizEmployeesServcieTagsService;
import com.nu.modules.employeesInfo.entity.NuBizEmployeesServcieTags;
import com.nu.modules.employeesInfo.service.INuBizEmployeesServcieTagsService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
@ -52,7 +35,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
public class NuBizEmployeesServcieTagsController extends JeecgController<NuBizEmployeesServcieTags, INuBizEmployeesServcieTagsService> {
@Autowired
private INuBizEmployeesServcieTagsService nuBizEmployeesServcieTagsService;
/**
* 分页列表查询
*
@ -74,7 +57,7 @@ public class NuBizEmployeesServcieTagsController extends JeecgController<NuBizEm
IPage<NuBizEmployeesServcieTags> pageList = nuBizEmployeesServcieTagsService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -89,7 +72,7 @@ public class NuBizEmployeesServcieTagsController extends JeecgController<NuBizEm
nuBizEmployeesServcieTagsService.save(nuBizEmployeesServcieTags);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -104,7 +87,7 @@ public class NuBizEmployeesServcieTagsController extends JeecgController<NuBizEm
nuBizEmployeesServcieTagsService.updateById(nuBizEmployeesServcieTags);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*

View File

@ -1,15 +1,10 @@
package com.nu.modules.bizEmployeesInfo.entity;
package com.nu.modules.employeesInfo.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
@ -44,7 +39,6 @@ public class BizEmployeesInfo implements Serializable {
private java.lang.String name;
/**性别*/
@Excel(name = "性别", width = 15, dicCode = "sex")
@Dict(dicCode = "sex")
@ApiModelProperty(value = "性别")
private java.lang.String sex;
/**民族*/
@ -70,7 +64,6 @@ public class BizEmployeesInfo implements Serializable {
private java.util.Date entryTime;
/**岗位级别*/
@Excel(name = "岗位级别", width = 15, dicCode = "post_level")
@Dict(dicCode = "post_level")
@ApiModelProperty(value = "岗位级别")
private java.lang.String postLevel;
/**出生日期*/
@ -81,12 +74,10 @@ public class BizEmployeesInfo implements Serializable {
private java.util.Date dateOfBirth;
/**婚否*/
@Excel(name = "婚否", width = 15, dicCode = "married_or_not")
@Dict(dicCode = "married_or_not")
@ApiModelProperty(value = "婚否")
private java.lang.String marriedOrNot;
/**工资*/
@Excel(name = "工资", width = 15, dicCode = "wages")
@Dict(dicCode = "wages")
@ApiModelProperty(value = "工资")
private java.lang.String wages;
/**身高*/
@ -103,12 +94,10 @@ public class BizEmployeesInfo implements Serializable {
private java.lang.String address;
/**是否吸烟*/
@Excel(name = "是否吸烟", width = 15, dicCode = "is_smoking")
@Dict(dicCode = "is_smoking")
@ApiModelProperty(value = "是否吸烟")
private java.lang.String isSmoking;
/**健康状况*/
@Excel(name = "健康状况", width = 15, dicCode = "health_status")
@Dict(dicCode = "health_status")
@ApiModelProperty(value = "健康状况")
private java.lang.String healthStatus;
/**户籍所在地*/
@ -117,7 +106,6 @@ public class BizEmployeesInfo implements Serializable {
private java.lang.String houseAddress;
/**政治面貌*/
@Excel(name = "政治面貌", width = 15, dicCode = "political_appearance")
@Dict(dicCode = "political_appearance")
@ApiModelProperty(value = "政治面貌")
private java.lang.String politicalAppearance;
/**紧急联系人*/
@ -134,7 +122,6 @@ public class BizEmployeesInfo implements Serializable {
private java.lang.String emergencyRelationship;
/**户口性质*/
@Excel(name = "户口性质", width = 15, dicCode = "hukou_nature")
@Dict(dicCode = "hukou_nature")
@ApiModelProperty(value = "户口性质")
private java.lang.String hukouNature;
/**备注*/

View File

@ -1,20 +1,14 @@
package com.nu.modules.bizEmployeesInfo.entity;
package com.nu.modules.employeesInfo.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;

View File

@ -1,9 +1,6 @@
package com.nu.modules.bizEmployeesInfo.mapper;
package com.nu.modules.employeesInfo.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nu.modules.bizEmployeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.employeesInfo.entity.BizEmployeesInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**

View File

@ -1,9 +1,6 @@
package com.nu.modules.bizEmployeesInfo.mapper;
package com.nu.modules.employeesInfo.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nu.modules.bizEmployeesInfo.entity.NuBizEmployeesServcieTags;
import com.nu.modules.employeesInfo.entity.NuBizEmployeesServcieTags;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**

View File

@ -1,6 +1,6 @@
package com.nu.modules.bizEmployeesInfo.service;
package com.nu.modules.employeesInfo.service;
import com.nu.modules.bizEmployeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.employeesInfo.entity.BizEmployeesInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**

View File

@ -1,6 +1,6 @@
package com.nu.modules.bizEmployeesInfo.service;
package com.nu.modules.employeesInfo.service;
import com.nu.modules.bizEmployeesInfo.entity.NuBizEmployeesServcieTags;
import com.nu.modules.employeesInfo.entity.NuBizEmployeesServcieTags;
import com.baomidou.mybatisplus.extension.service.IService;
/**

View File

@ -1,8 +1,8 @@
package com.nu.modules.bizEmployeesInfo.service.impl;
package com.nu.modules.employeesInfo.service.impl;
import com.nu.modules.bizEmployeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.bizEmployeesInfo.mapper.BizEmployeesInfoMapper;
import com.nu.modules.bizEmployeesInfo.service.IBizEmployeesInfoService;
import com.nu.modules.employeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.employeesInfo.mapper.BizEmployeesInfoMapper;
import com.nu.modules.employeesInfo.service.IBizEmployeesInfoService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

View File

@ -1,8 +1,8 @@
package com.nu.modules.bizEmployeesInfo.service.impl;
package com.nu.modules.employeesInfo.service.impl;
import com.nu.modules.bizEmployeesInfo.entity.NuBizEmployeesServcieTags;
import com.nu.modules.bizEmployeesInfo.mapper.NuBizEmployeesServcieTagsMapper;
import com.nu.modules.bizEmployeesInfo.service.INuBizEmployeesServcieTagsService;
import com.nu.modules.employeesInfo.entity.NuBizEmployeesServcieTags;
import com.nu.modules.employeesInfo.mapper.NuBizEmployeesServcieTagsMapper;
import com.nu.modules.employeesInfo.service.INuBizEmployeesServcieTagsService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

View File

@ -0,0 +1,222 @@
package com.nu.modules.employeesapply.controller;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nu.dto.EmployeesStatusMQDto;
import com.nu.modules.employeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.employeesInfo.service.IBizEmployeesInfoService;
import com.nu.modules.employeesapply.entity.EmployeesApply;
import com.nu.modules.employeesapply.service.IEmployeesApplyService;
import com.nu.utils.RabbitMQUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @Description: 员工申请
* @Author: jeecg-boot
* @Date: 2025-09-05
* @Version: V1.0
*/
@Api(tags = "员工申请")
@RestController
@RequestMapping("/admin/employeesapply")
@Slf4j
public class EmployeesApplyController extends JeecgController<EmployeesApply, IEmployeesApplyService> {
@Autowired
private IEmployeesApplyService employeesApplyService;
@Autowired
private RabbitMQUtil rabbitMQUtil;
@Autowired
private ISysBaseAPI sysBaseAPI;
@Autowired
private IBizEmployeesInfoService employeesInfoService;
/**
* 分页列表查询
*
* @param employeesApply
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "员工申请-分页列表查询")
@ApiOperation(value = "员工申请-分页列表查询", notes = "员工申请-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<EmployeesApply>> queryPageList(EmployeesApply employeesApply, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
// 自定义多选的查询规则为LIKE_WITH_OR
customeRuleMap.put("sex", QueryRuleEnum.LIKE_WITH_OR);
QueryWrapper<EmployeesApply> queryWrapper = QueryGenerator.initQueryWrapper(employeesApply, req.getParameterMap(), customeRuleMap);
Page<EmployeesApply> page = new Page<EmployeesApply>(pageNo, pageSize);
IPage<EmployeesApply> pageList = employeesApplyService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param employeesApply
* @return
*/
@AutoLog(value = "员工申请-添加")
@ApiOperation(value = "员工申请-添加", notes = "员工申请-添加")
@RequiresPermissions("employeesapply:nu_biz_employees_apply:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody EmployeesApply employeesApply) {
employeesApplyService.save(employeesApply);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param employeesApply
* @return
*/
@AutoLog(value = "员工申请-编辑")
@ApiOperation(value = "员工申请-编辑", notes = "员工申请-编辑")
@RequiresPermissions("employeesapply:nu_biz_employees_apply:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody EmployeesApply employeesApply) {
if (StringUtils.isNotBlank(employeesApply.getStatusVal())) {
//有值则说明是正在进行审批
if ("auditPass".equals(employeesApply.getStatusVal())) {
employeesApply.setStatus("2");
employeesApply.setAuditContent("审批通过");
}
if ("auditFaild".equals(employeesApply.getStatusVal())) {
employeesApply.setStatus("3");
}
}
employeesApplyService.updateById(employeesApply);
if (StringUtils.isNotBlank(employeesApply.getStatusVal())) {
Date entryTime = new Date();//入职时间
//通知管理平台修改此人申请结果
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
EmployeesStatusMQDto mqdto = new EmployeesStatusMQDto();
mqdto.setEmployeeId(employeesApply.getEmployeeId());//员工id
mqdto.setOrgCode(deptInfo.getString("code"));//机构编码
mqdto.setAuditStatus(employeesApply.getStatus());//审批状态
mqdto.setAuditContent(employeesApply.getAuditContent());//审批备注
if ("auditPass".equals(employeesApply.getStatusVal())) {
mqdto.setEntryTime(entryTime);//入驻时间
}
rabbitMQUtil.sendToExchange("hldy.employees", "hldy.employeesorg.auditstatus.sync", mqdto);
//审批通过后将员工信息插入到员工表中
if ("auditPass".equals(employeesApply.getStatusVal())) {
QueryWrapper<BizEmployeesInfo> qw = new QueryWrapper<>();
qw.eq("id", employeesApply.getEmployeeId());
BizEmployeesInfo one = employeesInfoService.getOne(qw);
if (one == null) {
BizEmployeesInfo employeesInfo = new BizEmployeesInfo();
BeanUtils.copyProperties(employeesApply, employeesInfo);
employeesInfo.setId(employeesApply.getEmployeeId());
employeesInfo.setSysOrgCode(deptInfo.getString("code"));
employeesInfo.setEntryTime(entryTime);
employeesInfoService.save(employeesInfo);
}
}
}
return Result.OK("编辑成功!");
}
// /**
// * 通过id删除
// *
// * @param id
// * @return
// */
// @AutoLog(value = "员工申请-通过id删除")
// @ApiOperation(value="员工申请-通过id删除", notes="员工申请-通过id删除")
// @RequiresPermissions("employeesapply:nu_biz_employees_apply:delete")
// @DeleteMapping(value = "/delete")
// public Result<String> delete(@RequestParam(name="id",required=true) String id) {
// employeesApplyService.removeById(id);
// return Result.OK("删除成功!");
// }
//
// /**
// * 批量删除
// *
// * @param ids
// * @return
// */
// @AutoLog(value = "员工申请-批量删除")
// @ApiOperation(value="员工申请-批量删除", notes="员工申请-批量删除")
// @RequiresPermissions("employeesapply:nu_biz_employees_apply:deleteBatch")
// @DeleteMapping(value = "/deleteBatch")
// public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
// this.employeesApplyService.removeByIds(Arrays.asList(ids.split(",")));
// return Result.OK("批量删除成功!");
// }
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "员工申请-通过id查询")
@ApiOperation(value = "员工申请-通过id查询", notes = "员工申请-通过id查询")
@GetMapping(value = "/queryById")
public Result<EmployeesApply> queryById(@RequestParam(name = "id", required = true) String id) {
EmployeesApply employeesApply = employeesApplyService.getById(id);
if (employeesApply == null) {
return Result.error("未找到对应数据");
}
return Result.OK(employeesApply);
}
/**
* 导出excel
*
* @param request
* @param employeesApply
*/
@RequiresPermissions("employeesapply:nu_biz_employees_apply:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, EmployeesApply employeesApply) {
return super.exportXls(request, employeesApply, EmployeesApply.class, "员工申请");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("employeesapply:nu_biz_employees_apply:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, EmployeesApply.class);
}
}

View File

@ -0,0 +1,196 @@
package com.nu.modules.employeesapply.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 员工申请
* @Author: jeecg-boot
* @Date: 2025-09-05
* @Version: V1.0
*/
@Data
@TableName("nu_biz_employees_apply")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_biz_employees_apply对象", description="员工申请")
public class EmployeesApply implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**员工id*/
@ApiModelProperty(value = "员工id")
private java.lang.String employeeId;
/**姓名*/
@Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名")
private java.lang.String name;
/**性别*/
@Excel(name = "性别", width = 15)
@ApiModelProperty(value = "性别")
// @Dict(dicCode = "sex")
private java.lang.String sex;
/**民族*/
@Excel(name = "民族", width = 15)
@ApiModelProperty(value = "民族")
private java.lang.String national;
/**身份证号*/
@Excel(name = "身份证号", width = 15)
@ApiModelProperty(value = "身份证号")
private java.lang.String idCard;
/**联系电话*/
@Excel(name = "联系电话", width = 15)
@ApiModelProperty(value = "联系电话")
private java.lang.String tel;
/**出生日期*/
@Excel(name = "出生日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "出生日期")
private java.util.Date dateOfBirth;
/**婚否*/
@Excel(name = "婚否", width = 15)
@ApiModelProperty(value = "婚否")
// @Dict(dicCode = "married_or_not")
private java.lang.String marriedOrNot;
/**身高*/
@Excel(name = "身高", width = 15)
@ApiModelProperty(value = "身高")
private java.lang.Double height;
/**体重*/
@Excel(name = "体重", width = 15)
@ApiModelProperty(value = "体重")
private java.lang.Double weight;
/**家庭住址*/
@Excel(name = "家庭住址", width = 15)
@ApiModelProperty(value = "家庭住址")
private java.lang.String address;
/**是否吸烟*/
@Excel(name = "是否吸烟", width = 15)
@ApiModelProperty(value = "是否吸烟")
// @Dict(dicCode = "is_smoking")
private java.lang.String isSmoking;
/**健康状况*/
@Excel(name = "健康状况", width = 15)
@ApiModelProperty(value = "健康状况")
// @Dict(dicCode = "health_status")
private java.lang.String healthStatus;
/**户籍所在地*/
@Excel(name = "户籍所在地", width = 15)
@ApiModelProperty(value = "户籍所在地")
private java.lang.String houseAddress;
/**政治面貌*/
@Excel(name = "政治面貌", width = 15)
@ApiModelProperty(value = "政治面貌")
// @Dict(dicCode = "political_appearance")
private java.lang.String politicalAppearance;
/**紧急联系人*/
@Excel(name = "紧急联系人", width = 15)
@ApiModelProperty(value = "紧急联系人")
private java.lang.String emergencyContact;
/**紧急联系人电话*/
@Excel(name = "紧急联系人电话", width = 15)
@ApiModelProperty(value = "紧急联系人电话")
private java.lang.String emergencyTel;
/**紧急联系人与本人关系*/
@Excel(name = "紧急联系人与本人关系", width = 15)
@ApiModelProperty(value = "紧急联系人与本人关系")
private java.lang.String emergencyRelationship;
/**户口性质*/
@Excel(name = "户口性质", width = 15)
@ApiModelProperty(value = "户口性质")
// @Dict(dicCode = "hukou_nature")
private java.lang.String hukouNature;
/**身份证正面*/
@Excel(name = "身份证正面", width = 15)
@ApiModelProperty(value = "身份证正面")
private java.lang.String idCardPositive;
/**身份证反面*/
@Excel(name = "身份证反面", width = 15)
@ApiModelProperty(value = "身份证反面")
private java.lang.String idCardNegative;
/**健康证正面*/
@Excel(name = "健康证正面", width = 15)
@ApiModelProperty(value = "健康证正面")
private java.lang.String healthCertificatePositive;
/**健康证反面*/
@Excel(name = "健康证反面", width = 15)
@ApiModelProperty(value = "健康证反面")
private java.lang.String healthCertificateNegative;
/**银行卡正面*/
@Excel(name = "银行卡正面", width = 15)
@ApiModelProperty(value = "银行卡正面")
private java.lang.String bankPositive;
/**银行卡反面*/
@Excel(name = "银行卡反面", width = 15)
@ApiModelProperty(value = "银行卡反面")
private java.lang.String bankNegative;
/**资质证*/
@Excel(name = "资质证", width = 15)
@ApiModelProperty(value = "资质证")
private java.lang.String qualification;
/**无犯罪证明*/
@Excel(name = "无犯罪证明", width = 15)
@ApiModelProperty(value = "无犯罪证明")
private java.lang.String noCrimeCertificate;
/**区域*/
@Excel(name = "区域", width = 15)
@ApiModelProperty(value = "区域")
private java.lang.String regional;
/**是否删除 0未删除 1删除*/
@Excel(name = "是否删除 0未删除 1删除", width = 15)
@ApiModelProperty(value = "是否删除 0未删除 1删除")
@TableLogic
private java.lang.String delFlag;
/**申请日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "申请日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**申请状态 1申请中 2通过 3驳回*/
@Excel(name = "申请状态", width = 15)
@ApiModelProperty(value = "申请状态")
@Dict(dicCode = "employees_audit_status")
private java.lang.String status;
/**审核备注*/
@Excel(name = "审核备注", width = 15)
@ApiModelProperty(value = "审核备注")
private java.lang.String auditContent;
/**是否历史数据*/
@Excel(name = "是否历史数据", width = 15)
@ApiModelProperty(value = "是否历史数据")
private java.lang.String izHistory;
/**
* 审批字符串 有值时说明是走的审批
* auditPass 审批通过
* auditFaild 审批不同过
*/
@TableField(exist = false)
private String statusVal;
}

View File

@ -0,0 +1,17 @@
package com.nu.modules.employeesapply.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nu.modules.employeesapply.entity.EmployeesApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 员工申请
* @Author: jeecg-boot
* @Date: 2025-09-05
* @Version: V1.0
*/
public interface EmployeesApplyMapper extends BaseMapper<EmployeesApply> {
}

View File

@ -0,0 +1,5 @@
<?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.nu.modules.employeesapply.mapper.EmployeesApplyMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package com.nu.modules.employeesapply.service;
import com.nu.modules.employeesapply.entity.EmployeesApply;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 员工申请
* @Author: jeecg-boot
* @Date: 2025-09-05
* @Version: V1.0
*/
public interface IEmployeesApplyService extends IService<EmployeesApply> {
}

View File

@ -0,0 +1,19 @@
package com.nu.modules.employeesapply.service.impl;
import com.nu.modules.employeesapply.entity.EmployeesApply;
import com.nu.modules.employeesapply.mapper.EmployeesApplyMapper;
import com.nu.modules.employeesapply.service.IEmployeesApplyService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 员工申请
* @Author: jeecg-boot
* @Date: 2025-09-05
* @Version: V1.0
*/
@Service
public class EmployeesApplyServiceImpl extends ServiceImpl<EmployeesApplyMapper, EmployeesApply> implements IEmployeesApplyService {
}

View File

@ -0,0 +1,164 @@
package com.nu.modules.employessadvisiory.controller;
import java.util.Arrays;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import com.nu.modules.employessadvisiory.entity.NuEmployeesAdvisoryInfo;
import com.nu.modules.employessadvisiory.service.INuEmployeesAdvisoryInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: 员工咨询信息
* @Author: jeecg-boot
* @Date: 2025-06-09
* @Version: V1.0
*/
@Api(tags="员工咨询信息")
@RestController
@RequestMapping("/admin/employeesAdvisoryInfo")
@Slf4j
public class NuEmployeesAdvisoryInfoController extends JeecgController<NuEmployeesAdvisoryInfo, INuEmployeesAdvisoryInfoService> {
@Autowired
private INuEmployeesAdvisoryInfoService nuEmployeesAdvisoryInfoService;
/**
* 分页列表查询
*
* @param nuEmployeesAdvisoryInfo
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "员工咨询信息-分页列表查询")
@ApiOperation(value="员工咨询信息-分页列表查询", notes="员工咨询信息-分页列表查询")
@GetMapping(value = "/list")
@DS("ope")
public Result<IPage<NuEmployeesAdvisoryInfo>> queryPageList(NuEmployeesAdvisoryInfo nuEmployeesAdvisoryInfo,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<NuEmployeesAdvisoryInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuEmployeesAdvisoryInfo, req.getParameterMap());
Page<NuEmployeesAdvisoryInfo> page = new Page<NuEmployeesAdvisoryInfo>(pageNo, pageSize);
IPage<NuEmployeesAdvisoryInfo> pageList = nuEmployeesAdvisoryInfoService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param nuEmployeesAdvisoryInfo
* @return
*/
@AutoLog(value = "员工咨询信息-添加")
@ApiOperation(value="员工咨询信息-添加", notes="员工咨询信息-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody NuEmployeesAdvisoryInfo nuEmployeesAdvisoryInfo) {
nuEmployeesAdvisoryInfoService.save(nuEmployeesAdvisoryInfo);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param nuEmployeesAdvisoryInfo
* @return
*/
@AutoLog(value = "员工咨询信息-编辑")
@ApiOperation(value="员工咨询信息-编辑", notes="员工咨询信息-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody NuEmployeesAdvisoryInfo nuEmployeesAdvisoryInfo) {
nuEmployeesAdvisoryInfoService.updateById(nuEmployeesAdvisoryInfo);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "员工咨询信息-通过id删除")
@ApiOperation(value="员工咨询信息-通过id删除", notes="员工咨询信息-通过id删除")
@RequiresPermissions("nuEmployeesAdvisoryInfo:nu_employees_advisory_info:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
nuEmployeesAdvisoryInfoService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "员工咨询信息-批量删除")
@ApiOperation(value="员工咨询信息-批量删除", notes="员工咨询信息-批量删除")
@RequiresPermissions("nuEmployeesAdvisoryInfo:nu_employees_advisory_info:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.nuEmployeesAdvisoryInfoService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "员工咨询信息-通过id查询")
@ApiOperation(value="员工咨询信息-通过id查询", notes="员工咨询信息-通过id查询")
@GetMapping(value = "/queryById")
public Result<NuEmployeesAdvisoryInfo> queryById(@RequestParam(name="id",required=true) String id) {
NuEmployeesAdvisoryInfo nuEmployeesAdvisoryInfo = nuEmployeesAdvisoryInfoService.getById(id);
if(nuEmployeesAdvisoryInfo==null) {
return Result.error("未找到对应数据");
}
return Result.OK(nuEmployeesAdvisoryInfo);
}
/**
* 导出excel
*
* @param request
* @param nuEmployeesAdvisoryInfo
*/
@RequiresPermissions("nuEmployeesAdvisoryInfo:nu_employees_advisory_info:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, NuEmployeesAdvisoryInfo nuEmployeesAdvisoryInfo) {
return super.exportXls(request, nuEmployeesAdvisoryInfo, NuEmployeesAdvisoryInfo.class, "员工咨询信息");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("nuEmployeesAdvisoryInfo:nu_employees_advisory_info:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, NuEmployeesAdvisoryInfo.class);
}
}

View File

@ -0,0 +1,195 @@
package com.nu.modules.employessadvisiory.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 员工咨询信息
* @Author: jeecg-boot
* @Date: 2025-06-09
* @Version: V1.0
*/
@Data
@TableName("nu_employees_advisory_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="nu_employees_advisory_info对象", description="员工咨询信息")
public class NuEmployeesAdvisoryInfo implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**微信id*/
@Excel(name = "微信id", width = 15)
@ApiModelProperty(value = "微信id")
private java.lang.String openId;
/**微信名称*/
@Excel(name = "微信名称", width = 15)
@ApiModelProperty(value = "微信名称")
private java.lang.String wechatName;
/**联系电话*/
@Excel(name = "联系电话", width = 15)
@ApiModelProperty(value = "联系电话")
private java.lang.String tel;
/**状态 1审核中 2审核完成 3驳回 */
@Excel(name = "状态 1审核中 2审核完成 3驳回 ", width = 15)
@ApiModelProperty(value = "状态 1审核中 2审核完成 3驳回 ")
@Dict(dicCode = "org_apply_status")
private java.lang.String status;
/**审核备注*/
@Excel(name = "审核备注", width = 15)
@ApiModelProperty(value = "审核备注")
private java.lang.String content;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**机构是否入驻0否 1是(是否入驻过)*/
@Excel(name = "机构是否入驻0否 1是(是否入驻过)", width = 15)
@ApiModelProperty(value = "机构是否入驻0否 1是(是否入驻过)")
private java.lang.String izEntry;
/**咨询人姓名*/
@Excel(name = "咨询人姓名", width = 15)
@ApiModelProperty(value = "咨询人姓名")
private java.lang.String name;
/**性别*/
@Excel(name = "性别", width = 15)
@ApiModelProperty(value = "性别")
private java.lang.String sex;
/**民族*/
@Excel(name = "民族", width = 15)
@ApiModelProperty(value = "民族")
private java.lang.String national;
/**出生日期*/
@Excel(name = "出生日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "出生日期")
private java.util.Date birthDate;
/**住址(身份证上)*/
@Excel(name = "住址(身份证上)", width = 15)
@ApiModelProperty(value = "住址(身份证上)")
private java.lang.String idCardAddress;
/**身份证号*/
@Excel(name = "身份证号", width = 15)
@ApiModelProperty(value = "身份证号")
private java.lang.String idCard;
/**签发机关*/
@Excel(name = "签发机关", width = 15)
@ApiModelProperty(value = "签发机关")
private java.lang.String issuingAuthority;
/**有效开始日期*/
@Excel(name = "有效开始日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "有效开始日期")
private java.util.Date startTime;
/**有效结束日期*/
@Excel(name = "有效结束日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "有效结束日期")
private java.util.Date endTime;
/**身份证正面*/
@Excel(name = "身份证正面", width = 15)
@ApiModelProperty(value = "身份证正面")
private java.lang.String cardZmPath;
/**身份证反面*/
@Excel(name = "身份证反面", width = 15)
@ApiModelProperty(value = "身份证反面")
private java.lang.String cardFmPath;
/**婚否0未婚 1已婚*/
@Excel(name = "婚否0未婚 1已婚", width = 15)
@ApiModelProperty(value = "婚否0未婚 1已婚")
private java.lang.String maritalStatus;
/**身高*/
@Excel(name = "身高", width = 15)
@ApiModelProperty(value = "身高")
private java.lang.String height;
/**体重*/
@Excel(name = "体重", width = 15)
@ApiModelProperty(value = "体重")
private java.lang.String weight;
/**健康状况0健康 1患病*/
@Excel(name = "健康状况0健康 1患病", width = 15)
@ApiModelProperty(value = "健康状况0健康 1患病")
private java.lang.String healthStatus;
/**政治面貌0共产党员 1民主党 2国民党 3无党派*/
@Excel(name = "政治面貌0共产党员 1民主党 2国民党 3无党派", width = 15)
@ApiModelProperty(value = "政治面貌0共产党员 1民主党 2国民党 3无党派")
private java.lang.String politicalAppearance;
/**紧急联系人姓名*/
@Excel(name = "紧急联系人姓名", width = 15)
@ApiModelProperty(value = "紧急联系人姓名")
private java.lang.String contactName;
/**紧急联系人电话*/
@Excel(name = "紧急联系人电话", width = 15)
@ApiModelProperty(value = "紧急联系人电话")
private java.lang.String contactTel;
/**紧急联系人与本人关系*/
@Excel(name = "紧急联系人与本人关系", width = 15)
@ApiModelProperty(value = "紧急联系人与本人关系")
private java.lang.String contactRelationship;
/**户口性质0农业 1非农业*/
@Excel(name = "户口性质0农业 1非农业", width = 15)
@ApiModelProperty(value = "户口性质0农业 1非农业")
private java.lang.String hukouType;
/**银行卡正面*/
@Excel(name = "银行卡正面", width = 15)
@ApiModelProperty(value = "银行卡正面")
private java.lang.String bankZmPath;
/**银行卡反面*/
@Excel(name = "银行卡反面", width = 15)
@ApiModelProperty(value = "银行卡反面")
private java.lang.String bankFmPath;
/**开户行*/
@Excel(name = "开户行", width = 15)
@ApiModelProperty(value = "开户行")
private java.lang.String openingBank;
/**银行卡号*/
@Excel(name = "银行卡号", width = 15)
@ApiModelProperty(value = "银行卡号")
private java.lang.String bankCard;
/**健康证正面*/
@Excel(name = "健康证正面", width = 15)
@ApiModelProperty(value = "健康证正面")
private java.lang.String healthZmPath;
/**健康证反面*/
@Excel(name = "健康证反面", width = 15)
@ApiModelProperty(value = "健康证反面")
private java.lang.String healthFmPath;
/**资质证(可多张)*/
@Excel(name = "资质证(可多张)", width = 15)
@ApiModelProperty(value = "资质证(可多张)")
private java.lang.String qualificationPath;
/**无犯罪正面*/
@Excel(name = "无犯罪正面", width = 15)
@ApiModelProperty(value = "无犯罪正面")
private java.lang.String noCrimeCertificate;
}

View File

@ -0,0 +1,14 @@
package com.nu.modules.employessadvisiory.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nu.modules.employessadvisiory.entity.NuEmployeesAdvisoryInfo;
/**
* @Description: 员工咨询信息
* @Author: jeecg-boot
* @Date: 2025-06-09
* @Version: V1.0
*/
public interface NuEmployeesAdvisoryInfoMapper extends BaseMapper<NuEmployeesAdvisoryInfo> {
}

View File

@ -0,0 +1,6 @@
<?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.nu.modules.employessadvisiory.mapper.NuEmployeesAdvisoryInfoMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package com.nu.modules.employessadvisiory.service;
import com.nu.modules.employessadvisiory.entity.NuEmployeesAdvisoryInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 员工咨询信息
* @Author: jeecg-boot
* @Date: 2025-06-09
* @Version: V1.0
*/
public interface INuEmployeesAdvisoryInfoService extends IService<NuEmployeesAdvisoryInfo> {
}

View File

@ -0,0 +1,18 @@
package com.nu.modules.employessadvisiory.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.modules.employessadvisiory.entity.NuEmployeesAdvisoryInfo;
import com.nu.modules.employessadvisiory.mapper.NuEmployeesAdvisoryInfoMapper;
import com.nu.modules.employessadvisiory.service.INuEmployeesAdvisoryInfoService;
import org.springframework.stereotype.Service;
/**
* @Description: 员工咨询信息
* @Author: jeecg-boot
* @Date: 2025-06-09
* @Version: V1.0
*/
@Service
public class NuEmployeesAdvisoryInfoServiceImpl extends ServiceImpl<NuEmployeesAdvisoryInfoMapper, NuEmployeesAdvisoryInfo> implements INuEmployeesAdvisoryInfoService {
}

View File

@ -7,8 +7,8 @@ import com.nu.modules.nuBizAdvisoryInfo.entity.NuBizAdvisoryInfo;
import com.nu.modules.nuBizAdvisoryInfo.mapper.NuBizAdvisoryInfoMapper;
import com.nu.modules.nuBizAdvisoryInfo.service.INuBizAdvisoryInfoService;
import com.nu.modules.nuBizAdvisoryInfo.service.ServerAdvisoryInfoService;
import com.nu.modules.bizEmployeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.bizEmployeesInfo.service.IBizEmployeesInfoService;
import com.nu.modules.employeesInfo.entity.BizEmployeesInfo;
import com.nu.modules.employeesInfo.service.IBizEmployeesInfoService;
import com.nu.modules.nuBizCustomerInfo.entity.NuBizCustomerInfo;
import com.nu.modules.nuBizCustomerInfo.service.INuBizCustomerInfoService;
import com.nu.utils.RabbitMQUtil;

View File

@ -0,0 +1,28 @@
package com.nu.mq.employees.exceptionhandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.AmqpRejectAndDontRequeueException;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.listener.api.RabbitListenerErrorHandler;
import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException;
import org.springframework.stereotype.Component;
@Slf4j
@Component("employeesMQErrorHandler")
public class EmployeesMQExceptionHandler implements RabbitListenerErrorHandler {
@Override
public Object handleError(Message message, org.springframework.messaging.Message<?> message1, ListenerExecutionFailedException e) {
log.error("MQ消息处理失败 | 消息体: {} | 异常原因: {}", new String(message.getBody()), e.getCause().getMessage());
// 根据异常类型选择处理策略
// if (isRetryable(e)) {
// // 可重试异常抛出异常触发重试
// throw e;
// } else {
// 不可恢复异常拒绝消息且不重新入队
throw new AmqpRejectAndDontRequeueException("消息处理失败且禁止重试", e);
// }
}
}

View File

@ -0,0 +1,28 @@
package com.nu.mq.employees.listener;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component("employeesAsyncDQNP")
public class DynamicQueueNameProvider {
@Autowired
private ISysBaseAPI sysBaseAPI;
public String getQueueName() {
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
String orgCode = deptInfo.getString("code");
if (StringUtils.isNotBlank(orgCode)) {
return orgCode + ".employees.apply";
} else {
return "";
}
}
public String getKeyName() {
return getQueueName();
}
}

View File

@ -0,0 +1,59 @@
package com.nu.mq.employees.listener;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.nu.dto.EmployeesApplyMQDto;
import com.nu.dto.SysConfigMQDto;
import com.nu.modules.employeesapply.entity.EmployeesApply;
import com.nu.modules.employeesapply.service.IEmployeesApplyService;
import com.nu.utils.RabbitMQUtil;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class EmployeesMQListener {
@Autowired
private RabbitMQUtil rabbitMQUtil;
@Autowired
private IEmployeesApplyService employeesApplyService;
/**
* direct直连 只发给我的
*
* @param dto
*/
@RabbitListener(
bindings = @QueueBinding(
value = @Queue(name = "#{employeesAsyncDQNP.getQueueName()}"),
exchange = @Exchange(name = "hldy.employees", type = ExchangeTypes.DIRECT),
key = "#{employeesAsyncDQNP.getKeyName()}"
),
errorHandler = "employeesMQErrorHandler"
)
public void handleEmployeeApply(EmployeesApplyMQDto dto) {
//将历史申请变更为历史状态
EmployeesApply hisdto = new EmployeesApply();
hisdto.setIzHistory("0");
UpdateWrapper<EmployeesApply> uw = new UpdateWrapper<>();
uw.eq("employee_id",dto.getEmployeeId());
employeesApplyService.update(hisdto,uw);
EmployeesApply employeesApply = new EmployeesApply();
BeanUtils.copyProperties(dto,employeesApply);
employeesApply.setEmployeeId(dto.getEmployeeId());
employeesApply.setId(dto.getId());
employeesApply.setStatus("1");
employeesApply.setDelFlag("0");
employeesApply.setIzHistory("1");
employeesApplyService.save(employeesApply);
}
}

View File

@ -0,0 +1,92 @@
package com.nu.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 员工申请
* @Author: jeecg-boot
* @Date: 2025-09-05
* @Version: V1.0
*/
@Data
public class EmployeesApplyMQDto implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
private String id;
/**open_id*/
private String openId;
/**员工id*/
private String employeeId;
/**姓名*/
private String name;
/**性别*/
private String sex;
/**民族*/
private String national;
/**身份证号*/
private String idCard;
/**联系电话*/
private String tel;
/**出生日期*/
private Date dateOfBirth;
/**婚否*/
private String marriedOrNot;
/**身高*/
private Double height;
/**体重*/
private Double weight;
/**家庭住址*/
private String address;
/**是否吸烟*/
private String isSmoking;
/**健康状况*/
private String healthStatus;
/**户籍所在地*/
private String houseAddress;
/**政治面貌*/
private String politicalAppearance;
/**紧急联系人*/
private String emergencyContact;
/**紧急联系人电话*/
private String emergencyTel;
/**紧急联系人与本人关系*/
private String emergencyRelationship;
/**户口性质*/
private String hukouNature;
/**身份证正面*/
private String idCardPositive;
/**身份证反面*/
private String idCardNegative;
/**健康证正面*/
private String healthCertificatePositive;
/**健康证反面*/
private String healthCertificateNegative;
/**银行卡正面*/
private String bankPositive;
/**银行卡反面*/
private String bankNegative;
/**资质证*/
private String qualification;
/**无犯罪证明*/
private String noCrimeCertificate;
/**区域*/
private String regional;
/**是否删除 0未删除 1删除*/
private String delFlag;
/**申请日期*/
private Date createTime;
/**更新人*/
private String updateBy;
/**更新日期*/
private Date updateTime;
/**申请状态 1申请中 2通过 3驳回*/
private String status;
/**审核备注*/
private String auditContent;
/**机构编码*/
private String orgCode;
}

View File

@ -0,0 +1,32 @@
package com.nu.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 员工状态
* @Author: jeecg-boot
* @Date: 2025-09-05
* @Version: V1.0
*/
@Data
public class EmployeesStatusMQDto implements Serializable {
private static final long serialVersionUID = 1L;
/**员工id*/
private String employeeId;
/**申请状态 1申请中 2通过 3驳回*/
private String auditStatus;
/**审核备注*/
private String auditContent;
/**是否在线 0在线 1不在线*/
private java.lang.String izOnline;
/**冻结状态 0未冻结 1冻结*/
private java.lang.String izFreeze;
/**机构编码*/
private String orgCode;
/**入职时间*/
private Date entryTime;
}