Commit 0cd4bcfd authored by fangxinjiang's avatar fangxinjiang

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

parents 635a4855 8bf16c37
...@@ -89,6 +89,16 @@ public class EmployeeRegistrationPre extends BaseEntity { ...@@ -89,6 +89,16 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.IGNORED)
private String fileTown; private String fileTown;
@Schema(description = "档案所在地-省编号")
private String provinceCode;
@Schema(description = "档案所在地-市编号")
private String cityCode;
@Schema(description = "档案所在地-县编号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String townCode;
@Schema(description = "确认人") @Schema(description = "确认人")
private String confirmUser; private String confirmUser;
......
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -43,6 +44,15 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -43,6 +44,15 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "档案所在地-县") @Schema(description = "档案所在地-县")
private String fileTown; private String fileTown;
@Schema(description = "档案所在地-省编号")
private String provinceCode;
@Schema(description = "档案所在地-市编号")
private String cityCode;
@Schema(description = "档案所在地-县编号")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String townCode;
@Schema(description = "员工姓名") @Schema(description = "员工姓名")
...@@ -60,6 +70,9 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -60,6 +70,9 @@ public class EmployeeRegistrationPreVo implements Serializable {
@Schema(description = "入职日期") @Schema(description = "入职日期")
private Date joinLeaveDate; private Date joinLeaveDate;
@Schema(description = "推送时间")
private String pushDate;
@Schema(description = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职,4已完成") @Schema(description = "状态,0短信待发送,1信息待填写,2信息待审核,3拒绝入职,4已完成")
private String processStatus; private String processStatus;
...@@ -82,7 +95,7 @@ public class EmployeeRegistrationPreVo implements Serializable { ...@@ -82,7 +95,7 @@ public class EmployeeRegistrationPreVo implements Serializable {
private String dataSource; private String dataSource;
@Schema(description = "预计收集时间") @Schema(description = "预计收集时间")
private LocalDateTime expectedCollectionTime; private Date expectedCollectionTime;
@Schema(description = "确认人") @Schema(description = "确认人")
private String confirmUser; private String confirmUser;
......
...@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo; ...@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @Author fxj * @Author fxj
...@@ -14,9 +13,7 @@ import java.util.List; ...@@ -14,9 +13,7 @@ import java.util.List;
@Data @Data
public class SendMessageUpdateVo implements Serializable { public class SendMessageUpdateVo implements Serializable {
// 签名 // 签名
private List<String> idList; private String id;
// 类型
private String type;
//项目编码 //项目编码
private String deptNo; private String deptNo;
} }
package com.yifu.cloud.plus.v1.yifu.archives.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
@Configuration
public class TaskSchedulerConfig {
@Bean
public TaskScheduler taskScheduler() {
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
scheduler.setPoolSize(10);
scheduler.setThreadNamePrefix("scheduled-task-");
scheduler.initialize();
return scheduler;
}
}
...@@ -19,6 +19,7 @@ import lombok.RequiredArgsConstructor; ...@@ -19,6 +19,7 @@ import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
/** /**
* 入职待建档表 * 入职待建档表
...@@ -166,7 +167,21 @@ public class EmployeeRegistrationPreController { ...@@ -166,7 +167,21 @@ public class EmployeeRegistrationPreController {
@Operation(summary = "批量发送入职信息收集短信", description = "批量发送入职信息收集短信") @Operation(summary = "批量发送入职信息收集短信", description = "批量发送入职信息收集短信")
@SysLog("批量发送入职信息收集短信" ) @SysLog("批量发送入职信息收集短信" )
@PostMapping("/batchSms") @PostMapping("/batchSms")
public R batchSendMessage(@RequestBody SendMessageUpdateVo vo) { public R batchSendMessage(@RequestBody List<SendMessageUpdateVo> vo,String type) {
return employeeRegistrationPreService.batchSendMessage(vo); return employeeRegistrationPreService.batchSendMessage(vo, type);
} }
/**
* @Description: 判断简档详档(员工类型:代理的是简档,“非代理”且员工合同类型为:空、标准合同、劳务派遣合同、补贴合同 是详档,其余为简档)
* @Author: hgw
* @Date: 2025/3/20 15:24
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(summary = "判断简档详档", description = "判断简档详档")
@SysLog("判断简档详档" )
@GetMapping("/judgeIsSimple")
public R<String> judgeIsSimple(@RequestParam String empIdCard, @RequestParam String deptId) {
return R.ok(employeeRegistrationPreService.judgeIsSimple(empIdCard, deptId));
}
} }
...@@ -152,8 +152,7 @@ public class TEmployeeLogController { ...@@ -152,8 +152,7 @@ public class TEmployeeLogController {
**/ **/
@Operation(summary = "通过EMP_ID查询入职确认信息变更日志", description = "通过EMP_ID查询入职确认信息变更日志") @Operation(summary = "通过EMP_ID查询入职确认信息变更日志", description = "通过EMP_ID查询入职确认信息变更日志")
@GetMapping("/getPreLogById") @GetMapping("/getPreLogById")
public R<List<TEmployeeLog>> getPreLogById(@RequestParam String id) { public R<IPage<TEmployeeLog>> getPreLogById(Page<TEmployeeLog> page, TEmployeeLog tEmployeeLog) {
return R.ok(tEmployeeLogService.list(Wrappers.<TEmployeeLog>query().eq("EMP_ID", id) return R.ok(tEmployeeLogService.page(page, Wrappers.query(tEmployeeLog).orderByDesc(CommonConstants.CREATE_TIME)));
.eq("TYPE", CommonConstants.FOUR_INT).orderByDesc(CommonConstants.CREATE_TIME)));
} }
} }
...@@ -48,4 +48,21 @@ public interface EmployeeRegistrationPreMapper extends BaseMapper<EmployeeRegist ...@@ -48,4 +48,21 @@ public interface EmployeeRegistrationPreMapper extends BaseMapper<EmployeeRegist
List<EmployeeRegistrationPreInfoExportVo> selectConfirmExportList(@Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo searchVo); List<EmployeeRegistrationPreInfoExportVo> selectConfirmExportList(@Param("employeeRegistrationPre") EmployeeRegistrationPreSearchVo searchVo);
MessageTempleteVo selectTempleteVo(@Param("id") String id); MessageTempleteVo selectTempleteVo(@Param("id") String id);
/**
* @Description: 判断简档详档-优先从档案维护任务表
* @Author: hgw
* @Date: 2025/3/20 15:20
* @return: java.lang.String
**/
String judegIsSimpleByPre(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
/**
* @Description: 判断简档详档-从项目档案表
* @Author: hgw
* @Date: 2025/3/20 15:20
* @return: java.lang.String
**/
String judegIsSimpleByEmpProject(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
} }
...@@ -10,6 +10,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.SendMessageUpdateVo; ...@@ -10,6 +10,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.SendMessageUpdateVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List;
/** /**
* 入职待建档表 * 入职待建档表
...@@ -62,7 +63,7 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr ...@@ -62,7 +63,7 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
R updateCommonInfo(EmployeeRegistrationPre employeeRegistrationPre); R updateCommonInfo(EmployeeRegistrationPre employeeRegistrationPre);
/** /**
* 入职确认信息信息修改 * 数量查询
* @param searchVo type 查询类型 1待办列表 2 监控列表 * @param searchVo type 查询类型 1待办列表 2 监控列表
* @return * @return
*/ */
...@@ -80,7 +81,17 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr ...@@ -80,7 +81,17 @@ public interface EmployeeRegistrationPreService extends IService<EmployeeRegistr
* @param vo * @param vo
* @return * @return
*/ */
R batchSendMessage(SendMessageUpdateVo vo); R batchSendMessage(List<SendMessageUpdateVo> vo, String type);
void updatePreStatusToEnd(String deptNo, String empIdcard);
void updatePreStatusToEnd(String deptNo, String EmpIdcard); /**
* @param empIdCard 身份证
* @param deptId 项目ID
* @Description: 判断简档详档(员工类型:代理的是简档,“非代理”且员工合同类型为:空、标准合同、劳务派遣合同、补贴合同 是详档,其余为简档)
* @Author: hgw
* @Date: 2025/3/20 15:03
* @return: java.lang.String
**/
String judgeIsSimple(String empIdCard, String deptId);
} }
package com.yifu.cloud.plus.v1.yifu.archives.service;
import com.yifu.cloud.plus.v1.yifu.archives.entity.EmployeeRegistrationPre;
public interface ScheduleService {
void scheduleTask(EmployeeRegistrationPre record);
void executeTask(String aId);
}
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
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.service.ScheduleService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SendMessageUpdateVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.stereotype.Service;
import org.springframework.transaction.support.TransactionTemplate;
import java.time.Instant;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.List;
@Service
public class ScheduleServiceImpl implements ScheduleService {
@Autowired
@Lazy
private EmployeeRegistrationPreService registrationPreService;
@Autowired
private TaskScheduler taskScheduler;
@Autowired
private TransactionTemplate transactionTemplate;
// 调度单个任务
@Override
public void scheduleTask(EmployeeRegistrationPre record) {
Instant triggerTime = record.getExpectedCollectionTime().atZone(ZoneId.systemDefault()).toInstant();
taskScheduler.schedule(() -> executeTask(record.getId()), triggerTime);
}
// 执行发送短信操作(事务内处理)
@Override
public void executeTask(String aId) {
transactionTemplate.execute(status -> {
List<SendMessageUpdateVo> voList = new ArrayList<>();
SendMessageUpdateVo updateVo = new SendMessageUpdateVo();
updateVo.setId(aId);
voList.add(updateVo);
registrationPreService.batchSendMessage(voList, CommonConstants.ONE_STRING);
return null;
});
}
}
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
<result property="fileProvince" column="file_province"/> <result property="fileProvince" column="file_province"/>
<result property="fileCity" column="file_city"/> <result property="fileCity" column="file_city"/>
<result property="fileTown" column="file_town"/> <result property="fileTown" column="file_town"/>
<result property="provinceCode" column="province_code"/>
<result property="cityCode" column="city_code"/>
<result property="townCode" column="town_code"/>
<result property="confirmUser" column="confirm_user"/> <result property="confirmUser" column="confirm_user"/>
<result property="confirmTime" column="confirm_time"/> <result property="confirmTime" column="confirm_time"/>
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
...@@ -101,7 +104,8 @@ ...@@ -101,7 +104,8 @@
a.update_by, a.update_by,
a.update_time, a.update_time,
a.contract_sub_name, a.contract_sub_name,
a.customer_username_new a.customer_username_new,
province_code,city_code,town_code
</sql> </sql>
<sql id="employeeRegistrationPre_where"> <sql id="employeeRegistrationPre_where">
<if test="employeeRegistrationPre != null"> <if test="employeeRegistrationPre != null">
...@@ -264,4 +268,18 @@ ...@@ -264,4 +268,18 @@
from t_message_templete a from t_message_templete a
where id = #{id} where id = #{id}
</select> </select>
<!-- 判断简档详档-优先从档案维护任务表 -->
<select id="judegIsSimpleByPre" resultType="java.lang.String">
select
if(a.emp_nature is null or (a.emp_nature != '2' and (a.contract_type is null or a.contract_type in ('1','20','9'))),1,2) 类型1详档2简档
from employee_registration_pre a where a.emp_idcard = #{empIdCard} and a.dept_id = #{deptId}
</select>
<!-- 判断简档详档-从项目档案表 -->
<select id="judegIsSimpleByEmpProject" resultType="java.lang.String">
select
if(a.EMP_NATRUE is null or (a.EMP_NATRUE != '2' and (a.contract_type is null or a.contract_type in ('1','20','9'))),1,2) 类型1详档2简档
from t_employee_project a where a.DELETE_FLAG = '0' and a.PROJECT_STATUS = 0 and a.emp_idcard = #{empIdCard} and a.dept_id = #{deptId}
</select>
</mapper> </mapper>
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
a.CONTRACT_TYPE as contract_type, a.CONTRACT_TYPE as contract_type,
if(a.UNCOMPLETE_TYPE = '1','基本信息',if(a.UNCOMPLETE_TYPE = '2','合同信息','基本信息、合同信息')) as type, if(a.UNCOMPLETE_TYPE = '1','基本信息',if(a.UNCOMPLETE_TYPE = '2','合同信息','基本信息、合同信息')) as type,
'待完善' as process_status, '待完善' as process_status,
a.ENJOIN_DATE as join_leave_date, DATE_FORMAT(a.ENJOIN_DATE, '%Y-%m-%d') as join_leave_date,
CASE WHEN a.PROJECT_SOURCE='1' THEN "社保/公积金" CASE WHEN a.PROJECT_SOURCE='1' THEN "社保/公积金"
WHEN a.PROJECT_SOURCE ='2' THEN "薪酬" WHEN a.PROJECT_SOURCE ='2' THEN "薪酬"
WHEN a.PROJECT_SOURCE ='3' THEN "商险" WHEN a.PROJECT_SOURCE ='3' THEN "商险"
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
WHEN a.PROJECT_SOURCE ='8' THEN "预入职" WHEN a.PROJECT_SOURCE ='8' THEN "预入职"
ELSE a.PROJECT_SOURCE END as data_source, ELSE a.PROJECT_SOURCE END as data_source,
c.CS_NAME as customer_username, c.CS_NAME as customer_username,
b.EMP_PHONE as emp_phone, b.EMP_PHONE as emp_phone
FROM t_employee_project a FROM t_employee_project a
inner join t_employee_info b on a.EMP_ID = b.id inner join t_employee_info b on a.EMP_ID = b.id
inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO inner join t_settle_domain c on a.DEPT_NO = c.DEPART_NO
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
<result property="empDeptid" column="emp_deptid"/> <result property="empDeptid" column="emp_deptid"/>
</resultMap> </resultMap>
<sql id="tEmployeeProjectBelongDept_where"> <sql id="tEmployeeProjectBelongDept_where">
/* 派单审核通过,或其他路径 */ /* 派单审核通过,或其他路径 2025-3-19 15:22:08 倩倩要求去掉审核条件*/
and ((a.PROJECT_SOURCE = '1' and a.STATUS = 1) or a.PROJECT_SOURCE != '1')
<if test="tEmployeeProjectBelongDept != null"> <if test="tEmployeeProjectBelongDept != null">
<if test="tEmployeeProjectBelongDept.deptId != null and tEmployeeProjectBelongDept.deptId.trim() != ''"> <if test="tEmployeeProjectBelongDept.deptId != null and tEmployeeProjectBelongDept.deptId.trim() != ''">
AND a.DEPT_ID = #{tEmployeeProjectBelongDept.deptId} AND a.DEPT_ID = #{tEmployeeProjectBelongDept.deptId}
...@@ -215,7 +214,7 @@ ...@@ -215,7 +214,7 @@
from t_employee_project a from t_employee_project a
LEFT JOIN t_employee_project_belong_dept b on a.id=b.id LEFT JOIN t_employee_project_belong_dept b on a.id=b.id
<where> <where>
a.DELETE_FLAG ='0' and ((a.PROJECT_SOURCE = '1' and a.STATUS = 1) or a.PROJECT_SOURCE != '1') and b.id is null a.DELETE_FLAG ='0' and b.id is null
<if test="tEmployeeProjectBelongDept.deptId != null and tEmployeeProjectBelongDept.deptId.trim() != ''"> <if test="tEmployeeProjectBelongDept.deptId != null and tEmployeeProjectBelongDept.deptId.trim() != ''">
AND a.DEPT_ID = #{tEmployeeProjectBelongDept.deptId} AND a.DEPT_ID = #{tEmployeeProjectBelongDept.deptId}
</if> </if>
......
...@@ -638,6 +638,8 @@ public interface CommonConstants { ...@@ -638,6 +638,8 @@ public interface CommonConstants {
List<String> processStatus = Stream.of("0","1").collect(Collectors.toList()); List<String> processStatus = Stream.of("0","1").collect(Collectors.toList());
List<String> processStatusEnd = Stream.of("3","4").collect(Collectors.toList());
List<String> processPreStatus = Stream.of("1").collect(Collectors.toList()); List<String> processPreStatus = Stream.of("1").collect(Collectors.toList());
List<String> processPreArchivesStatus = Stream.of("0","1","2").collect(Collectors.toList()); List<String> processPreArchivesStatus = Stream.of("0","1","2").collect(Collectors.toList());
......
...@@ -32,17 +32,6 @@ public class CspDaprUtils { ...@@ -32,17 +32,6 @@ public class CspDaprUtils {
* @return * @return
**/ **/
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/updateRegistByPreInfo", 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", countVo, EmployeeRegistrationDaprCountVo.class, SecurityConstants.FROM_IN);
} }
} }
package com.yifu.cloud.plus.v1.csp.vo; 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 com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
......
...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,7 +4,6 @@ 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;
...@@ -287,12 +286,10 @@ public class EmployeeRegistrationController { ...@@ -287,12 +286,10 @@ public class EmployeeRegistrationController {
**/ **/
@Operation(summary = "查询入职待确认数量") @Operation(summary = "查询入职待确认数量")
@SysLog("查询入职待确认数量") @SysLog("查询入职待确认数量")
@Inner @PostMapping("/getRegisterPreCount")
@PostMapping("/inner/getRegisterPreCount") public R getRegisterPreCount(@RequestBody EmployeeRegistrationSearchVo searchVo) {
public EmployeeRegistrationDaprCountVo getRegisterPreCount(@RequestBody EmployeeRegistrationDaprCountVo countVo) { YifuUser user = SecurityUtils.getUser();
EmployeeRegistrationSearchVo searchVo = new EmployeeRegistrationSearchVo(); menuUtil.setAuthSql(user, searchVo);
searchVo.setMId(countVo.getMId()); return R.ok(employeeRegistrationService.getRegisterPreCount(searchVo));
menuUtil.setAuthSql(countVo.getUser(), searchVo);
return employeeRegistrationService.getRegisterPreCount(countVo,searchVo);
} }
} }
...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -4,7 +4,6 @@ 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;
...@@ -128,7 +127,7 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati ...@@ -128,7 +127,7 @@ public interface EmployeeRegistrationService extends IService<EmployeeRegistrati
* @param countVo 查询入职待确认数量vo * @param countVo 查询入职待确认数量vo
* @return * @return
*/ */
EmployeeRegistrationDaprCountVo getRegisterPreCount(EmployeeRegistrationDaprCountVo countVo,EmployeeRegistrationSearchVo searchVo); long getRegisterPreCount(EmployeeRegistrationSearchVo searchVo);
/** /**
* @param searchCspVo 身份证 与 类型 * @param searchCspVo 身份证 与 类型
......
...@@ -656,22 +656,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -656,22 +656,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
registration.setProcessStatus(CommonConstants.THREE_STRING); registration.setProcessStatus(CommonConstants.THREE_STRING);
//新增拒绝入职操作记录 //新增拒绝入职操作记录
logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.BACK_RECEIVE, LocalDateTime.now(), logService.saveLog(registration.getId(), CommonConstants.ZERO_STRING, RegistConstants.BACK_RECEIVE, LocalDateTime.now(),
updateVo.getEmployeeName(), updateVo.getReason()); updateVo.getEmployeeName(), "拒绝入职原因:" + updateVo.getReason());
} }
return R.ok(); return R.ok();
} }
@Override @Override
public EmployeeRegistrationDaprCountVo getRegisterPreCount(EmployeeRegistrationDaprCountVo countVo, public long getRegisterPreCount(EmployeeRegistrationSearchVo employeeRegistration) {
EmployeeRegistrationSearchVo employeeRegistration) {
//权限和条件赋值 //权限和条件赋值
employeeRegistration.setType(countVo.getType()); initSearchVo(employeeRegistration);
initDaprSearchVo(employeeRegistration,countVo.getUser());
employeeRegistration.setStatusList(CommonConstants.processPreStatus); employeeRegistration.setStatusList(CommonConstants.processPreStatus);
employeeRegistration.setTypeList(CommonConstants.processPreStatus); employeeRegistration.setTypeList(CommonConstants.processPreStatus);
long count = baseMapper.selectExportCount(employeeRegistration); return baseMapper.selectExportCount(employeeRegistration);
countVo.setCount(count);
return countVo;
} }
//单个新增、导入校验 //单个新增、导入校验
...@@ -939,31 +935,6 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -939,31 +935,6 @@ 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) {
...@@ -976,22 +947,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -976,22 +947,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//数据初始化 //数据初始化
private void initRegistPreInfo(EmployeeRegistration registration,EmployeeRegistrationPreVo preVo,YifuUser user) { private void initRegistPreInfo(EmployeeRegistration registration,EmployeeRegistrationPreVo preVo,YifuUser user) {
preVo.setCustomerUsername(registration.getCustomerUsername()); try {
preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname()); preVo.setCustomerUsername(registration.getCustomerUsername());
preVo.setDeptName(registration.getDeptName()); preVo.setCustomerUserLoginname(registration.getCustomerUserLoginname());
preVo.setDeptId(registration.getDeptId()); preVo.setDeptName(registration.getDeptName());
preVo.setDataSource(registration.getDataSource()); preVo.setDeptId(registration.getDeptId());
preVo.setPosition(registration.getPosition()); preVo.setDataSource(registration.getDataSource());
preVo.setJoinLeaveDate(registration.getJoinLeaveDate()); preVo.setPosition(registration.getPosition());
preVo.setProcessStatus(CommonConstants.ZERO_STRING); preVo.setJoinLeaveDate(registration.getJoinLeaveDate());
preVo.setConfirmTime(DateUtil.getCurrentDateTime()); preVo.setProcessStatus(CommonConstants.ZERO_STRING);
preVo.setDeptNo(registration.getDeptNo()); preVo.setConfirmTime(DateUtil.getCurrentDateTime());
preVo.setConfirmUser(user.getNickname()); preVo.setDeptNo(registration.getDeptNo());
preVo.setCustomerUsernameNew(registration.getCustomerUsername()); preVo.setConfirmUser(user.getNickname());
preVo.setEmpPhone(registration.getEmpPhone()); preVo.setCustomerUsernameNew(registration.getCustomerUsername());
preVo.setEmployeeName(registration.getEmployeeName()); preVo.setEmpPhone(registration.getEmpPhone());
preVo.setEmpIdcard(registration.getEmpIdcard()); preVo.setEmployeeName(registration.getEmployeeName());
preVo.setExpectedCollectionTime(LocalDateTimeUtils.formatTime(DateUtil.dateToString( preVo.setEmpIdcard(registration.getEmpIdcard());
registration.getJoinLeaveDate(),DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00:00",LocalDateTimeUtils.DATE_TIME_PATTERN)); if (Common.isNotNull(preVo.getPushDate())) {
preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
registration.getJoinLeaveDate(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " " + preVo.getPushDate(), DateUtil.DATETIME_PATTERN_MINUTE));
}
}catch (Exception e) {
log.error("执行异常", e);
}
} }
} }
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