Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
0cd4bcfd
Commit
0cd4bcfd
authored
Mar 20, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.8' into MVP1.7.8
parents
635a4855
8bf16c37
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
334 additions
and
171 deletions
+334
-171
EmployeeRegistrationPre.java
...plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
+10
-0
EmployeeRegistrationPreVo.java
...d/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
+15
-2
SendMessageUpdateVo.java
...u/cloud/plus/v1/yifu/archives/vo/SendMessageUpdateVo.java
+1
-4
TaskSchedulerConfig.java
...oud/plus/v1/yifu/archives/config/TaskSchedulerConfig.java
+18
-0
EmployeeRegistrationPreController.java
...rchives/controller/EmployeeRegistrationPreController.java
+17
-2
TEmployeeLogController.java
...s/v1/yifu/archives/controller/TEmployeeLogController.java
+2
-3
EmployeeRegistrationPreMapper.java
...1/yifu/archives/mapper/EmployeeRegistrationPreMapper.java
+17
-0
EmployeeRegistrationPreService.java
...yifu/archives/service/EmployeeRegistrationPreService.java
+14
-3
ScheduleService.java
.../cloud/plus/v1/yifu/archives/service/ScheduleService.java
+10
-0
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+121
-78
ScheduleServiceImpl.java
...us/v1/yifu/archives/service/impl/ScheduleServiceImpl.java
+50
-0
EmployeeRegistrationPreMapper.xml
...c/main/resources/mapper/EmployeeRegistrationPreMapper.xml
+19
-1
TCompleteMonitorMapper.xml
...-biz/src/main/resources/mapper/TCompleteMonitorMapper.xml
+2
-2
TEmployeeProjectBelongDeptMapper.xml
...ain/resources/mapper/TEmployeeProjectBelongDeptMapper.xml
+2
-3
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+2
-0
CspDaprUtils.java
...ifu/cloud/plus/v1/yifu/common/dapr/util/CspDaprUtils.java
+1
-12
EmployeeRegistrationDaprCountVo.java
...cloud/plus/v1/csp/vo/EmployeeRegistrationDaprCountVo.java
+0
-1
EmployeeRegistrationController.java
...lus/v1/csp/controller/EmployeeRegistrationController.java
+5
-8
EmployeeRegistrationService.java
...loud/plus/v1/csp/service/EmployeeRegistrationService.java
+1
-2
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+27
-50
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
View file @
0cd4bcfd
...
@@ -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
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeRegistrationPreVo.java
View file @
0cd4bcfd
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
LocalDateTim
e
expectedCollectionTime
;
private
Dat
e
expectedCollectionTime
;
@Schema
(
description
=
"确认人"
)
@Schema
(
description
=
"确认人"
)
private
String
confirmUser
;
private
String
confirmUser
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/SendMessageUpdateVo.java
View file @
0cd4bcfd
...
@@ -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
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/config/TaskSchedulerConfig.java
0 → 100644
View file @
0cd4bcfd
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
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/EmployeeRegistrationPreController.java
View file @
0cd4bcfd
...
@@ -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
));
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeLogController.java
View file @
0cd4bcfd
...
@@ -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
)));
}
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/EmployeeRegistrationPreMapper.java
View file @
0cd4bcfd
...
@@ -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
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/EmployeeRegistrationPreService.java
View file @
0cd4bcfd
...
@@ -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
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/ScheduleService.java
0 → 100644
View file @
0cd4bcfd
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
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
0cd4bcfd
...
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
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.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.EmployeeRegistrationPreMapper
;
...
@@ -31,11 +30,15 @@ import lombok.RequiredArgsConstructor;
...
@@ -31,11 +30,15 @@ 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
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -67,6 +70,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -67,6 +70,10 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
private
final
MenuUtil
menuUtil
;
private
final
MenuUtil
menuUtil
;
@Autowired
@Lazy
private
ScheduleService
scheduleService
;
/**
/**
* 入职待建档表简单分页查询
* 入职待建档表简单分页查询
* @param employeeRegistrationPre 入职待建档表
* @param employeeRegistrationPre 入职待建档表
...
@@ -212,9 +219,27 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -212,9 +219,27 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Override
@Override
public
Boolean
saveRegistPreInfo
(
EmployeeRegistrationPreVo
preVo
)
{
public
Boolean
saveRegistPreInfo
(
EmployeeRegistrationPreVo
preVo
)
{
EmployeeRegistrationPre
pre
=
new
EmployeeRegistrationPre
();
EmployeeRegistrationPre
pre
=
new
EmployeeRegistrationPre
();
BeanUtils
.
copyProperties
(
pre
,
preVo
);
BeanUtils
.
copyProperties
(
preVo
,
pre
);
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
()))
{
pre
.
setExpectedCollectionTime
(
LocalDateTimeUtils
.
dateToLocalDateTime
(
preVo
.
getExpectedCollectionTime
()));
}
baseMapper
.
insert
(
pre
);
baseMapper
.
insert
(
pre
);
if
(
Common
.
isNotNull
(
preVo
.
getExpectedCollectionTime
()))
{
// 事务提交后触发调度
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
LocalDateTime
now
=
LocalDateTime
.
now
();
if
(
pre
.
getExpectedCollectionTime
().
isBefore
(
now
)
||
pre
.
getExpectedCollectionTime
().
isEqual
(
now
))
{
scheduleService
.
executeTask
(
pre
.
getId
());
}
else
{
scheduleService
.
scheduleTask
(
pre
);
}
}
});
}
return
true
;
return
true
;
}
}
...
@@ -256,30 +281,32 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -256,30 +281,32 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
String
natureItemAfter
=
null
;
String
natureItemAfter
=
null
;
String
contractItemBefore
=
null
;
String
contractItemBefore
=
null
;
String
contractItemAfter
=
null
;
String
contractItemAfter
=
null
;
if
(!
updat
ePre
.
getContractType
().
equals
(
employeeRegistrationPre
.
getContractType
()))
{
if
(!
compar
ePre
.
getContractType
().
equals
(
employeeRegistrationPre
.
getContractType
()))
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type"
);
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"personnel_type"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
updat
ePre
.
getContractType
())){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
compar
ePre
.
getContractType
())){
contractItemBefore
=
entry
.
getValue
();
contractItemBefore
=
entry
.
getValue
();
break
;
}
}
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
employeeRegistrationPre
.
getContractType
())){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
employeeRegistrationPre
.
getContractType
())){
contractItemAfter
=
entry
.
getValue
();
contractItemAfter
=
entry
.
getValue
();
}
if
(
null
!=
contractItemBefore
&&
null
!=
contractItemAfter
)
{
break
;
break
;
}
}
}
}
}
}
if
(!
updat
ePre
.
getEmpNature
().
equals
(
employeeRegistrationPre
.
getEmpNature
()))
{
if
(!
compar
ePre
.
getEmpNature
().
equals
(
employeeRegistrationPre
.
getEmpNature
()))
{
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
Map
<
String
,
String
>
dicObj
=
(
Map
<
String
,
String
>)
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"emp_natrue"
);
CacheConstants
.
DICT_DETAILS
+
CommonConstants
.
COLON_STRING
+
"emp_natrue"
);
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
for
(
Map
.
Entry
<
String
,
String
>
entry:
dicObj
.
entrySet
()){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
updat
ePre
.
getEmpNature
())){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
compar
ePre
.
getEmpNature
())){
natureItemBefore
=
entry
.
getValue
();
natureItemBefore
=
entry
.
getValue
();
break
;
}
}
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
employeeRegistrationPre
.
getEmpNature
())){
if
(
Common
.
isNotNull
(
entry
.
getKey
())
&&
entry
.
getKey
().
equals
(
employeeRegistrationPre
.
getEmpNature
())){
natureItemAfter
=
entry
.
getValue
();
natureItemAfter
=
entry
.
getValue
();
}
if
(
null
!=
natureItemAfter
&&
null
!=
natureItemBefore
)
{
break
;
break
;
}
}
}
}
...
@@ -317,34 +344,19 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -317,34 +344,19 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
public
R
getListCount
(
EmployeeRegistrationPreSearchVo
searchVo
)
{
public
R
getListCount
(
EmployeeRegistrationPreSearchVo
searchVo
)
{
try
{
try
{
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
//入职确认数量
EmployeeRegistrationDaprCountVo
vo
=
new
EmployeeRegistrationDaprCountVo
();
vo
.
setUser
(
user
);
vo
.
setType
(
searchVo
.
getType
());
vo
.
setMId
(
searchVo
.
getMId
());
R
<
EmployeeRegistrationDaprCountVo
>
daprVo
=
cspDaprUtils
.
getRegisterPreCount
(
vo
);
if
(
Common
.
isNotNull
(
daprVo
)
&&
Common
.
isNotNull
(
daprVo
.
getData
()))
{
vo
=
daprVo
.
getData
();
}
//入职待确认数量
long
countOne
=
vo
.
getCount
();
//入职待建档数量
//入职待建档数量
menuUtil
.
setAuthSql
(
user
,
searchVo
);
menuUtil
.
setAuthSql
(
user
,
searchVo
);
initSearchVo
(
searchVo
);
initSearchVo
(
searchVo
);
searchVo
.
setStatusList
(
CommonConstants
.
processPreArchivesStatus
);
searchVo
.
setStatusList
(
CommonConstants
.
processPreArchivesStatus
);
long
countTwo
=
baseMapper
.
selectExportCount
(
searchVo
);
long
countTwo
=
baseMapper
.
selectExportCount
(
searchVo
);
//档案待完整数量
//档案待完整数量
long
countThree
=
completeMonitorMapper
.
getAllLackArchivesExportCount
(
searchVo
);
long
countThree
=
completeMonitorMapper
.
getAllLackArchivesExportCount
(
searchVo
);
EmployeeRegistrationCountVo
countVo
=
new
EmployeeRegistrationCountVo
();
EmployeeRegistrationCountVo
countVo
=
new
EmployeeRegistrationCountVo
();
countVo
.
setTypeOneCount
(
countOne
);
countVo
.
setTypeTwoCount
(
countTwo
);
countVo
.
setTypeTwoCount
(
countTwo
);
countVo
.
setTypeThreeCount
(
countThree
);
countVo
.
setTypeThreeCount
(
countThree
);
countVo
.
setTotalCount
(
countOne
+
countTwo
+
countThree
);
return
R
.
ok
(
countVo
);
return
R
.
ok
(
countVo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"
生成入职待确认信息修改操作日志
异常"
,
e
);
log
.
error
(
"
查询数量
异常"
,
e
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
);
}
}
}
}
...
@@ -363,79 +375,91 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -363,79 +375,91 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
}
@Override
@Override
public
R
batchSendMessage
(
SendMessageUpdateVo
vo
)
{
public
R
batchSendMessage
(
List
<
SendMessageUpdateVo
>
voList
,
String
type
)
{
//获取短信待发放和信息待填写的数据
//获取短信待发放和信息待填写的数据
List
<
String
>
idList
=
vo
.
getIdList
();
RegistParamVo
paramVo
=
new
RegistParamVo
();
RegistParamVo
paramVo
=
new
RegistParamVo
();
List
<
TRegistWarningEmployee
>
smsEmployeeList
=
new
ArrayList
<>();
List
<
TRegistWarningEmployee
>
smsEmployeeList
=
new
ArrayList
<>();
List
<
EmployeeRegistrationPre
>
updateList
=
new
ArrayList
<>();
List
<
EmployeeRegistrationPre
>
updateList
=
new
ArrayList
<>();
List
<
RegistParamVo
>
params
=
new
ArrayList
<>();
List
<
RegistParamVo
>
params
=
new
ArrayList
<>();
List
<
String
>
phones
=
new
ArrayList
<>();
List
<
String
>
phones
=
new
ArrayList
<>();
if
(
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getType
()))
{
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
List
<
EmployeeRegistrationPre
>
updatePreList
=
baseMapper
.
selectList
(
Wrappers
.<
EmployeeRegistrationPre
>
query
()
for
(
SendMessageUpdateVo
updateVo:
voList
)
{
.
lambda
().
in
(
EmployeeRegistrationPre:
:
getId
,
idList
)
EmployeeRegistrationPre
updatePre
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistrationPre
>
query
()
.
in
(
EmployeeRegistrationPre:
:
getProcessStatus
,
CommonConstants
.
processStatus
));
.
lambda
().
eq
(
EmployeeRegistrationPre:
:
getId
,
updateVo
.
getId
())
if
(
null
==
updatePreList
||
updatePreList
.
isEmpty
())
{
.
in
(
EmployeeRegistrationPre:
:
getProcessStatus
,
CommonConstants
.
processStatus
));
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
if
(
Common
.
isNotNull
(
updatePre
))
{
}
paramVo
.
setName
(
updatePre
.
getEmployeeName
());
for
(
EmployeeRegistrationPre
updatePre
:
updatePreList
)
{
paramVo
.
setLinkValue
(
"additional.html#/quick-onboarding?"
+
"?empId="
+
updatePre
.
getId
());
paramVo
.
setName
(
updatePre
.
getEmployeeName
());
params
.
add
(
paramVo
);
paramVo
.
setLinkValue
(
"additional.html#/quick-onboarding?"
+
"?empId="
+
updatePre
.
getId
());
phones
.
add
(
updatePre
.
getEmpPhone
());
params
.
add
(
paramVo
);
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
updatePre
.
getProcessStatus
()))
{
phones
.
add
(
updatePre
.
getEmpPhone
());
updatePre
.
setProcessStatus
(
CommonConstants
.
ONE_STRING
);
if
(
CommonConstants
.
ONE_STRING
.
equals
(
updatePre
.
getProcessStatus
()))
{
}
updatePre
.
setProcessStatus
(
CommonConstants
.
TWO_STRING
);
//生成短信发送的记录
TRegistWarningEmployee
smsEmployee
=
new
TRegistWarningEmployee
();
smsEmployee
.
setEmpName
(
updatePre
.
getEmployeeName
());
smsEmployee
.
setEmpPhone
(
updatePre
.
getEmpPhone
());
smsEmployee
.
setSendDate
(
DateUtil
.
getCurrentDateTime
());
smsEmployee
.
setSendMethod
(
CommonConstants
.
ONE_INT
);
smsEmployeeList
.
add
(
smsEmployee
);
updateList
.
add
(
updatePre
);
}
}
updateList
.
add
(
updatePre
);
}
}
}
else
{
}
else
{
List
<
TEmployeeInfo
>
infoList
=
employeeInfoMapper
.
selectList
(
Wrappers
.<
TEmployeeInfo
>
query
()
for
(
SendMessageUpdateVo
updateVo:
voList
)
{
.
lambda
().
in
(
TEmployeeInfo:
:
getId
,
idList
));
TEmployeeInfo
info
=
employeeInfoMapper
.
selectById
(
updateVo
.
getId
());
if
(
null
==
infoList
||
infoList
.
isEmpty
())
{
if
(
Common
.
isNotNull
(
info
))
{
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
paramVo
.
setName
(
info
.
getEmpName
());
}
paramVo
.
setLinkValue
(
"additional.html#/quick-onboarding?"
+
"?empId="
+
info
.
getId
());
for
(
TEmployeeInfo
info
:
infoList
)
{
params
.
add
(
paramVo
);
paramVo
.
setName
(
info
.
getEmpName
());
phones
.
add
(
info
.
getEmpPhone
());
paramVo
.
setLinkValue
(
"additional.html#/quick-onboarding?"
+
"?empId="
+
info
.
getId
());
//如果有入职待建档数据同步更新
params
.
add
(
paramVo
);
EmployeeRegistrationPre
registrationPre
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistrationPre
>
query
().
lambda
()
phones
.
add
(
info
.
getEmpPhone
());
.
eq
(
EmployeeRegistrationPre:
:
getEmpIdcard
,
info
.
getEmpIdcard
())
//如果有入职待建档数据同步更新
.
eq
(
EmployeeRegistrationPre:
:
getDeptNo
,
updateVo
.
getDeptNo
())
EmployeeRegistrationPre
registrationPre
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistrationPre
>
query
().
lambda
()
.
eq
(
EmployeeRegistrationPre:
:
getProcessStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
EmployeeRegistrationPre:
:
getEmpIdcard
,
info
.
getEmpIdcard
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
EmployeeRegistrationPre:
:
getDeptNo
,
vo
.
getDeptNo
())
if
(
Common
.
isNotNull
(
registrationPre
))
{
.
eq
(
EmployeeRegistrationPre:
:
getProcessStatus
,
CommonConstants
.
ZERO_STRING
)
registrationPre
.
setProcessStatus
(
CommonConstants
.
ONE_STRING
);
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
if
(
Common
.
isNotNull
(
registrationPre
))
{
updateList
.
add
(
registrationPre
);
registrationPre
.
setProcessStatus
(
CommonConstants
.
TWO_STRING
);
//生成短信发送的记录
TRegistWarningEmployee
smsEmployee
=
new
TRegistWarningEmployee
();
smsEmployee
.
setEmpName
(
info
.
getEmpName
());
smsEmployee
.
setEmpPhone
(
info
.
getEmpPhone
());
smsEmployee
.
setSendDate
(
DateUtil
.
getCurrentDateTime
());
smsEmployee
.
setSendMethod
(
CommonConstants
.
ONE_INT
);
smsEmployeeList
.
add
(
smsEmployee
);
}
}
updateList
.
add
(
registrationPre
);
}
}
}
}
//发送短信
//发送短信
AliSmsResult
res
=
sendMessage
(
phones
,
params
);
if
(!
params
.
isEmpty
())
{
if
(
null
!=
res
&&
null
!=
res
.
getBizId
())
{
AliSmsResult
res
=
sendMessage
(
phones
,
params
);
this
.
updateBatchById
(
updateList
);
if
(
null
!=
res
&&
null
!=
res
.
getBizId
())
{
for
(
EmployeeRegistrationPre
updatePre:
updateList
)
{
if
(!
updateList
.
isEmpty
())
{
//生成短信发送的记录
this
.
updateBatchById
(
updateList
);
TRegistWarningEmployee
smsEmployee
=
new
TRegistWarningEmployee
();
}
smsEmployee
.
setWarningId
(
updatePre
.
getId
());
for
(
TRegistWarningEmployee
employee
:
smsEmployeeList
)
{
smsEmployee
.
setEmpName
(
updatePre
.
getEmployeeName
());
employee
.
setBizId
(
res
.
getBizId
());
smsEmployee
.
setEmpPhone
(
updatePre
.
getEmpPhone
());
employee
.
setMessage
(
res
.
getMessage
());
smsEmployee
.
setSendDate
(
DateUtil
.
getCurrentDateTime
());
}
smsEmployee
.
setSendMethod
(
CommonConstants
.
ONE_INT
);
employeeService
.
saveBatch
(
smsEmployeeList
);
smsEmployeeList
.
add
(
smsEmployee
);
return
R
.
ok
();
}
else
{
for
(
TRegistWarningEmployee
employee
:
smsEmployeeList
)
{
employee
.
setMessage
(
"短信发送失败"
);
}
employeeService
.
saveBatch
(
smsEmployeeList
);
}
}
employeeService
.
saveBatch
(
smsEmployeeList
);
return
R
.
ok
();
}
else
{
return
R
.
failed
();
}
}
return
R
.
failed
();
}
}
@Override
@Override
public
void
updatePreStatusToEnd
(
String
deptNo
,
String
E
mpIdcard
)
{
public
void
updatePreStatusToEnd
(
String
deptNo
,
String
e
mpIdcard
)
{
EmployeeRegistrationPre
registrationPre
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistrationPre
>
query
().
lambda
()
EmployeeRegistrationPre
registrationPre
=
baseMapper
.
selectOne
(
Wrappers
.<
EmployeeRegistrationPre
>
query
().
lambda
()
.
eq
(
EmployeeRegistrationPre:
:
getEmpIdcard
,
E
mpIdcard
)
.
eq
(
EmployeeRegistrationPre:
:
getEmpIdcard
,
e
mpIdcard
)
.
eq
(
EmployeeRegistrationPre:
:
getDeptNo
,
deptNo
)
.
eq
(
EmployeeRegistrationPre:
:
getDeptNo
,
deptNo
)
.
in
(
EmployeeRegistrationPre:
:
getProcessStatus
,
CommonConstants
.
processPreArchivesStatus
)
.
in
(
EmployeeRegistrationPre:
:
getProcessStatus
,
CommonConstants
.
processPreArchivesStatus
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
...
@@ -497,4 +521,23 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
...
@@ -497,4 +521,23 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
return
false
;
return
false
;
}
}
/**
* @Description: 判断简档详档(员工类型:代理的是简档,“非代理”且员工合同类型为:空、标准合同、劳务派遣合同、补贴合同 是详档,其余为简档)
* @Author: hgw
* @Date: 2025/3/20 15:22
* @return: java.lang.String
**/
@Override
public
String
judgeIsSimple
(
String
empIdCard
,
String
deptId
)
{
// 类型1详档2简档
String
type
=
baseMapper
.
judegIsSimpleByPre
(
empIdCard
,
deptId
);
if
(
Common
.
isEmpty
(
type
))
{
type
=
baseMapper
.
judegIsSimpleByEmpProject
(
empIdCard
,
deptId
);
}
if
(
Common
.
isEmpty
(
type
))
{
type
=
CommonConstants
.
ONE_STRING
;
}
return
type
;
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/ScheduleServiceImpl.java
0 → 100644
View file @
0cd4bcfd
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
;
});
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/EmployeeRegistrationPreMapper.xml
View file @
0cd4bcfd
...
@@ -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>
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCompleteMonitorMapper.xml
View file @
0cd4bcfd
...
@@ -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
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectBelongDeptMapper.xml
View file @
0cd4bcfd
...
@@ -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>
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
0cd4bcfd
...
@@ -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
());
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/CspDaprUtils.java
View file @
0cd4bcfd
...
@@ -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
);
}
}
}
}
yifu-csp/yifu-csp-api/src/main/java/com/yifu/cloud/plus/v1/csp/vo/EmployeeRegistrationDaprCountVo.java
View file @
0cd4bcfd
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
;
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/controller/EmployeeRegistrationController.java
View file @
0cd4bcfd
...
@@ -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
);
}
}
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/EmployeeRegistrationService.java
View file @
0cd4bcfd
...
@@ -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 身份证 与 类型
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
0cd4bcfd
...
@@ -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
);
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment