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
19666a87
Commit
19666a87
authored
Oct 16, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.16' into MVP1.7.16
parents
2cfe6eeb
137d8bce
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
255 additions
and
18 deletions
+255
-18
TDispatchInfoPreVo.java
...fu/cloud/plus/v1/yifu/archives/vo/TDispatchInfoPreVo.java
+8
-0
FascController.java
...loud/plus/v1/yifu/archives/controller/FascController.java
+122
-0
EmployeeRegistrationPreServiceImpl.java
...ives/service/impl/EmployeeRegistrationPreServiceImpl.java
+1
-1
application.yml
...ives/yifu-archives-biz/src/main/resources/application.yml
+1
-0
application-dev.yml
...eck/yifu-check-biz/src/main/resources/application-dev.yml
+0
-1
EmployeeRegistrationServiceImpl.java
.../v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
+12
-6
application-dev.yml
yifu-job/yifu-job-biz/src/main/resources/application-dev.yml
+0
-1
TDispatchInfoPre.java
...fu/cloud/plus/v1/yifu/social/entity/TDispatchInfoPre.java
+18
-0
TDispatchInfoPreExportVo.java
...loud/plus/v1/yifu/social/vo/TDispatchInfoPreExportVo.java
+1
-2
TDispatchInfoPreServiceImpl.java
...yifu/social/service/impl/TDispatchInfoPreServiceImpl.java
+4
-1
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+79
-4
TDispatchInfoPreMapper.xml
...-biz/src/main/resources/mapper/TDispatchInfoPreMapper.xml
+8
-2
TSocialFundInfoMapper.xml
...l-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
+1
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TDispatchInfoPreVo.java
View file @
19666a87
...
...
@@ -41,6 +41,14 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema
(
description
=
"员工身份证"
)
@ExcelProperty
(
"员工身份证"
)
private
String
empIdcard
;
/**
* 手机号码
*/
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"手机号码不能超过20个字符"
)
@ExcelProperty
(
"手机号码"
)
@Schema
(
description
=
"手机号码"
)
private
String
phone
;
/**
* 社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/FascController.java
View file @
19666a87
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fadada.api.utils.crypt.FddCryptUtil
;
import
com.fasc.open.api.constants.RequestConstants
;
import
com.fasc.open.api.exception.ApiException
;
import
com.yifu.cloud.plus.v1.yifu.archives.config.FascConfig
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TFascPushLog
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.FascService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TFascPushLogService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @auther huyc
* @date 2022/6/29
...
...
@@ -24,6 +39,13 @@ public class FascController {
@Autowired
private
FascService
fascService
;
@Autowired
private
FascConfig
fascConfig
;
private
final
TFascPushLogService
tFascPushLogService
;
private
static
String
FASC_EVENT
=
"X-FASC-Event"
;
private
static
String
FASC_BIZ_CONTENT
=
"bizContent"
;
/**
* @param templateName 签署任务模板名称,如果传了该参数,会根据名称模糊匹配查询,长度最大100个字符。
...
...
@@ -77,4 +99,104 @@ public class FascController {
return
fascService
.
urgeTask
(
id
);
}
// 法大大回调
/*@ResponseBody
@PostMapping(value = "/api/fascCallback")
public String fddEventCallback(@RequestHeader HttpHeaders headers,
@RequestParam("bizContent") String bizContent) throws Exception {
//appSecret,由开发者登陆到法大大官网,在应用管理管理中点击应用详情里面获取
String appSecret = "xxxx";
//获取请求头参数
String appId = headers.getFirst("X-FASC-App-Id");
String signType = headers.getFirst("X-FASC-Sign-Type");
String sign = headers.getFirst("X-FASC-Sign");
String timestamp = headers.getFirst("X-FASC-Timestamp");
//事件名称,开发者可以根据不同事件名称去解析bizContent的值,实现不同的逻辑
String event = headers.getFirst("X-FASC-Event");
String nonce = headers.getFirst("X-FASC-Nonce");
//验签
Map<String, String> paramMap = new HashMap<>();
paramMap.put("X-FASC-App-Id", appId);
paramMap.put("X-FASC-Sign-Type", "HMAC-SHA256");
paramMap.put("X-FASC-Timestamp", timestamp);
paramMap.put("X-FASC-Nonce", nonce);
paramMap.put("X-FASC-Event", event);
paramMap.put("bizContent", bizContent);
//参数排序,ascii码排序
String sortParam = FddCryptUtil.sortParameters(paramMap);
//生成签名后可以进行校验
String signature = FddCryptUtil.sign(sortParam, timestamp, appSecret);
if(!signature.equals(sign)) {
//log.error("日志记录,签名失败");
//为了不重复接收该请求,建议这里返回success,返回success后这条消息法大大将中断重试回调机制
return "{\"code\":\"200\";\"msg\":\"success\"}";
}
return "{\"code\":\"200\";\"msg\":\"success\"}";
}*/
@Operation
(
summary
=
"异步通知"
,
description
=
"异步通知"
)
@RequestMapping
(
value
=
"/api/fascCallback"
)
public
R
<
String
>
notifyUrl
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
// 新增推送日志
TFascPushLog
pushLog
=
new
TFascPushLog
();
pushLog
.
setTransReferenceId
(
fascConfig
.
getOpenId
());
pushLog
.
setReturnData
(
JSON
.
toJSONString
(
request
));
pushLog
.
setTaskStatus
(
CommonConstants
.
ONE_STRING
);
pushLog
.
setTypeKey
(
"签署任务事件,异步通知"
);
pushLog
.
setTypeName
(
"签署任务事件,异步通知"
);
tFascPushLogService
.
save
(
pushLog
);
if
(
checkSign
(
request
))
{
return
R
.
failed
(
"验签失败"
);
}
String
fddEvent
=
request
.
getHeader
(
FASC_EVENT
);
String
fddBizContent
=
request
.
getParameter
(
FASC_BIZ_CONTENT
);
if
(
Common
.
isNotNull
(
fddEvent
))
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
fddBizContent
);
String
taskId
=
jsonObject
.
getString
(
"taskId"
);
String
taskStatus
=
jsonObject
.
getString
(
"taskStatus"
);
String
signStatus
=
jsonObject
.
getString
(
"signStatus"
);
String
signerId
=
jsonObject
.
getString
(
"signerId"
);
pushLog
.
setReturnData
(
"fddEvent:"
+
fddEvent
+
";fddBizContent:"
+
fddBizContent
);
if
(
fddEvent
.
equals
(
"sign-task-finished"
))
{
pushLog
.
setReturnData
(
"签署任务完成事件:fddEvent:"
+
fddEvent
+
";fddBizContent:"
+
fddBizContent
);
return
R
.
ok
(
null
,
"success"
);
}
else
if
(
fddEvent
.
equals
(
"sign-task-canceled"
))
{
pushLog
.
setReturnData
(
"签署任务撤销事件:fddEvent:"
+
fddEvent
+
";fddBizContent:"
+
fddBizContent
);
return
R
.
ok
(
null
,
"success"
);
}
else
if
(
fddEvent
.
equals
(
"sign-task-sign-failed"
))
{
pushLog
.
setReturnData
(
"签署任务参与方签署失败事件:fddEvent:"
+
fddEvent
+
";fddBizContent:"
+
fddBizContent
);
return
R
.
ok
(
null
,
"success"
);
}
else
if
(
fddEvent
.
equals
(
"sign-task-abolish"
))
{
pushLog
.
setReturnData
(
"签署任务作废事件:fddEvent:"
+
fddEvent
+
";fddBizContent:"
+
fddBizContent
);
return
R
.
ok
(
null
,
"success"
);
}
}
tFascPushLogService
.
updateById
(
pushLog
);
return
R
.
ok
(
null
,
"success"
);
}
//验证签名,返回true表示失败
public
boolean
checkSign
(
HttpServletRequest
request
)
throws
Exception
{
Map
<
String
,
String
>
paraMap
=
new
HashMap
<>();
paraMap
.
put
(
RequestConstants
.
APP_ID
,
request
.
getHeader
(
RequestConstants
.
APP_ID
));
paraMap
.
put
(
RequestConstants
.
SIGN_TYPE
,
request
.
getHeader
(
RequestConstants
.
SIGN_TYPE
));
paraMap
.
put
(
RequestConstants
.
TIMESTAMP
,
request
.
getHeader
(
RequestConstants
.
TIMESTAMP
));
paraMap
.
put
(
RequestConstants
.
NONCE
,
request
.
getHeader
(
RequestConstants
.
NONCE
));
paraMap
.
put
(
FASC_EVENT
,
request
.
getHeader
(
FASC_EVENT
));
paraMap
.
put
(
FASC_BIZ_CONTENT
,
request
.
getParameter
(
FASC_BIZ_CONTENT
));
//参数排序,ascii码排序
String
sortParam
=
FddCryptUtil
.
sortParameters
(
paraMap
);
//计算之后得到签名 该签名需要放到请求头
String
signature
=
FddCryptUtil
.
sign
(
sortParam
,
request
.
getHeader
(
RequestConstants
.
TIMESTAMP
),
fascConfig
.
getAppSecret
());
if
(
StringUtils
.
equals
(
signature
,
request
.
getHeader
(
RequestConstants
.
SIGN
)))
{
return
false
;
}
// 表示验签失败:
return
true
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/EmployeeRegistrationPreServiceImpl.java
View file @
19666a87
...
...
@@ -763,7 +763,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
}
//1.9.16社保自动化校验逻辑
if
(
employeeRegistrationPre
.
getServerItem
().
contains
(
"社保
购买
"
))
{
if
(
employeeRegistrationPre
.
getServerItem
().
contains
(
"社保"
))
{
//根据身份证号码和项目编号查询合同
TEmployeeAutoRegistCheckVo
cardVo
=
new
TEmployeeAutoRegistCheckVo
();
cardVo
.
setEmpIdcard
(
employeeRegistrationPre
.
getEmpIdcard
());
...
...
yifu-archives/yifu-archives-biz/src/main/resources/application.yml
View file @
19666a87
...
...
@@ -60,6 +60,7 @@ security:
-
/tgzempinfo/saveTGzEmpInfo
-
/gz/core/saveOfferInfo
-
/gz/core/getGzBank
-
/fasc/api/fascCallback
# 文件上传相关 支持阿里云、华为云、腾讯、minio
...
...
yifu-check/yifu-check-biz/src/main/resources/application-dev.yml
View file @
19666a87
...
...
@@ -8,7 +8,6 @@ spring:
on-profile
:
dev
redis
:
host
:
127.0.0.1
password
:
'
@yf_2017'
datasource
:
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
...
...
yifu-csp/yifu-csp-biz/src/main/java/com/yifu/cloud/plus/v1/csp/service/impl/EmployeeRegistrationServiceImpl.java
View file @
19666a87
...
...
@@ -643,7 +643,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
}
//1.9.16社保自动化校验逻辑
if
(
preVo
.
getServerItem
().
contains
(
"社保
购买
"
))
{
if
(
preVo
.
getServerItem
().
contains
(
"社保"
))
{
//根据身份证号码和项目编号查询合同
R
<
Boolean
>
socialFlag
=
socialDaprUtils
.
selectExitEmpSocial
(
cardVo
);
//是否已签署为是需要判断合同是否在用或者流程中
...
...
@@ -706,7 +706,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initContractPreInfo
(
registration
,
preVo
.
getEmployeeContractPreVos
(),
user
,
domainR
.
getData
());
}
//服务类型包含社保购买时
if
(
preVo
.
getServerItem
().
contains
(
"社保
购买
"
)
&&
(
null
!=
preVo
.
getExitSocialInfoList
()
if
(
preVo
.
getServerItem
().
contains
(
"社保"
)
&&
(
null
!=
preVo
.
getExitSocialInfoList
()
||
null
!=
preVo
.
getDispatchInfoPreVo
()))
{
//生成社保待购买或者已购买数据
if
(
null
!=
preVo
.
getDispatchInfoPreVo
())
{
...
...
@@ -990,7 +990,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
}
//1.9.16社保自动化校验逻辑
if
(
preVo
.
getServerItem
().
contains
(
"社保
购买
"
)
&&
null
!=
preVo
.
getDispatchInfoPreVo
())
{
if
(
preVo
.
getServerItem
().
contains
(
"社保"
)
&&
null
!=
preVo
.
getDispatchInfoPreVo
())
{
//根据身份证号码和项目编号查询合同
flag
=
socialDaprUtils
.
selectExitEmpSocial
(
cardVo
);
//是否已签署为否需要判断是否在用或者流程中的合同
...
...
@@ -1044,7 +1044,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initContractPreInfo
(
registration
,
employeeContractPreVo
,
user
,
domainR
.
getData
());
}
//服务类型包含社保购买时
if
(
preVo
.
getServerItem
().
contains
(
"社保
购买
"
)
&&
(
null
!=
preVo
.
getExitSocialInfoList
()
if
(
preVo
.
getServerItem
().
contains
(
"社保"
)
&&
(
null
!=
preVo
.
getExitSocialInfoList
()
||
null
!=
preVo
.
getDispatchInfoPreVo
()))
{
//生成社保待购买或者已购买数据
if
(
null
!=
preVo
.
getDispatchInfoPreVo
())
{
...
...
@@ -1206,7 +1206,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
initContractPreInfo
(
registrationNow
,
employeeContractPreVo
,
user
,
domainR
.
getData
());
}
//服务类型包含社保购买时
if
(
preVo
.
getServerItem
().
contains
(
"社保
购买
"
)
&&
(
null
!=
preVo
.
getExitSocialInfoList
()
if
(
preVo
.
getServerItem
().
contains
(
"社保"
)
&&
(
null
!=
preVo
.
getExitSocialInfoList
()
||
null
!=
preVo
.
getDispatchInfoPreVo
()))
{
//生成社保待购买或者已购买数据
initSocialPreInfo
(
registrationNow
,
preVo
.
getDispatchInfoPreVo
(),
user
,
domainR
.
getData
());
...
...
@@ -1713,6 +1713,7 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo
.
setJoinLeaveDate
(
registration
.
getJoinLeaveDate
());
preVo
.
setDeptNo
(
registration
.
getDeptNo
());
preVo
.
setEmpName
(
registration
.
getEmployeeName
());
preVo
.
setPhone
(
registration
.
getEmpPhone
());
preVo
.
setPosition
(
registration
.
getPosition
());
preVo
.
setEmpIdcard
(
registration
.
getEmpIdcard
());
preVo
.
setCreateBy
(
user
.
getId
());
...
...
@@ -1720,13 +1721,18 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo
.
setUpdateBy
(
user
.
getId
());
preVo
.
setTypeSub
(
CommonConstants
.
ZERO_STRING
);
preVo
.
setProcessStatus
(
CommonConstants
.
ZERO_STRING
);
preVo
.
setDispatchItem
(
"养老、医疗、生育、失业、工伤、大病"
);
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getIsCreateDate
())
&&
Common
.
isEmpty
(
preVo
.
getSocialStartDate
()))
{
preVo
.
setSocialStartDate
(
registration
.
getJoinLeaveDate
());
}
//如果自动触发派增为是,计算派单发起时间和派单确认时间
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
());
vo
.
setRegistDate
(
registration
.
getJoinLeaveDate
());
Date
date
=
this
.
addYearsMonths
(
vo
);
TEmployeeInsuranceWorkDayVo
dayVo
=
new
TEmployeeInsuranceWorkDayVo
();
dayVo
.
setType
(
CommonConstants
.
TWO_STRING
);
...
...
yifu-job/yifu-job-biz/src/main/resources/application-dev.yml
View file @
19666a87
...
...
@@ -5,7 +5,6 @@ spring:
matching-strategy
:
ant_path_matcher
redis
:
host
:
127.0.0.1
password
:
'
@yf_2017'
datasource
:
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TDispatchInfoPre.java
View file @
19666a87
...
...
@@ -49,6 +49,14 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty
(
"身份证号"
)
@Schema
(
description
=
"身份证号"
)
private
String
empIdcard
;
/**
* 手机号码
*/
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"手机号码不能超过20个字符"
)
@ExcelProperty
(
"手机号码"
)
@Schema
(
description
=
"手机号码"
)
private
String
phone
;
/**
* 社保购买状态,0待确认,1待派单,2派单失败,3待审核,4审核不通过,5待办理,6办理中,7办理成功,8办理失败,9部分办理失败
*/
...
...
@@ -385,7 +393,16 @@ public class TDispatchInfoPre extends BaseEntity {
@Schema
(
description
=
"派单id"
)
private
String
dispatcherId
;
/**
* 社保公积金查询id
*/
@ExcelAttribute
(
name
=
"社保公积金查询id"
)
@ExcelProperty
(
"社保公积金查询id"
)
@Schema
(
description
=
"社保公积金查询id"
)
private
String
socialFundId
;
@Schema
(
description
=
"发起失败原因"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
errorInfo
;
@Schema
(
description
=
"发起失败时间"
)
...
...
@@ -393,6 +410,7 @@ public class TDispatchInfoPre extends BaseEntity {
private
Date
errorTime
;
@Schema
(
description
=
"派单审核/办理不通过原因"
)
@TableField
(
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
errorBackInfo
;
/**
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TDispatchInfoPreExportVo.java
View file @
19666a87
...
...
@@ -2,7 +2,6 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -16,7 +15,7 @@ import java.time.LocalDateTime;
* @date 2025-09-30 16:40:07
*/
@Data
public
class
TDispatchInfoPreExportVo
extends
RowIndex
implements
Serializable
{
public
class
TDispatchInfoPreExportVo
implements
Serializable
{
/**
* 项目名称
*/
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoPreServiceImpl.java
View file @
19666a87
...
...
@@ -203,6 +203,9 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if
(
Common
.
isNotNull
(
preVo
.
getExpectedConfirmTime
()))
{
pre
.
setExpectedConfirmTime
(
LocalDateTimeUtils
.
dateToLocalDateTime
(
preVo
.
getExpectedConfirmTime
()));
}
if
(
Common
.
isEmpty
(
pre
.
getDispatchItem
()))
{
preVo
.
setDispatchItem
(
"养老、医疗、生育、失业、工伤、大病"
);
}
//如果自动触发派增为是,计算派单发起时间和派单确认时间
if
(
Common
.
isNotNull
(
preVo
.
getIsAutoDis
())
&&
CommonConstants
.
ZERO_STRING
.
equals
(
preVo
.
getIsAutoDis
())
&&
Common
.
isNotNull
(
preVo
.
getExpectedCollectionType
())
&&
Common
.
isEmpty
(
preVo
.
getExpectedCollectionTime
()))
{
...
...
@@ -339,7 +342,7 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
if
(
Common
.
isNotNull
(
disList
))
{
//调用批量派单接口100条处理一次,同原合同派单保持一致
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
dispatchInfoService
.
importTDispatchInfo
(
excelVO
List
,
errorMessageList
,
user
,
null
,
new
HashMap
<>());
dispatchInfoService
.
importTDispatchInfo
(
dis
List
,
errorMessageList
,
user
,
null
,
new
HashMap
<>());
if
(!
errorMessageList
.
stream
().
allMatch
(
message
->
message
.
getMessage
().
equals
(
CommonConstants
.
SAVE_SUCCESS
)))
{
errorMessageListAll
.
addAll
(
errorMessageList
);
//更新社保状态为2发起失败
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
19666a87
...
...
@@ -40,6 +40,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.google.common.collect.Lists
;
import
com.google.gson.JsonObject
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
...
...
@@ -174,6 +175,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Autowired
private
TSocialFriendBackLogService
socialFriendBackLogService
;
@Autowired
private
WxConfig
wxConfig
;
/**
* 派单信息记录表简单分页查询
*
...
...
@@ -650,7 +654,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 开始插入各种数据了
insertAllInfo
(
excelVOList
,
errorMessageList
,
empVoMap
,
res
,
socialsMap
,
fundsMap
,
socialFundAddMap
,
dispatchMap
,
excelVOTemp
,
dispatchPart
,
injury
);
// 清理map list 等数据
Common
.
clear
(
excelVOList
);
//
Common.clear(excelVOList);
Common
.
clear
(
empAddsMap
);
Common
.
clear
(
contractsMap
);
Common
.
clear
(
projectsMap
);
...
...
@@ -1139,7 +1143,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
TDispatchInfoPre
dispatchInfoPre
=
dispatchInfoPreMapper
.
selectById
(
preId
);
if
(
Common
.
isNotNull
(
dispatchInfoPre
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
THREE_STRING
);
dispatchInfoPre
.
setDispatcherId
(
socialFund
.
getId
());
dispatchInfoPre
.
setDispatcherId
(
socialFund
.
getDispatchId
());
dispatchInfoPre
.
setSocialFundId
(
socialFund
.
getId
());
dispatchInfoPre
.
setErrorInfo
(
null
);
dispatchInfoPre
.
setErrorTime
(
null
);
dispatchInfoPreMapper
.
updateById
(
dispatchInfoPre
);
...
...
@@ -3688,7 +3693,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if
(
null
!=
socialInfo
)
{
//派单审核通过更新社保待购买表的状态
TDispatchInfoPre
dispatchInfoPre
=
dispatchInfoPreMapper
.
selectOne
(
Wrappers
.<
TDispatchInfoPre
>
query
().
lambda
()
.
eq
(
TDispatchInfoPre:
:
get
Dispatcher
Id
,
sf
.
getId
())
.
eq
(
TDispatchInfoPre:
:
get
SocialFund
Id
,
sf
.
getId
())
.
eq
(
TDispatchInfoPre:
:
getProcessStatus
,
CommonConstants
.
THREE_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// 派增审核
...
...
@@ -3704,6 +3709,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//审核通过更新状态
if
(
Common
.
isNotNull
(
dispatchInfoPre
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
FIVE_STRING
);
dispatchInfoPre
.
setErrorBackInfo
(
null
);
dispatchInfoPreMapper
.
updateById
(
dispatchInfoPre
);
}
//派增审核不通过 需要处理预估数据
...
...
@@ -3723,6 +3729,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
FOUR_STRING
);
dispatchInfoPre
.
setErrorBackInfo
(
auditRemark
);
dispatchInfoPreMapper
.
updateById
(
dispatchInfoPre
);
sendDisFalureMessageToWx
(
dispatchInfoPre
);
}
}
socialInfo
.
setAuditTime
(
now
);
...
...
@@ -4422,23 +4429,50 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
//针对社保自动化过来的数据,办理更新待购买数据状态
TDispatchInfoPre
dispatchInfoPre
=
dispatchInfoPreMapper
.
selectOne
(
Wrappers
.<
TDispatchInfoPre
>
query
().
lambda
()
.
eq
(
TDispatchInfoPre:
:
get
Dispatcher
Id
,
sf
.
getId
())
.
eq
(
TDispatchInfoPre:
:
get
SocialFund
Id
,
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
);
dispatchInfoPre
.
setErrorBackInfo
(
null
);
}
if
(
sf
.
getSocialStatus
().
equals
(
CommonConstants
.
FOUR_STRING
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
NINE_STRING
);
dispatchInfoPre
.
setErrorBackInfo
(
handleRemark
);
StringBuffer
errorTemp
=
new
StringBuffer
();
//针对部分办理失败更新社保待购买的派单项
if
(
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getPensionHandle
()))
{
errorTemp
.
append
(
DispatchConstants
.
DISPATCH_PENSION
);
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getMedicalHandle
()))
{
errorTemp
.
append
(
DispatchConstants
.
DISPATCH_MEDICAL
);
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getBirthHandle
()))
{
errorTemp
.
append
(
DispatchConstants
.
DISPATCH_BIRTH
);
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getWorkInjuryHandle
()))
{
errorTemp
.
append
(
DispatchConstants
.
DISPATCH_INJURY
);
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getUnemployHandle
()))
{
errorTemp
.
append
(
DispatchConstants
.
DISPATCH_UNEMP
);
}
if
(
CommonConstants
.
TWO_STRING
.
equals
(
sf
.
getBigailmentHandle
()))
{
errorTemp
.
append
(
DispatchConstants
.
DISPATCH_BIGMAILMENT
);
}
if
(
Common
.
isNotNull
(
errorTemp
.
toString
()))
{
dispatchInfoPre
.
setDispatchItem
(
errorTemp
.
deleteCharAt
(
errorTemp
.
length
()
-
1
).
toString
());
}
sendDisFalureMessageToWx
(
dispatchInfoPre
);
}
if
(
sf
.
getSocialStatus
().
equals
(
CommonConstants
.
FIVE_STRING
))
{
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
EIGHT_STRING
);
dispatchInfoPre
.
setErrorBackInfo
(
handleRemark
);
sendDisFalureMessageToWx
(
dispatchInfoPre
);
}
if
(
sf
.
getSocialStatus
().
equals
(
CommonConstants
.
THREE_STRING
))
{
dispatchInfoPre
.
setErrorBackInfo
(
null
);
dispatchInfoPre
.
setProcessStatus
(
CommonConstants
.
SEVEN_STRING
);
}
dispatchInfoPreMapper
.
updateById
(
dispatchInfoPre
);
...
...
@@ -8784,4 +8818,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
return
R
.
failed
(
"未找到反馈文件"
);
}
//发送企业微信待办
private
void
sendDisFalureMessageToWx
(
TDispatchInfoPre
pre
)
{
//获取前端客服
SysUser
user
;
if
(
Common
.
isEmpty
(
pre
.
getCustomerUserLoginName
()))
{
return
;
}
R
<
SysUser
>
res
=
upmsDaprUtils
.
getSimpleUserByLoginName
(
pre
.
getCustomerUserLoginName
());
if
(
Common
.
isNotNull
(
res
)
&&
Common
.
isNotNull
(
res
.
getData
()))
{
user
=
res
.
getData
();
}
else
{
return
;
}
StringBuilder
sendUser
=
null
;
if
(
Common
.
isNotKong
(
user
.
getWxMessage
()))
{
sendUser
=
new
StringBuilder
(
user
.
getWxMessage
());
}
if
(
sendUser
!=
null
)
{
RestTemplate
restTemplate
=
new
RestTemplate
();
Map
<
String
,
Object
>
requestMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
textcard
=
new
HashMap
<>();
String
authUrl
=
String
.
format
(
SecurityConstants
.
WX_GET_MESSAGE_AUTH_URL
,
wxConfig
.
getCorpid
(),
wxConfig
.
getDomainName
()
+
"/auth/oauth/wxLogin"
,
"68"
+
pre
.
getId
());
StringBuilder
description
=
new
StringBuilder
();
String
title
=
"作业自动化——社保办理失败提醒"
;
description
.
append
(
pre
.
getEmpName
()).
append
(
"-"
).
append
(
pre
.
getEmpIdcard
()).
append
(
"-"
)
.
append
(
pre
.
getPhone
()).
append
(
",社保派单审核/办理失败"
).
append
(
"<br>"
);
description
.
append
(
"请及时处理,以免产生用工风险!"
).
append
(
"<br>"
);
textcard
.
put
(
"title"
,
title
);
textcard
.
put
(
"url"
,
authUrl
);
textcard
.
put
(
"description"
,
description
.
toString
());
requestMap
.
put
(
"touser"
,
sendUser
);
requestMap
.
put
(
"agentid"
,
wxConfig
.
getAgentid
());
requestMap
.
put
(
"msgtype"
,
"textcard"
);
requestMap
.
put
(
"textcard"
,
textcard
);
// 必须加上header说明
if
(!
wxConfig
.
sendTextCard
(
restTemplate
,
requestMap
))
{
wxConfig
.
sendTextCard
(
restTemplate
,
requestMap
);
}
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoPreMapper.xml
View file @
19666a87
...
...
@@ -53,6 +53,7 @@
<result
property=
"contractStatus"
column=
"CONTRACT_STATUS"
/>
<result
property=
"contractId"
column=
"CONTRACT_ID"
/>
<result
property=
"dispatcherId"
column=
"DISPATCHER_ID"
/>
<result
property=
"socialFundId"
column=
"SOCIAL_FUND_ID"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
...
...
@@ -63,6 +64,7 @@
<result
property=
"errorBackInfo"
column=
"error_back_info"
/>
<result
property=
"errorTime"
column=
"error_time"
/>
<result
property=
"position"
column=
"position"
/>
<result
property=
"phone"
column=
"phone"
/>
</resultMap>
<resultMap
id=
"tDispatchInfoPreExportMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo"
>
...
...
@@ -131,7 +133,7 @@
a.CREATE_NAME,
a.UPDATE_TIME,
a.CREATE_TIME,
a.DELETE_FLAG,error_info,error_time,a.DISPATCHER_ID,a.error_back_info,a.position
a.DELETE_FLAG,error_info,error_time,a.DISPATCHER_ID,a.error_back_info,a.position
,SOCIAL_FUND_ID,a.phone
</sql>
<sql
id=
"tDispatchInfoPre_where"
>
<if
test=
"tDispatchInfoPre != null"
>
...
...
@@ -203,6 +205,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>
...
...
@@ -290,7 +295,7 @@
(@i :=@i+1) as rowIndex,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
a.dept_no
deptNo
,
a.dept_no
settleDomainCode
,
a.RECORD_BASE recordBase,
a.SOCIAL_HOUSEHOLD_NAME socialHousehold,
if(a.IS_CREATE_DATE = '0',a.SOCIAL_START_DATE,a.PENSION_START) as pensionStart,
...
...
@@ -307,6 +312,7 @@
if(a.PAYMENT_TYPE = '1',BIRTH_CARDINAL,null) as birthCardinal,
if(a.PAYMENT_TYPE = '1',BIGAILMENT_CARDINAL,null) as bigailmentCardinal,
a.id preId,
a.TRUST_REMARK trustRemark,
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
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFundInfoMapper.xml
View file @
19666a87
...
...
@@ -1238,6 +1238,7 @@
<select
id=
"selectSocialFundInfoCountByEmpIdcard"
resultType=
"java.lang.Long"
>
SELECT count(1)
FROM t_social_fund_info a
inner join t_dispatch_info d on a.DISPATCH_ID = d.ID
where a.EMP_IDCARD = #{empIdcard}
and a.social_status in ('0', '1', '2', '3', '4', '6', '7', '9', '11', '12')
</select>
...
...
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