Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
dea4ef0d
You need to sign in or sign up before continuing.
Commit
dea4ef0d
authored
Dec 12, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.3-shuiyou 增减接口
parent
34f652a7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
82 deletions
+90
-82
IdCardUtil.java
...com/yifu/cloud/plus/v1/yifu/archives/util/IdCardUtil.java
+0
-48
SociaFriendYgsAddVo.java
...ifu/cloud/plus/v1/yifu/social/vo/SociaFriendYgsAddVo.java
+1
-0
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+51
-8
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+38
-26
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/util/IdCardUtil.java
View file @
dea4ef0d
...
@@ -120,52 +120,4 @@ public class IdCardUtil {
...
@@ -120,52 +120,4 @@ public class IdCardUtil {
}
}
return
sex
;
return
sex
;
}
}
/**
* @param idNum 身份证
* @Description: 获取身份证的性别-汉字(已知身份证正确)
* @Author: hgw
* @Date: 2024/12/11 17:00
* @return: java.lang.String
**/
public
static
String
getSexName
(
String
idNum
){
String
sex
=
"男"
;
if
(
idNum
!=
null
)
{
String
sexString
=
""
;
if
(
idNum
.
length
()
==
18
)
{
sexString
=
idNum
.
substring
(
16
,
17
);
}
else
if
(
idNum
.
length
()
==
15
)
{
sexString
=
idNum
.
substring
(
14
,
15
);
}
try
{
// 判断性别
if
(
Integer
.
parseInt
(
sexString
)
%
2
==
0
)
{
sex
=
"女"
;
}
}
catch
(
Exception
e
)
{
sex
=
"男"
;
}
}
return
sex
;
}
/**
* @param idNum 身份证
* @Description: 获取身份证的年月日(已知身份证正确)
* @Author: hgw
* @Date: 2024/12/11 17:07
* @return: java.lang.String
**/
public
static
String
getBirthStr
(
String
idNum
)
{
String
birthStr
=
"1990-01-01"
;
if
(
idNum
!=
null
)
{
if
(
idNum
.
length
()
==
18
)
{
birthStr
=
idNum
.
substring
(
6
,
10
)
+
"-"
+
idNum
.
substring
(
10
,
12
)
+
"-"
+
idNum
.
substring
(
12
,
14
);
}
else
if
(
idNum
.
length
()==
15
){
birthStr
=
"19"
+
idNum
.
substring
(
6
,
8
)
+
"-"
+
idNum
.
substring
(
8
,
10
)
+
"-"
+
idNum
.
substring
(
10
,
12
);
}
}
return
birthStr
;
}
}
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SociaFriendYgsAddVo.java
View file @
dea4ef0d
...
@@ -72,6 +72,7 @@ public class SociaFriendYgsAddVo implements Serializable {
...
@@ -72,6 +72,7 @@ public class SociaFriendYgsAddVo implements Serializable {
//其他20 法律、行政法规规定的其他情形
//其他20 法律、行政法规规定的其他情形
//合同期满12 劳动合同期满
//合同期满12 劳动合同期满
//单位辞退2 劳动者严重违反用人单位的规章制度
//单位辞退2 劳动者严重违反用人单位的规章制度
// 其他的默认 个人辞职1 劳动者提前30天书面通知解除或试用期提前3天通知解除合同 2024-12-12 09:19:59 昨晚盛宇沟通的结果
@ExcelProperty
(
"减少原因"
)
@ExcelProperty
(
"减少原因"
)
private
String
reduceReason
;
private
String
reduceReason
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
dea4ef0d
...
@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.social.config;
...
@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.social.config;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yifu.cloud.plus.v1.yifu.archives.util.IdCardUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
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.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
...
@@ -177,9 +176,9 @@ public class SocialFriendConfig {
...
@@ -177,9 +176,9 @@ public class SocialFriendConfig {
cbrymdOne
.
put
(
"gj"
,
"中国"
);
cbrymdOne
.
put
(
"gj"
,
"中国"
);
// 性别
// 性别
//cbrymdOne.put("xb", "男")
//cbrymdOne.put("xb", "男")
cbrymdOne
.
put
(
"xb"
,
IdCardUtil
.
getSexName
(
vo
.
getEmpIdcard
()));
cbrymdOne
.
put
(
"xb"
,
getSexName
(
vo
.
getEmpIdcard
()));
// 出生日期
// 出生日期
cbrymdOne
.
put
(
"csrq"
,
IdCardUtil
.
getBirthStr
(
vo
.
getEmpIdcard
()));
cbrymdOne
.
put
(
"csrq"
,
getBirthStr
(
vo
.
getEmpIdcard
()));
// 民族 空的默认汉族
// 民族 空的默认汉族
cbrymdOne
.
put
(
"mz"
,
vo
.
getEmpNational
());
cbrymdOne
.
put
(
"mz"
,
vo
.
getEmpNational
());
// 手机号码
// 手机号码
...
@@ -345,7 +344,7 @@ public class SocialFriendConfig {
...
@@ -345,7 +344,7 @@ public class SocialFriendConfig {
* @Date: 2024-12-9 16:54:22
* @Date: 2024-12-9 16:54:22
* @return: java.lang.String
* @return: java.lang.String
**/
**/
public
R
<
FriendResult
>
getFriendByRequestId
(
RestTemplate
restTemplate
,
String
requestId
)
{
public
FriendResult
getFriendByRequestId
(
RestTemplate
restTemplate
,
String
requestId
)
{
if
(
Common
.
isEmpty
(
requestId
))
{
if
(
Common
.
isEmpty
(
requestId
))
{
return
null
;
return
null
;
}
}
...
@@ -379,10 +378,7 @@ public class SocialFriendConfig {
...
@@ -379,10 +378,7 @@ public class SocialFriendConfig {
FriendResult
result
=
new
FriendResult
();
FriendResult
result
=
new
FriendResult
();
// 组装返回结果
// 组装返回结果
getResultToVo
(
dataResultList
,
result
);
getResultToVo
(
dataResultList
,
result
);
if
(
Common
.
isNotNull
(
result
.
getIdCard
()))
{
return
result
;
return
R
.
ok
(
result
);
}
return
R
.
failed
(
result
);
}
}
// 组装返回结果
// 组装返回结果
...
@@ -451,4 +447,51 @@ public class SocialFriendConfig {
...
@@ -451,4 +447,51 @@ public class SocialFriendConfig {
return
treeMap
;
return
treeMap
;
}
}
/**
* @param idNum 身份证
* @Description: 获取身份证的性别-汉字(已知身份证正确)
* @Author: hgw
* @Date: 2024/12/11 17:00
* @return: java.lang.String
**/
public
static
String
getSexName
(
String
idNum
)
{
String
sex
=
"男"
;
if
(
idNum
!=
null
)
{
String
sexString
=
""
;
if
(
idNum
.
length
()
==
18
)
{
sexString
=
idNum
.
substring
(
16
,
17
);
}
else
if
(
idNum
.
length
()
==
15
)
{
sexString
=
idNum
.
substring
(
14
,
15
);
}
try
{
// 判断性别
if
(
Integer
.
parseInt
(
sexString
)
%
2
==
0
)
{
sex
=
"女"
;
}
}
catch
(
Exception
e
)
{
sex
=
"男"
;
}
}
return
sex
;
}
/**
* @param idNum 身份证
* @Description: 获取身份证的年月日(已知身份证正确)
* @Author: hgw
* @Date: 2024/12/11 17:07
* @return: java.lang.String
**/
public
static
String
getBirthStr
(
String
idNum
)
{
String
birthStr
=
"1990-01-01"
;
if
(
idNum
!=
null
)
{
if
(
idNum
.
length
()
==
18
)
{
birthStr
=
idNum
.
substring
(
6
,
10
)
+
"-"
+
idNum
.
substring
(
10
,
12
)
+
"-"
+
idNum
.
substring
(
12
,
14
);
}
else
if
(
idNum
.
length
()
==
15
)
{
birthStr
=
"19"
+
idNum
.
substring
(
6
,
8
)
+
"-"
+
idNum
.
substring
(
8
,
10
)
+
"-"
+
idNum
.
substring
(
10
,
12
);
}
}
return
birthStr
;
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
dea4ef0d
...
@@ -69,6 +69,44 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -69,6 +69,44 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
private
final
TSocialDeadlineInfoService
tSocialDeadlineInfoService
;
private
final
TSocialDeadlineInfoService
tSocialDeadlineInfoService
;
private
final
TSocialSoldierLogService
tSocialSoldierLogService
;
private
final
TSocialSoldierLogService
tSocialSoldierLogService
;
/**
* @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
<
String
>
pushFriendTest
(
List
<
String
>
dispatchIdList
)
{
String
thisTime
=
DateUtil
.
getThisTime
();
// type 1社保增 2社保减 3医保增 4医保减
int
type
=
1
;
SociaFriendYgsAddVo
vo
=
new
SociaFriendYgsAddVo
();
String
id
=
socialFriendConfig
.
pushFriendByInfo
(
restTemplate
,
vo
,
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
)
{
FriendResult
info
=
socialFriendConfig
.
getFriendByRequestId
(
restTemplate
,
"15074c814b4240a19cdb4425a7ae502c"
);
return
R
.
ok
(
info
);
}
/**
/**
* @param socialList
* @param socialList
* @param file
* @param file
...
@@ -161,33 +199,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -161,33 +199,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
return
new
CommonsMultipartFile
(
item
);
return
new
CommonsMultipartFile
(
item
);
}
}
/**
* @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
<
String
>
pushFriendTest
(
List
<
String
>
dispatchIdList
)
{
String
thisTime
=
DateUtil
.
getThisTime
();
// type 1社保增 2社保减 3医保增 4医保减
int
type
=
1
;
SociaFriendYgsAddVo
vo
=
new
SociaFriendYgsAddVo
();
String
id
=
socialFriendConfig
.
pushFriendByInfo
(
restTemplate
,
vo
,
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: 推送到社保士兵
* @Description: 推送到社保士兵
...
...
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