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
ad672332
Commit
ad672332
authored
Mar 07, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.7-项目
parent
4d6ec441
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
147 additions
and
135 deletions
+147
-135
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+146
-135
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+1
-0
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
ad672332
...
@@ -67,13 +67,15 @@ public class SocialFriendConfig {
...
@@ -67,13 +67,15 @@ public class SocialFriendConfig {
private
static
final
String
VERSION
=
"version"
;
private
static
final
String
VERSION
=
"version"
;
/**
/**
* @param : listVo 同一类(户、增减)的前100个
* @param : vo 第一个,存账密等信息
* @param : type 1社保增 2社保减 3医保增 4医保减
* @param : type 1社保增 2社保减 3医保增 4医保减
* @Description: 推送任务接口
* @Description: 推送任务接口
* @Author: hgw
* @Author: hgw
* @Date: 2024-12-9 16:54:31
* @Date: 2024-12-9 16:54:31
* @return: java.lang.String
* @return: java.lang.String
**/
**/
public
String
pushFriendByInfo
(
RestTemplate
restTemplate
,
SociaFriendYgsAddVo
vo
,
int
type
,
String
thisTime
public
String
pushFriendByInfo
(
RestTemplate
restTemplate
,
SociaFriendYgsAddVo
vo
,
List
<
SociaFriendYgsAddVo
>
listVo
,
int
type
,
String
thisTime
,
List
<
TSocialFriendBackLog
>
backLogList
)
{
,
List
<
TSocialFriendBackLog
>
backLogList
)
{
String
addId
=
""
;
String
addId
=
""
;
String
appAddUrl
=
urlPre
;
String
appAddUrl
=
urlPre
;
...
@@ -137,7 +139,7 @@ public class SocialFriendConfig {
...
@@ -137,7 +139,7 @@ public class SocialFriendConfig {
}
}
json
.
put
(
"ywblzhlb"
,
ywblzhlbArr
);
json
.
put
(
"ywblzhlb"
,
ywblzhlbArr
);
// type 1社保增 2社保减 3医保增 4医保减
// type 1社保增 2社保减 3医保增 4医保减
setEmpInfo
(
json
,
v
o
,
type
);
setEmpInfo
(
json
,
listV
o
,
type
);
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
// 推的json
// 推的json
...
@@ -153,7 +155,11 @@ public class SocialFriendConfig {
...
@@ -153,7 +155,11 @@ public class SocialFriendConfig {
if
(
Common
.
isNotNull
(
dataResultList
))
{
if
(
Common
.
isNotNull
(
dataResultList
))
{
// 拉取的数据日志
// 拉取的数据日志
backLog
=
new
TSocialFriendBackLog
();
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
vo
.
getSocialId
());
StringBuilder
ids
=
new
StringBuilder
();
for
(
SociaFriendYgsAddVo
tempVo
:
listVo
)
{
ids
=
ids
.
append
(
tempVo
).
append
(
","
);
}
backLog
.
setSocialId
(
ids
.
toString
());
backLog
.
setType
(
type
);
backLog
.
setType
(
type
);
backLog
.
setLogInfo
(
dataResultList
);
backLog
.
setLogInfo
(
dataResultList
);
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
...
@@ -242,9 +248,9 @@ public class SocialFriendConfig {
...
@@ -242,9 +248,9 @@ public class SocialFriendConfig {
* @Date: 2024/12/11 10:24
* @Date: 2024/12/11 10:24
* @return: void
* @return: void
**/
**/
private
void
setEmpInfo
(
JSONObject
json
,
SociaFriendYgsAddVo
v
o
,
int
type
)
{
private
void
setEmpInfo
(
JSONObject
json
,
List
<
SociaFriendYgsAddVo
>
listV
o
,
int
type
)
{
if
(
type
==
1
||
type
==
3
)
{
if
(
type
==
1
||
type
==
3
)
{
setEmpInfoAdd
(
json
,
v
o
,
type
);
setEmpInfoAdd
(
json
,
listV
o
,
type
);
}
else
{
}
else
{
setEmpInfoReduce
(
json
,
vo
,
type
);
setEmpInfoReduce
(
json
,
vo
,
type
);
}
}
...
@@ -257,142 +263,147 @@ public class SocialFriendConfig {
...
@@ -257,142 +263,147 @@ public class SocialFriendConfig {
* @Date: 2024/12/10 18:05
* @Date: 2024/12/10 18:05
* @return: void
* @return: void
**/
**/
private
void
setEmpInfoAdd
(
JSONObject
json
,
SociaFriendYgsAddVo
v
o
,
int
type
)
{
private
void
setEmpInfoAdd
(
JSONObject
json
,
List
<
SociaFriendYgsAddVo
>
listV
o
,
int
type
)
{
// 参保人员名单 数组
// 参保人员名单 数组
JSONArray
cbrymdArr
=
new
JSONArray
();
JSONArray
cbrymdArr
=
new
JSONArray
();
JSONObject
cbrymdOne
=
new
JSONObject
();
JSONObject
cbrymdOne
;
// 姓名
cbrymdOne
.
put
(
"xm"
,
vo
.
getEmpName
());
// 2025-3-6 15:44:32 单个改造为批量
// 证件类型
for
(
SociaFriendYgsAddVo
vo
:
listVo
)
{
cbrymdOne
.
put
(
"zzlx"
,
"居民身份证"
);
cbrymdOne
=
new
JSONObject
();
// 证件号码"828888200908213819"
// 姓名
cbrymdOne
.
put
(
"zzhm"
,
vo
.
getEmpIdcard
());
cbrymdOne
.
put
(
"xm"
,
vo
.
getEmpName
());
// 证件类型
// 国籍(地区) "中国"
cbrymdOne
.
put
(
"zzlx"
,
"居民身份证"
);
cbrymdOne
.
put
(
"gj"
,
"中国"
);
// 证件号码"828888200908213819"
// 性别
cbrymdOne
.
put
(
"zzhm"
,
vo
.
getEmpIdcard
());
//cbrymdOne.put("xb", "男")
cbrymdOne
.
put
(
"xb"
,
getSexName
(
vo
.
getEmpIdcard
()));
// 国籍(地区) "中国"
// 出生日期
cbrymdOne
.
put
(
"gj"
,
"中国"
);
cbrymdOne
.
put
(
"csrq"
,
getBirthStr
(
vo
.
getEmpIdcard
()));
// 性别
// 民族 空的默认汉族
//cbrymdOne.put("xb", "男")
cbrymdOne
.
put
(
"mz"
,
vo
.
getEmpNational
());
cbrymdOne
.
put
(
"xb"
,
getSexName
(
vo
.
getEmpIdcard
()));
// 手机号码
// 出生日期
cbrymdOne
.
put
(
"sjhm"
,
vo
.
getEmpMobile
());
cbrymdOne
.
put
(
"csrq"
,
getBirthStr
(
vo
.
getEmpIdcard
()));
String
areaName
=
"安徽省"
;
// 民族 空的默认汉族
// 户口地所在行政区
cbrymdOne
.
put
(
"mz"
,
vo
.
getEmpNational
());
cbrymdOne
.
put
(
"hkszdxzq"
,
areaName
);
// 手机号码
// 户口所在地地址
cbrymdOne
.
put
(
"sjhm"
,
vo
.
getEmpMobile
());
cbrymdOne
.
put
(
"hkszddz"
,
areaName
);
String
areaName
=
"安徽省"
;
// 户口性质
// 户口地所在行政区
//cbrymdOne.put("hkxz", "居民户口(含农业户口、非农业户口)")
cbrymdOne
.
put
(
"hkszdxzq"
,
areaName
);
cbrymdOne
.
put
(
"hkxz"
,
"本地居民户口"
);
// 户口所在地地址
// 居住地址
cbrymdOne
.
put
(
"hkszddz"
,
areaName
);
cbrymdOne
.
put
(
"jzdz"
,
areaName
);
// 户口性质
// 居住地行政区
//cbrymdOne.put("hkxz", "居民户口(含农业户口、非农业户口)")
cbrymdOne
.
put
(
"jzdzxzq"
,
areaName
);
cbrymdOne
.
put
(
"hkxz"
,
"本地居民户口"
);
// 社保起缴日期(养老起缴)yyyy-MM-dd
// 居住地址
String
startDate
=
vo
.
getSocialStartDate
();
cbrymdOne
.
put
(
"jzdz"
,
areaName
);
// 参加工作日期
// 居住地行政区
cbrymdOne
.
put
(
"cjgzrq"
,
startDate
);
cbrymdOne
.
put
(
"jzdzxzq"
,
areaName
);
// 文化程度 见字典“受教育程度” 空的默认“大学专科”
// 社保起缴日期(养老起缴)yyyy-MM-dd
//cbrymdOne.put("whcd", "大学专科")
String
startDate
=
vo
.
getSocialStartDate
();
cbrymdOne
.
put
(
"whcd"
,
vo
.
getEducationName
());
// 参加工作日期
cbrymdOne
.
put
(
"cjgzrq"
,
startDate
);
// 办理项目列表
// 文化程度 见字典“受教育程度” 空的默认“大学专科”
JSONArray
blxmlbArr
=
new
JSONArray
();
//cbrymdOne.put("whcd", "大学专科")
JSONObject
blxmlbOne
=
new
JSONObject
();
cbrymdOne
.
put
(
"whcd"
,
vo
.
getEducationName
());
String
blxm
=
"社保"
;
// 险种类型 例如养老、工伤、医疗等
// 办理项目列表
String
xzlb
=
"企业职工养老,工伤保险,失业保险"
;
JSONArray
blxmlbArr
=
new
JSONArray
();
if
(
type
>
2
)
{
JSONObject
blxmlbOne
=
new
JSONObject
();
blxm
=
"医保"
;
String
blxm
=
"社保"
;
xzlb
=
null
;
// 险种类型 例如养老、工伤、医疗等
if
(
Common
.
isNotNull
(
vo
.
getUnitMedicalMoney
())
&&
CommonConstants
.
ONE_INTEGER
.
equals
(
vo
.
getUnitMedicalMoney
()))
{
String
xzlb
=
"企业职工养老,工伤保险,失业保险"
;
xzlb
=
"职工基本医疗保险"
;
if
(
type
>
2
)
{
}
blxm
=
"医保"
;
if
(
Common
.
isNotNull
(
vo
.
getUnitBirthMoney
())
&&
CommonConstants
.
ONE_INTEGER
.
equals
(
vo
.
getUnitBirthMoney
()))
{
xzlb
=
null
;
if
(
Common
.
isNotNull
(
xzlb
))
{
if
(
Common
.
isNotNull
(
vo
.
getUnitMedicalMoney
())
&&
CommonConstants
.
ONE_INTEGER
.
equals
(
vo
.
getUnitMedicalMoney
()))
{
xzlb
+=
",生育保险"
;
xzlb
=
"职工基本医疗保险"
;
}
else
{
xzlb
=
"生育保险"
;
}
}
}
if
(
Common
.
isNotNull
(
vo
.
getUnitBirthMoney
())
&&
CommonConstants
.
ONE_INTEGER
.
equals
(
vo
.
getUnitBirthMoney
()))
{
if
(
Common
.
isNotNull
(
vo
.
getUnitBigailmentMoney
())
&&
CommonConstants
.
ONE_INTEGER
.
equals
(
vo
.
getUnitBigailmentMoney
()))
{
if
(
Common
.
isNotNull
(
xzlb
))
{
if
(
Common
.
isNotNull
(
xzlb
))
{
xzlb
+=
",生育保险"
;
xzlb
+=
",大额医疗"
;
}
else
{
}
else
{
xzlb
=
"生育保险"
;
xzlb
=
"大额医疗"
;
}
}
if
(
Common
.
isNotNull
(
vo
.
getUnitBigailmentMoney
())
&&
CommonConstants
.
ONE_INTEGER
.
equals
(
vo
.
getUnitBigailmentMoney
()))
{
if
(
Common
.
isNotNull
(
xzlb
))
{
xzlb
+=
",大额医疗"
;
}
else
{
xzlb
=
"大额医疗"
;
}
}
}
}
}
String
[]
strArr
=
xzlb
.
split
(
","
);
// 办理项目
blxmlbOne
.
put
(
"blxm"
,
blxm
);
// 本次参保日期 格式:yyyy-MM-dd
blxmlbOne
.
put
(
"bccbrq"
,
startDate
);
// 申报工资 社保派单里的“备案基数”
blxmlbOne
.
put
(
"sbgz"
,
vo
.
getRecordBase
());
// 险种类型 例如养老、工伤、医疗等
blxmlbOne
.
put
(
"xzlb"
,
strArr
);
blxmlbArr
.
add
(
blxmlbOne
);
cbrymdOne
.
put
(
"blxmlb"
,
blxmlbArr
);
// 特色字段信息
JSONObject
tszdxx
=
new
JSONObject
();
// 增员年月 社保必填;yyyyMM 社保起缴日期(养老起缴)到月
tszdxx
.
put
(
"zyny"
,
vo
.
getSocialStartMonth
());
// 同步办理用工劳动备案 社保必填;是
tszdxx
.
put
(
"tbblygldhtba"
,
"是"
);
// 参保模式 新参、续参
tszdxx
.
put
(
"cbms"
,
"续参"
);
// 就业登记时间 社保必填;yyyy-MM-dd
tszdxx
.
put
(
"jydjsj"
,
startDate
);
// 单位就业起始时间 社保必填;yyyy-MM-dd
tszdxx
.
put
(
"dwjyqssj"
,
startDate
);
// 安徽非必填!社保个人身份材料 取文件上传后获取的文件路径。图片总大小不超过1M, 材料仅支持图片格式,支持上传jpeg/jpg/png格式。
// tszdxx.put("sbzycl", url)
// 用工形式 社保必填 // 盛宇文档对应,只有3种
tszdxx
.
put
(
"ygxs"
,
vo
.
getContractType
());
// 劳动合同签署情况 社保必填 默认"初签"
tszdxx
.
put
(
"ldhtqsqk"
,
"初签"
);
// 人员类型 默认:在职职工
tszdxx
.
put
(
"rylx"
,
"在职职工"
);
// 医保个人身份材料 安徽非必填! 无
//tszdxx.put("ybzycl", url)
// 职业工种 社保必填 默认“办事人员和有关人员”
tszdxx
.
put
(
"zygz"
,
"办事人员和有关人员"
);
// 人员身份 个人身份 社保必填 默认“职员”
tszdxx
.
put
(
"grsf"
,
"职员"
);
// 工作时间制度 社保必填
tszdxx
.
put
(
"gzsjzd"
,
vo
.
getWorkingHours
());
// 医保用工形式 医保新参必填 默认“原固定职工”
tszdxx
.
put
(
"ybygxs"
,
"原固定职工"
);
if
(
type
<
3
)
{
// 企业职工社会保险增员花名册 安徽非必填!
// 社保增员必填
tszdxx
.
put
(
"qyzgshbxzyhmc"
,
vo
.
getQyzgshbxzyhmc
());
}
else
{
// 企业职工基本医疗保险参保登记表 安徽非必填! 数组
String
[]
arr
=
{
vo
.
getQyzgjbylbxcbdjb
()};
// 增员、减员必填
tszdxx
.
put
(
"qyzgjbylbxcbdjb"
,
arr
);
}
cbrymdOne
.
put
(
"tszdxx"
,
tszdxx
);
// 就业信息 社保必填;
JSONObject
jyxx
=
new
JSONObject
();
// 劳动合同类型
jyxx
.
put
(
"ldhtlx"
,
vo
.
getContractTypeTwo
());
// 劳动合同起始日期
jyxx
.
put
(
"ldhtqsrq"
,
startDate
);
// 劳动合同截止日期 派单里的“合同截止日期”
jyxx
.
put
(
"ldhtjzrq"
,
vo
.
getContractEnd
());
cbrymdOne
.
put
(
"jyxx"
,
jyxx
);
cbrymdArr
.
add
(
cbrymdOne
);
}
}
String
[]
strArr
=
xzlb
.
split
(
","
);
// 办理项目
blxmlbOne
.
put
(
"blxm"
,
blxm
);
// 本次参保日期 格式:yyyy-MM-dd
blxmlbOne
.
put
(
"bccbrq"
,
startDate
);
// 申报工资 社保派单里的“备案基数”
blxmlbOne
.
put
(
"sbgz"
,
vo
.
getRecordBase
());
// 险种类型 例如养老、工伤、医疗等
blxmlbOne
.
put
(
"xzlb"
,
strArr
);
blxmlbArr
.
add
(
blxmlbOne
);
cbrymdOne
.
put
(
"blxmlb"
,
blxmlbArr
);
// 特色字段信息
JSONObject
tszdxx
=
new
JSONObject
();
// 增员年月 社保必填;yyyyMM 社保起缴日期(养老起缴)到月
tszdxx
.
put
(
"zyny"
,
vo
.
getSocialStartMonth
());
// 同步办理用工劳动备案 社保必填;是
tszdxx
.
put
(
"tbblygldhtba"
,
"是"
);
// 参保模式 新参、续参
tszdxx
.
put
(
"cbms"
,
"续参"
);
// 就业登记时间 社保必填;yyyy-MM-dd
tszdxx
.
put
(
"jydjsj"
,
startDate
);
// 单位就业起始时间 社保必填;yyyy-MM-dd
tszdxx
.
put
(
"dwjyqssj"
,
startDate
);
// 安徽非必填!社保个人身份材料 取文件上传后获取的文件路径。图片总大小不超过1M, 材料仅支持图片格式,支持上传jpeg/jpg/png格式。
// tszdxx.put("sbzycl", url)
// 用工形式 社保必填 // 盛宇文档对应,只有3种
tszdxx
.
put
(
"ygxs"
,
vo
.
getContractType
());
// 劳动合同签署情况 社保必填 默认"初签"
tszdxx
.
put
(
"ldhtqsqk"
,
"初签"
);
// 人员类型 默认:在职职工
tszdxx
.
put
(
"rylx"
,
"在职职工"
);
// 医保个人身份材料 安徽非必填! 无
//tszdxx.put("ybzycl", url)
// 职业工种 社保必填 默认“办事人员和有关人员”
tszdxx
.
put
(
"zygz"
,
"办事人员和有关人员"
);
// 人员身份 个人身份 社保必填 默认“职员”
tszdxx
.
put
(
"grsf"
,
"职员"
);
// 工作时间制度 社保必填
tszdxx
.
put
(
"gzsjzd"
,
vo
.
getWorkingHours
());
// 医保用工形式 医保新参必填 默认“原固定职工”
tszdxx
.
put
(
"ybygxs"
,
"原固定职工"
);
if
(
type
<
3
)
{
// 企业职工社会保险增员花名册 安徽非必填!
// 社保增员必填
tszdxx
.
put
(
"qyzgshbxzyhmc"
,
vo
.
getQyzgshbxzyhmc
());
}
else
{
// 企业职工基本医疗保险参保登记表 安徽非必填! 数组
String
[]
arr
=
{
vo
.
getQyzgjbylbxcbdjb
()};
// 增员、减员必填
tszdxx
.
put
(
"qyzgjbylbxcbdjb"
,
arr
);
}
cbrymdOne
.
put
(
"tszdxx"
,
tszdxx
);
// 就业信息 社保必填;
JSONObject
jyxx
=
new
JSONObject
();
// 劳动合同类型
jyxx
.
put
(
"ldhtlx"
,
vo
.
getContractTypeTwo
());
// 劳动合同起始日期
jyxx
.
put
(
"ldhtqsrq"
,
startDate
);
// 劳动合同截止日期 派单里的“合同截止日期”
jyxx
.
put
(
"ldhtjzrq"
,
vo
.
getContractEnd
());
cbrymdOne
.
put
(
"jyxx"
,
jyxx
);
cbrymdArr
.
add
(
cbrymdOne
);
// 人员名单
// 人员名单
String
buyType
=
"cbrymd"
;
String
buyType
=
"cbrymd"
;
json
.
put
(
buyType
,
cbrymdArr
);
json
.
put
(
buyType
,
cbrymdArr
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
ad672332
...
@@ -190,6 +190,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -190,6 +190,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
logList
.
add
(
socialLog
);
logList
.
add
(
socialLog
);
}
}
}
}
List
<
SociaFriendYgsAddVo
>
listVo
,
if
(!
backLogList
.
isEmpty
())
{
if
(!
backLogList
.
isEmpty
())
{
tSocialFriendBackLogService
.
saveBatch
(
backLogList
);
tSocialFriendBackLogService
.
saveBatch
(
backLogList
);
...
...
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