Commit 4d9abeb8 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.8' into MVP1.7.8

parents 52603ec0 9060388b
package com.yifu.cloud.plus.v1.yifu.archives.entity;
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.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
......@@ -8,6 +9,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
import java.util.Date;
/**
......@@ -75,7 +77,7 @@ public class EmployeeRegistrationPre extends BaseEntity {
private String dataSource;
@Schema(description = "预计收集时间")
private Date expectedCollectionTime;
private LocalDateTime expectedCollectionTime;
@Schema(description = "服务事项")
private String serverItem;
......@@ -98,5 +100,9 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema(description = "最新的客服名称")
private String customerUsernameNew;
@Schema(description = "拒绝入职原因")
@TableField(exist = false)
private String reason;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 入职待建档表
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@Data
@ColumnWidth(17)
public class EmployeeRegistrationPreExportVo implements Serializable {
@ExcelAttribute(name = "项目名称")
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String deptName;
@ExcelAttribute(name = "项目编码")
@Schema(description = "项目编码")
@ExcelProperty("项目编码")
private String deptNo;
@ExcelAttribute(name = "员工姓名")
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelAttribute(name = "身份证号")
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelAttribute(name = "手机号码")
@Schema(description = "手机号码")
@ExcelProperty("手机号码")
private String empPhone;
@ExcelAttribute(name = "入职日期", isDate = true)
@Schema(description = "入职日期")
@ExcelProperty("入职日期")
private Date joinLeaveDate;
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
@Schema(description = "员工类型")
@ExcelProperty("员工类型")
private String empNature;
@ExcelAttribute(name = "合同类型(字典值)", isDataId = true,dataType = ExcelAttributeConstants.PERSONNEL_TYPE)
@Schema(description = "合同类型(字典值)")
@ExcelProperty("合同类型")
private String contractType;
@ExcelAttribute(name = "数据来源")
@Schema(description = "数据来源")
@ExcelProperty("数据来源")
private String dataSource;
@ExcelAttribute(name = "前端客服")
@Schema(description = "前端客服")
@ExcelProperty("前端客服")
private String customerUsername;
@ExcelAttribute(name = "预计收集时间", isDate = true)
@Schema(description = "预计收集时间")
@ExcelProperty("预计收集时间")
private LocalDateTime expectedCollectionTime;
@ExcelAttribute(name = "状态")
@Schema(description = "状态")
@ExcelProperty("状态")
private String processStatus;
}
......@@ -45,12 +45,10 @@ public class EmployeeRegistrationPreSearchVo extends EmployeeRegistrationPre {
@TableField(exist = false)
private List<String> statusList;
@Schema(description = "项目权限数组")
@TableField(exist = false)
private List<String> deptNoList;
@Schema(description = "列表类型 1 待办 2监控")
private String type;
}
......@@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 确认接受vo
......@@ -42,4 +44,54 @@ public class EmployeeRegistrationPreVo implements Serializable {
private String fileTown;
@Schema(description = "员工姓名")
private String employeeName;
@Schema(description = "身份证号")
private String empIdcard;
@Schema(description = "手机号码")
private String empPhone;
@Schema(description = "就职岗位")
private String position;
@Schema(description = "入职日期")
private Date joinLeaveDate;
@Schema(description = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职,4已完成")
private String processStatus;
@Schema(description = "前端客服")
private String customerUsername;
@Schema(description = "前端客服登录名")
private String customerUserLoginname;
@Schema(description = "项目名称")
private String deptName;
@Schema(description = "项目编码")
private String deptNo;
@Schema(description = "项目id")
private String deptId;
@Schema(description = "数据来源")
private String dataSource;
@Schema(description = "预计收集时间")
private LocalDateTime expectedCollectionTime;
@Schema(description = "确认人")
private String confirmUser;
@Schema(description = "确认时间")
private Date confirmTime;
@Schema(description = "最新的客服名称")
private String customerUsernameNew;
}
......@@ -5,15 +5,19 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 入职待建档表
......@@ -29,6 +33,8 @@ public class EmployeeRegistrationPreController {
private final EmployeeRegistrationPreService employeeRegistrationPreService;
private final MenuUtil menuUtil;
/**
* 简单分页查询
* @param page 分页对象
......@@ -38,17 +44,9 @@ public class EmployeeRegistrationPreController {
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<EmployeeRegistrationPre>> getEmployeeRegistrationPrePage(Page<EmployeeRegistrationPre> page, EmployeeRegistrationPreSearchVo employeeRegistrationPre) {
return new R<>(employeeRegistrationPreService.getEmployeeRegistrationPrePage(page,employeeRegistrationPre));
}
/**
* 不分页查询
* @param employeeRegistrationPre 入职待建档表
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage" )
public R<List<EmployeeRegistrationPre>> getEmployeeRegistrationPreNoPage(@RequestBody EmployeeRegistrationPreSearchVo employeeRegistrationPre) {
return R.ok(employeeRegistrationPreService.noPageDiy(employeeRegistrationPre));
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, employeeRegistrationPre);
return new R<>(employeeRegistrationPreService.getEmployeeRegistrationPrePage(page,employeeRegistrationPre));
}
/**
......@@ -82,8 +80,8 @@ public class EmployeeRegistrationPreController {
@Operation(summary = "修改入职待建档表", description = "修改入职待建档表")
@SysLog("修改入职待建档表" )
@PostMapping("/updateById")
public R<Boolean> updateById(@RequestBody EmployeeRegistrationPre employeeRegistrationPre) {
return R.ok(employeeRegistrationPreService.updateById(employeeRegistrationPre));
public R updateById(@RequestBody EmployeeRegistrationPre employeeRegistrationPre) {
return employeeRegistrationPreService.updateRegistById(employeeRegistrationPre);
}
/**
......@@ -96,4 +94,17 @@ public class EmployeeRegistrationPreController {
public void export(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) {
employeeRegistrationPreService.listExport(response,searchVo);
}
/**
* @Author huyc
* @Description 新增入职待建档信息
* @Date 14:34 2025/3/14
* @Param
* @return
**/
@Inner
@PostMapping("/inner/saveRegistPreInfo")
public Boolean saveRegistPreInfo(@RequestBody EmployeeRegistrationPreVo preVo) {
return employeeRegistrationPreService.saveRegistPreInfo(preVo);
}
}
......@@ -4,9 +4,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 入职待建档表
*
......@@ -21,4 +25,16 @@ public interface EmployeeRegistrationPreMapper extends BaseMapper<EmployeeRegist
* @return
*/
IPage<EmployeeRegistrationPre> getEmployeeRegistrationPrePage(Page<EmployeeRegistrationPre> page, @Param("employeeRegistrationPre") EmployeeRegistrationPre employeeRegistrationPre);
/**
* 入职待建档表导出数量查询
* @param searchVo 导出查询vo
* @return
*/
long selectExportCount(@Param("EmployeeRegistrationPre") EmployeeRegistrationPreSearchVo searchVo);
/**
* 入职待建档表导出列表查询
* @param searchVo 导出查询vo
* @return
*/
List<EmployeeRegistrationPreExportVo> selectExportList(@Param("EmployeeRegistrationPre") EmployeeRegistrationPreSearchVo searchVo);
}
......@@ -5,9 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 入职待建档表
......@@ -23,7 +24,24 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
*/
IPage<EmployeeRegistrationPre> getEmployeeRegistrationPrePage(Page<EmployeeRegistrationPre> page, EmployeeRegistrationPreSearchVo employeeRegistrationPre);
/**
* 入职待建档表导出
* @param searchVo 入职待建档导出查询vo
* @return
*/
void listExport(HttpServletResponse response, EmployeeRegistrationPreSearchVo searchVo);
List<EmployeeRegistrationPre> noPageDiy(EmployeeRegistrationPreSearchVo searchVo);
/**
* 新增入职待建档信息
* @param preVo 新增入职待建档vo
* @return
*/
Boolean saveRegistPreInfo(EmployeeRegistrationPreVo preVo);
/**
* 拒绝入职
* @param employeeRegistrationPre 入职待建档表
* @return
*/
R updateRegistById(EmployeeRegistrationPre employeeRegistrationPre);
}
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainRegistListVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.*;
/**
* 入职待建档表
......@@ -48,6 +45,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Autowired
private ArchivesDaprUtil archivesDaprUtil;
@Autowired
private CspDaprUtils cspDaprUtils;
/**
* 入职待建档表简单分页查询
* @param employeeRegistrationPre 入职待建档表
......@@ -55,10 +55,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
*/
@Override
public IPage<EmployeeRegistrationPre> getEmployeeRegistrationPrePage(Page<EmployeeRegistrationPre> page, EmployeeRegistrationPreSearchVo employeeRegistrationPre){
//前端客服的所有项目权限赋值
//权限赋值
initSearchVo(employeeRegistrationPre);
//待办列表只查看未处理的数据
if (CommonConstants.ONE_STRING.equals(employeeRegistrationPre.getType())) {
if (Common.isEmpty(employeeRegistrationPre.getStatusList())
&& CommonConstants.ONE_STRING.equals(employeeRegistrationPre.getType())) {
employeeRegistrationPre.setStatusList(CommonConstants.processPreArchivesStatus);
}
return baseMapper.getEmployeeRegistrationPrePage(page,employeeRegistrationPre);
......@@ -73,36 +73,43 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
public void listExport(HttpServletResponse response, EmployeeRegistrationPreSearchVo searchVo){
String fileName = "入职待建档表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<EmployeeRegistrationPre> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
List<EmployeeRegistrationPreExportVo> list = new ArrayList<>();
//权限赋值
initSearchVo(searchVo);
if (Common.isEmpty(searchVo.getStatusList())
&& CommonConstants.ONE_STRING.equals(searchVo.getType())) {
searchVo.setStatusList(CommonConstants.processPreArchivesStatus);
}
long count = baseMapper.selectExportCount(searchVo);
try (ServletOutputStream out= response.getOutputStream();){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeRegistrationPre.class).build();
int index = 0;
ExcelUtil<EmployeeRegistrationPreExportVo> util = new ExcelUtil<>(EmployeeRegistrationPreExportVo.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
Set<String> exportFields = new HashSet<>(Arrays.asList("deptName", "deptNo", "employeeName", "empIdcard",
"empPhone", "joinLeaveDate", "empNature", "contractType", "dataSource", "customerUsername", "expectedCollectionTime", "processStatus"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeRegistrationPreExportVo.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(exportFields).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; ) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
ExcelUtil<EmployeeRegistrationPre> util = new ExcelUtil<>(EmployeeRegistrationPre.class);
for (EmployeeRegistrationPre vo:list){
util.convertEntity(vo,null,null,null);
}
}
list = baseMapper.selectExportList(searchVo);
if (Common.isNotNull(list)){
WriteSheet writeSheet = EasyExcel.writerSheet("入职待建档表"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)){
list.clear();
}
......@@ -114,57 +121,44 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if (Common.isNotNull(list)){
list.clear();
}
out.flush();
excelWriter.finish();
}catch (Exception e){
log.error("执行异常" ,e);
}finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("执行异常", e);
}
}
}
@Override
public List<EmployeeRegistrationPre> noPageDiy(EmployeeRegistrationPreSearchVo searchVo) {
LambdaQueryWrapper<EmployeeRegistrationPre> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(EmployeeRegistrationPre::getId,idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0){
wrapper.last(" limit "+ searchVo.getLimitStart() +","+ searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
}
private Long noPageCountDiy(EmployeeRegistrationPreSearchVo searchVo) {
LambdaQueryWrapper<EmployeeRegistrationPre> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(EmployeeRegistrationPre::getId,idList);
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(EmployeeRegistrationPreSearchVo entity){
LambdaQueryWrapper<EmployeeRegistrationPre> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(EmployeeRegistrationPre::getCreateTime, entity.getCreateTimes()[0])
.le(EmployeeRegistrationPre::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())){
wrapper.eq(EmployeeRegistrationPre::getCreateName,entity.getCreateName());
}
return wrapper;
}
@Override
public Boolean saveRegistPreInfo(EmployeeRegistrationPreVo preVo) {
EmployeeRegistrationPre pre = new EmployeeRegistrationPre();
BeanUtils.copyProperties(pre,preVo);
baseMapper.insert(pre);
return true;
}
@Override
public R updateRegistById(EmployeeRegistrationPre employeeRegistrationPre) {
EmployeeRegistrationPre updatePre = baseMapper.selectById(employeeRegistrationPre.getId());
if (Common.isEmpty(updatePre) || (updatePre.getProcessStatus().equals(CommonConstants.THREE_STRING)
|| updatePre.getProcessStatus().equals(CommonConstants.FOUR_STRING))) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
YifuUser user = SecurityUtils.getUser();
employeeRegistrationPre.setProcessStatus(CommonConstants.THREE_STRING);
baseMapper.updateById(employeeRegistrationPre);
//新增操作记录
EmployeeRegistrationUpdateVo receiveVo = new EmployeeRegistrationUpdateVo();
receiveVo.setEmployeeName(user.getNickname());
receiveVo.setEmpIdcard(updatePre.getEmpIdcard());
receiveVo.setReason(employeeRegistrationPre.getReason());
receiveVo.setDepeNo(employeeRegistrationPre.getDeptNo());
try {
//调用csp服务更新状态和新增操作记录
cspDaprUtils.updateRegistByPreInfo(receiveVo);
} catch (Exception e) {
log.error("调用csp服务更新数据异常", e);
}
return R.ok();
}
/**
* @Description: 获取前端客服的所有项目权限
......@@ -176,7 +170,12 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
if (!isSsc && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
if (isSsc || CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
searchVo.setAuthSql(null);
return;
}
if (Common.isNotNull(searchVo.getType()) && CommonConstants.ONE_STRING.equals(searchVo.getType())) {
searchVo.setAuthSql(null);
//获取项目信息
R<TSettleDomainRegistListVo> domainR = archivesDaprUtil.getAllDeptByCustomerLoginName(user.getUsername());
if (null != domainR && null != domainR.getData() && null != domainR.getData().getDeptNos()) {
......
......@@ -35,6 +35,22 @@
<result property="updateTime" column="update_time"/>
<result property="customerUsernameNew" column="customer_username_new"/>
</resultMap>
<resultMap id="employeeRegistrationPreExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo">
<result property="employeeName" column="employee_name"/>
<result property="empIdcard" column="emp_idcard"/>
<result property="empPhone" column="emp_phone"/>
<result property="joinLeaveDate" column="join_leave_date"/>
<result property="customerUsername" column="customer_username"/>
<result property="deptName" column="dept_name"/>
<result property="deptNo" column="dept_no"/>
<result property="empNature" column="emp_nature"/>
<result property="contractType" column="contract_type"/>
<result property="dataSource" column="data_source"/>
<result property="expectedCollectionTime" column="expected_collection_time"/>
<result property="processStatus" column="process_status"/>
</resultMap>
<sql id="Base_Column_List">
a.id,
a.employee_name,
......@@ -134,24 +150,16 @@
<if test="employeeRegistrationPre.confirmUser != null and employeeRegistrationPre.confirmUser.trim() != ''">
AND a.confirm_user = #{employeeRegistrationPre.confirmUser}
</if>
<if test="employeeRegistrationPre.confirmTime != null">
AND a.confirm_time = #{employeeRegistrationPre.confirmTime}
</if>
<if test="employeeRegistrationPre.createBy != null and employeeRegistrationPre.createBy.trim() != ''">
AND a.create_by = #{employeeRegistrationPre.createBy}
</if>
<if test="employeeRegistrationPre.createName != null and employeeRegistrationPre.createName.trim() != ''">
AND a.create_name = #{employeeRegistrationPre.createName}
</if>
<if test="employeeRegistrationPre.createTime != null">
AND a.create_time = #{employeeRegistrationPre.createTime}
</if>
<if test="employeeRegistrationPre.updateBy != null and employeeRegistrationPre.updateBy.trim() != ''">
AND a.update_by = #{employeeRegistrationPre.updateBy}
</if>
<if test="employeeRegistrationPre.updateTime != null">
AND a.update_time = #{employeeRegistrationPre.updateTime}
</if>
<if test="employeeRegistrationPre.authSql != null and employeeRegistrationPre.authSql.trim() != ''">
${employeeRegistrationPre.authSql}
</if>
<if test="employeeRegistrationPre.deptNoList != null and employeeRegistrationPre.deptNoList.size > 0">
AND a.dept_no in
<foreach item="idStr" index="index" collection="employeeRegistrationPre.deptNoList" open="(" separator=","
close=")">
#{idStr}
</foreach>
</if>
</if>
</sql>
<!--employeeRegistrationPre简单分页查询-->
......@@ -164,4 +172,41 @@
<include refid="employeeRegistrationPre_where"/>
</where>
</select>
<select id="selectExportCount" resultType="java.lang.Long">
SELECT
count(1)
FROM employee_registration_pre a
<where>
1=1
<include refid="employeeRegistrationPre_where"/>
</where>
</select>
<!--employeeRegistrationPre导出查询-->
<select id="selectExportList" resultMap="employeeRegistrationPreExportMap">
SELECT
a.employee_name,
a.emp_idcard,
a.emp_phone,
a.join_leave_date,
a.customer_username,
a.dept_name,
a.dept_no,
a.emp_nature,
a.contract_type,
if(a.data_source = '1','客户端','客服端') data_source,
a.expected_collection_time,
if(a.process_status = '0','短信待发送',if(a.process_status = '1','信息待填写',if(a.process_status = '2','信息待审核','拒绝入职'))) process_status
FROM employee_registration_pre a
<where>
1=1
<include refid="employeeRegistrationPre_where"/>
</where>
order by a.create_time desc
<if test="employeeRegistrationPre.limitStart != null">
limit #{employeeRegistrationPre.limitStart},#{employeeRegistrationPre.limitEnd}
</if>
</select>
</mapper>
......@@ -68,6 +68,12 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-csp-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-process</artifactId>
......
......@@ -545,4 +545,15 @@ public class ArchivesDaprUtil {
}
return res;
}
/**
* @Author huyc
* @Description 新增入职待建档信息
* @Date 14:34 2025/3/14
* @Param
* @return
**/
public R<Boolean> saveRegistPreInfo(EmployeeRegistrationPreVo preVo) {
return HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/employeeregistrationpre/inner/saveRegistPreInfo", JSON.toJSONString(preVo), Boolean.class, SecurityConstants.FROM_IN);
}
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.ekp.vo.EkpIncomePushInfoVo;
import com.yifu.cloud.plus.v1.ekp.vo.EkpSocialPushInfoVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCspProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprEkpProperties;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.*;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import java.util.List;
/**
* @Author fxj
* @Description 客户服务平台 服务间调用工具类
......@@ -26,6 +21,17 @@ import java.util.List;
public class CspDaprUtils {
@Autowired
private DaprEkpProperties daprProperties;
private DaprCspProperties daprCspProperties;
/**
* @Author huyc
* @Description 更新入离职登记的状态和新增操作记录
* @Date 9:22 2025/3/17
* @Param
* @return
**/
public R<Boolean> updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo) {
return HttpDaprUtil.invokeMethodPost(daprCspProperties.getAppUrl(),daprCspProperties.getAppId(),"/employeeregistration/inner/updateRegistPreInfo", JSON.toJSONString(updateVo), Boolean.class, SecurityConstants.FROM_IN);
}
}
......@@ -8,4 +8,5 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SalaryDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.EkpDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.PermissionDaprUtil,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ProcessDaprUtils
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ProcessDaprUtils,\
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils
......@@ -29,4 +29,6 @@ public class RegistConstants {
public static final String MESSAGE_FINISH = "已处理";
public static final String BACK_RECEIVE = "拒绝入职";
}
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 入离职登记表
*
* @author huych
* @date 2025-02-25 14:48:11
*/
@Data
public class EmployeeRegistrationReceiveVo implements Serializable {
@ExcelProperty("id")
private String id;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("员工姓名")
private String employeeName;
@ExcelProperty("原因")
private String reason;
@Schema(description = "项目立项时间")
private LocalDateTime projectCreateTime;
@Schema(description = "项目档案id")
private String empProjectId;
}
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 入离职登记表
*
* @author huych
* @date 2025-03-17 9:48:11
*/
@Data
public class EmployeeRegistrationUpdateVo implements Serializable {
@ExcelProperty("id")
private String id;
@ExcelProperty("身份证号")
private String empIdcard;
@ExcelProperty("操作人人姓名")
private String employeeName;
@ExcelProperty("原因")
private String reason;
@ExcelProperty("项目编码")
private String depeNo;
}
......@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration;
import com.yifu.cloud.plus.v1.csp.service.EmployeeRegistrationService;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationReceiveVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeProjectBelongDeptSearchCspVo;
......@@ -203,6 +205,8 @@ public class EmployeeRegistrationController {
@Operation(description = "入职待确认列表简单分页查询")
@GetMapping("/hrConfirmPage")
public R<IPage<EmployeeRegistration>> getHrConfirmEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, employeeRegistration);
return new R<>(employeeRegistrationService.getHrConfirmEmployeeRegistrationPage(page, employeeRegistration));
}
......@@ -231,15 +235,41 @@ public class EmployeeRegistrationController {
}
/**
* 修改入离职登记表
* 入职待确认表 批量确认接收
*
* @param employeeRegistration 入离职登记表
* @author huych
* @date 2025-03-13 16:55:32
**/
@Operation(description = "入职待确认表批量接收")
@PostMapping("/batchConfirmReceive")
public R batchConfirmReceive(@RequestBody EmployeeRegistrationPreVo preVo) {
return employeeRegistrationService.batchConfirmReceive(preVo);
}
/**
* 批量修改入离职登记表
*
* @param employeeRegistList 入离职登记表
* @return R
*/
@Operation(summary = "修改入离职登记表")
@SysLog("修改入离职登记表")
@PostMapping("/updatePreById")
public R updatePreById(@RequestBody EmployeeRegistration employeeRegistration) {
return employeeRegistrationService.updatePreRegist(employeeRegistration);
@Operation(summary = "批量修改入离职登记表")
@SysLog("批量入离职登记表")
@PostMapping("/batchUpdatePreById")
public R batchUpdatePreById(@RequestBody List<EmployeeRegistrationReceiveVo> employeeRegistList) {
return employeeRegistrationService.batchUpdatePreById(employeeRegistList);
}
/**
* 更新入离职登记表
*
* @param updateVo 状态和日志新增vo
* @return R
*/
@Operation(summary = "更新入离职登记表")
@SysLog("更新入离职登记表")
@Inner
@PostMapping("/inner/updateRegistByPreInfo")
public R updateRegistByPreInfo(@RequestBody EmployeeRegistrationUpdateVo updateVo) {
return employeeRegistrationService.updateRegistByPreInfo(updateVo);
}
}
......@@ -30,6 +30,8 @@ public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistrat
*/
IPage<EmployeeRegistration> getEmployeeRegistrationPage(Page<EmployeeRegistration> page, @Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
List<EmployeeRegistration> getEmployeeRegistrationList(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
long selectExportCount(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
List<EmployeeRegistrationExportVo> selectExportList(@Param("employeeRegistration") EmployeeRegistrationSearchVo employeeRegistration);
......
......@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationReceiveVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeProjectBelongDeptSearchCspVo;
......@@ -100,11 +102,25 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
R confirmReceive(EmployeeRegistrationPreVo preVo);
/**
* 单个更新
* @param registration 入离职登记
* 入职待确认表批量确认接收
* @param preVo 入离职登记
* @return
*/
R batchConfirmReceive(EmployeeRegistrationPreVo preVo);
/**
* 批量更新
* @param employeeRegistList 入离职登记
* @return
*/
R batchUpdatePreById(List<EmployeeRegistrationReceiveVo> employeeRegistList);
/**
* 批量更新
* @param updateVo 状态和日志新增vo
* @return
*/
R updatePreRegist(EmployeeRegistration registration);
R updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo);
/**
* @param searchCspVo 身份证 与 类型
......
......@@ -22,7 +22,6 @@ import com.yifu.cloud.plus.v1.csp.service.TOperationLogService;
import com.yifu.cloud.plus.v1.csp.vo.*;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.SysCspDeptVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProjectBelongDept;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ClientNameConstants;
......@@ -120,12 +119,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
*/
@Override
public IPage<EmployeeRegistration> getHrConfirmEmployeeRegistrationPage(Page<EmployeeRegistration> page, EmployeeRegistrationSearchVo employeeRegistration) {
//前端客服的所有项目权限赋值
//权限和条件赋值
initSearchVo(employeeRegistration);
//待办列表只查看未处理的数据
if (CommonConstants.ONE_STRING.equals(employeeRegistration.getType())) {
if (Common.isEmpty(employeeRegistration.getStatusList())) {
employeeRegistration.setStatusList(CommonConstants.processPreStatus);
}
employeeRegistration.setTypeList(CommonConstants.processPreStatus);
return baseMapper.getEmployeeRegistrationPage(page, employeeRegistration);
}
......@@ -240,9 +239,10 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//前端客服的所有项目权限赋值
initSearchVo(searchVo);
//待办列表只查看未处理的数据
if (CommonConstants.ONE_STRING.equals(searchVo.getType())) {
if (Common.isEmpty(searchVo.getStatusList())) {
searchVo.setStatusList(CommonConstants.processPreStatus);
}
searchVo.setTypeList(CommonConstants.processPreStatus);
long count = baseMapper.selectExportCount(searchVo);
try (ServletOutputStream out = response.getOutputStream()) {
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
......@@ -424,8 +424,6 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
!CommonConstants.ONE_STRING.equals(registration.getProcessStatus()))) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
EmployeeRegistrationPre registrationPre = new EmployeeRegistrationPre();
initRegistPreInfo(registrationPre,registration,preVo);
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo vo = new EmpProjectStatusVo();
......@@ -440,6 +438,64 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
user.getNickname(), null);
//生成档案待建档数据
initRegistPreInfo(registration,preVo, user);
archivesDaprUtil.saveRegistPreInfo(preVo);
return R.ok();
}
/**
* 入职待确认表确认接收
*
* @param preVo 确认接受vo
* @return
*/
@Override
public R batchConfirmReceive(EmployeeRegistrationPreVo preVo) {
if (Common.isEmpty(preVo)) {
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
//查询该项目该前端客服下所有待接收的入职登记
//前端客服的所有项目权限赋值
EmployeeRegistrationSearchVo searchVo = new EmployeeRegistrationSearchVo();
initSearchVo(searchVo);
searchVo.setStatusList(CommonConstants.processPreStatus);
searchVo.setTypeList(CommonConstants.processPreStatus);
searchVo.setDeptNo(preVo.getDeptNo());
List<EmployeeRegistration> registrationList = baseMapper.getEmployeeRegistrationList(searchVo);
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(registrationList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
List<EmployeeRegistrationReceiveVo> receiveVoList = new ArrayList<>();
for (EmployeeRegistration registration:registrationList) {
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo vo = new EmpProjectStatusVo();
vo.setEmpIdcard(registration.getEmpIdcard());
vo.setDeptNo(registration.getDeptNo());
EmpProjectStatusVo exit = getEmpProjectStatus(vo);
if (Common.isNotNull(exit)) {
EmployeeRegistrationReceiveVo receiveVo = new EmployeeRegistrationReceiveVo();
receiveVo.setId(registration.getId());
receiveVo.setEmployeeName(registration.getEmployeeName());
receiveVo.setEmpIdcard(registration.getEmpIdcard());
receiveVo.setReason(RegistConstants.BEFORE_IN_PROJECT);
receiveVo.setEmpProjectId(exit.getEmpProjectId());
receiveVo.setProjectCreateTime(exit.getProjectTime());
receiveVoList.add(receiveVo);
continue;
}
registration.setProcessStatus(CommonConstants.ZERO_STRING);
baseMapper.updateById(registration);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
user.getNickname(), null);
//生成档案待建档数据
initRegistPreInfo(registration, preVo, user);
archivesDaprUtil.saveRegistPreInfo(preVo);
}
if (!receiveVoList.isEmpty() && Common.isNotNull(receiveVoList)) {
return R.ok(receiveVoList);
}
return R.ok();
}
......@@ -512,26 +568,45 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
@Override
public R updatePreRegist(EmployeeRegistration registration) {
public R batchUpdatePreById(List<EmployeeRegistrationReceiveVo> employeeRegistList) {
YifuUser user = SecurityUtils.getUser();
EmployeeRegistration registrationNow = baseMapper.selectById(registration.getId());
if (Common.isEmpty(registrationNow) || !CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())) {
return R.failed(RegistConstants.NO_DATA_TO_HANDLE);
for (EmployeeRegistrationReceiveVo vo : employeeRegistList) {
EmployeeRegistration registrationNow = baseMapper.selectById(vo.getId());
if (Common.isEmpty(registrationNow) || !CommonConstants.ONE_STRING.equals(registrationNow.getProcessStatus())) {
return R.failed(RegistConstants.NO_DATA_TO_HANDLE);
}
registrationNow.setProcessStatus(CommonConstants.TWO_STRING);
logService.saveLog(registrationNow.getId(), CommonConstants.ZERO_STRING, RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
user.getNickname(), null);
logService.saveLog(registrationNow.getId(), CommonConstants.ZERO_STRING, RegistConstants.MESSAGE_FINISH, vo.getProjectCreateTime(),
user.getNickname(), CommonConstants.ONE_STRING.equals(registrationNow.getFeedbackType())
? RegistConstants.BEFORE_IN_PROJECT : RegistConstants.BEFORE_OUT_PROJECT);
SysCspDeptVo deptVo = new SysCspDeptVo();
if (CommonConstants.ONE_STRING.equals(registrationNow.getFeedbackType())) {
deptVo.setDepartName(registrationNow.getEmpDeptname());
deptVo.setDepartId(Long.valueOf(registrationNow.getEmpDeptid()));
}
deptVo.setProjectId(vo.getEmpProjectId());
archivesDaprUtil.saveOrDeleteDeptRelation(deptVo);
baseMapper.updateById(registrationNow);
}
registrationNow.setProcessStatus(CommonConstants.TWO_STRING);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.CONFIRM_SUBMIT, LocalDateTime.now(),
user.getNickname(), null);
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.MESSAGE_FINISH, registration.getProjectCreateTime(),
user.getNickname(), CommonConstants.ONE_STRING.equals(registrationNow.getFeedbackType())
? RegistConstants.BEFORE_IN_PROJECT : RegistConstants.BEFORE_OUT_PROJECT);
SysCspDeptVo vo = new SysCspDeptVo();
if (CommonConstants.ONE_STRING.equals(registrationNow.getFeedbackType())) {
vo.setDepartName(registrationNow.getEmpDeptname());
vo.setDepartId(Long.valueOf(registrationNow.getEmpDeptid()));
return R.ok();
}
@Override
public R updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo) {
EmployeeRegistration registration = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, updateVo.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, updateVo.getDepeNo())
.eq(EmployeeRegistration::getFeedbackType, CommonConstants.ONE_STRING)
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(registration)) {
registration.setProcessStatus(CommonConstants.THREE_STRING);
//新增拒绝入职操作记录
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.BACK_RECEIVE, LocalDateTime.now(),
updateVo.getEmployeeName(), updateVo.getReason());
}
vo.setProjectId(registration.getEmpProjectId());
archivesDaprUtil.saveOrDeleteDeptRelation(vo);
baseMapper.updateById(registrationNow);
return R.ok();
}
......@@ -777,7 +852,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
if (!isSsc && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
if (isSsc || CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
searchVo.setAuthSql(null);
return;
}
if (Common.isNotNull(searchVo.getType()) && CommonConstants.ONE_STRING.equals(searchVo.getType())) {
searchVo.setAuthSql(null);
//获取项目信息
R<TSettleDomainRegistListVo> domainR = archivesDaprUtil.getAllDeptByCustomerLoginName(user.getUsername());
if (null != domainR && null != domainR.getData() && null != domainR.getData().getDeptNos()) {
......@@ -799,7 +879,23 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//数据初始化
private void initRegistPreInfo(EmployeeRegistrationPre registrationPre,EmployeeRegistration registration,EmployeeRegistrationPreVo preVo) {
private void initRegistPreInfo(EmployeeRegistration registration,EmployeeRegistrationPreVo preVo,YifuUser user) {
preVo.setCustomerUsername(registration.getCustomerUsername());
preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname());
preVo.setDeptName(registration.getDeptName());
preVo.setDeptId(registration.getDeptId());
preVo.setDataSource(registration.getDataSource());
preVo.setPosition(registration.getPosition());
preVo.setJoinLeaveDate(registration.getJoinLeaveDate());
preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setConfirmTime(DateUtil.getCurrentDateTime());
preVo.setDeptNo(registration.getDeptNo());
preVo.setConfirmUser(user.getNickname());
preVo.setCustomerUsernameNew(registration.getCustomerUsername());
preVo.setEmpPhone(registration.getEmpPhone());
preVo.setEmployeeName(registration.getEmployeeName());
preVo.setEmpIdcard(registration.getEmpIdcard());
preVo.setExpectedCollectionTime(LocalDateTimeUtils.formatTime(DateUtil.dateToString(
registration.getJoinLeaveDate(),DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00:00",LocalDateTimeUtils.DATE_TIME_PATTERN));
}
}
......@@ -219,6 +219,18 @@
order by a.create_time desc
</select>
<!--employeeRegistration简单分页查询-->
<select id="getEmployeeRegistrationList" resultMap="employeeRegistrationMap">
SELECT
<include refid="Base_Column_List"/>
FROM employee_registration a
<where>
1=1
<include refid="employeeRegistration_where"/>
</where>
order by a.create_time desc
</select>
<select id="selectExportCount" resultType="java.lang.Long">
SELECT
count(1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment