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
c82bd732
Commit
c82bd732
authored
Dec 11, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.3-shuiyou 测试提交
parent
1102dd7b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
755 additions
and
103 deletions
+755
-103
SocialTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
+23
-0
FriendResult.java
...a/com/yifu/cloud/plus/v1/yifu/social/vo/FriendResult.java
+21
-0
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+612
-96
SocialFriendSign.java
...fu/cloud/plus/v1/yifu/social/config/SocialFriendSign.java
+61
-0
TSocialFriendController.java
...us/v1/yifu/social/controller/TSocialFriendController.java
+18
-0
TSocialFriendPushService.java
...plus/v1/yifu/social/service/TSocialFriendPushService.java
+3
-0
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+17
-7
No files found.
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
View file @
c82bd732
...
...
@@ -194,6 +194,29 @@ public class SocialTask {
log
.
info
(
"------------2定时任务推送社保士兵-定时任务结束------------"
);
}
/**
* @Description: 1定时任务推送税友
* @Author: hgw
* @Date: 2024-12-9 17:00:02
**/
public
void
doPushFriend
()
{
log
.
info
(
"------------1定时任务推送税友-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tsocialfriend/inner/doPushFriend"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------1定时任务推送税友-定时任务结束------------"
);
}
/**
* @Description: 2定时任务获取税友
* @Author: hgw
* @Date: 2024-12-9 16:59:56
**/
public
void
doGetFriendByRequestId
()
{
log
.
info
(
"------------2定时任务获取税友-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tsocialfriend/inner/doGetFriendByRequestId"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------2定时任务获取税友-定时任务结束------------"
);
}
/**
* @Description: 3每日定时任务推送社保士兵审核结果查询
* @Author: hgw
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/FriendResult.java
0 → 100644
View file @
c82bd732
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author fxj
* @Date 2024/5/10
* @Description
* @Version 1.0
*/
@Data
public
class
FriendResult
implements
Serializable
{
// 身份证
private
String
idCard
;
// 状态1-处理中,2-处理成功,3-处理失败,4-待办(提交成功,待网厅状态流转,上海特有)
private
String
zt
;
// 提示或者错误信息 SUCCESS
private
String
cwxx
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
c82bd732
...
...
@@ -5,16 +5,20 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.http.*
;
import
org.springframework.web.client.RestTemplate
;
import
java.security.SignatureException
;
import
java.util.Date
;
import
java.util.TreeMap
;
/**
* @Author: hgw
* @Date: 2024-12-6 17:01:23
...
...
@@ -42,96 +46,605 @@ public class SocialFriendConfig {
@Value
(
"${socialFriend.urlGetInfo}"
)
private
String
urlGetInfo
;
private
static
final
String
APP_KEY
=
"appKey"
;
private
static
final
String
TIMESTAMP
=
"timestamp"
;
private
static
final
String
X_REQ_NONCE
=
"xReqNonce"
;
private
static
final
String
VERSION
=
"version"
;
/**
* @Description: 4:推送任务接口
* @param : type 1社保增 2社保减 3医保增 4医保减
* @Description: 推送任务接口
* @Author: hgw
* @Date: 2024-
5-8 15:07:45
* @Date: 2024-
12-9 16:54:31
* @return: java.lang.String
**/
public
String
getFourAppAdd
(
RestTemplate
restTemplat
e
)
{
public
String
pushFriendByInfo
(
RestTemplate
restTemplate
,
String
id
,
int
type
,
String
thisTim
e
)
{
String
addId
=
""
;
String
appAddUrl
=
urlPre
+
urlPush
;
String
version
=
"1.0.0"
;
String
timestamp
=
String
.
valueOf
(
new
Date
().
getTime
());
String
xReqNonce
=
"1"
;
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
add
(
"accept"
,
MediaType
.
TEXT_PLAIN
.
toString
());
headers
.
add
(
"appKey"
,
appKey
);
headers
.
add
(
"appSecret"
,
appSecret
);
// */*
headers
.
add
(
"accept"
,
MediaType
.
ALL_VALUE
);
headers
.
add
(
APP_KEY
,
appKey
);
headers
.
add
(
TIMESTAMP
,
timestamp
);
try
{
String
signature
=
SocialFriendSign
.
qianMing
(
getMapParam
(
appKey
,
appSecret
,
xReqNonce
,
version
,
timestamp
,
null
));
headers
.
add
(
"signature"
,
signature
);
}
catch
(
SignatureException
e
)
{
log
.
error
(
"税友签名失败"
,
e
);
return
addId
;
}
headers
.
add
(
X_REQ_NONCE
,
xReqNonce
);
headers
.
add
(
VERSION
,
version
);
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"bizNo"
,
"e5150440add340158e6b258bf8c60e7c"
);
// 外部业务订单号
json
.
put
(
"bizNo"
,
id
+
thisTime
);
// 企业名称
json
.
put
(
"qymc"
,
"安徽测试企业"
);
// 税号
json
.
put
(
"nsrsbh"
,
"91340100634561365L"
);
// 行政区划代码
json
.
put
(
"areaid"
,
"340100"
);
JSONArray
ywblzhlbArr
=
new
JSONArray
();
JSONObject
jsonYwblzhlbYgs
=
new
JSONObject
();
jsonYwblzhlbYgs
.
put
(
"mm"
,
"Aa123456"
);
jsonYwblzhlbYgs
.
put
(
"blxm"
,
"社保"
);
jsonYwblzhlbYgs
.
put
(
"dwbh"
,
"123456"
);
jsonYwblzhlbYgs
.
put
(
"zh"
,
"1234567"
);
jsonYwblzhlbYgs
.
put
(
"mmlx"
,
"4"
);
JSONObject
jsonYwblzhlbYsd
=
new
JSONObject
();
jsonYwblzhlbYsd
.
put
(
"mm"
,
"Aa123456"
);
jsonYwblzhlbYsd
.
put
(
"blxm"
,
"医保"
);
jsonYwblzhlbYsd
.
put
(
"dwbh"
,
"123456"
);
jsonYwblzhlbYsd
.
put
(
"zh"
,
"1234567"
);
jsonYwblzhlbYsd
.
put
(
"mmlx"
,
"4"
);
ywblzhlbArr
.
add
(
jsonYwblzhlbYgs
);
ywblzhlbArr
.
add
(
jsonYwblzhlbYsd
);
if
(
type
<
3
)
{
JSONObject
jsonYwblzhlbYgs
=
new
JSONObject
();
// 密码
jsonYwblzhlbYgs
.
put
(
"mm"
,
"Aa123456"
);
// 办理项目 例如社保、医保等
jsonYwblzhlbYgs
.
put
(
"blxm"
,
"社保"
);
// 单位编号
jsonYwblzhlbYgs
.
put
(
"dwbh"
,
"123456"
);
// 账号
jsonYwblzhlbYgs
.
put
(
"zh"
,
"1234567"
);
// 密码类型:安徽社保医保都是4:
jsonYwblzhlbYgs
.
put
(
"mmlx"
,
"4"
);
ywblzhlbArr
.
add
(
jsonYwblzhlbYgs
);
}
else
{
JSONObject
jsonYwblzhlbYsd
=
new
JSONObject
();
jsonYwblzhlbYsd
.
put
(
"mm"
,
"Aa123456"
);
jsonYwblzhlbYsd
.
put
(
"blxm"
,
"医保"
);
jsonYwblzhlbYsd
.
put
(
"dwbh"
,
"123456"
);
jsonYwblzhlbYsd
.
put
(
"zh"
,
"1234567"
);
jsonYwblzhlbYsd
.
put
(
"mmlx"
,
"4"
);
ywblzhlbArr
.
add
(
jsonYwblzhlbYsd
);
}
json
.
put
(
"ywblzhlb"
,
ywblzhlbArr
);
// type 1社保增 2社保减 3医保增 4医保减
setEmpInfo
(
json
,
type
);
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
String
dataResultList
=
restTemplate
.
postForObject
(
appAddUrl
,
formEntity
,
String
.
class
);
// {"head":{"code":"00000000","description":"成功","msg":"成功","time":"2024-12-06 17:10:26","status":"Y"
// ,"body":{"requestId":"85440b327d71466abcd9c5c81d5bb172"
if
(
Common
.
isNotNull
(
dataResultList
))
{
JSONObject
dataObject
=
JSON
.
parseObject
(
dataResultList
);
String
head
=
dataObject
.
getString
(
"head"
);
if
(
Common
.
isNotNull
(
head
))
{
JSONObject
headObject
=
JSON
.
parseObject
(
head
);
String
status
=
headObject
.
getString
(
"status"
);
if
(
"Y"
.
equals
(
status
))
{
String
body
=
dataObject
.
getString
(
"body"
);
JSONObject
bodyObject
=
JSON
.
parseObject
(
body
);
addId
=
bodyObject
.
getString
(
"requestId"
);
}
}
}
return
addId
;
}
/**
* @param json 总传参json
* @param type 1社保增 2社保减 3医保增 4医保减
* @Description: 分流塞值
* @Author: hgw
* @Date: 2024/12/11 10:24
* @return: void
**/
private
void
setEmpInfo
(
JSONObject
json
,
int
type
)
{
switch
(
type
)
{
case
1
:
setEmpInfoOne
(
json
);
break
;
case
2
:
setEmpInfoTwo
(
json
);
break
;
case
3
:
setEmpInfoThree
(
json
);
break
;
case
4
:
setEmpInfoFour
(
json
);
break
;
default
:
break
;
}
}
/**
* @param json 主json存数据
* @Description: 塞人员名单-1社保增
* @Author: hgw
* @Date: 2024/12/10 18:05
* @return: void
**/
private
void
setEmpInfoOne
(
JSONObject
json
)
{
// 参保人员名单 数组
JSONArray
cbrymdArr
=
new
JSONArray
();
JSONObject
cbrymdOne
=
new
JSONObject
();
cbrymdOne
.
put
(
"csrq"
,
"2009-08-21"
);
// 姓名
cbrymdOne
.
put
(
"xm"
,
"测试金辰"
);
// 证件类型
cbrymdOne
.
put
(
"zzlx"
,
"居民身份证"
);
// 证件号码
cbrymdOne
.
put
(
"zzhm"
,
"828888200908213819"
);
// 国籍(地区)
cbrymdOne
.
put
(
"gj"
,
"中国"
);
cbrymdOne
.
put
(
"whcd"
,
"大学本科"
);
cbrymdOne
.
put
(
"sjhm"
,
"10000340997"
);
// 性别
cbrymdOne
.
put
(
"xb"
,
"男"
);
cbrymdOne
.
put
(
"hkszdxzq"
,
"浙江省|杭州市|滨江区"
);
// 出生日期
cbrymdOne
.
put
(
"csrq"
,
"2009-08-21"
);
// 民族
cbrymdOne
.
put
(
"mz"
,
"汉族"
);
cbrymdOne
.
put
(
"cjgzrq"
,
"2017-06-14"
);
// 手机号码
cbrymdOne
.
put
(
"sjhm"
,
"10000340997"
);
// 户口地所在行政区
cbrymdOne
.
put
(
"hkszdxzq"
,
"浙江省|杭州市|滨江区"
);
// 户口所在地地址
cbrymdOne
.
put
(
"hkszddz"
,
"滨江区南环路3738号"
);
// 户口性质
cbrymdOne
.
put
(
"hkxz"
,
"非农业户口(城镇)"
);
// 居住地址
cbrymdOne
.
put
(
"jzdz"
,
"滨江区南环路3738号"
);
// 居住地行政区
cbrymdOne
.
put
(
"jzdzxzq"
,
"浙江省|杭州市|滨江区"
);
// 参加工作日期
cbrymdOne
.
put
(
"cjgzrq"
,
"2024-12-01"
);
// 文化程度
cbrymdOne
.
put
(
"whcd"
,
"大学本科"
);
// 办理项目列表
JSONArray
blxmlbArr
=
new
JSONArray
();
JSONObject
blxmlbOne
=
new
JSONObject
();
String
[]
strArr
=
{
"企业职工养老"
};
blxmlbOne
.
put
(
"xzlb"
,
strArr
);
blxmlbOne
.
put
(
"blxm"
,
"社保"
);
blxmlbOne
.
put
(
"bccbrq"
,
"2024-05-30"
);
String
[]
strArrTwo
=
{
"生育保险"
,
"职工基本医疗保险"
,
"大病统筹医疗保险"
};
String
blxm
=
"社保"
;
// 办理项目
blxmlbOne
.
put
(
"blxm"
,
blxm
);
// 本次参保日期 格式:YYYY-MM-DD
blxmlbOne
.
put
(
"bccbrq"
,
"2024-12-01"
);
// 申报工资 ?基数吗?
blxmlbOne
.
put
(
"sbgz"
,
"4000"
);
JSONObject
blxmlbTwo
=
new
JSONObject
();
String
[]
strArrTwo
=
{
"生育保险"
};
blxmlbTwo
.
put
(
"xzlb"
,
strArrTwo
);
blxmlbTwo
.
put
(
"blxm"
,
"医保"
);
blxmlbTwo
.
put
(
"bccbrq"
,
"2024-04-30"
);
blxmlbTwo
.
put
(
"sbgz"
,
"4000"
);
// 险种类型 例如养老、工伤、医疗等
String
[]
strArr
=
{
"企业职工养老"
,
"工伤保险"
,
"失业保险"
};
// 险种类型 例如养老、工伤、医疗等
blxmlbOne
.
put
(
"xzlb"
,
strArr
);
blxmlbArr
.
add
(
blxmlbOne
);
blxmlbArr
.
add
(
blxmlbTwo
);
cbrymdOne
.
put
(
"blxmlb"
,
blxmlbArr
);
cbrymdOne
.
put
(
"jzdz"
,
"滨江区南环路3738号"
);
// 特色字段信息
JSONObject
tszdxx
=
new
JSONObject
();
// 增员年月 社保必填;yyyyMM
tszdxx
.
put
(
"zyny"
,
"202412"
);
// 同步办理用工劳动备案 社保必填;是
tszdxx
.
put
(
"tbblygldhtba"
,
"是"
);
// 参保模式 新参、续参
// tszdxx.put("cbms", "是")
// 就业登记时间 社保必填;yyyy-mm-dd
tszdxx
.
put
(
"jydjsj"
,
"2024-12-01"
);
// 单位就业起始时间 社保必填;yyyy-mm-dd
tszdxx
.
put
(
"dwjyqssj"
,
"2024-12-01"
);
// 安徽非必填!社保个人身份材料 取文件上传后获取的文件路径。图片总大小不超过1M, 材料仅支持图片格式,支持上传jpeg/jpg/png格式。
// tszdxx.put("sbzycl", url)
// 用工形式 社保必填
tszdxx
.
put
(
"ygxs"
,
"订立固定期限劳动合同"
);
// 劳动合同签署情况 社保必填
tszdxx
.
put
(
"ldhtqsqk"
,
"初签"
);
// 人员类型
tszdxx
.
put
(
"rylx"
,
"在职职工"
);
// 医保个人身份材料 安徽非必填!
//tszdxx.put("ybzycl", url)
// 职业工种 社保必填
tszdxx
.
put
(
"zygz"
,
"社会服务人员"
);
// 人员身份 个人身份 社保必填
tszdxx
.
put
(
"grsf"
,
"职员"
);
// 工作时间制度 社保必填
tszdxx
.
put
(
"gzsjzd"
,
"标准工作时间制度"
);
// 医保用工形式 医保新参必填
// tszdxx.put("ybygxs", "原固定职工")
// 企业职工社会保险增员花名册 安徽非必填!
// tszdxx.put("qyzgshbxzyhmc", url)
// 企业职工基本医疗保险参保登记表 安徽非必填! 数组
// tszdxx.put("qyzgshbxzyhmc", url)
cbrymdOne
.
put
(
"tszdxx"
,
tszdxx
);
// 就业信息 社保必填;
JSONObject
jyxx
=
new
JSONObject
();
// 劳动合同类型
jyxx
.
put
(
"ldhtlx"
,
"固定期限劳动合同"
);
// 劳动合同起始日期
jyxx
.
put
(
"ldhtqsrq"
,
"2024-12-01"
);
// 劳动合同截止日期
jyxx
.
put
(
"ldhtjzrq"
,
"2030-11-30"
);
cbrymdOne
.
put
(
"jyxx"
,
jyxx
);
cbrymdArr
.
add
(
cbrymdOne
);
// 人员名单
String
buyType
=
"cbrymd"
;
json
.
put
(
buyType
,
cbrymdArr
);
}
/**
* @param json 主json存数据
* @Description: 塞人员名单-2社保减
* @Author: hgw
* @Date: 2024/12/10 18:05
* @return: void
**/
private
void
setEmpInfoTwo
(
JSONObject
json
)
{
// 参保人员名单 数组
JSONArray
cbrymdArr
=
new
JSONArray
();
JSONObject
cbrymdOne
=
new
JSONObject
();
// 姓名
cbrymdOne
.
put
(
"xm"
,
"测试金辰"
);
// 证件类型
cbrymdOne
.
put
(
"zzlx"
,
"居民身份证"
);
// 证件号码
cbrymdOne
.
put
(
"zzhm"
,
"828888200908213819"
);
cbrymdOne
.
put
(
"hkxz"
,
"外地居民户口"
);
// 国籍(地区)
cbrymdOne
.
put
(
"gj"
,
"中国"
);
// 性别
cbrymdOne
.
put
(
"xb"
,
"男"
);
// 出生日期
cbrymdOne
.
put
(
"csrq"
,
"2009-08-21"
);
// 民族
cbrymdOne
.
put
(
"mz"
,
"汉族"
);
// 手机号码
cbrymdOne
.
put
(
"sjhm"
,
"10000340997"
);
// 户口地所在行政区
cbrymdOne
.
put
(
"hkszdxzq"
,
"浙江省|杭州市|滨江区"
);
// 户口所在地地址
cbrymdOne
.
put
(
"hkszddz"
,
"滨江区南环路3738号"
);
// 户口性质
cbrymdOne
.
put
(
"hkxz"
,
"非农业户口(城镇)"
);
// 居住地址
cbrymdOne
.
put
(
"jzdz"
,
"滨江区南环路3738号"
);
// 居住地行政区
cbrymdOne
.
put
(
"jzdzxzq"
,
"浙江省|杭州市|滨江区"
);
// 参加工作日期
cbrymdOne
.
put
(
"cjgzrq"
,
"2024-12-01"
);
// 文化程度
cbrymdOne
.
put
(
"whcd"
,
"大学本科"
);
// 办理项目列表
JSONArray
blxmlbArr
=
new
JSONArray
();
JSONObject
blxmlbOne
=
new
JSONObject
();
String
blxm
=
"社保"
;
// 办理项目
blxmlbOne
.
put
(
"blxm"
,
blxm
);
// 本次参保日期 格式:YYYY-MM-DD
blxmlbOne
.
put
(
"bccbrq"
,
"2024-12-01"
);
// 申报工资 ?基数吗?
blxmlbOne
.
put
(
"sbgz"
,
"4000"
);
// 险种类型 例如养老、工伤、医疗等
String
[]
strArr
=
{
"企业职工养老"
,
"工伤保险"
,
"失业保险"
};
// 险种类型 例如养老、工伤、医疗等
blxmlbOne
.
put
(
"xzlb"
,
strArr
);
blxmlbArr
.
add
(
blxmlbOne
);
cbrymdOne
.
put
(
"blxmlb"
,
blxmlbArr
);
// 特色字段信息
JSONObject
tszdxx
=
new
JSONObject
();
tszdxx
.
put
(
"dwjyqssj"
,
"2028-08-07"
);
// 增员年月 社保必填;yyyyMM
tszdxx
.
put
(
"zyny"
,
"202412"
);
// 同步办理用工劳动备案 社保必填;是
tszdxx
.
put
(
"tbblygldhtba"
,
"是"
);
// 参保模式 新参、续参
// tszdxx.put("cbms", "是")
// 就业登记时间 社保必填;yyyy-mm-dd
tszdxx
.
put
(
"jydjsj"
,
"2024-12-01"
);
// 单位就业起始时间 社保必填;yyyy-mm-dd
tszdxx
.
put
(
"dwjyqssj"
,
"2024-12-01"
);
// 安徽非必填!社保个人身份材料 取文件上传后获取的文件路径。图片总大小不超过1M, 材料仅支持图片格式,支持上传jpeg/jpg/png格式。
// tszdxx.put("sbzycl", url)
// 用工形式 社保必填
tszdxx
.
put
(
"ygxs"
,
"订立固定期限劳动合同"
);
tszdxx
.
put
(
"gzsjzd"
,
"标准工作时间制度"
);
tszdxx
.
put
(
"jydjsj"
,
"2023-08-01"
);
tszdxx
.
put
(
"zygz"
,
"专业技术人员"
);
// 劳动合同签署情况 社保必填
tszdxx
.
put
(
"ldhtqsqk"
,
"初签"
);
tszdxx
.
put
(
"grsf"
,
"企业管理人员"
);
// 人员类型
tszdxx
.
put
(
"rylx"
,
"在职职工"
);
// 医保个人身份材料 安徽非必填!
//tszdxx.put("ybzycl", url)
// 职业工种 社保必填
tszdxx
.
put
(
"zygz"
,
"社会服务人员"
);
// 人员身份 个人身份 社保必填
tszdxx
.
put
(
"grsf"
,
"职员"
);
// 工作时间制度 社保必填
tszdxx
.
put
(
"gzsjzd"
,
"标准工作时间制度"
);
// 医保用工形式 医保新参必填
// tszdxx.put("ybygxs", "原固定职工")
// 企业职工社会保险增员花名册 安徽非必填!
// tszdxx.put("qyzgshbxzyhmc", url)
// 企业职工基本医疗保险参保登记表 安徽非必填! 数组
// tszdxx.put("qyzgshbxzyhmc", url)
cbrymdOne
.
put
(
"tszdxx"
,
tszdxx
);
// 就业信息 社保必填;
JSONObject
jyxx
=
new
JSONObject
();
// 劳动合同类型
jyxx
.
put
(
"ldhtlx"
,
"固定期限劳动合同"
);
// 劳动合同起始日期
jyxx
.
put
(
"ldhtqsrq"
,
"2024-12-01"
);
// 劳动合同截止日期
jyxx
.
put
(
"ldhtjzrq"
,
"2030-11-30"
);
cbrymdOne
.
put
(
"jyxx"
,
jyxx
);
cbrymdArr
.
add
(
cbrymdOne
);
// 人员名单
String
buyType
=
"tbrymd"
;
json
.
put
(
buyType
,
cbrymdArr
);
}
/**
* @param json 主json存数据
* @Description: 塞人员名单-3医保增
* @Author: hgw
* @Date: 2024/12/10 18:05
* @return: void
**/
private
void
setEmpInfoThree
(
JSONObject
json
)
{
// 参保人员名单 数组
JSONArray
cbrymdArr
=
new
JSONArray
();
JSONObject
cbrymdOne
=
new
JSONObject
();
// 姓名
cbrymdOne
.
put
(
"xm"
,
"测试金辰"
);
// 证件类型
cbrymdOne
.
put
(
"zzlx"
,
"居民身份证"
);
// 证件号码
cbrymdOne
.
put
(
"zzhm"
,
"828888200908213819"
);
// 国籍(地区)
cbrymdOne
.
put
(
"gj"
,
"中国"
);
// 性别
cbrymdOne
.
put
(
"xb"
,
"男"
);
// 出生日期
cbrymdOne
.
put
(
"csrq"
,
"2009-08-21"
);
// 民族
cbrymdOne
.
put
(
"mz"
,
"汉族"
);
// 手机号码
cbrymdOne
.
put
(
"sjhm"
,
"10000340997"
);
// 户口地所在行政区
cbrymdOne
.
put
(
"hkszdxzq"
,
"浙江省|杭州市|滨江区"
);
// 户口所在地地址
cbrymdOne
.
put
(
"hkszddz"
,
"滨江区南环路3738号"
);
// 户口性质
cbrymdOne
.
put
(
"hkxz"
,
"非农业户口(城镇)"
);
// 居住地址
cbrymdOne
.
put
(
"jzdz"
,
"滨江区南环路3738号"
);
// 居住地行政区
cbrymdOne
.
put
(
"jzdzxzq"
,
"浙江省|杭州市|滨江区"
);
// 参加工作日期
cbrymdOne
.
put
(
"cjgzrq"
,
"2024-12-01"
);
// 文化程度
cbrymdOne
.
put
(
"whcd"
,
"大学本科"
);
// 办理项目列表
JSONArray
blxmlbArr
=
new
JSONArray
();
JSONObject
blxmlbOne
=
new
JSONObject
();
String
blxm
=
"医保"
;
// 办理项目
blxmlbOne
.
put
(
"blxm"
,
blxm
);
// 本次参保日期 格式:YYYY-MM-DD
blxmlbOne
.
put
(
"bccbrq"
,
"2024-12-01"
);
// 申报工资 ?基数吗?
blxmlbOne
.
put
(
"sbgz"
,
"4000"
);
// 险种类型 例如养老、工伤、医疗等
String
[]
strArr
=
{
"生育保险"
,
"职工基本医疗保险"
,
"大病统筹医疗保险"
};
// 险种类型 例如养老、工伤、医疗等
blxmlbOne
.
put
(
"xzlb"
,
strArr
);
blxmlbArr
.
add
(
blxmlbOne
);
cbrymdOne
.
put
(
"blxmlb"
,
blxmlbArr
);
// 特色字段信息
JSONObject
tszdxx
=
new
JSONObject
();
// 增员年月 社保必填;yyyyMM
tszdxx
.
put
(
"zyny"
,
"202412"
);
// 同步办理用工劳动备案 社保必填;是
tszdxx
.
put
(
"tbblygldhtba"
,
"是"
);
// 参保模式 新参、续参
// tszdxx.put("cbms", "是")
// 就业登记时间 社保必填;yyyy-mm-dd
tszdxx
.
put
(
"jydjsj"
,
"2024-12-01"
);
// 单位就业起始时间 社保必填;yyyy-mm-dd
tszdxx
.
put
(
"dwjyqssj"
,
"2024-12-01"
);
// 安徽非必填!社保个人身份材料 取文件上传后获取的文件路径。图片总大小不超过1M, 材料仅支持图片格式,支持上传jpeg/jpg/png格式。
// tszdxx.put("sbzycl", url)
// 用工形式 社保必填
tszdxx
.
put
(
"ygxs"
,
"订立固定期限劳动合同"
);
// 劳动合同签署情况 社保必填
tszdxx
.
put
(
"ldhtqsqk"
,
"初签"
);
// 人员类型
tszdxx
.
put
(
"rylx"
,
"在职职工"
);
// 医保个人身份材料 安徽非必填!
//tszdxx.put("ybzycl", url)
// 职业工种 社保必填
tszdxx
.
put
(
"zygz"
,
"社会服务人员"
);
// 人员身份 个人身份 社保必填
tszdxx
.
put
(
"grsf"
,
"职员"
);
// 工作时间制度 社保必填
tszdxx
.
put
(
"gzsjzd"
,
"标准工作时间制度"
);
// 医保用工形式 医保新参必填
// tszdxx.put("ybygxs", "原固定职工")
// 企业职工社会保险增员花名册 安徽非必填!
// tszdxx.put("qyzgshbxzyhmc", url)
// 企业职工基本医疗保险参保登记表 安徽非必填! 数组
// tszdxx.put("qyzgshbxzyhmc", url)
cbrymdOne
.
put
(
"tszdxx"
,
tszdxx
);
// 就业信息 社保必填;
JSONObject
jyxx
=
new
JSONObject
();
// 劳动合同类型
jyxx
.
put
(
"ldhtlx"
,
"固定期限劳动合同"
);
// 劳动合同起始日期
jyxx
.
put
(
"ldhtqsrq"
,
"2024-12-01"
);
// 劳动合同截止日期
jyxx
.
put
(
"ldhtjzrq"
,
"2030-11-30"
);
cbrymdOne
.
put
(
"jyxx"
,
jyxx
);
cbrymdArr
.
add
(
cbrymdOne
);
// 人员名单
String
buyType
=
"cbrymd"
;
json
.
put
(
buyType
,
cbrymdArr
);
}
/**
* @param json 主json存数据
* @Description: 塞人员名单-4医保减
* @Author: hgw
* @Date: 2024/12/10 18:05
* @return: void
**/
private
void
setEmpInfoFour
(
JSONObject
json
)
{
// 参保人员名单 数组
JSONArray
cbrymdArr
=
new
JSONArray
();
JSONObject
cbrymdOne
=
new
JSONObject
();
// 姓名
cbrymdOne
.
put
(
"xm"
,
"测试金辰"
);
// 证件类型
cbrymdOne
.
put
(
"zzlx"
,
"居民身份证"
);
// 证件号码
cbrymdOne
.
put
(
"zzhm"
,
"828888200908213819"
);
// 国籍(地区)
cbrymdOne
.
put
(
"gj"
,
"中国"
);
// 性别
cbrymdOne
.
put
(
"xb"
,
"男"
);
// 出生日期
cbrymdOne
.
put
(
"csrq"
,
"2009-08-21"
);
// 民族
cbrymdOne
.
put
(
"mz"
,
"汉族"
);
// 手机号码
cbrymdOne
.
put
(
"sjhm"
,
"10000340997"
);
// 户口地所在行政区
cbrymdOne
.
put
(
"hkszdxzq"
,
"浙江省|杭州市|滨江区"
);
// 户口所在地地址
cbrymdOne
.
put
(
"hkszddz"
,
"滨江区南环路3738号"
);
// 户口性质
cbrymdOne
.
put
(
"hkxz"
,
"非农业户口(城镇)"
);
// 居住地址
cbrymdOne
.
put
(
"jzdz"
,
"滨江区南环路3738号"
);
// 居住地行政区
cbrymdOne
.
put
(
"jzdzxzq"
,
"浙江省|杭州市|滨江区"
);
// 参加工作日期
cbrymdOne
.
put
(
"cjgzrq"
,
"2024-12-01"
);
// 文化程度
cbrymdOne
.
put
(
"whcd"
,
"大学本科"
);
// 办理项目列表
JSONArray
blxmlbArr
=
new
JSONArray
();
JSONObject
blxmlbOne
=
new
JSONObject
();
String
blxm
=
"医保"
;
// 办理项目
blxmlbOne
.
put
(
"blxm"
,
blxm
);
// 本次参保日期 格式:YYYY-MM-DD
blxmlbOne
.
put
(
"bccbrq"
,
"2024-12-01"
);
// 申报工资 ?基数吗?
blxmlbOne
.
put
(
"sbgz"
,
"4000"
);
// 险种类型 例如养老、工伤、医疗等
String
[]
strArr
=
{
"生育保险"
,
"职工基本医疗保险"
,
"大病统筹医疗保险"
};
// 险种类型 例如养老、工伤、医疗等
blxmlbOne
.
put
(
"xzlb"
,
strArr
);
blxmlbArr
.
add
(
blxmlbOne
);
cbrymdOne
.
put
(
"blxmlb"
,
blxmlbArr
);
// 特色字段信息
JSONObject
tszdxx
=
new
JSONObject
();
// 增员年月 社保必填;yyyyMM
tszdxx
.
put
(
"zyny"
,
"202412"
);
// 同步办理用工劳动备案 社保必填;是
tszdxx
.
put
(
"tbblygldhtba"
,
"是"
);
// 参保模式 新参、续参
// tszdxx.put("cbms", "是")
// 就业登记时间 社保必填;yyyy-mm-dd
tszdxx
.
put
(
"jydjsj"
,
"2024-12-01"
);
// 单位就业起始时间 社保必填;yyyy-mm-dd
tszdxx
.
put
(
"dwjyqssj"
,
"2024-12-01"
);
// 安徽非必填!社保个人身份材料 取文件上传后获取的文件路径。图片总大小不超过1M, 材料仅支持图片格式,支持上传jpeg/jpg/png格式。
// tszdxx.put("sbzycl", url)
// 用工形式 社保必填
tszdxx
.
put
(
"ygxs"
,
"订立固定期限劳动合同"
);
// 劳动合同签署情况 社保必填
tszdxx
.
put
(
"ldhtqsqk"
,
"初签"
);
// 人员类型
tszdxx
.
put
(
"rylx"
,
"在职职工"
);
// 医保个人身份材料 安徽非必填!
//tszdxx.put("ybzycl", url)
// 职业工种 社保必填
tszdxx
.
put
(
"zygz"
,
"社会服务人员"
);
// 人员身份 个人身份 社保必填
tszdxx
.
put
(
"grsf"
,
"职员"
);
// 工作时间制度 社保必填
tszdxx
.
put
(
"gzsjzd"
,
"标准工作时间制度"
);
// 医保用工形式 医保新参必填
// tszdxx.put("ybygxs", "原固定职工")
// 企业职工社会保险增员花名册 安徽非必填!
// tszdxx.put("qyzgshbxzyhmc", url)
// 企业职工基本医疗保险参保登记表 安徽非必填! 数组
// tszdxx.put("qyzgshbxzyhmc", url)
cbrymdOne
.
put
(
"tszdxx"
,
tszdxx
);
// 就业信息 社保必填;
JSONObject
jyxx
=
new
JSONObject
();
jyxx
.
put
(
"ldhtqsrq"
,
"2023-08-20"
);
jyxx
.
put
(
"ldhtjzrq"
,
"2030-12-30"
);
// 劳动合同类型
jyxx
.
put
(
"ldhtlx"
,
"固定期限劳动合同"
);
// 劳动合同起始日期
jyxx
.
put
(
"ldhtqsrq"
,
"2024-12-01"
);
// 劳动合同截止日期
jyxx
.
put
(
"ldhtjzrq"
,
"2030-11-30"
);
cbrymdOne
.
put
(
"jyxx"
,
jyxx
);
cbrymdArr
.
add
(
cbrymdOne
);
json
.
put
(
"cbrymd"
,
cbrymdArr
);
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
String
dataResultList
=
restTemplate
.
postForObject
(
appAddUrl
,
formEntity
,
String
.
class
);
// {"head":{"code":"00000000","description":"成功","msg":"成功","time":"2024-12-06 17:10:26","status":"Y"}
// ,"body":{"requestId":"85440b327d71466abcd9c5c81d5bb172"}}
// 人员名单
String
buyType
=
"tbrymd"
;
json
.
put
(
buyType
,
cbrymdArr
);
}
/**
* @param: requestId : 请求ID
* @Description: 任务查询接口
* @Author: hgw
* @Date: 2024-12-9 16:54:22
* @return: java.lang.String
**/
public
R
<
FriendResult
>
getFriendByRequestId
(
RestTemplate
restTemplate
,
String
requestId
)
{
if
(
Common
.
isEmpty
(
requestId
))
{
return
null
;
}
String
appAddUrl
=
urlPre
+
urlGetInfo
+
"?requestId="
+
requestId
;
String
version
=
"1.0.0"
;
String
timestamp
=
String
.
valueOf
(
new
Date
().
getTime
());
String
xReqNonce
=
"1"
;
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
add
(
APP_KEY
,
appKey
);
headers
.
add
(
TIMESTAMP
,
timestamp
);
try
{
String
signature
=
SocialFriendSign
.
qianMing
(
getMapParam
(
appKey
,
appSecret
,
xReqNonce
,
version
,
timestamp
,
requestId
));
headers
.
add
(
"signature"
,
signature
);
}
catch
(
SignatureException
e
)
{
log
.
error
(
"税友签名失败"
,
e
);
return
null
;
}
headers
.
add
(
X_REQ_NONCE
,
xReqNonce
);
headers
.
add
(
VERSION
,
version
);
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
headers
);
ResponseEntity
<
String
>
response
=
restTemplate
.
exchange
(
appAddUrl
,
HttpMethod
.
GET
,
formEntity
,
String
.
class
);
if
(
Common
.
isEmpty
(
response
)
||
Common
.
isEmpty
(
response
.
getBody
()))
{
throw
new
CheckedException
(
"获取税友结果失败"
);
}
int
statusCode
=
response
.
getStatusCodeValue
();
if
(
statusCode
!=
200
)
{
throw
new
CheckedException
(
"获取税友结果失败,statusCode="
+
statusCode
);
}
String
dataResultList
=
response
.
getBody
();
FriendResult
result
=
new
FriendResult
();
// 组装返回结果
getResultToVo
(
dataResultList
,
result
);
if
(
Common
.
isNotNull
(
result
.
getIdCard
()))
{
return
R
.
ok
(
result
);
}
return
R
.
failed
(
result
);
}
// 组装返回结果
private
void
getResultToVo
(
String
dataResultList
,
FriendResult
result
)
{
if
(
Common
.
isNotNull
(
dataResultList
))
{
JSONObject
dataObject
=
JSON
.
parseObject
(
dataResultList
);
String
head
=
dataObject
.
getString
(
"head"
);
...
...
@@ -141,56 +654,59 @@ public class SocialFriendConfig {
if
(
"Y"
.
equals
(
status
))
{
String
body
=
dataObject
.
getString
(
"body"
);
JSONObject
bodyObject
=
JSON
.
parseObject
(
body
);
addId
=
bodyObject
.
getString
(
"requestId"
);
System
.
out
.
println
(
addId
);
}
else
{
System
.
out
.
println
(
"失败"
);
// 获取核心结果
getResultToVoCore
(
result
,
bodyObject
);
}
}
}
return
addId
;
}
/**
* @param: fileKey : resultFile 查看文件; resultAnnex 查看附件
* @Description: 5:任务查询接口
// 提取方法,组装核心结果
private
void
getResultToVoCore
(
FriendResult
result
,
JSONObject
bodyObject
)
{
if
(
Common
.
isNotNull
(
bodyObject
))
{
// 人员办理项目结果
JSONArray
ryywbljglbArr
=
(
JSONArray
)
bodyObject
.
get
(
"ryywbljglb"
);
if
(
Common
.
isNotNull
(
ryywbljglbArr
))
{
// 注意:此处可以返回多条身份证,但是我们单条提交
JSONObject
ryywbljglb
=
(
JSONObject
)
ryywbljglbArr
.
get
(
0
);
// 身份证
String
idCard
=
ryywbljglb
.
getString
(
"zzhm"
);
result
.
setIdCard
(
idCard
);
// 办理项目列表
JSONArray
blxmjglbArr
=
(
JSONArray
)
ryywbljglb
.
get
(
"blxmjglb"
);
if
(
Common
.
isNotNull
(
blxmjglbArr
))
{
// 注意:此处可以返回多条办理,但是我们社保与医保分开提交
JSONObject
blxmjglb
=
(
JSONObject
)
blxmjglbArr
.
get
(
0
);
// 状态1-处理中,2-处理成功,3-处理失败,4-待办(提交成功,待网厅状态流转,上海特有)
String
zt
=
blxmjglb
.
getString
(
"zt"
);
result
.
setZt
(
zt
);
// 明细状态:提交失败、审核失败、审核成功、待确认
//String mxzt = blxmjglb.getString("mxzt")
// 提示或者错误信息 SUCCESS
String
cwxx
=
blxmjglb
.
getString
(
"cwxx"
);
result
.
setCwxx
(
cwxx
);
}
}
}
}
/*
* @Description: 塞请求参数
* @Author: hgw
* @Date: 2024
-5-8 15:07:45
* @return: java.
lang.String
* @Date: 2024
/12/10 10:38
* @return: java.
util.TreeMap<java.lang.String,java.lang.String>
**/
public
R
<
String
>
getFiveJob
(
RestTemplate
restTemplate
,
String
addId
,
String
fileKey
)
{
if
(
Common
.
isEmpty
(
addId
))
{
return
null
;
}
String
resultFile
=
null
;
String
moduleDetailUrl
=
urlPre
+
urlGetInfo
;
HttpHeaders
headers
=
new
HttpHeaders
();
MediaType
type
=
MediaType
.
parseMediaType
(
"application/json; charset=UTF-8"
);
headers
.
setContentType
(
type
);
headers
.
add
(
"accept"
,
MediaType
.
TEXT_PLAIN
.
toString
());
headers
.
add
(
"appKey"
,
appKey
);
headers
.
add
(
"appSecret"
,
appSecret
);
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
headers
);
ResponseEntity
response
=
restTemplate
.
exchange
(
moduleDetailUrl
,
HttpMethod
.
GET
,
formEntity
,
String
.
class
);
if
(
Common
.
isEmpty
(
response
)
||
Common
.
isEmpty
(
response
.
getBody
()))
{
throw
new
CheckedException
(
"获取税友【任务查询接口】失败"
);
}
int
status
=
response
.
getStatusCodeValue
();
if
(
status
!=
200
)
{
throw
new
CheckedException
(
"获取税友【任务查询接口】失败,status="
+
status
);
}
String
body
=
(
String
)
response
.
getBody
();
JSONObject
bodyObject
=
JSON
.
parseObject
(
body
);
JSONObject
dataObject
=
(
JSONObject
)
bodyObject
.
get
(
"data"
);
String
statusStr
=
dataObject
.
getString
(
"status"
);
if
(!
"完成"
.
equals
(
statusStr
))
{
return
R
.
failed
(
statusStr
);
}
resultFile
=
dataObject
.
getString
(
fileKey
);
if
(
Common
.
isEmpty
(
resultFile
))
{
return
R
.
failed
(
resultFile
);
private
TreeMap
<
String
,
String
>
getMapParam
(
String
appKey
,
String
appSecret
,
String
xReqNonce
,
String
version
,
String
timestamp
,
String
requestId
)
{
TreeMap
<
String
,
String
>
treeMap
=
new
TreeMap
<>();
if
(
Common
.
isNotNull
(
requestId
))
{
treeMap
.
put
(
"requestId"
,
requestId
);
}
return
R
.
ok
(
resultFile
);
treeMap
.
put
(
VERSION
,
version
);
treeMap
.
put
(
TIMESTAMP
,
timestamp
);
treeMap
.
put
(
APP_KEY
,
appKey
);
treeMap
.
put
(
X_REQ_NONCE
,
xReqNonce
);
treeMap
.
put
(
"appSecret"
,
appSecret
);
return
treeMap
;
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendSign.java
0 → 100644
View file @
c82bd732
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
config
;
import
javax.crypto.Mac
;
import
javax.crypto.spec.SecretKeySpec
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.security.InvalidKeyException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.SignatureException
;
import
java.util.Base64
;
import
java.util.Map
;
/**
* @author hgw2
* @description 税友签名接口
* @date 2024/12/9
*/
public
class
SocialFriendSign
{
public
static
String
qianMing
(
Map
<
String
,
String
>
treeMap
)
throws
SignatureException
{
// 1. 将以上 key=value 对的 value 进行合并,生成一下字符串 mergeStr
//System.out.println("header内的信息:"+treeMap.toString())
StringBuilder
mergeStr
=
new
StringBuilder
();
for
(
Map
.
Entry
<
String
,
String
>
stringStringEntry
:
treeMap
.
entrySet
())
{
mergeStr
.
append
(
stringStringEntry
.
getValue
());
}
//System.out.println("Key-Value 合并: " + mergeStr)
// 2. 将生成的 mergeStr 进行 Url 编码
String
encodedStr
=
null
;
try
{
encodedStr
=
URLEncoder
.
encode
(
mergeStr
.
toString
(),
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
// URL 编码失败
throw
new
SignatureException
(
"【税友】URL 编码失败"
);
}
//System.out.println("encodeURL 编码:" + encodedStr)
// 3.利用 HmacSHA256 算法对 signStr 进行哈希运算生成消息摘要,摘要结果以 Base64 结果形式返回,signStr 即为请求参数中的 signature 字段
String
signatureResult
=
""
;
try
{
Mac
mac
=
Mac
.
getInstance
(
"HmacSHA256"
);
SecretKeySpec
signingKey
=
new
SecretKeySpec
(
treeMap
.
get
(
"appSecret"
).
getBytes
(),
"HmacSHA256"
);
mac
.
init
(
signingKey
);
byte
[]
signData
=
mac
.
doFinal
(
encodedStr
.
getBytes
());
byte
[]
resultBytes
=
Base64
.
getEncoder
().
encode
(
signData
);
signatureResult
=
new
String
(
resultBytes
,
StandardCharsets
.
UTF_8
);
}
catch
(
NoSuchAlgorithmException
e
)
{
throw
new
SignatureException
(
"【税友】平台不支持 HmacSHA 摘要方式"
);
}
catch
(
InvalidKeyException
e
)
{
throw
new
SignatureException
(
"【税友】指定的访问密钥无效"
);
}
//ystem.out.println("加密结果: " + signatureResult)
return
signatureResult
;
}
private
SocialFriendSign
()
{
throw
new
IllegalStateException
(
"SocialFriendSign class"
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialFriendController.java
View file @
c82bd732
...
...
@@ -17,11 +17,13 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendPushService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -51,6 +53,22 @@ public class TSocialFriendController {
return
tSocialFriendPushService
.
pushFriendTest
(
dispatchIdList
);
}
@Operation
(
description
=
"1定时任务推送税友"
)
@PostMapping
(
"/inner/doPushFriend"
)
@SysLog
(
"1定时任务推送税友"
)
@Inner
public
R
<
String
>
doPushFriendTest
()
{
return
tSocialFriendPushService
.
pushFriendTest
(
null
);
}
@Operation
(
description
=
"2定时任务获取税友"
)
@PostMapping
(
"/inner/doGetFriendByRequestId"
)
@SysLog
(
"2定时任务获取税友"
)
@Inner
public
R
<
FriendResult
>
doGetFriendByRequestId
()
{
return
tSocialFriendPushService
.
getFriendByRequestIdTest
(
null
);
}
/**
* @param addId 任务id,可为空
* @Description: 1获取税友状态
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialFriendPushService.java
View file @
c82bd732
...
...
@@ -17,9 +17,11 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.List
;
...
...
@@ -50,6 +52,7 @@ public interface TSocialFriendPushService extends IService<TSocialInfo> {
R
<
String
>
pushSoldier
(
List
<
String
>
dispatchIdList
);
R
<
String
>
pushFriendTest
(
List
<
String
>
dispatchIdList
);
R
<
FriendResult
>
getFriendByRequestIdTest
(
List
<
String
>
dispatchIdList
);
/**
* @param
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
c82bd732
...
...
@@ -32,10 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierLog;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFriendMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.*
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAuditVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAddVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAuditVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.compress.utils.IOUtils
;
...
...
@@ -172,12 +169,25 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
**/
@Override
public
R
<
String
>
pushFriendTest
(
List
<
String
>
dispatchIdList
)
{
// 获取时间限制配置(获取 当月启用 的配置)
String
id
=
socialFriendConfig
.
getFourAppAdd
(
restTemplate
);
String
thisTime
=
DateUtil
.
getThisTime
();
// type 1社保增 2社保减 3医保增 4医保减
int
type
=
1
;
String
id
=
socialFriendConfig
.
pushFriendByInfo
(
restTemplate
,
"3"
,
type
,
thisTime
);
return
R
.
ok
(
id
);
}
/**
* @Description: 推送到社保士兵
* @Author: hgw
* @Date: 2024/5/10 17:53
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
FriendResult
>
getFriendByRequestIdTest
(
List
<
String
>
dispatchIdList
)
{
R
<
FriendResult
>
info
=
socialFriendConfig
.
getFriendByRequestId
(
restTemplate
,
"15074c814b4240a19cdb4425a7ae502c"
);
return
info
;
}
/**
* @Description: 推送到社保士兵
* @Author: hgw
...
...
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