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
f0f142a8
Commit
f0f142a8
authored
Apr 29, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.10-单个推送接口
parent
41ab3486
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
101 additions
and
14 deletions
+101
-14
TSocialFriendBackLog.java
...loud/plus/v1/yifu/social/entity/TSocialFriendBackLog.java
+1
-1
SociaFriendYgsAddVo.java
...ifu/cloud/plus/v1/yifu/social/vo/SociaFriendYgsAddVo.java
+9
-0
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+3
-0
TDispatchInfoController.java
...us/v1/yifu/social/controller/TDispatchInfoController.java
+1
-1
TDispatchInfoService.java
...oud/plus/v1/yifu/social/service/TDispatchInfoService.java
+4
-2
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+9
-5
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+63
-1
DoSocialTask.java
...com/yifu/cloud/plus/v1/yifu/social/util/DoSocialTask.java
+5
-2
TSocialFriendMapper.xml
...ial-biz/src/main/resources/mapper/TSocialFriendMapper.xml
+6
-2
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TSocialFriendBackLog.java
View file @
f0f142a8
...
...
@@ -65,7 +65,7 @@ public class TSocialFriendBackLog {
@ExcelAttribute
(
name
=
"类型"
)
@ExcelProperty
(
"类型"
)
@Schema
(
description
=
"类型1社保增 2社保减 3医保增 4医保减 5推送的日志 6社保图片路径7医保图片路径11社保增拉取 12社保减拉取 13医保增拉取 14医保减拉取"
)
@Schema
(
description
=
"类型1社保增 2社保减 3医保增 4医保减 5推送的日志 6社保图片路径7医保图片路径11社保增拉取 12社保减拉取 13医保增拉取 14医保减拉取
16社保单个图片17医保单个图片
"
)
private
Integer
type
;
/**
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SociaFriendYgsAddVo.java
View file @
f0f142a8
...
...
@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author hgw
...
...
@@ -82,6 +83,8 @@ public class SociaFriendYgsAddVo implements Serializable {
// 企业职工社会保险增员花名册 qyzgshbxzyhmc
private
String
qyzgshbxzyhmc
;
// 单个附件list
private
List
<
String
>
imgList
;
// 当前行政经办区——2025-3-31 10:23:02 盛宇与税友沟通,可以默认安徽省,暂时不用这个字段了,后面有特殊要求再加
/*@ExcelProperty("当前行政经办区
private String dqxzjbq*/
...
...
@@ -109,4 +112,10 @@ public class SociaFriendYgsAddVo implements Serializable {
@ExcelProperty
(
"备案解除二级原因"
)
private
String
bajcejyy
;
@ExcelProperty
(
"是否单个"
)
private
String
isSingle
;
// 用来获取单个推送的附件
@ExcelProperty
(
"派单ID"
)
private
String
dispatchId
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
f0f142a8
...
...
@@ -158,6 +158,9 @@ public class SocialFriendConfig {
qyzgshbxzyhmclbArr
.
add
(
vo
.
getQyzgjbylbxcbdjb
());
json
.
put
(
"qyzgshbxzyhmclb"
,
qyzgshbxzyhmclbArr
);
}
// todo-税友新附件接口还没有,要把 imgUrl传过去
// json.put("imgUrl", vo.getImgList());
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
// 推的json
TSocialFriendBackLog
backLogPush
=
new
TSocialFriendBackLog
();
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TDispatchInfoController.java
View file @
f0f142a8
...
...
@@ -531,7 +531,7 @@ public class TDispatchInfoController {
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//主动释放锁
return
tDispatchInfoService
.
addApplyAudit
(
idList
,
auditStatus
,
auditRemark
,
remark
);
return
tDispatchInfoService
.
addApplyAudit
(
idList
,
auditStatus
,
auditRemark
,
remark
,
isSingleAudit
);
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TDispatchInfoService.java
View file @
f0f142a8
...
...
@@ -80,9 +80,11 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
DispatchDetailVo
getSocialAndFundInfoById
(
String
id
);
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
);
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
,
String
isSingleAudit
);
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
);
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
,
String
isSingleAudit
);
// isAutoFlag:是否社保士兵的自动办理,true :是
R
<
List
<
ErrorMessage
>>
addApplyHandle
(
List
<
String
>
ids
,
String
typeSub
,
String
handleStatus
,
String
handleRemark
,
String
socialType
,
String
remark
,
YifuUser
user
,
boolean
isAutoHandle
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
f0f142a8
...
...
@@ -3476,11 +3476,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Author fxj
* @Description 派单申请批量审核
* @Date 16:54 2022/7/25
* @Param
* @Param
isSingleAudit 1:单个审核接口并且户类型为单个,即时推送税友
* @return
**/
@Override
public
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
)
{
public
List
<
ErrorMessage
>
addBatchApplyAudit
(
List
<
String
>
idsList
,
YifuUser
user
,
int
flag
,
String
auditStatus
,
String
auditRemark
,
String
remark
,
String
isSingleAudit
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
if
(!
Common
.
isNotNull
(
idsList
))
{
errorList
.
add
(
new
ErrorMessage
(-
1
,
CommonConstants
.
PARAM_IS_NOT_ERROR
));
...
...
@@ -3804,6 +3805,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
dis
.
setIsSingle
(
isSingleAudit
);
baseMapper
.
updateById
(
dis
);
socialFundMapper
.
updateById
(
sf
);
if
(
isAuto
)
{
...
...
@@ -3816,7 +3818,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&&
set
!=
null
&&
Common
.
isNotNull
(
set
.
getType
())
&&
set
.
getType
()
==
1
)
{
isFriend
=
true
;
}
socialTask
.
pushSoldier
(
dis
.
getId
(),
isFriend
);
socialTask
.
pushSoldier
(
dis
.
getId
(),
isFriend
,
isSingleAudit
);
}
//派减的申请审核完更新社保公积金查询快照表
...
...
@@ -3931,10 +3933,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
}
// String isSingleAudit 1:单个审核接口并且户类型为单个,即时推送税友
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ShardingTransactionType
(
TransactionType
.
BASE
)
@Override
public
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
)
{
public
R
<
List
<
ErrorMessage
>>
addApplyAudit
(
List
<
String
>
ids
,
String
auditStatus
,
String
auditRemark
,
String
remark
,
String
isSingleAudit
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
)
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -3953,7 +3957,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
}
else
{
return
R
.
failed
(
"派单审核状态参数异常:0待审核 1审核通过 2审核不通过"
);
}
List
<
ErrorMessage
>
errorInfo
=
addBatchApplyAudit
(
ids
,
user
,
flag
,
auditStatus
,
Common
.
isNullToString
(
auditRemark
),
remark
);
List
<
ErrorMessage
>
errorInfo
=
addBatchApplyAudit
(
ids
,
user
,
flag
,
auditStatus
,
Common
.
isNullToString
(
auditRemark
),
remark
,
isSingleAudit
);
return
R
.
ok
(
errorInfo
,
"派单审核结果:"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"派单审核异常:"
+
e
.
getMessage
());
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
f0f142a8
...
...
@@ -39,6 +39,7 @@ import com.yifu.cloud.plus.v1.yifu.social.util.ExcelToImage;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
...
...
@@ -99,6 +100,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
TSocialFreindSet
set
=
tSocialFreindSetService
.
getById
(
"1"
);
if
(
set
!=
null
&&
Common
.
isNotNull
(
set
.
getType
())
&&
1
==
set
.
getType
())
{
// 离职原因Map,将离职原因翻译为税友的字典
Map
<
String
,
TSocialFriendReduceSet
>
reduceMap
=
tSocialFriendReduceSetService
.
getFriendReduceMap
();
// 获取时间限制配置(获取 当月启用 的配置)
...
...
@@ -174,6 +176,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
SociaFriendYgsAddVo
vo
;
int
i
=
1
;
TSocialFriendReduceSet
reduceSet
;
// 是否为单个推送(派单审核时定性的)
boolean
isSingle
;
for
(
int
index
=
0
;
index
<
ygsAddlist
.
size
();
index
++)
{
vo
=
ygsAddlist
.
get
(
index
);
// 派减离职原因转化:
...
...
@@ -214,12 +218,19 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
&&
!
vo
.
getSocialHouseholdName
().
equals
(
ygsAddlist
.
get
(
index
+
1
).
getSocialHouseholdName
()))
{
nextFlag
=
true
;
}
if
(
nextFlag
||
i
%
10
==
0
||
index
>=
ygsAddlist
.
size
()-
1
)
{
isSingle
=
Common
.
isNotNull
(
vo
.
getIsSingle
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getIsSingle
());
if
(
isSingle
||
nextFlag
||
i
%
10
==
0
||
index
>=
ygsAddlist
.
size
()-
1
)
{
// 房工接口,获取 企业职工社会保险增员花名册 url
urlR
=
doExportRoster
(
vo
.
getSocialId
(),
String
.
valueOf
(
type
),
vo
.
getUnitCreditCode
(),
listVo
);
if
(
urlR
!=
null
&&
urlR
.
getCode
()
==
200
&&
Common
.
isNotNull
(
urlR
.
getData
()))
{
vo
.
setQyzgshbxzyhmc
(
urlR
.
getData
());
}
if
(
isSingle
&&
Common
.
isNotNull
(
vo
.
getDispatchId
()))
{
// 获取单个附件并推送税友,返回 imgList 到Vo里
this
.
setImgList
(
vo
);
}
i
=
0
;
nextFlag
=
false
;
requestId
=
socialFriendConfig
.
pushFriendByInfo
(
restTemplate
,
vo
,
listVo
,
type
,
thisTime
,
backLogList
);
...
...
@@ -278,6 +289,57 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
}
/**
* @param vo
* @Description: 获取单个附件并推送税友,返回 imgList 到Vo里
* @Author: hgw
* @Date: 2025/4/28 17:05
* @return: void
**/
private
void
setImgList
(
SociaFriendYgsAddVo
vo
)
{
URL
url
;
InputStream
inStream
=
null
;
List
<
String
>
imgList
=
new
ArrayList
<>();
List
<
TAttaInfo
>
attaInfoList
=
attaInfoMapper
.
getTAttaInfoListByDoMainId
(
vo
.
getDispatchId
());
if
(
attaInfoList
!=
null
&&
!
attaInfoList
.
isEmpty
())
{
String
base64String
;
TSocialFriendBackLog
backLog
;
String
imgUrl
;
for
(
TAttaInfo
attaInfo
:
attaInfoList
)
{
if
(
Common
.
isNotNull
(
attaInfo
.
getAttaSrc
()))
{
// 获取附件url
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
if
(
url
!=
null
)
{
try
{
inStream
=
url
.
openStream
();
// inStream转化为base64String
base64String
=
Base64
.
getEncoder
().
encodeToString
(
IOUtils
.
toByteArray
(
inStream
));
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
vo
.
getSocialId
());
backLog
.
setType
(
16
);
imgUrl
=
socialFriendConfig
.
uploadPng
(
restTemplate
,
attaInfo
.
getAttaName
(),
base64String
,
backLog
);
tSocialFriendBackLogService
.
save
(
backLog
);
if
(
Common
.
isNotNull
(
imgUrl
)){
imgList
.
add
(
imgUrl
);
}
}
catch
(
Exception
e
){
log
.
info
(
"税友单个图片上传失败!"
);
}
finally
{
if
(
null
!=
inStream
){
try
{
inStream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
vo
.
setImgList
(
imgList
);
}
}
/**
* @Description: 推送医保和记录日志
* @Author: hgw
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoSocialTask.java
View file @
f0f142a8
...
...
@@ -269,7 +269,7 @@ public class DoSocialTask {
* @return
**/
@Async
public
void
pushSoldier
(
String
dispatchId
,
boolean
isFriend
)
{
public
void
pushSoldier
(
String
dispatchId
,
boolean
isFriend
,
String
isSingleAudit
)
{
List
<
String
>
dispatchIdList
=
new
ArrayList
<>();
dispatchIdList
.
add
(
dispatchId
);
try
{
...
...
@@ -280,7 +280,10 @@ public class DoSocialTask {
// 当前默认 安徽省 ,且开关是税友的,才可以税友推送办理
if
(
isFriend
)
{
// 断开派单单条推送税友
// tSocialFriendPushService.pushFriend(dispatchIdList);
// 单个审核接口并且户类型为单个,即时推送税友
if
(
CommonConstants
.
ONE_STRING
.
equals
(
isSingleAudit
))
{
tSocialFriendPushService
.
pushFriend
(
dispatchIdList
);
}
}
else
{
tSocialSoldierPushService
.
pushSoldier
(
dispatchIdList
);
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TSocialFriendMapper.xml
View file @
f0f142a8
...
...
@@ -79,7 +79,9 @@
s.SOCIAL_PROVINCE socialProvince,
s.SOCIAL_CITY socialCity,
s.SOCIAL_TOWN socialTown,
a.SCHOOL_NAME byyx
a.SCHOOL_NAME byyx,
a.IS_SINGLE isSingle,
a.ID dispatchId
</sql>
...
...
@@ -221,7 +223,9 @@
s.SOCIAL_PROVINCE socialProvince,
s.SOCIAL_CITY socialCity,
s.SOCIAL_TOWN socialTown,
a.SCHOOL_NAME byyx
a.SCHOOL_NAME byyx,
a.IS_SINGLE isSingle,
a.ID dispatchId
<include
refid=
"getSocialSoldierBaseTwo"
/>
and a.type = '1' and s.YSD_HANDLE_STATUS in ('0','1','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