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
dfeedadc
Commit
dfeedadc
authored
Dec 13, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.3-shuiyou 增减接口
parent
8c0f5027
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
114 additions
and
20 deletions
+114
-20
DateUtil.java
...om/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
+9
-0
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+30
-10
TSocialFriendServiceImpl.java
...v1/yifu/social/service/impl/TSocialFriendServiceImpl.java
+2
-2
application-dev.yml
...al/yifu-social-biz/src/main/resources/application-dev.yml
+4
-2
application-prd.yml
...al/yifu-social-biz/src/main/resources/application-prd.yml
+4
-2
application-test.yml
...l/yifu-social-biz/src/main/resources/application-test.yml
+4
-2
TSocialFriendMapper.xml
...ial-biz/src/main/resources/mapper/TSocialFriendMapper.xml
+61
-2
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/DateUtil.java
View file @
dfeedadc
...
...
@@ -1619,6 +1619,15 @@ public class DateUtil {
return
sf
.
format
(
new
Date
());
}
public
static
String
getLastDay
(){
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
DateUtil
.
ISO_EXPANDED_DATE_FORMAT
);
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
setTime
(
new
Date
());
int
lastDay
=
instance
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
);
instance
.
set
(
Calendar
.
DAY_OF_MONTH
,
lastDay
);
return
sf
.
format
(
instance
.
getTime
());
}
/**
* @Description: 返回当前年月日字符串
* @Author: hgw
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
dfeedadc
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.social.config;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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
;
...
...
@@ -43,12 +44,18 @@ public class SocialFriendConfig {
// url前缀
@Value
(
"${socialFriend.urlPre}"
)
private
String
urlPre
;
// url推
@Value
(
"${socialFriend.urlPush}"
)
private
String
urlPush
;
// url拉结果数据
@Value
(
"${socialFriend.urlGetInfo}"
)
private
String
urlGetInfo
;
// url推 增加
@Value
(
"${socialFriend.urlPushAdd}"
)
private
String
urlPushAdd
;
// url拉结果数据 增加
@Value
(
"${socialFriend.urlGetInfoAdd}"
)
private
String
urlGetInfoAdd
;
// url推 增加
@Value
(
"${socialFriend.urlPushReduce}"
)
private
String
urlPushReduce
;
// url拉结果数据 增加
@Value
(
"${socialFriend.urlGetInfoReduce}"
)
private
String
urlGetInfoReduce
;
// url拉结果数据
@Value
(
"${socialFriend.urlUpload}"
)
private
String
urlUpload
;
...
...
@@ -69,7 +76,12 @@ public class SocialFriendConfig {
public
String
pushFriendByInfo
(
RestTemplate
restTemplate
,
SociaFriendYgsAddVo
vo
,
int
type
,
String
thisTime
,
TSocialFriendBackLog
backLog
)
{
String
addId
=
""
;
String
appAddUrl
=
urlPre
+
urlPush
;
String
appAddUrl
=
urlPre
;
if
(
type
==
1
||
type
==
3
)
{
appAddUrl
+=
urlPushAdd
;
}
else
{
appAddUrl
+=
urlPushReduce
;
}
String
version
=
"1.0.0"
;
String
timestamp
=
String
.
valueOf
(
new
Date
().
getTime
());
String
xReqNonce
=
"1"
;
...
...
@@ -127,6 +139,7 @@ public class SocialFriendConfig {
setEmpInfo
(
json
,
vo
,
type
);
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
System
.
out
.
println
(
"推的接送="
+
json
);
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"
...
...
@@ -384,7 +397,7 @@ public class SocialFriendConfig {
// 中断原因 除死亡以外,其他停保原因默认:“在职人员解除/终止劳动合同” 死亡对应“死亡或失踪”
blxmlbOne
.
put
(
"tbyy"
,
vo
.
getTbyy
());
// 中断时间 yyyy-MM-dd 默认当前时间
blxmlbOne
.
put
(
"tbsj"
,
DateUtil
.
get
ThisDayByPatten
(
"yyyy-MM-dd"
));
blxmlbOne
.
put
(
"tbsj"
,
DateUtil
.
get
LastDay
(
));
blxmlbArr
.
add
(
blxmlbOne
);
cbrymdOne
.
put
(
"blxmlb"
,
blxmlbArr
);
...
...
@@ -411,17 +424,24 @@ public class SocialFriendConfig {
}
/**
* @param: type 0增加1减少
* @param: requestId : 请求ID
* @Description: 任务查询接口
* @Author: hgw
* @Date: 2024-12-9 16:54:22
* @return: java.lang.String
**/
public
FriendResult
getFriendByRequestId
(
RestTemplate
restTemplate
,
String
requestId
,
TSocialFriendBackLog
backLog
)
{
public
FriendResult
getFriendByRequestId
(
RestTemplate
restTemplate
,
String
requestId
,
TSocialFriendBackLog
backLog
,
String
type
)
{
if
(
Common
.
isEmpty
(
requestId
))
{
return
null
;
}
String
appAddUrl
=
urlPre
+
urlGetInfo
+
"?requestId="
+
requestId
;
String
appAddUrl
=
urlPre
;
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
type
))
{
appAddUrl
+=
urlGetInfoAdd
;
}
else
{
appAddUrl
+=
urlGetInfoReduce
;
}
appAddUrl
+=
"?requestId="
+
requestId
;
String
version
=
"1.0.0"
;
String
timestamp
=
String
.
valueOf
(
new
Date
().
getTime
());
String
xReqNonce
=
"1"
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendServiceImpl.java
View file @
dfeedadc
...
...
@@ -94,7 +94,7 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
socialInfo
.
getId
());
backLog
.
setRequestId
(
socialInfo
.
getYgsRequestId
());
info
=
socialFriendConfig
.
getFriendByRequestId
(
restTemplate
,
socialInfo
.
getYgsRequestId
(),
backLog
);
info
=
socialFriendConfig
.
getFriendByRequestId
(
restTemplate
,
socialInfo
.
getYgsRequestId
(),
backLog
,
socialInfo
.
getDispatchType
()
);
logList
.
add
(
backLog
);
if
(
info
!=
null
&&
Common
.
isNotNull
(
info
.
getZt
()))
{
doCore
(
info
,
socialInfo
,
typeFlag
,
user
,
errorMap
);
...
...
@@ -114,7 +114,7 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
socialInfo
.
getId
());
backLog
.
setRequestId
(
socialInfo
.
getYsdRequestId
());
info
=
socialFriendConfig
.
getFriendByRequestId
(
restTemplate
,
socialInfo
.
getYsdRequestId
(),
backLog
);
info
=
socialFriendConfig
.
getFriendByRequestId
(
restTemplate
,
socialInfo
.
getYsdRequestId
(),
backLog
,
socialInfo
.
getDispatchType
()
);
logList
.
add
(
backLog
);
if
(
info
!=
null
&&
Common
.
isNotNull
(
info
.
getZt
()))
{
doCore
(
info
,
socialInfo
,
typeFlag
,
user
,
errorMap
);
...
...
yifu-social/yifu-social-biz/src/main/resources/application-dev.yml
View file @
dfeedadc
...
...
@@ -63,8 +63,10 @@ soldier:
#税友相关属性配置
socialFriend
:
urlPre
:
https://test-openapi.17win.com
urlPush
:
/gateway/socins/hrss/employee/v2/register
urlGetInfo
:
/gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushAdd
:
/gateway/socins/hrss/employee/v2/register
urlGetInfoAdd
:
/gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce
:
/gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce
:
/gateway/socins/hrss/employee/v2/getStopFeedback
urlUpload
:
/gateway/file/upload
appKey
:
89357285571962202409230949030
appSecret
:
V52dkvxtFUgIvzlfNE9G8g==
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/resources/application-prd.yml
View file @
dfeedadc
...
...
@@ -59,8 +59,10 @@ soldier:
#税友相关属性配置
socialFriend
:
urlPre
:
https://test-openapi.17win.com
urlPush
:
/gateway/socins/hrss/employee/v2/register
urlGetInfo
:
/gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushAdd
:
/gateway/socins/hrss/employee/v2/register
urlGetInfoAdd
:
/gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce
:
/gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce
:
/gateway/socins/hrss/employee/v2/getStopFeedback
urlUpload
:
/gateway/file/upload
appKey
:
89357285571962202409230949030
appSecret
:
V52dkvxtFUgIvzlfNE9G8g==
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/resources/application-test.yml
View file @
dfeedadc
...
...
@@ -58,8 +58,10 @@ soldier:
#税友相关属性配置
socialFriend
:
urlPre
:
https://test-openapi.17win.com
urlPush
:
/gateway/socins/hrss/employee/v2/register
urlGetInfo
:
/gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushAdd
:
/gateway/socins/hrss/employee/v2/register
urlGetInfoAdd
:
/gateway/socins/hrss/employee/v2/getRegisterFeedback
urlPushReduce
:
/gateway/socins/hrss/employee/v2/stop
urlGetInfoReduce
:
/gateway/socins/hrss/employee/v2/getStopFeedback
urlUpload
:
/gateway/file/upload
appKey
:
89357285571962202409230949030
appSecret
:
V52dkvxtFUgIvzlfNE9G8g==
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFriendMapper.xml
View file @
dfeedadc
...
...
@@ -74,7 +74,7 @@
when '2' then '无固定期限劳动合同'
else '固定期限劳动合同' end contractTypeTwo,
a.CONTRACT_END contractEnd,
if(a.REDUCE_REASON = '16','死亡或失踪','在职人员
解除/终止
劳动合同') tbyy,
if(a.REDUCE_REASON = '16','死亡或失踪','在职人员
主动解除
劳动合同') tbyy,
case a.REDUCE_REASON
when '21' then '职工与用人单位协商一致解除劳动合同(18条1款)'
when '5' then '第四十四条第二项,劳动者开始依法享受基本养老保险待遇'
...
...
@@ -161,7 +161,66 @@
<!-- 税友医生大减少模板-->
<select
id=
"getSocialSoldierYsdReduceVoList"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.SociaFriendYgsAddVo"
>
<include
refid=
"getSocialSoldierBaseOne"
/>
SELECT
s.id as socialId,
if(a.TYPE='0','派增','派减') type,
a.SOCIAL_HOUSEHOLD_NAME socialHouseholdName,
shh.UNIT_CREDIT_CODE unitCreditCode,
shh.AREA_CODE areaCode,
shh.SOCIAL_ACCOUNT socialAccount,
shh.SOCIAL_PASSWORD socialPassword,
shh.MEDICL_ACCOUNT mediclAccount,
shh.MEDICL_PASSWORD mediclPassword,
shh.CUSTOMER_NO customerNo,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
if (a.EMP_NATIONAL in ('2','3','5','6','7','8','9','11') and nation.label is not null, nation.label,'汉族') empNational,
a.EMP_MOBILE empMobile,
DATE_FORMAT(s.SOCIAL_START_DATE,"%Y-%m-%d") socialStartDate,
if(a.EDUCATION_NAME is null, '大学专科',
case a.EDUCATION_NAME
when '博士' then '博士研究生'
when '技工' then '技工学校'
when '高中' then '普通中学(高中)'
when '小学' then '小学'
when '文盲' then '其他'
when '中专' then '中等专科'
when '初中' then '初级中学'
when '本科' then '大学本科'
when '大专' then '大学专科'
when '硕士' then '研究生'
when '职高' then '职业高中'
else '其他'
end) educationName,
s.RECORD_BASE recordBase,
DATE_FORMAT(s.SOCIAL_START_DATE,"%Y%m") socialStartMonth,
case a.CONTRACT_TYPE
when '0' then '订立以完成一定工作任务为期限的劳动合同'
when '1' then '订立固定期限劳动合同'
when '2' then '订立无固定期限劳动合同'
else '其他' end contractType,
case a.WORKING_HOURS
when '1' then '标准工作时间制度'
when '2' then '综合计算工时制度'
when '3' then '不定时工作时间制度'
else '标准工作时间制度' end workingHours,
case a.CONTRACT_TYPE
when '0' then '以完成一定工作为期限的劳动合同'
when '1' then '固定期限劳动合同'
when '2' then '无固定期限劳动合同'
else '固定期限劳动合同' end contractTypeTwo,
a.CONTRACT_END contractEnd,
if(a.REDUCE_REASON = '16','人员失踪','在职人员解除/终止劳动合同') tbyy,
case a.REDUCE_REASON
when '21' then '职工与用人单位协商一致解除劳动合同(18条1款)'
when '5' then '第四十四条第二项,劳动者开始依法享受基本养老保险待遇'
when '16' then '劳动者死亡,或者被人民法院宣告死亡或者宣告失踪'
when '1' then '劳动者提前30天书面通知解除或试用期提前3天通知解除合同'
when '2' then '劳动者严重违反用人单位的规章制度'
else '法律、行政法规规定的其他情形' end zzyy,
s.SOCIAL_PROVINCE socialProvince,
s.SOCIAL_CITY socialCity,
s.SOCIAL_TOWN socialTown
<include
refid=
"getSocialSoldierBaseTwo"
/>
and a.type = '1' and s.YSD_HANDLE_STATUS in ('0','1','2','3')
and (
...
...
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