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
d4ac2931
Commit
d4ac2931
authored
Oct 13, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-社保自动化相关提价
parent
b5d6e282
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1042 additions
and
54 deletions
+1042
-54
EmployeeRegistrationPre.java
...plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
+13
-0
TEmployeePreLogDetail.java
...d/plus/v1/yifu/archives/entity/TEmployeePreLogDetail.java
+4
-4
EmployeePreSocialListVo.java
...oud/plus/v1/yifu/archives/vo/EmployeePreSocialListVo.java
+26
-0
TDispatchInfoPreVo.java
...fu/cloud/plus/v1/yifu/archives/vo/TDispatchInfoPreVo.java
+24
-0
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+48
-4
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+1
-0
TEmployeePreLogServiceImpl.java
...ifu/archives/service/impl/TEmployeePreLogServiceImpl.java
+144
-4
TSettleDomainServiceImpl.java
.../yifu/archives/service/impl/TSettleDomainServiceImpl.java
+6
-0
application-dev.yml
.../yifu-archives-biz/src/main/resources/application-dev.yml
+0
-1
EmployeeRegistrationPreMapper.xml
...c/main/resources/mapper/EmployeeRegistrationPreMapper.xml
+1
-0
SocialDaprUtils.java
.../cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
+54
-2
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+63
-15
SocialTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
+27
-0
TDispatchInfo.java
.../yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
+4
-0
TDispatchInfoPre.java
...fu/cloud/plus/v1/yifu/social/entity/TDispatchInfoPre.java
+40
-5
TDispatchImportVo.java
.../yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
+11
-0
TDispatchInfoPreSearchVo.java
...loud/plus/v1/yifu/social/vo/TDispatchInfoPreSearchVo.java
+4
-0
TDispatchInfoPreController.java
...v1/yifu/social/controller/TDispatchInfoPreController.java
+87
-0
TDispatchInfoPreMapper.java
...ud/plus/v1/yifu/social/mapper/TDispatchInfoPreMapper.java
+6
-0
TDispatchInfoPreService.java
.../plus/v1/yifu/social/service/TDispatchInfoPreService.java
+27
-0
TDispatchInfoPreServiceImpl.java
...yifu/social/service/impl/TDispatchInfoPreServiceImpl.java
+316
-14
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+59
-4
TDispatchInfoPreMapper.xml
...-biz/src/main/resources/mapper/TDispatchInfoPreMapper.xml
+77
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/EmployeeRegistrationPre.java
View file @
d4ac2931
...
...
@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.archives.entity;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TDispatchInfoPreVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSocialPreDetailVo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail
;
...
...
@@ -104,6 +106,9 @@ public class EmployeeRegistrationPre extends BaseEntity {
@Schema
(
description
=
"商险是否已购买 0 是 1 否"
)
private
String
insuranceIsBuy
;
@Schema
(
description
=
"商险是否已购买 0 是 1 否"
)
private
String
socialIsBuy
;
@Schema
(
description
=
"档案所在地-县编号"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
townCode
;
...
...
@@ -134,6 +139,14 @@ public class EmployeeRegistrationPre extends BaseEntity {
@TableField
(
exist
=
false
)
private
List
<
TInsurancePreDetail
>
exitInsuranceInfoList
;
@Schema
(
description
=
"社保待购买信息"
)
@TableField
(
exist
=
false
)
private
TDispatchInfoPreVo
dispatchInfoPreVo
;
@Schema
(
description
=
"社保流程中信息集合"
)
@TableField
(
exist
=
false
)
private
List
<
TSocialPreDetailVo
>
exitSocialInfoList
;
@Schema
(
description
=
"附件集合"
)
@TableField
(
exist
=
false
)
private
List
<
TAttaInfo
>
attaList
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeePreLogDetail.java
View file @
d4ac2931
...
...
@@ -52,10 +52,10 @@ public class TEmployeePreLogDetail extends BaseEntity {
/**
* 类型:1档案;2商险
*/
@ExcelAttribute
(
name
=
"类型:1档案;2商险3合同"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"类型:1档案;2商险3合同不能超过1个字符"
)
@ExcelProperty
(
"类型:1档案;2商险3合同"
)
@Schema
(
description
=
"类型:1档案;2商险 3合同"
)
@ExcelAttribute
(
name
=
"类型:1档案;2商险3合同
4社保
"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"类型:1档案;2商险3合同
4社保
不能超过1个字符"
)
@ExcelProperty
(
"类型:1档案;2商险3合同
4社保
"
)
@Schema
(
description
=
"类型:1档案;2商险 3合同
4社保
"
)
private
String
type
;
/**
* 入职确认信息表ID
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeePreSocialListVo.java
0 → 100644
View file @
d4ac2931
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsurancePreDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author huych
* @description 社保自动化自动化社保明细VO
* @date 2025-10-10 15:44:26
*/
@Data
@Schema
(
description
=
"社保自动化自动化社保明细VO"
)
public
class
EmployeePreSocialListVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
628032758008497542L
;
@Schema
(
description
=
"社保待购买信息"
)
private
TDispatchInfoPreVo
dispatchInfoPreVo
;
@Schema
(
description
=
"社保流程中信息集合"
)
private
List
<
TSocialPreDetailVo
>
exitSocialInfoList
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TDispatchInfoPreVo.java
View file @
d4ac2931
...
...
@@ -138,6 +138,11 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema
(
description
=
"0社保1公积金"
)
@ExcelProperty
(
"0社保1公积金"
)
private
String
typeSub
;
/**
* 接收方式
*/
@Schema
(
description
=
"接收方式 0项目配置 1自定义"
)
private
String
receiveType
;
/**
* 备案基数
*/
...
...
@@ -180,6 +185,11 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema
(
description
=
"预计派单时间"
)
@ExcelProperty
(
"预计派单时间"
)
private
Date
expectedCollectionTime
;
/**
* 预计派单时间
*/
@Schema
(
description
=
"预计派单类型 入职日期当天 0 入职一个月 1 ..."
)
private
String
expectedCollectionType
;
/**
* 派单确认时间
*/
...
...
@@ -208,6 +218,13 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema
(
description
=
"配置名称"
)
@ExcelProperty
(
"配置名称"
)
private
String
configName
;
/**
* 配置id
*/
@ExcelAttribute
(
name
=
"配置id"
)
@Schema
(
description
=
"配置id"
)
@ExcelProperty
(
"配置id"
)
private
String
configId
;
/**
* 入职确认信息主表id
*/
...
...
@@ -215,6 +232,13 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema
(
description
=
"入职确认信息主表id"
)
@ExcelProperty
(
"入职确认信息主表id"
)
private
String
registerId
;
/**
* 起缴日期
*/
@ExcelAttribute
(
name
=
"起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"起缴日期"
)
@ExcelProperty
(
"起缴日期"
)
private
Date
socialStartDate
;
/**
* 养老起缴日期
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
d4ac2931
...
...
@@ -26,10 +26,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.alisms.YiFuSmsUtil;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprInsurancesProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TEmployeeInsurancePre
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
...
...
@@ -74,6 +71,9 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
@Autowired
private
CspDaprUtils
cspDaprUtils
;
@Autowired
private
SocialDaprUtils
socialDaprUtils
;
@Autowired
private
OSSUtil
ossUtil
;
...
...
@@ -762,6 +762,41 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
}
//1.9.16社保自动化校验逻辑
if
(
employeeRegistrationPre
.
getServerItem
().
contains
(
"社保购买"
))
{
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo
cardVo
=
new
TEmployeeAutoRegistCheckVo
();
cardVo
.
setEmpIdcard
(
employeeRegistrationPre
.
getEmpIdcard
());
R
<
Boolean
>
socialFlag
=
socialDaprUtils
.
selectExitEmpSocial
(
cardVo
);
//是否已签署为是需要判断合同是否在用或者流程中
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
employeeRegistrationPre
.
getSocialIsBuy
())
&&
(
Common
.
isEmpty
(
socialFlag
)
||
Boolean
.
TRUE
.
equals
(!
socialFlag
.
getData
())))
{
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
"未找到流程中或者在用的社保信息!"
);
}
//是否已签署为否需要判断是否在用或者流程中的合同
if
(
CommonConstants
.
ONE_STRING
.
equals
(
employeeRegistrationPre
.
getSocialIsBuy
())
&&
Common
.
isNotNull
(
socialFlag
)
&&
Boolean
.
TRUE
.
equals
(
socialFlag
.
getData
())
&&
null
!=
employeeRegistrationPre
.
getDispatchInfoPreVo
()
&&
Common
.
isEmpty
(
employeeRegistrationPre
.
getDispatchInfoPreVo
().
getId
()))
{
return
R
.
other
(
CommonConstants
.
TWO_INT
,
null
,
"该人员存在在途/有效的社保数据,请将“是否已参保”调整为“是”"
);
}
//流程中的社保数据不能修改
//查已购买社保明细
if
(
null
!=
employeeRegistrationPre
.
getDispatchInfoPreVo
()
&&
Common
.
isEmpty
(
employeeRegistrationPre
.
getDispatchInfoPreVo
().
getId
()))
{
R
<
EmployeePreSocialListVo
>
socialSdr
=
socialDaprUtils
.
getSocialPreInfoStatus
(
id
);
if
(
socialSdr
!=
null
&&
socialSdr
.
getData
()
!=
null
&&
null
!=
socialSdr
.
getData
().
getDispatchInfoPreVo
()
&&
(
socialSdr
.
getData
().
getDispatchInfoPreVo
().
getProcessStatus
().
equals
(
CommonConstants
.
THREE_STRING
)
||
socialSdr
.
getData
().
getDispatchInfoPreVo
().
getProcessStatus
().
equals
(
CommonConstants
.
FIVE_STRING
)
||
socialSdr
.
getData
().
getDispatchInfoPreVo
().
getProcessStatus
().
equals
(
CommonConstants
.
SIX_STRING
)||
socialSdr
.
getData
().
getDispatchInfoPreVo
().
getProcessStatus
().
equals
(
CommonConstants
.
SEVEN_STRING
)
||
socialSdr
.
getData
().
getDispatchInfoPreVo
().
getProcessStatus
().
equals
(
CommonConstants
.
NINE_STRING
)))
{
return
R
.
failed
(
"流程中的社保待购买数据不可修改!"
);
}
}
}
//操作记录中字典值的转化
String
natureItemBefore
=
null
;
String
natureItemAfter
=
null
;
...
...
@@ -1487,6 +1522,15 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
pre
.
setAttaList
(
attaInfo
);
}
// 查已购买社保明细
R
<
EmployeePreSocialListVo
>
socialSdr
=
socialDaprUtils
.
getSocialPreInfoList
(
id
);
if
(
socialSdr
!=
null
&&
socialSdr
.
getData
()
!=
null
)
{
if
(
null
!=
socialSdr
.
getData
().
getExitSocialInfoList
())
{
pre
.
setExitSocialInfoList
(
socialSdr
.
getData
().
getExitSocialInfoList
());
}
else
if
(
null
!=
socialSdr
.
getData
().
getDispatchInfoPreVo
())
{
pre
.
setDispatchInfoPreVo
(
socialSdr
.
getData
().
getDispatchInfoPreVo
());
}
}
}
return
pre
;
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
d4ac2931
...
...
@@ -577,6 +577,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
baseMapper
.
updateById
(
tEmployeeContractInfo
);
}
// 不是待提交,记录审核记录
this
.
setAuditInfo
(
tEmployeeContractInfo
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeePreLogServiceImpl.java
View file @
d4ac2931
This diff is collapsed.
Click to expand it.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TSettleDomainServiceImpl.java
View file @
d4ac2931
...
...
@@ -42,6 +42,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CspDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -75,6 +76,9 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
@Autowired
private
CspDaprUtils
cspDaprUtils
;
@Autowired
private
SocialDaprUtils
socialDaprUtils
;
@Autowired
private
InsuranceDaprUtil
insuranceDaprUtil
;
...
...
@@ -593,6 +597,8 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
.
set
(
TEmployeeContractPre:
:
getCustomerUsername
,
vo
.
getName
())
.
set
(
TEmployeeContractPre:
:
getCustomerUserLoginname
,
vo
.
getLoginName
());
employeeContractPreService
.
update
(
updateContractWrapper
);
//更新社保待购买的前端客服
socialDaprUtils
.
updateSocialPreCustomerName
(
updateVo
);
}
}
}
catch
(
Exception
e
){
...
...
yifu-archives/yifu-archives-biz/src/main/resources/application-dev.yml
View file @
d4ac2931
...
...
@@ -8,7 +8,6 @@ spring:
redis
:
host
:
127.0.0.1
port
:
6379
password
:
'
@yf_2017'
datasource
:
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/EmployeeRegistrationPreMapper.xml
View file @
d4ac2931
...
...
@@ -38,6 +38,7 @@
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"customerUsernameNew"
column=
"customer_username_new"
/>
<result
property=
"insuranceIsBuy"
column=
"insurance_is_buy"
/>
<result
property=
"socialIsBuy"
column=
"social_is_buy"
/>
</resultMap>
<resultMap
id=
"employeeRegistrationPreExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreExportVo"
>
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/SocialDaprUtils.java
View file @
d4ac2931
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeePreSocialListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeAutoRegistCheckVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
...
...
@@ -10,7 +12,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.*
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SysBaseSetInfoVo
;
...
...
@@ -226,7 +227,6 @@ public class SocialDaprUtils {
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tsocialfundinfo/selectExitEmpSocial"
,
JSON
.
toJSONString
(
cardVo
),
Boolean
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huyc
* @Description 新增社保待购买信息
...
...
@@ -253,4 +253,56 @@ public class SocialDaprUtils {
}
return
res
;
}
/**
* @Author huych
* @Description 更新社保待购买的前端客服姓名
* @Date 2025-10-10 11:01:12
* @Param
* @return
**/
public
void
updateSocialPreCustomerName
(
EmployeeRegistrationCustomerUserUpdateVo
updateVo
){
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
()
,
daprProperties
.
getAppId
(),
"/tdispatchinfopre/updateSocialPreCustomerName"
,
updateVo
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huych
* @Description 获取社保待购买和已购买的信息
* @Date 2025-10-10 15:48:08
* @Param
* @return
**/
public
R
<
EmployeePreSocialListVo
>
getSocialPreInfoList
(
String
id
){
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
()
,
daprProperties
.
getAppId
(),
"/tdispatchinfopre/getSocialPreInfoList"
,
id
,
EmployeePreSocialListVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huych
* @Description 获取社保已购买的信息
* @Date 2025-10-10 15:48:08
* @Param
* @return
**/
public
R
<
EmployeePreSocialListVo
>
getSocialPreInfoStatus
(
String
id
){
return
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
()
,
daprProperties
.
getAppId
(),
"/tdispatchinfopre/getSocialPreInfoStatus"
,
id
,
EmployeePreSocialListVo
.
class
,
SecurityConstants
.
FROM_IN
);
}
/**
* @Author huych
* @Description 删除社保已购买非流程中的数据
* @Date 2025-10-10 15:51:36
* @Param
* @return
**/
public
void
deleteUnProcessSocialPreInfo
(
String
id
){
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
()
,
daprProperties
.
getAppId
(),
"/tdispatchinfopre/deleteUnProcessSocialPreInfo"
,
id
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
}
}
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
d4ac2931
...
...
@@ -635,7 +635,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//1.9.16社保自动化校验逻辑
if
(
preVo
.
getServerItem
().
contains
(
"社保购买"
)
&&
null
!=
preVo
.
getEmployeeContractPreVos
()
)
{
if
(
preVo
.
getServerItem
().
contains
(
"社保购买"
))
{
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo
cardVo
=
new
TEmployeeAutoRegistCheckVo
();
cardVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
...
...
@@ -904,7 +904,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
List
<
EmployeeRegistrationReceiveVo
>
receiveVoList
=
new
ArrayList
<>();
R
<
TEmployeeInsuranceWorkDayVo
>
dataR
;
R
<
Boolean
>
flag
;
TEmployeeAutoRegistCheckVo
exitCheckVo
;
for
(
EmployeeRegistration
registration:
registrationList
)
{
exitCheckVo
=
new
TEmployeeAutoRegistCheckVo
();
exitCheckVo
.
setEmployeeName
(
registration
.
getEmployeeName
());
exitCheckVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
exitCheckVo
.
setDeptName
(
registration
.
getDeptName
());
exitCheckVo
.
setDeptNo
(
registration
.
getDeptNo
());
if
(
preVo
.
getServerItem
().
contains
(
"商险"
)
&&
!
preVo
.
getEmployeeInsurancePreVos
().
isEmpty
())
{
TEmployeeInsurancePreVo
insurancePreVo
=
preVo
.
getEmployeeInsurancePreVos
().
get
(
0
);
insurancePreVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
...
...
@@ -935,11 +941,6 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
compareTo
(
DateUtil
.
dateToString
(
insurancePreVo
.
getPolicyEnd
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
))
>
0
)
||
(
DateUtil
.
dateToString
(
insurancePreVo
.
getPolicyStart
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
).
compareTo
(
DateUtil
.
dateToString
(
insurancePreVo
.
getPolicyEnd
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
))
>
0
))
{
TEmployeeAutoRegistCheckVo
exitCheckVo
=
new
TEmployeeAutoRegistCheckVo
();
exitCheckVo
.
setEmployeeName
(
registration
.
getEmployeeName
());
exitCheckVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
exitCheckVo
.
setDeptName
(
registration
.
getDeptName
());
exitCheckVo
.
setDeptNo
(
registration
.
getDeptNo
());
exitCheckVo
.
setType
(
"商险"
);
exitCheckVo
.
setErrorMsg
(
"入职日期需要小于等于保单截止日期/保单开始日期需小于等于保单截止日期"
);
errorList
.
add
(
exitCheckVo
);
...
...
@@ -965,17 +966,28 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
flag
=
archivesDaprUtil
.
selectExitEmpCopntract
(
cardVo
);
//是否已签署为否需要判断是否在用或者流程中的合同
if
(
Common
.
isNotNull
(
flag
)
&&
Boolean
.
TRUE
.
equals
(
flag
.
getData
()))
{
TEmployeeAutoRegistCheckVo
exitCheckVo
=
new
TEmployeeAutoRegistCheckVo
();
exitCheckVo
.
setEmployeeName
(
registration
.
getEmployeeName
());
exitCheckVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
exitCheckVo
.
setDeptName
(
registration
.
getDeptName
());
exitCheckVo
.
setDeptNo
(
registration
.
getDeptNo
());
exitCheckVo
.
setType
(
"合同"
);
exitCheckVo
.
setErrorMsg
(
"该项目下存在在途/有效的合同数据"
);
errorList
.
add
(
exitCheckVo
);
continue
;
}
}
//1.9.16社保自动化校验逻辑
if
(
preVo
.
getServerItem
().
contains
(
"社保购买"
)
&&
null
!=
preVo
.
getDispatchInfoPreVo
())
{
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo
cardVo
=
new
TEmployeeAutoRegistCheckVo
();
cardVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
flag
=
socialDaprUtils
.
selectExitEmpSocial
(
cardVo
);
//是否已签署为否需要判断是否在用或者流程中的合同
if
(
Common
.
isNotNull
(
flag
)
&&
Boolean
.
TRUE
.
equals
(
flag
.
getData
()))
{
exitCheckVo
.
setType
(
"社保"
);
exitCheckVo
.
setErrorMsg
(
"该人员存在在途/有效的社保数据"
);
errorList
.
add
(
exitCheckVo
);
continue
;
}
}
//点击“接收确认”的时候,监测到该人员该项目下已有在项的档案时,再次提醒:该人员已在项,
//状态将更新成“已处理”;处理记录中,针对此情况,记录真实的进项时间,备注:先于登记入项
EmpProjectStatusVo
vo
=
new
EmpProjectStatusVo
();
...
...
@@ -1017,6 +1029,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//生成合同待购买数据
initContractPreInfo
(
registration
,
employeeContractPreVo
,
user
,
domainR
.
getData
());
}
//服务类型包含社保购买时
if
(
preVo
.
getServerItem
().
contains
(
"社保购买"
)
&&
(
null
!=
preVo
.
getExitSocialInfoList
()
||
null
!=
preVo
.
getDispatchInfoPreVo
()))
{
//生成社保待购买或者已购买数据
initSocialPreInfo
(
registration
,
preVo
.
getDispatchInfoPreVo
(),
user
,
domainR
.
getData
());
socialDaprUtils
.
saveSocialPreInfo
(
preVo
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
...
...
@@ -1170,6 +1189,13 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//生成合同待购买数据
initContractPreInfo
(
registrationNow
,
employeeContractPreVo
,
user
,
domainR
.
getData
());
}
//服务类型包含社保购买时
if
(
preVo
.
getServerItem
().
contains
(
"社保购买"
)
&&
(
null
!=
preVo
.
getExitSocialInfoList
()
||
null
!=
preVo
.
getDispatchInfoPreVo
()))
{
//生成社保待购买或者已购买数据
initSocialPreInfo
(
registrationNow
,
preVo
.
getDispatchInfoPreVo
(),
user
,
domainR
.
getData
());
socialDaprUtils
.
saveSocialPreInfo
(
preVo
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
...
...
@@ -1677,10 +1703,32 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo
.
setUpdateBy
(
user
.
getId
());
preVo
.
setTypeSub
(
CommonConstants
.
ZERO_STRING
);
preVo
.
setProcessStatus
(
CommonConstants
.
ZERO_STRING
);
preVo
.
setExpectedCollectionTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
getExpectedCollectionTime
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" 15:20"
,
DateUtil
.
DATETIME_PATTERN_MINUTE
));
preVo
.
setExpectedConfirmTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
getExpectedCollectionTime
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" 09:00"
,
DateUtil
.
DATETIME_PATTERN_MINUTE
));
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if
(
Common
.
isNotNull
(
preVo
.
getIsAutoDis
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getIsAutoDis
())
&&
Common
.
isNotNull
(
preVo
.
getExpectedCollectionType
()))
{
TEmployeeContractDateVo
vo
=
new
TEmployeeContractDateVo
();
vo
.
setMonthAfter
(
Integer
.
parseInt
(
preVo
.
getExpectedCollectionType
()));
vo
.
setYearAfter
(
0
);
vo
.
setRegistDate
(
preVo
.
getJoinLeaveDate
());
Date
date
=
this
.
addYearsMonths
(
vo
);
TEmployeeInsuranceWorkDayVo
dayVo
=
new
TEmployeeInsuranceWorkDayVo
();
dayVo
.
setType
(
CommonConstants
.
TWO_STRING
);
dayVo
.
setRegistDate
(
date
);
dayVo
.
setRegistType
(
0
);
R
<
TEmployeeInsuranceWorkDayVo
>
dataR
=
socialDaprUtils
.
getBeforeOrAfterWorkDay
(
dayVo
);
if
(
Common
.
isNotNull
(
dataR
)
&&
Common
.
isNotNull
(
dataR
.
getData
())
&&
Common
.
isNotNull
(
dataR
.
getData
().
getPriDisDate
()))
{
preVo
.
setExpectedCollectionTime
(
dataR
.
getData
().
getPriDisDate
());
preVo
.
setExpectedConfirmTime
(
dataR
.
getData
().
getPriDisDate
());
}
else
{
preVo
.
setExpectedCollectionTime
(
date
);
preVo
.
setExpectedConfirmTime
(
date
);
}
preVo
.
setExpectedCollectionTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
getExpectedCollectionTime
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" 15:20"
,
DateUtil
.
DATETIME_PATTERN_MINUTE
));
preVo
.
setExpectedConfirmTime
(
DateUtil
.
parseDate
(
DateUtil
.
dateToString
(
preVo
.
getExpectedCollectionTime
(),
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
)
+
" 09:00"
,
DateUtil
.
DATETIME_PATTERN_MINUTE
));
}
}
//商险状态是否正常判断
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
View file @
d4ac2931
...
...
@@ -287,4 +287,31 @@ public class SocialTask {
"/tsocialfriend/inner/doChangeHandleStatusToEnd"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时任务每月1日3点定时更新跨月的继续办理的数据为终止办理-定时任务结束------------"
);
}
/**
* 每天九点推送社保待确认信息
* @author huych
* @param
* @return void
*/
public
void
pushWxConfrimMessage
()
{
log
.
info
(
"-------------每天九点推送社保待确认信息------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tdispatchinfopre/inner/pushWxConfrimMessage"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每天九点推送社保待确认信息-定时任务开始------------"
);
}
/**
* 每天刷新商险到期提醒信息
* @author huych
* @param
* @return void
*/
public
void
pushDisConfrimSocial
()
{
log
.
info
(
"-------------每天三点二十批量派单社保------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tdispatchinfopre/inner/pushDisConfrimSocial"
,
""
,
Void
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每天三点二十批量派单社保-定时任务开始------------"
);
}
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfo.java
View file @
d4ac2931
...
...
@@ -897,4 +897,8 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty
(
"医保仅补缴生成材料"
)
private
String
dataFlagYsd
;
@Schema
(
description
=
"社保待购买id"
)
@TableField
(
exist
=
false
)
private
String
preId
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfoPre.java
View file @
d4ac2931
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
...
...
@@ -228,6 +226,13 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty
(
"起缴日期是否一致 0 是 1否"
)
@Schema
(
description
=
"起缴日期是否一致 0 是 1否"
)
private
String
isCreateDate
;
/**
* 起缴日期
*/
@ExcelAttribute
(
name
=
"起缴日期"
,
isDate
=
true
)
@Schema
(
description
=
"起缴日期"
)
@ExcelProperty
(
"起缴日期"
)
private
Date
socialStartDate
;
/**
* 配置名称
*/
...
...
@@ -236,6 +241,18 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty
(
"配置名称"
)
@Schema
(
description
=
"配置名称"
)
private
String
configName
;
/**
* 配置id
*/
@ExcelAttribute
(
name
=
"配置id"
)
@Schema
(
description
=
"配置id"
)
@ExcelProperty
(
"配置id"
)
private
String
configId
;
/**
* 接收方式
*/
@Schema
(
description
=
"接收方式 0项目配置 1自定义"
)
private
String
receiveType
;
/**
* 入职确认信息主表id
*/
...
...
@@ -355,11 +372,29 @@ public class TDispatchInfoPre extends BaseEntity {
/**
* 合同id
*/
@ExcelAttribute
(
name
=
"合同id"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"合同id不能超过32个字符"
)
@ExcelAttribute
(
name
=
"合同id"
)
@ExcelProperty
(
"合同id"
)
@Schema
(
description
=
"合同id"
)
private
String
contractId
;
/**
* 派单id
*/
@ExcelAttribute
(
name
=
"派单id"
)
@ExcelProperty
(
"派单id"
)
@Schema
(
description
=
"派单id"
)
private
String
disPatcherId
;
@Schema
(
description
=
"发起失败原因"
)
private
String
errorInfo
;
@Schema
(
description
=
"发起失败时间"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
Date
errorTime
;
@Schema
(
description
=
"派单审核/办理不通过原因"
)
private
String
errorBackInfo
;
/**
* 0未删除1删除
*/
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchImportVo.java
View file @
d4ac2931
...
...
@@ -557,6 +557,17 @@ public class TDispatchImportVo extends RowIndex implements Serializable {
@ExcelProperty
(
"派单ID"
)
private
String
dispatchId
;
@ExcelAttribute
(
name
=
"preId"
)
@ExcelProperty
(
value
=
"preId"
)
private
String
preId
;
@ExcelAttribute
(
name
=
"preName"
)
@ExcelProperty
(
value
=
"preName"
)
private
String
preName
;
@ExcelAttribute
(
name
=
"preLoginName"
)
@ExcelProperty
(
value
=
"preLoginName"
)
private
String
preLoginName
;
/**
* 订单ID
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchInfoPreSearchVo.java
View file @
d4ac2931
...
...
@@ -53,4 +53,8 @@ public class TDispatchInfoPreSearchVo extends TDispatchInfoPre {
@TableField
(
exist
=
false
)
private
String
dispatcherTimeEnd
;
@Schema
(
description
=
"失败标签 1查询失败数据"
)
@TableField
(
exist
=
false
)
private
String
failType
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoPreController.java
View file @
d4ac2931
...
...
@@ -2,6 +2,8 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeePreSocialListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
...
...
@@ -130,6 +132,16 @@ public class TDispatchInfoPreController {
return
tDispatchInfoPreService
.
confirm
(
idList
);
}
/**
* 社保待购买信息单个/批量发起购买任务
* @param idList id数组
**/
@Operation
(
description
=
"合社保待购买信息单个/批量发起购买任务"
)
@PostMapping
(
"/dispatcherContract"
)
public
R
dispatcherContract
(
@RequestBody
List
<
String
>
idList
)
{
return
tDispatchInfoPreService
.
dispatcherSocial
(
idList
,
"1"
);
}
/**
* 社保待购买数量查询
* @param searchVo 社保待购买任务表
...
...
@@ -154,4 +166,79 @@ public class TDispatchInfoPreController {
public
Boolean
saveSocialPreInfo
(
@RequestBody
EmployeeRegistrationPreVo
preVo
)
{
return
tDispatchInfoPreService
.
saveSocialPreInfo
(
preVo
);
}
/**
* 更新社保待购买的前端客服姓名
* @author huych
* @date 2025-10-10 11:02:35
**/
@Operation
(
description
=
"更新社保待购买的前端客服姓名"
)
@Inner
@PostMapping
(
"/updateSocialPreCustomerName"
)
public
void
updateSocialPreCustomerName
(
@RequestBody
EmployeeRegistrationCustomerUserUpdateVo
updateVo
)
{
tDispatchInfoPreService
.
updateSocialPreCustomerName
(
updateVo
);
}
/**
* 入职确认信息详情中的社保明细信息
* @author huych
* @date 2025-10-10 15:51:18
**/
@Operation
(
description
=
"入职确认信息详情中的社保明细信息"
)
@Inner
@PostMapping
(
"/getSocialPreInfoList"
)
public
EmployeePreSocialListVo
getSocialPreInfoList
(
@RequestBody
String
id
)
{
return
tDispatchInfoPreService
.
getSocialPreInfoList
(
id
);
}
/**
* 查询社保待购买的状态
* @author huych
* @date 2025-10-11 14:45:26
**/
@Operation
(
description
=
"查询社保待购买的状态"
)
@Inner
@PostMapping
(
"/getSocialPreInfoStatus"
)
public
EmployeePreSocialListVo
getSocialPreInfoStatus
(
@RequestBody
String
id
)
{
return
tDispatchInfoPreService
.
getSocialPreInfoStatus
(
id
);
}
/**
* 删除非流程中的社保待购买数据
* @author huych
* @date 2025-10-11 15:30:02
**/
@Operation
(
description
=
"删除非流程中的社保待购买数据"
)
@Inner
@PostMapping
(
"/deleteUnProcessSocialPreInfo"
)
public
void
deleteUnProcessSocialPreInfo
(
@RequestBody
String
id
)
{
tDispatchInfoPreService
.
deleteUnProcessSocialPreInfo
(
id
);
}
/**
* 派单当日9点统一推送确认信息
* @author huych
* @date 2025-10-11 18:50:16
* @return void
*/
@SysLog
(
"派单当日9点统一推送确认信息"
)
@Inner
@PostMapping
(
"/inner/pushWxConfrimMessage"
)
public
void
pushWxConfrimMessage
()
{
tDispatchInfoPreService
.
pushWxConfrimMessage
();
}
/**
* 每天下午三点二十推送待购买数据
* @author huych
* @date 2025-10-11 18:51:58
* @return void
*/
@SysLog
(
"每天下午三点二十推送待购买数据"
)
@Inner
@PostMapping
(
"/inner/pushDisConfrimSocial"
)
public
void
pushDisConfrimSocial
()
{
tDispatchInfoPreService
.
pushDisConfrimSocial
();
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TDispatchInfoPreMapper.java
View file @
d4ac2931
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -32,5 +33,10 @@ public interface TDispatchInfoPreMapper extends BaseMapper<TDispatchInfoPre> {
List
<
TDispatchInfoPreExportVo
>
selectExportList
(
@Param
(
"tDispatchInfoPre"
)
TDispatchInfoPreSearchVo
searchVo
);
List
<
TDispatchImportVo
>
getDisPatcherSocialList
(
@Param
(
"idList"
)
List
<
String
>
idList
,
@Param
(
"statusList"
)
List
<
String
>
statusList
,
@Param
(
"type"
)
String
type
);
List
<
TDispatchInfoPre
>
getAllUnDisData
();
List
<
String
>
getAllUnDisDataIdList
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoPreService.java
View file @
d4ac2931
...
...
@@ -3,6 +3,8 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.csp.vo.EmployeeRegistrationCustomerUserUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeePreSocialListVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeRegistrationPreVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfoPre
;
...
...
@@ -54,4 +56,29 @@ public interface TDispatchInfoPreService extends IService<TDispatchInfoPre> {
* @return
*/
Boolean
saveSocialPreInfo
(
EmployeeRegistrationPreVo
preVo
);
/**
* 更新社保待购买前端客服信息
* @param updateVo
* @return
*/
void
updateSocialPreCustomerName
(
EmployeeRegistrationCustomerUserUpdateVo
updateVo
);
EmployeePreSocialListVo
getSocialPreInfoList
(
String
id
);
EmployeePreSocialListVo
getSocialPreInfoStatus
(
String
id
);
void
deleteUnProcessSocialPreInfo
(
String
id
);
/**
* 社保待购买信息单个/批量发起签署任务
* @param idList id集合
* @param type 1 手动 2 自动
* @return
*/
R
dispatcherSocial
(
List
<
String
>
idList
,
String
type
);
void
pushWxConfrimMessage
();
void
pushDisConfrimSocial
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoPreServiceImpl.java
View file @
d4ac2931
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
d4ac2931
...
...
@@ -130,6 +130,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
private
final
TAuditInfoMapper
auditInfoMapper
;
private
final
TDispatchInfoPreMapper
dispatchInfoPreMapper
;
@Autowired
private
CacheManager
cacheManager
;
...
...
@@ -777,7 +779,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
dispatch
))
{
socialFund
.
setDispatchId
(
dispatch
.
getId
());
}
initSocialFundAndInsert
(
emp
,
social
,
fund
,
socialFund
,
project
,
dispatchPart
,
injury
);
initSocialFundAndInsert
(
emp
,
social
,
fund
,
socialFund
,
project
,
dispatchPart
,
injury
,
dispatch
.
getPreId
()
);
}
// 生成预付数据
if
(
Common
.
isNotNull
(
socialFund
)
&&
Common
.
isNotNull
(
socialFund
.
getId
()))
{
...
...
@@ -957,7 +959,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TProvidentFund
fund
,
TSocialFundInfo
socialFund
,
EmpProjectDispatchVo
project
,
boolean
dispatchPart
,
boolean
injury
)
{
boolean
dispatchPart
,
boolean
injury
,
String
preId
)
{
if
(
Common
.
isNotNull
(
socialFund
))
{
if
(
Common
.
isNotNull
(
project
))
{
socialFund
.
setEmpNo
(
project
.
getEmpCode
());
...
...
@@ -1132,6 +1134,17 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
else
{
socialFundMapper
.
insert
(
socialFund
);
}
//派单完成更新社保待购买表的状态
if
(
Common
.
isNotNull
(
preId
))
{
TDispatchInfoPre
dispatchInfoPre
=
dispatchInfoPreMapper
.
selectById
(
preId
);
if
(
Common
.
isNotNull
(
dispatchInfoPre
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
THREE_STRING
);
dispatchInfoPre
.
setDisPatcherId
(
socialFund
.
getId
());
dispatchInfoPre
.
setErrorInfo
(
null
);
dispatchInfoPre
.
setErrorTime
(
null
);
dispatchInfoPreMapper
.
updateById
(
dispatchInfoPre
);
}
}
}
}
...
...
@@ -1333,7 +1346,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatch
.
setContactAddress
(
excel
.
getContactAddress
());
}
dispatch
.
setOrganName
(
user
.
getDeptName
());
dispatch
.
setCreateBy
(
user
.
getId
());
if
(
Common
.
isNotNull
(
excel
.
getPreId
()))
{
dispatch
.
setPreId
(
excel
.
getPreId
());
}
dispatch
.
setCreateBy
(
null
==
user
?
"1"
:
user
.
getId
());
dispatch
.
setCreateName
(
null
==
excel
.
getPreName
()
?
user
.
getNickname
()
:
excel
.
getPreName
());
dispatch
.
setCreateTime
(
LocalDateTime
.
now
());
dispatch
.
setContractSubName
(
excel
.
getContractSubName
());
dispatch
.
setContractName
(
excel
.
getContractName
());
...
...
@@ -3669,6 +3686,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue;
}*/
if
(
null
!=
socialInfo
)
{
//派单审核通过更新社保待购买表的状态
TDispatchInfoPre
dispatchInfoPre
=
dispatchInfoPreMapper
.
selectOne
(
Wrappers
.<
TDispatchInfoPre
>
query
().
lambda
()
.
eq
(
TDispatchInfoPre:
:
getDisPatcherId
,
sf
.
getId
())
.
eq
(
TDispatchInfoPre:
:
getProcessStatus
,
CommonConstants
.
THREE_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// 派增审核
if
(
CommonConstants
.
dingleDigitStrArray
[
0
].
equals
(
dis
.
getType
()))
{
//派增审核通过
...
...
@@ -3679,6 +3701,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf
.
setSocialAddStatus
(
CommonConstants
.
ONE_STRING
);
sf
.
setSocialStatus
(
CommonConstants
.
ONE_STRING
);
}
//审核通过更新状态
if
(
Common
.
isNotNull
(
dispatchInfoPre
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
FIVE_STRING
);
dispatchInfoPreMapper
.
updateById
(
dispatchInfoPre
);
}
//派增审核不通过 需要处理预估数据
}
else
if
(
CommonConstants
.
ONE_INT
==
flag
)
{
socialInfo
.
setDeleteFlag
(
CommonConstants
.
ONE_STRING
);
...
...
@@ -3691,7 +3718,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
null
!=
sf
.
getSocialIdSuccess
()){
sf
.
setSocialId
(
sf
.
getSocialIdSuccess
());
}
//审核不通过更新状态
if
(
Common
.
isNotNull
(
dispatchInfoPre
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
FOUR_STRING
);
dispatchInfoPre
.
setErrorBackInfo
(
auditRemark
);
dispatchInfoPreMapper
.
updateById
(
dispatchInfoPre
);
}
}
socialInfo
.
setAuditTime
(
now
);
socialInfo
.
setAuditUser
(
user
.
getId
());
...
...
@@ -4388,6 +4420,29 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
auditInfo
.
setSocialId
(
dis
.
getId
());
}
//针对社保自动化过来的数据,办理更新待购买数据状态
TDispatchInfoPre
dispatchInfoPre
=
dispatchInfoPreMapper
.
selectOne
(
Wrappers
.<
TDispatchInfoPre
>
query
().
lambda
()
.
eq
(
TDispatchInfoPre:
:
getDisPatcherId
,
sf
.
getId
())
.
eq
(
TDispatchInfoPre:
:
getProcessStatus
,
CommonConstants
.
FIVE_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
dispatchInfoPre
))
{
//此处状态可能会更新为 办理成功 办理中 部分办理失败和办理失败
if
(
sf
.
getSocialStatus
().
equals
(
CommonConstants
.
TWO_STRING
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
SIX_STRING
);
}
if
(
sf
.
getSocialStatus
().
equals
(
CommonConstants
.
FOUR_STRING
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
NINE_STRING
);
dispatchInfoPre
.
setErrorBackInfo
(
handleRemark
);
}
if
(
sf
.
getSocialStatus
().
equals
(
CommonConstants
.
FIVE_STRING
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
EIGHT_STRING
);
dispatchInfoPre
.
setErrorBackInfo
(
handleRemark
);
}
if
(
sf
.
getSocialStatus
().
equals
(
CommonConstants
.
THREE_STRING
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
SEVEN_STRING
);
}
dispatchInfoPreMapper
.
updateById
(
dispatchInfoPre
);
}
}
else
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
"找不到对应员工社保派增派单数据:"
+
dis
.
getEmpName
()));
return
true
;
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoPreMapper.xml
View file @
d4ac2931
...
...
@@ -32,6 +32,8 @@
<result
property=
"isAutoDis"
column=
"IS_AUTO_DIS"
/>
<result
property=
"isCreateDate"
column=
"IS_CREATE_DATE"
/>
<result
property=
"configName"
column=
"CONFIG_NAME"
/>
<result
property=
"configId"
column=
"CONFIG_ID"
/>
<result
property=
"receiveType"
column=
"RECEIVE_TYPE"
/>
<result
property=
"registerId"
column=
"REGISTER_ID"
/>
<result
property=
"pensionStart"
column=
"PENSION_START"
/>
<result
property=
"medicalStart"
column=
"MEDICAL_START"
/>
...
...
@@ -39,6 +41,7 @@
<result
property=
"workInjuryStart"
column=
"WORK_INJURY_START"
/>
<result
property=
"birthStart"
column=
"BIRTH_START"
/>
<result
property=
"bigailmentStart"
column=
"BIGAILMENT_START"
/>
<result
property=
"socialStartDate"
column=
"SOCIAL_START_DATE"
/>
<result
property=
"trustRemark"
column=
"TRUST_REMARK"
/>
<result
property=
"pensionCardinal"
column=
"PENSION_CARDINAL"
/>
<result
property=
"medicalCardinal"
column=
"MEDICAL_CARDINAL"
/>
...
...
@@ -49,12 +52,16 @@
<result
property=
"paymentType"
column=
"PAYMENT_TYPE"
/>
<result
property=
"contractStatus"
column=
"CONTRACT_STATUS"
/>
<result
property=
"contractId"
column=
"CONTRACT_ID"
/>
<result
property=
"disPatcherId"
column=
"DISPATCHER_ID"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
/>
<result
property=
"errorInfo"
column=
"error_info"
/>
<result
property=
"errorBackInfo"
column=
"error_back_info"
/>
<result
property=
"errorTime"
column=
"error_time"
/>
</resultMap>
<resultMap
id=
"tDispatchInfoPreExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo"
>
...
...
@@ -88,6 +95,7 @@
a.PROVIDENT_HOUSEHOLD_NAME,
a.SOCIAL_HOUSEHOLD_NAME,
a.TYPE_SUB,
a.RECEIVE_TYPE,
a.RECORD_BASE,
a.RECORD_BASE_TYPE,
a.JOIN_LEAVE_DATE,
...
...
@@ -98,10 +106,12 @@
a.IS_AUTO_DIS,
a.IS_CREATE_DATE,
a.CONFIG_NAME,
a.CONFIG_ID,
a.REGISTER_ID,
a.PENSION_START,
a.MEDICAL_START,
a.UNEMPLOY_START,
a.SOCIAL_START_DATE,
a.WORK_INJURY_START,
a.BIRTH_START,
a.BIGAILMENT_START,
...
...
@@ -120,7 +130,7 @@
a.CREATE_NAME,
a.UPDATE_TIME,
a.CREATE_TIME,
a.DELETE_FLAG
a.DELETE_FLAG
,error_info,error_time,a.DISPATCHER_ID,a.error_back_info
</sql>
<sql
id=
"tDispatchInfoPre_where"
>
<if
test=
"tDispatchInfoPre != null"
>
...
...
@@ -188,6 +198,9 @@
<if
test=
"tDispatchInfoPre.customerUsername != null and tDispatchInfoPre.customerUsername.trim() != ''"
>
AND a.CUSTOMER_USERNAME = #{tDispatchInfoPre.customerUsername}
</if>
<if
test=
"tDispatchInfoPre.customerUserLoginName != null and tDispatchInfoPre.customerUserLoginName.trim() != ''"
>
AND a.CUSTOMER_USER_LOGIN_NAME = #{tDispatchInfoPre.customerUsername.customerUserLoginName}
</if>
<if
test=
"tDispatchInfoPre.expectedCollectionTime != null"
>
AND DATE_FORMAT(a.EXPECTED_COLLECTION_TIME,'%Y-%m-%d') = CURDATE()
</if>
...
...
@@ -209,6 +222,9 @@
<if
test=
"tDispatchInfoPre.contractStatus != null and tDispatchInfoPre.contractStatus.trim() != ''"
>
AND a.CONTRACT_STATUS = #{tDispatchInfoPre.contractStatus}
</if>
<if
test=
"tDispatchInfoPre.failType != null and tDispatchInfoPre.failType.trim() != ''"
>
AND a.error_info is not null
</if>
<if
test=
"tDispatchInfoPre.authSql != null and tDispatchInfoPre.authSql.trim() != ''"
>
${tDispatchInfoPre.authSql}
</if>
...
...
@@ -289,4 +305,64 @@
order by a.create_time desc
limit 0,2000
</select>
<!--tDispatchInfoPre社保待派单数据查询-->
<select
id=
"getDisPatcherSocialList"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchImportVo"
>
SELECT
(@i :=@i+1) as rowIndex,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
a.dept_no deptNo,
a.RECORD_BASE recordBase,
a.SOCIAL_HOUSEHOLD_NAME socialHousehold,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.PENSION_START) as pensionStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.MEDICAL_START) as medicalStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.WORK_INJURY_START) as workInjuryStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.UNEMPLOY_START) as unemployStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.BIRTH_START) as birthStart,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.BIGAILMENT_START) as bigailmentStart,
a.PAYMENT_TYPE as paymentType,
if(a.PAYMENT_TYPE = '1',PENSION_CARDINAL,null) as pensionCardinal,
if(a.PAYMENT_TYPE = '1',MEDICAL_CARDINAL,null) as medicalCardinal,
if(a.PAYMENT_TYPE = '1',UNEMPLOYMENT_CARDINAL,null) as unemploymentCardinal,
if(a.PAYMENT_TYPE = '1',WORK_INJURY_CARDINAL,null) as workInjuryCardinal,
if(a.PAYMENT_TYPE = '1',BIRTH_CARDINAL,null) as birthCardinal,
if(a.PAYMENT_TYPE = '1',BIGAILMENT_CARDINAL,null) as bigailmentCardinal,
a.id preId,
a.CUSTOMER_USER_LOGIN_NAME as preLoginName,
if(#{type} = '1',concat('手动派单-',a.customer_username),concat('自动化派单-',a.customer_username)) preName
FROM t_dispatch_info_pre a,(select @i:=0) as itable
<where>
1=1
AND a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
AND a.process_status in
<foreach
item=
"status"
index=
"index"
collection=
"statusList"
open=
"("
separator=
","
close=
")"
>
#{status}
</foreach>
</where>
</select>
<select
id=
"getAllUnDisData"
resultMap=
"tDispatchInfoPreMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_dispatch_info_pre a
where
a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d")
<![CDATA[ <= ]]>
CURDATE()
and a.process_status = '0'
group by a.customer_user_login_name
</select>
<select
id=
"getAllUnDisDataIdList"
resultType=
"java.lang.String"
>
SELECT
id
FROM t_dispatch_info_pre a
where
a.expected_collection_time is not null
and DATE_FORMAT(a.expected_collection_time,"%Y-%m-%d")
<![CDATA[ <= ]]>
CURDATE()
and a.process_status in ('1','2','4','8','9')
</select>
</mapper>
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