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
6fac2c1f
Commit
6fac2c1f
authored
Sep 12, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.15' into MVP1.7.15
parents
8f142964
77a8b7a0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
30 deletions
+104
-30
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+104
-30
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
6fac2c1f
...
...
@@ -208,6 +208,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
List
<
TSocialFriendBackLog
>
backLogList
=
new
ArrayList
<>();
R
<
String
>
urlR
;
List
<
SociaFriendYgsAddVo
>
listVo
=
new
ArrayList
<>();
// 花名册需要的list
List
<
SociaFriendYgsAddVo
>
huaListVo
=
new
ArrayList
<>();
List
<
TSocialSoldierLog
>
logTemp
=
new
ArrayList
<>();
List
<
TSocialInfo
>
socialInfoTemp
=
new
ArrayList
<>();
List
<
TSocialInfo
>
socialInfoUpdate
=
new
ArrayList
<>();
...
...
@@ -222,6 +224,11 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
boolean
isSingle
;
// 是否为生成解除劳动合同书 且是 派减
boolean
isAutoLeaveDoc
;
// 社保是否自动生成花名册
boolean
rosterAutoFlagYgs
;
// 社保仅补缴生成材料 0否1是
boolean
dataFlagYgs
;
int
nowMonth
=
Integer
.
parseInt
(
DateUtil
.
getThisMonth
());
for
(
int
index
=
0
;
index
<
ygsAddlist
.
size
();
index
++)
{
vo
=
ygsAddlist
.
get
(
index
);
// 派减离职原因转化:
...
...
@@ -252,6 +259,24 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
socialInfo
=
new
TSocialInfo
();
socialInfo
.
setId
(
vo
.
getSocialId
());
listVo
.
add
(
vo
);
// 仅补缴生成材料
dataFlagYgs
=
Common
.
isNotNull
(
vo
.
getDataFlagYgs
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getDataFlagYgs
())
&&
Common
.
isNotNull
(
vo
.
getSocialStartMonth
());
if
(
dataFlagYgs
)
{
// 仅补缴生成材料
try
{
if
(
nowMonth
>=
Integer
.
parseInt
(
vo
.
getSocialStartMonth
()))
{
huaListVo
.
add
(
vo
);
}
}
catch
(
Exception
e
)
{
huaListVo
.
add
(
vo
);
}
}
else
{
huaListVo
.
add
(
vo
);
}
socialInfoTemp
.
add
(
socialInfo
);
socialLog
=
tSocialSoldierLogService
.
getFriendLog
(
vo
,
typeStr
,
dispatchItem
,
remark
);
if
(
socialLog
!=
null
)
{
...
...
@@ -267,12 +292,17 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
&&
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getIsAutoLeaveDoc
());
if
(
isAutoLeaveDoc
||
isSingle
||
nextFlag
||
i
%
10
==
0
||
index
>=
ygsAddlist
.
size
()-
1
)
{
urlR
=
doExportRosterNew
(
vo
,
type
,
listVo
,
zhangMap
,
templateSrcMap
);
// 房工接口,获取 企业职工社会保险增员花名册 url
// urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo)
rosterAutoFlagYgs
=
Common
.
isEmpty
(
vo
.
getRosterAutoFlagYgs
())
||
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getRosterAutoFlagYgs
());
if
(
rosterAutoFlagYgs
&&
!
huaListVo
.
isEmpty
())
{
urlR
=
doExportRosterNew
(
vo
,
type
,
huaListVo
,
zhangMap
,
templateSrcMap
);
// 房工接口,获取 企业职工基本医疗保险参保登记表 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里
...
...
@@ -304,6 +334,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
// 重置
listVo
=
new
ArrayList
<>();
huaListVo
=
new
ArrayList
<>();
socialInfoTemp
=
new
ArrayList
<>();
logTemp
=
new
ArrayList
<>();
}
...
...
@@ -465,6 +496,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
R
<
String
>
urlR
;
List
<
SociaFriendYgsAddVo
>
listVo
=
new
ArrayList
<>();
// 花名册需要的list
List
<
SociaFriendYgsAddVo
>
huaListVo
=
new
ArrayList
<>();
List
<
TSocialSoldierLog
>
logTemp
=
new
ArrayList
<>();
List
<
TSocialInfo
>
socialInfoTemp
=
new
ArrayList
<>();
List
<
TSocialInfo
>
socialInfoUpdate
=
new
ArrayList
<>();
...
...
@@ -479,6 +512,11 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
boolean
isAutoLeaveDoc
;
// 是否为单个推送(派单审核时定性的)
boolean
isSingle
;
// 社保是否自动生成花名册
boolean
rosterAutoFlagYsd
;
// 社保仅补缴生成材料 0否1是
boolean
dataFlagYsd
;
int
nowMonth
=
Integer
.
parseInt
(
DateUtil
.
getThisMonth
());
for
(
int
index
=
0
;
index
<
ysdAddlist
.
size
();
index
++)
{
vo
=
ysdAddlist
.
get
(
index
);
...
...
@@ -506,7 +544,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
remark
=
"超出医保离职原因的配置,转人工!配置为:"
+
vo
.
getTbyy
();
socialInfo
=
new
TSocialInfo
();
socialInfo
.
setId
(
vo
.
getSocialId
());
socialInfo
.
setY
gs
HandleStatus
(
CommonConstants
.
FIVE_STRING
);
socialInfo
.
setY
sd
HandleStatus
(
CommonConstants
.
FIVE_STRING
);
renGongList
.
add
(
socialInfo
);
socialLog
=
tSocialSoldierLogService
.
getFriendLog
(
vo
,
typeStr
,
dispatchItem
,
remark
);
if
(
socialLog
!=
null
)
{
...
...
@@ -521,6 +559,22 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
socialInfo
=
new
TSocialInfo
();
socialInfo
.
setId
(
vo
.
getSocialId
());
listVo
.
add
(
vo
);
// 仅补缴生成材料
dataFlagYsd
=
Common
.
isNotNull
(
vo
.
getDataFlagYsd
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getDataFlagYsd
())
&&
Common
.
isNotNull
(
vo
.
getSocialStartMonth
());
if
(
dataFlagYsd
)
{
// 仅补缴生成材料
try
{
if
(
nowMonth
>=
Integer
.
parseInt
(
vo
.
getSocialStartMonth
()))
{
huaListVo
.
add
(
vo
);
}
}
catch
(
Exception
e
)
{
huaListVo
.
add
(
vo
);
}
}
else
{
huaListVo
.
add
(
vo
);
}
socialInfo
=
new
TSocialInfo
();
socialInfo
.
setId
(
vo
.
getSocialId
());
socialInfoTemp
.
add
(
socialInfo
);
...
...
@@ -533,18 +587,23 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
&&
!
vo
.
getSocialHouseholdName
().
equals
(
ysdAddlist
.
get
(
index
+
1
).
getSocialHouseholdName
()))
{
nextFlag
=
true
;
}
isSingle
=
Common
.
isNotNull
(
vo
.
getIsSingle
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getIsSingle
());
isSingle
=
Common
.
isNotNull
(
vo
.
getIsSingleYsd
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getIsSingleYsd
());
isAutoLeaveDoc
=
templateUrl
!=
null
&&
type
==
4
&&
Common
.
isNotNull
(
vo
.
getIsAutoLeaveDoc
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getIsAutoLeaveDoc
());
if
(
isAutoLeaveDoc
||
isSingle
||
nextFlag
||
i
%
10
==
0
||
index
>=
ysdAddlist
.
size
()-
1
)
{
urlR
=
doExportRosterNew
(
vo
,
type
,
listVo
,
zhangMap
,
templateSrcMap
);
rosterAutoFlagYsd
=
Common
.
isEmpty
(
vo
.
getRosterAutoFlagYsd
())
||
CommonConstants
.
ONE_STRING
.
equals
(
vo
.
getRosterAutoFlagYsd
());
if
(
rosterAutoFlagYsd
&&
!
huaListVo
.
isEmpty
())
{
urlR
=
doExportRosterNew
(
vo
,
type
,
huaListVo
,
zhangMap
,
templateSrcMap
);
// 房工接口,获取 企业职工基本医疗保险参保登记表 url
//urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo);
//urlR = doExportRoster(vo.getSocialId(), String.valueOf(type), vo.getUnitCreditCode(), listVo)
if
(
urlR
!=
null
&&
urlR
.
getCode
()
==
200
&&
Common
.
isNotNull
(
urlR
.
getData
()))
{
vo
.
setQyzgjbylbxcbdjb
(
urlR
.
getData
());
}
}
// 派减且是要自动生成离职证明:
if
(
isAutoLeaveDoc
)
{
this
.
doSetAutoDoc
(
zhangMap
,
templateUrl
,
vo
,
CommonConstants
.
NINE_INTEGER
);
...
...
@@ -574,6 +633,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
// 重置
listVo
=
new
ArrayList
<>();
huaListVo
=
new
ArrayList
<>();
socialInfoTemp
=
new
ArrayList
<>();
logTemp
=
new
ArrayList
<>();
}
...
...
@@ -1253,24 +1313,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
backLog
.
setSocialId
(
vo
.
getSocialId
());
backLog
.
setType
(
CommonConstants
.
SIX_INT
);
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
try
{
String
key
=
"socialFriend/"
+
vo
.
getSocialId
()
+
"/"
+
System
.
currentTimeMillis
()
+
fileName
;
ossUtil
.
uploadFileByStream
(
inputStreamOut
,
key
,
null
);
TSocialFriendBackLog
backLogFile
=
new
TSocialFriendBackLog
();
backLogFile
.
setSocialId
(
vo
.
getSocialId
());
backLogFile
.
setType
(
19
);
backLogFile
.
setCreateTime
(
LocalDateTime
.
now
());
if
(
Common
.
isNotNull
(
key
))
{
URL
fileUrl
=
ossUtil
.
getObjectUrl
(
null
,
key
);
if
(
Common
.
isNotNull
(
fileUrl
))
{
key
+=
fileUrl
.
toString
();
}
}
backLogFile
.
setLogInfo
(
key
);
tSocialFriendBackLogService
.
save
(
backLogFile
);
}
catch
(
Exception
e
)
{
log
.
info
(
"花名册上传到阿里云失败,查看文件使用,没有找税友要也行"
);
}
// 上传花名册到阿里云
this
.
uploadHuaMingCeToOss
(
vo
,
fileName
,
inputStreamOut
);
R
<
String
>
ulrR
=
excelToImage
.
excelToImg
(
inputStreamOut
,
socialFriendConfig
,
restTemplate
,
backLog
);
tSocialFriendBackLogService
.
save
(
backLog
);
return
ulrR
;
...
...
@@ -1291,6 +1335,36 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
}
/**
* @param vo
* @param fileName
* @param inputStreamOut
* @Description: 上传花名册到阿里云
* @Author: hgw
* @Date: 2025/9/12 14:18
* @return: void
**/
private
void
uploadHuaMingCeToOss
(
SociaFriendYgsAddVo
vo
,
String
fileName
,
FileInputStream
inputStreamOut
)
{
try
{
String
key
=
"socialFriend/"
+
vo
.
getSocialId
()
+
"/"
+
System
.
currentTimeMillis
()
+
fileName
;
ossUtil
.
uploadFileByStream
(
inputStreamOut
,
key
,
null
);
TSocialFriendBackLog
backLogFile
=
new
TSocialFriendBackLog
();
backLogFile
.
setSocialId
(
vo
.
getSocialId
());
backLogFile
.
setType
(
19
);
backLogFile
.
setCreateTime
(
LocalDateTime
.
now
());
if
(
Common
.
isNotNull
(
key
))
{
URL
fileUrl
=
ossUtil
.
getObjectUrl
(
null
,
key
);
if
(
Common
.
isNotNull
(
fileUrl
))
{
key
+=
fileUrl
.
toString
();
}
}
backLogFile
.
setLogInfo
(
key
);
tSocialFriendBackLogService
.
save
(
backLogFile
);
}
catch
(
Exception
e
)
{
log
.
info
(
"花名册上传到阿里云失败,查看文件使用,没有找税友要也行"
);
}
}
/**
* 填充主表数据
*/
...
...
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