Commit e9a9e3d5 authored by fangxinjiang's avatar fangxinjiang

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

parents b53f7b3e 1b12c166
package com.yifu.cloud.plus.v1.yifu.archives.entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 入职待办条数vo
*
* @author huych
* @date 2025-03-12 17:14:19
*/
@Data
public class EmployeeRegistrationCountVo implements Serializable {
@Schema(description = "入职待确认数量")
private long typeOneCount;
@Schema(description = "入职待建档数量")
private long typeTwoCount;
@Schema(description = "档案待完整数量")
private long typeThreeCount;
@Schema(description = "总数量")
private long totalCount;
}
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
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; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
...@@ -89,6 +86,7 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -89,6 +86,7 @@ public class EmployeeRegistrationPre extends BaseEntity {
private String fileCity; private String fileCity;
@Schema(description = "档案所在地-县") @Schema(description = "档案所在地-县")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String fileTown; private String fileTown;
@Schema(description = "确认人") @Schema(description = "确认人")
......
...@@ -44,9 +44,9 @@ public class TEmployeeLog extends BaseEntity { ...@@ -44,9 +44,9 @@ public class TEmployeeLog extends BaseEntity {
private String id; private String id;
/** /**
* 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新 * 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新 4入职确认信息
*/ */
@Schema(description = "类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新") @Schema(description = "类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新;4入职确认信息")
private Integer type; private Integer type;
/** /**
......
...@@ -51,4 +51,17 @@ public class EmployeeRegistrationPreSearchVo extends EmployeeRegistrationPre { ...@@ -51,4 +51,17 @@ public class EmployeeRegistrationPreSearchVo extends EmployeeRegistrationPre {
@Schema(description = "列表类型 1 待办 2监控 3入职确认信息") @Schema(description = "列表类型 1 待办 2监控 3入职确认信息")
private String type; private String type;
@Schema(description = "入职待确认")
@TableField(exist = false)
private String mIdOne;
@Schema(description = "入职待建档")
@TableField(exist = false)
private String mIdTwo;
@Schema(description = "入职待完整")
@TableField(exist = false)
private String mIdThree;
} }
...@@ -6,9 +6,9 @@ import java.util.List; ...@@ -6,9 +6,9 @@ import java.util.List;
@Data @Data
public class TSettleDomainRegistListVo { public class TSettleDomainRegistListVo {
/** /**
* 合同主体项目编码 * 合同主体项目编码
*/ */
private List<String> deptNos; private List<String> deptNos;
} }
...@@ -92,6 +92,8 @@ public class EmployeeRegistrationPreController { ...@@ -92,6 +92,8 @@ public class EmployeeRegistrationPreController {
@Operation(description = "导出入职待建档表") @Operation(description = "导出入职待建档表")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) { public void export(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
employeeRegistrationPreService.listExport(response,searchVo); employeeRegistrationPreService.listExport(response,searchVo);
} }
...@@ -103,6 +105,8 @@ public class EmployeeRegistrationPreController { ...@@ -103,6 +105,8 @@ public class EmployeeRegistrationPreController {
@Operation(description = "导出入职确认信息") @Operation(description = "导出入职确认信息")
@PostMapping("/confirmExport") @PostMapping("/confirmExport")
public void confirmExport(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) { public void confirmExport(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
employeeRegistrationPreService.confirmExport(response,searchVo); employeeRegistrationPreService.confirmExport(response,searchVo);
} }
...@@ -118,4 +122,28 @@ public class EmployeeRegistrationPreController { ...@@ -118,4 +122,28 @@ public class EmployeeRegistrationPreController {
public Boolean saveRegistPreInfo(@RequestBody EmployeeRegistrationPreVo preVo) { public Boolean saveRegistPreInfo(@RequestBody EmployeeRegistrationPreVo preVo) {
return employeeRegistrationPreService.saveRegistPreInfo(preVo); return employeeRegistrationPreService.saveRegistPreInfo(preVo);
} }
/**
* 入职确认信息信息修改
* @param employeeRegistrationPre 入职确认信息
* @return R
*/
@Operation(summary = "入职确认信息信息修改", description = "入职确认信息信息修改")
@SysLog("修改入职待建档表" )
@PostMapping("/updateCommonInfo")
public R updateCommonInfo(@RequestBody EmployeeRegistrationPre employeeRegistrationPre) {
return employeeRegistrationPreService.updateCommonInfo(employeeRegistrationPre);
}
/**
* 入职确认信息信息修改
* @param searchVo type 查询类型 1待办列表 2 监控列表
* @return R
*/
@Operation(summary = "查询各个tab页签的入职待办条数", description = "查询各个tab页签的入职待办条数")
@SysLog("查询各个tab页签的入职待办条数" )
@PostMapping("/getListCount")
public R getListCount(@RequestBody EmployeeRegistrationPreSearchVo searchVo) {
return employeeRegistrationPreService.getListCount(searchVo);
}
} }
...@@ -185,6 +185,8 @@ public class TCompleteMonitorController { ...@@ -185,6 +185,8 @@ public class TCompleteMonitorController {
@Operation(description = "导出档案待完善") @Operation(description = "导出档案待完善")
@PostMapping("/archivesExport") @PostMapping("/archivesExport")
public void archivesExport(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) { public void archivesExport(HttpServletResponse response, @RequestBody EmployeeRegistrationPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tCompleteMonitorService.archivesExport(response,searchVo); tCompleteMonitorService.archivesExport(response,searchVo);
} }
} }
...@@ -143,4 +143,17 @@ public class TEmployeeLogController { ...@@ -143,4 +143,17 @@ public class TEmployeeLogController {
return R.ok(tEmployeeLogService.list(Wrappers.<TEmployeeLog>query().eq("PROJECT_ID", projectId) return R.ok(tEmployeeLogService.list(Wrappers.<TEmployeeLog>query().eq("PROJECT_ID", projectId)
.eq("TYPE", CommonConstants.ONE_INT).orderByDesc(CommonConstants.CREATE_TIME))); .eq("TYPE", CommonConstants.ONE_INT).orderByDesc(CommonConstants.CREATE_TIME)));
} }
/**
* @Description: 通过EMP_ID查询入职确认信息变更日志
* @Author: huyc
* @Date: 2025/3/17 19:06
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeLog>>
**/
@Operation(summary = "通过EMP_ID查询入职确认信息变更日志", description = "通过EMP_ID查询入职确认信息变更日志")
@GetMapping("/getPreLogById")
public R<List<TEmployeeLog>> getPreLogById(@RequestParam String id) {
return R.ok(tEmployeeLogService.list(Wrappers.<TEmployeeLog>query().eq("EMP_ID", id)
.eq("TYPE", CommonConstants.FOUR_INT).orderByDesc(CommonConstants.CREATE_TIME)));
}
} }
...@@ -49,16 +49,15 @@ public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> { ...@@ -49,16 +49,15 @@ public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> {
*/ */
IPage<EmployeeRegistrationProjectListVo> getAllLackArchivesPage(Page<EmployeeRegistrationProjectListVo> page, @Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo employeeRegistrationPre); IPage<EmployeeRegistrationProjectListVo> getAllLackArchivesPage(Page<EmployeeRegistrationProjectListVo> page, @Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo employeeRegistrationPre);
/** /**
* 档案完整度监控简单分页查询 * 入职待完善数量查询
* @param employeeRegistrationPre 入职待完善 * @param employeeRegistrationPre 入职待完善
* @return * @return
*/ */
long getAllLackArchivesExportCount(@Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo employeeRegistrationPre); long getAllLackArchivesExportCount(@Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo employeeRegistrationPre);
/** /**
* 档案完整度监控批量导出 * 入职待完善批量导出
* @param employeeRegistrationPre 入职待完善 * @param employeeRegistrationPre 入职待完善
* @return * @return
*/ */
......
...@@ -52,4 +52,18 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr ...@@ -52,4 +52,18 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
* @return * @return
*/ */
R updateRegistById(EmployeeRegistrationPre employeeRegistrationPre); R updateRegistById(EmployeeRegistrationPre employeeRegistrationPre);
/**
* 入职确认信息信息修改
* @param employeeRegistrationPre 入职确认信息表
* @return
*/
R updateCommonInfo(EmployeeRegistrationPre employeeRegistrationPre);
/**
* 入职确认信息信息修改
* @param searchVo type 查询类型 1待办列表 2 监控列表
* @return
*/
R getListCount(EmployeeRegistrationPreSearchVo searchVo);
} }
...@@ -48,7 +48,7 @@ public interface TEmployeeLogService extends IService<TEmployeeLog> { ...@@ -48,7 +48,7 @@ public interface TEmployeeLogService extends IService<TEmployeeLog> {
* 生成修改记录 * 生成修改记录
* @Author pwang * @Author pwang
* @Date 2022-06-22 11:32 * @Date 2022-06-22 11:32
* @param type 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新 * @param type 类型:0人员档案;1项目档案;2人员和项目档案;3员工合同更新 4入职确认信息修改
* @param empId 档案id * @param empId 档案id
* @param projectId 项目id * @param projectId 项目id
* @param oldInfo * @param oldInfo
......
...@@ -6,19 +6,28 @@ import com.alibaba.excel.write.metadata.WriteSheet; ...@@ -6,19 +6,28 @@ import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationDaprCountVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationCountVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre; 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.mapper.EmployeeRegistrationPreMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TCompleteMonitorMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService; import com.yifu.cloud.plus.v1.yifu.archives.service.EmployeeRegistrationPreService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreInfoExportVo;
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.constant.CacheConstants; 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.ClientNameConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; 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.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -37,13 +46,20 @@ import java.util.*; ...@@ -37,13 +46,20 @@ import java.util.*;
*/ */
@Log4j2 @Log4j2
@Service @Service
@RequiredArgsConstructor
public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegistrationPreMapper, EmployeeRegistrationPre> implements EmployeeRegistrationPreService { public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegistrationPreMapper, EmployeeRegistrationPre> implements EmployeeRegistrationPreService {
@Autowired @Autowired
private ArchivesDaprUtil archivesDaprUtil; private CspDaprUtils cspDaprUtils;
@Autowired @Autowired
private CspDaprUtils cspDaprUtils; private TEmployeeLogService tEmployeeLogService;
private final TCompleteMonitorMapper completeMonitorMapper;
private final TSettleDomainService tSettleDomainService;
private final MenuUtil menuUtil;
/** /**
* 入职待建档表简单分页查询 * 入职待建档表简单分页查询
...@@ -211,7 +227,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -211,7 +227,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
receiveVo.setEmployeeName(user.getNickname()); receiveVo.setEmployeeName(user.getNickname());
receiveVo.setEmpIdcard(updatePre.getEmpIdcard()); receiveVo.setEmpIdcard(updatePre.getEmpIdcard());
receiveVo.setReason(employeeRegistrationPre.getReason()); receiveVo.setReason(employeeRegistrationPre.getReason());
receiveVo.setDepeNo(employeeRegistrationPre.getDeptNo()); receiveVo.setDeptNo(employeeRegistrationPre.getDeptNo());
try { try {
//调用csp服务更新状态和新增操作记录 //调用csp服务更新状态和新增操作记录
cspDaprUtils.updateRegistByPreInfo(receiveVo); cspDaprUtils.updateRegistByPreInfo(receiveVo);
...@@ -221,6 +237,124 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -221,6 +237,124 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
return R.ok(); return R.ok();
} }
@Override
public R updateCommonInfo(EmployeeRegistrationPre employeeRegistrationPre) {
EmployeeRegistrationPre updatePre = baseMapper.selectById(employeeRegistrationPre.getId());
if (Common.isEmpty(updatePre)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
//旧的对象,用来对比变更参数
EmployeeRegistrationPre comparePre = baseMapper.selectById(employeeRegistrationPre.getId());
//操作记录中字典值的转化
String natureItemBefore = null;
String natureItemAfter = null;
String contractItemBefore = null;
String contractItemAfter = null;
if (!updatePre.getContractType().equals(employeeRegistrationPre.getContractType())) {
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue().get(
CacheConstants.DICT_DETAILS + CommonConstants.COLON_STRING + "personnel_type");
for (Map.Entry<String,String> entry:dicObj.entrySet()){
if (Common.isNotNull(entry.getKey()) && entry.getKey().equals(updatePre.getContractType())){
contractItemBefore = entry.getValue();
break;
}
if (Common.isNotNull(entry.getKey()) && entry.getKey().equals(employeeRegistrationPre.getContractType())){
contractItemAfter = entry.getValue();
break;
}
}
}
if (!updatePre.getEmpNature().equals(employeeRegistrationPre.getEmpNature())) {
Map<String,String> dicObj = (Map<String, String>) RedisUtil.redis.opsForValue().get(
CacheConstants.DICT_DETAILS + CommonConstants.COLON_STRING + "emp_natrue");
for (Map.Entry<String,String> entry:dicObj.entrySet()){
if (Common.isNotNull(entry.getKey()) && entry.getKey().equals(updatePre.getEmpNature())){
natureItemBefore = entry.getValue();
break;
}
if (Common.isNotNull(entry.getKey()) && entry.getKey().equals(employeeRegistrationPre.getEmpNature())){
natureItemAfter = entry.getValue();
break;
}
}
}
YifuUser user = SecurityUtils.getUser();
try {
updatePre.setServerItem(employeeRegistrationPre.getServerItem());
updatePre.setEmpNature(employeeRegistrationPre.getEmpNature());
updatePre.setContractType(employeeRegistrationPre.getContractType());
updatePre.setFileProvince(employeeRegistrationPre.getFileProvince());
updatePre.setFileCity(employeeRegistrationPre.getFileCity());
updatePre.setFileTown(employeeRegistrationPre.getFileTown());
baseMapper.updateById(employeeRegistrationPre);
if (null != natureItemBefore) {
comparePre.setEmpNature(natureItemBefore);
}
if (null != natureItemAfter) {
employeeRegistrationPre.setEmpNature(natureItemAfter);
}
if (null != contractItemBefore) {
comparePre.setContractType(contractItemBefore);
}
if (null != contractItemAfter) {
employeeRegistrationPre.setContractType(contractItemAfter);
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[4],
employeeRegistrationPre.getId(), "", comparePre, employeeRegistrationPre,user);
} catch (Exception e) {
log.error("生成入职待确认信息修改操作日志异常", e);
}
return R.ok();
}
@Override
public R getListCount(EmployeeRegistrationPreSearchVo searchVo) {
try {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
EmployeeRegistrationCountVo countVo = new EmployeeRegistrationCountVo();
//权限赋值
initSearchVo(searchVo);
//入职确认数量
EmployeeRegistrationDaprCountVo vo = new EmployeeRegistrationDaprCountVo();
vo.setUser(user);
vo.setType(searchVo.getType());
vo.setMId(searchVo.getMIdOne());
R<EmployeeRegistrationDaprCountVo> daprVo = cspDaprUtils.getRegisterPreCount(vo);
if (Common.isNotNull(daprVo) && Common.isNotNull(daprVo.getData())) {
vo = daprVo.getData();
}
//入职待确认数量
long countOne = vo.getCount();
//入职待建档数量
EmployeeRegistrationPreSearchVo preSearchVo = new EmployeeRegistrationPreSearchVo();
preSearchVo.setMId(searchVo.getMIdTwo());
preSearchVo.setType(searchVo.getType());
menuUtil.setAuthSql(user, preSearchVo);
initSearchVo(preSearchVo);
preSearchVo.setStatusList(CommonConstants.processPreArchivesStatus);
long countTwo = baseMapper.selectExportCount(preSearchVo);
//档案待完整数量
EmployeeRegistrationPreSearchVo monitorSearchVo = new EmployeeRegistrationPreSearchVo();
monitorSearchVo.setMIdThree(searchVo.getMIdThree());
monitorSearchVo.setType(searchVo.getType());
menuUtil.setAuthSql(user, monitorSearchVo);
initSearchVo(monitorSearchVo);
long countThree = completeMonitorMapper.getAllLackArchivesExportCount(monitorSearchVo);
countVo.setTypeOneCount(countOne);
countVo.setTypeTwoCount(countTwo);
countVo.setTypeThreeCount(countThree);
countVo.setTotalCount(countOne + countTwo + countThree);
return R.ok(countVo);
} catch (Exception e) {
log.error("生成入职待确认信息修改操作日志异常", e);
return R.failed(CommonConstants.RESULT_DATA_FAIL);
}
}
/** /**
* @Description: 获取前端客服的所有项目权限 * @Description: 获取前端客服的所有项目权限
* @Author: huych * @Author: huych
...@@ -238,9 +372,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -238,9 +372,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if (Common.isNotNull(searchVo.getType()) && CommonConstants.ONE_STRING.equals(searchVo.getType())) { if (Common.isNotNull(searchVo.getType()) && CommonConstants.ONE_STRING.equals(searchVo.getType())) {
searchVo.setAuthSql(null); searchVo.setAuthSql(null);
//获取项目信息 //获取项目信息
R<TSettleDomainRegistListVo> domainR = archivesDaprUtil.getAllDeptByCustomerLoginName(user.getUsername()); List<String> deptNos = tSettleDomainService.getAllDeptByCustomerLoginName(user.getUsername());
if (null != domainR && null != domainR.getData() && null != domainR.getData().getDeptNos()) { if (null != deptNos && !deptNos.isEmpty()) {
searchVo.setDeptNoList(domainR.getData().getDeptNos()); searchVo.setDeptNoList(deptNos);
} else { } else {
searchVo.setId(CommonConstants.ONE_STRING_NEGATE); searchVo.setId(CommonConstants.ONE_STRING_NEGATE);
} }
......
...@@ -86,6 +86,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -86,6 +86,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
private final AtomicInteger atomicInteger = new AtomicInteger(0); private final AtomicInteger atomicInteger = new AtomicInteger(0);
private final TSettleDomainService tSettleDomainService;
/** /**
* 档案完整度监控简单分页查询 * 档案完整度监控简单分页查询
* @param tCompleteMonitor 档案完整度监控 * @param tCompleteMonitor 档案完整度监控
...@@ -97,12 +99,14 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -97,12 +99,14 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
} }
/** /**
* 档案完整度监控简单分页查询 * 入职待完善简单分页查询
* @param preSearchVo 入职待完善 * @param preSearchVo 入职待完善
* @return * @return
*/ */
@Override @Override
public IPage<EmployeeRegistrationProjectListVo> getAllLackArchivesPage(Page<EmployeeRegistrationProjectListVo> page, EmployeeRegistrationPreSearchVo preSearchVo){ public IPage<EmployeeRegistrationProjectListVo> getAllLackArchivesPage(Page<EmployeeRegistrationProjectListVo> page, EmployeeRegistrationPreSearchVo preSearchVo){
//权限赋值
initSearchVo(preSearchVo);
return baseMapper.getAllLackArchivesPage(page,preSearchVo); return baseMapper.getAllLackArchivesPage(page,preSearchVo);
} }
...@@ -181,6 +185,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -181,6 +185,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
String fileName = "档案待完整列表" + DateUtil.getThisTime() + ".xlsx"; String fileName = "档案待完整列表" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<EmployeeRegistrationProjectListVo> list = new ArrayList<>(); List<EmployeeRegistrationProjectListVo> list = new ArrayList<>();
//权限赋值
initSearchVo(searchVo);
long count = baseMapper.getAllLackArchivesExportCount(searchVo); long count = baseMapper.getAllLackArchivesExportCount(searchVo);
try (ServletOutputStream out= response.getOutputStream();){ try (ServletOutputStream out= response.getOutputStream();){
response.setContentType(CommonConstants.MULTIPART_FORM_DATA); response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
...@@ -975,4 +981,39 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap ...@@ -975,4 +981,39 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
return Arrays.asList(strArr); return Arrays.asList(strArr);
} }
/**
* @Description: 获取前端客服的所有项目权限
* @Author: huych
* @Date: 2025/3/13 17:02
* @return:
**/
public void initSearchVo(EmployeeRegistrationPreSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
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);
//获取项目信息
List<String> deptNos = tSettleDomainService.getAllDeptByCustomerLoginName(user.getUsername());
if (null != deptNos && !deptNos.isEmpty()) {
searchVo.setDeptNoList(deptNos);
} else {
searchVo.setId(CommonConstants.ONE_STRING_NEGATE);
}
}
}
public boolean haveRole(YifuUser user, long roleId) {
List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP);
for (Long role : roleList) {
if (role == roleId) {
return true;
}
}
return false;
}
} }
package com.yifu.cloud.plus.v1.yifu.common.dapr.util; package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationDaprCountVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo; 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.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -23,7 +24,6 @@ public class CspDaprUtils { ...@@ -23,7 +24,6 @@ public class CspDaprUtils {
@Autowired @Autowired
private DaprCspProperties daprCspProperties; private DaprCspProperties daprCspProperties;
/** /**
* @Author huyc * @Author huyc
* @Description 更新入离职登记的状态和新增操作记录 * @Description 更新入离职登记的状态和新增操作记录
...@@ -34,4 +34,15 @@ public class CspDaprUtils { ...@@ -34,4 +34,15 @@ public class CspDaprUtils {
public R<Boolean> updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo) { public R<Boolean> updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo) {
return HttpDaprUtil.invokeMethodPost(daprCspProperties.getAppUrl(),daprCspProperties.getAppId(),"/employeeregistration/inner/updateRegistPreInfo", JSON.toJSONString(updateVo), Boolean.class, SecurityConstants.FROM_IN); return HttpDaprUtil.invokeMethodPost(daprCspProperties.getAppUrl(),daprCspProperties.getAppId(),"/employeeregistration/inner/updateRegistPreInfo", JSON.toJSONString(updateVo), Boolean.class, SecurityConstants.FROM_IN);
} }
/**
* @Author huyc
* @Description 查询入职待确认数量
* @Date 19:47 2025/3/17
* @Param
* @return
**/
public R<EmployeeRegistrationDaprCountVo> getRegisterPreCount(EmployeeRegistrationDaprCountVo countVo) {
return HttpDaprUtil.invokeMethodPost(daprCspProperties.getAppUrl(),daprCspProperties.getAppId(),"/employeeregistration/inner/getRegisterPreCount", JSON.toJSONString(countVo), EmployeeRegistrationDaprCountVo.class, SecurityConstants.FROM_IN);
}
} }
package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* 入离职登记表
*
* @author huych
* @date 2025-03-17 9:48:11
*/
@Data
public class EmployeeRegistrationDaprCountVo implements Serializable {
@Schema(description = "user")
private YifuUser user;
@Schema(description = "类型")
private String type;
@Schema(description = "数量")
private long count;
@Schema(description = "mId")
private String mId;
}
package com.yifu.cloud.plus.v1.csp.vo; package com.yifu.cloud.plus.v1.csp.vo;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -14,19 +15,19 @@ import java.io.Serializable; ...@@ -14,19 +15,19 @@ import java.io.Serializable;
@Data @Data
public class EmployeeRegistrationUpdateVo implements Serializable { public class EmployeeRegistrationUpdateVo implements Serializable {
@ExcelProperty("id") @Schema(description = "id")
private String id; private String id;
@ExcelProperty("身份证号") @Schema(description = "身份证号")
private String empIdcard; private String empIdcard;
@ExcelProperty("操作人人姓名") @Schema(description = "操作人人姓名")
private String employeeName; private String employeeName;
@ExcelProperty("原因") @Schema(description = "原因")
private String reason; private String reason;
@ExcelProperty("项目编码") @Schema(description = "项目编码")
private String depeNo; private String deptNo;
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration; 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.service.EmployeeRegistrationService;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationDaprCountVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationReceiveVo; 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.EmployeeRegistrationSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
...@@ -275,4 +276,21 @@ public class EmployeeRegistrationController { ...@@ -275,4 +276,21 @@ public class EmployeeRegistrationController {
public R updateRegistByPreInfo(@RequestBody EmployeeRegistrationUpdateVo updateVo) { public R updateRegistByPreInfo(@RequestBody EmployeeRegistrationUpdateVo updateVo) {
return employeeRegistrationService.updateRegistByPreInfo(updateVo); return employeeRegistrationService.updateRegistByPreInfo(updateVo);
} }
/**
* 查询入职待确认数量
*
* @author huych
* @date 2025-03-13 16:55:32
**/
@Operation(summary = "查询入职待确认数量")
@SysLog("查询入职待确认数量")
@Inner
@PostMapping("/inner/getRegisterPreCount")
public EmployeeRegistrationDaprCountVo getRegisterPreCount(@RequestBody EmployeeRegistrationDaprCountVo countVo) {
EmployeeRegistrationSearchVo searchVo = new EmployeeRegistrationSearchVo();
searchVo.setMId(countVo.getMId());
menuUtil.setAuthSql(countVo.getUser(), searchVo);
return employeeRegistrationService.getRegisterPreCount(countVo,searchVo);
}
} }
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration; import com.yifu.cloud.plus.v1.csp.entity.EmployeeRegistration;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationDaprCountVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationReceiveVo; 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.EmployeeRegistrationSearchVo;
import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo; import com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationUpdateVo;
...@@ -122,6 +123,13 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati ...@@ -122,6 +123,13 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
*/ */
R updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo); R updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo);
/**
* 查询入职待确认数量
* @param countVo 查询入职待确认数量vo
* @return
*/
EmployeeRegistrationDaprCountVo getRegisterPreCount(EmployeeRegistrationDaprCountVo countVo,EmployeeRegistrationSearchVo searchVo);
/** /**
* @param searchCspVo 身份证 与 类型 * @param searchCspVo 身份证 与 类型
* @Description: 获取已接收的入离职申请,同步所属部门到项目档案里 * @Description: 获取已接收的入离职申请,同步所属部门到项目档案里
......
...@@ -649,7 +649,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -649,7 +649,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
public R updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo) { public R updateRegistByPreInfo(EmployeeRegistrationUpdateVo updateVo) {
EmployeeRegistration registration = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda() EmployeeRegistration registration = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, updateVo.getEmpIdcard()) .eq(EmployeeRegistration::getEmpIdcard, updateVo.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, updateVo.getDepeNo()) .eq(EmployeeRegistration::getDeptNo, updateVo.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, CommonConstants.ONE_STRING) .eq(EmployeeRegistration::getFeedbackType, CommonConstants.ONE_STRING)
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus) .in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
...@@ -662,6 +662,19 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -662,6 +662,19 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return R.ok(); return R.ok();
} }
@Override
public EmployeeRegistrationDaprCountVo getRegisterPreCount(EmployeeRegistrationDaprCountVo countVo,
EmployeeRegistrationSearchVo employeeRegistration) {
//权限和条件赋值
employeeRegistration.setType(countVo.getType());
initDaprSearchVo(employeeRegistration,countVo.getUser());
employeeRegistration.setStatusList(CommonConstants.processPreStatus);
employeeRegistration.setTypeList(CommonConstants.processPreStatus);
long count = baseMapper.selectExportCount(employeeRegistration);
countVo.setCount(count);
return countVo;
}
//单个新增、导入校验 //单个新增、导入校验
private String registCheck(EmployeeRegistration registration) { private String registCheck(EmployeeRegistration registration) {
//定义判别用户身份证号的正则表达式(要么是15位,要么是18位,最后一位可以为字母) //定义判别用户身份证号的正则表达式(要么是15位,要么是18位,最后一位可以为字母)
...@@ -923,6 +936,31 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -923,6 +936,31 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
} }
/**
* @Description: 获取前端客服的所有项目权限
* @Author: huych
* @Date: 2025/3/13 17:02
* @return:
**/
public void initDaprSearchVo(EmployeeRegistrationSearchVo searchVo,YifuUser user) {
long roleId = 1839501715787390978L;
boolean isSsc = this.haveRole(user, roleId);
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()) {
searchVo.setDeptNoList(domainR.getData().getDeptNos());
} else {
searchVo.setId(CommonConstants.ONE_STRING_NEGATE);
}
}
}
public boolean haveRole(YifuUser user, long roleId) { public boolean haveRole(YifuUser user, long roleId) {
List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP); List<Long> roleList = user.getClientRoleMap().get(ClientNameConstants.CLIENT_MVP);
for (Long role : roleList) { for (Long role : roleList) {
......
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