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
ef40c3fe
Commit
ef40c3fe
authored
Mar 26, 2026
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.7.21' into MVP1.7.21
parents
54b2ac5e
d207cdae
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
236 additions
and
64 deletions
+236
-64
EkpBankResultVo.java
...n/java/com/yifu/cloud/plus/v1/ekp/vo/EkpBankResultVo.java
+2
-0
IcbcTransactionFlowIssueController.java
...v1/ekp/controller/IcbcTransactionFlowIssueController.java
+11
-1
EkpBankGrantDetailMapper.java
...fu/cloud/plus/v1/ekp/mapper/EkpBankGrantDetailMapper.java
+1
-1
EkpBankPayTaskMapper.java
...m/yifu/cloud/plus/v1/ekp/mapper/EkpBankPayTaskMapper.java
+6
-0
EkpBankGrantDetailService.java
.../cloud/plus/v1/ekp/service/EkpBankGrantDetailService.java
+1
-1
EkpBankPayTaskService.java
...yifu/cloud/plus/v1/ekp/service/EkpBankPayTaskService.java
+6
-0
EkpBankGrantDetailServiceImpl.java
...us/v1/ekp/service/impl/EkpBankGrantDetailServiceImpl.java
+2
-2
EkpBankPayTaskServiceImpl.java
...d/plus/v1/ekp/service/impl/EkpBankPayTaskServiceImpl.java
+21
-0
IcbcTransactionFlowIssueServiceImpl.java
...ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
+60
-15
IcbcTransactionFlowQueryServiceImpl.java
...ekp/service/impl/IcbcTransactionFlowQueryServiceImpl.java
+4
-0
EkpBankGrantDetailMapper.xml
...iz/src/main/resources/mapper/EkpBankGrantDetailMapper.xml
+1
-1
EkpBankPayTaskMapper.xml
...kp-biz/src/main/resources/mapper/EkpBankPayTaskMapper.xml
+19
-0
EkpSocialInfoMapper.xml
...ekp-biz/src/main/resources/mapper/EkpSocialInfoMapper.xml
+2
-2
TSalaryZeroServiceImpl.java
...s/v1/yifu/salary/service/impl/TSalaryZeroServiceImpl.java
+27
-4
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+44
-8
ExcelToImage.java
...com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
+29
-28
WordToImageUtil.java
.../yifu/cloud/plus/v1/yifu/social/util/WordToImageUtil.java
+0
-1
No files found.
yifu-ekp/yifu-ekp-api/src/main/java/com/yifu/cloud/plus/v1/ekp/vo/EkpBankResultVo.java
View file @
ef40c3fe
...
@@ -38,4 +38,6 @@ public class EkpBankResultVo implements Serializable {
...
@@ -38,4 +38,6 @@ public class EkpBankResultVo implements Serializable {
private
String
fdAttaSrc
;
private
String
fdAttaSrc
;
// 非扣税使用的金额,授权失败记录金额
// 非扣税使用的金额,授权失败记录金额
private
String
fdMoney
;
private
String
fdMoney
;
// 汇款用途,如果是非扣税,就是转账,如果是报销,就是报销
private
String
fdPayType
;
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/IcbcTransactionFlowIssueController.java
View file @
ef40c3fe
...
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.*;
...
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
/**
/**
* 聚富通代发工资相关
* 聚富通代发工资相关
...
@@ -163,10 +165,18 @@ public class IcbcTransactionFlowIssueController {
...
@@ -163,10 +165,18 @@ public class IcbcTransactionFlowIssueController {
// 工资
// 工资
icbcTransactionFlowIssueService
.
getPdfFile
();
icbcTransactionFlowIssueService
.
getPdfFile
();
// 非扣税
// 非扣税
icbcTransactionFlowIssueService
.
getPdfFileByNoTax
(
null
);
icbcTransactionFlowIssueService
.
getPdfFileByNoTax
(
addDay
(-
2
));
icbcTransactionFlowIssueService
.
getPdfFileByNoTax
(
addDay
(-
1
));
return
R
.
ok
();
return
R
.
ok
();
}
}
private
String
addDay
(
int
day
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
add
(
Calendar
.
DATE
,
day
);
// 获取前一天日期
return
sdf
.
format
(
cal
.
getTime
());
}
@Operation
(
summary
=
"定时任务获取回单文件"
,
description
=
"定时任务获取回单文件"
)
@Operation
(
summary
=
"定时任务获取回单文件"
,
description
=
"定时任务获取回单文件"
)
@PostMapping
(
"/getTestPdfFile"
)
@PostMapping
(
"/getTestPdfFile"
)
public
R
getPdfFileTest
()
throws
IOException
{
public
R
getPdfFileTest
()
throws
IOException
{
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/mapper/EkpBankGrantDetailMapper.java
View file @
ef40c3fe
...
@@ -78,7 +78,7 @@ public interface EkpBankGrantDetailMapper extends BaseMapper<EkpBankGrantDetail>
...
@@ -78,7 +78,7 @@ public interface EkpBankGrantDetailMapper extends BaseMapper<EkpBankGrantDetail>
List
<
EkpBankCodeConfiglVo
>
getEkpBankCodeConfiglVo
();
List
<
EkpBankCodeConfiglVo
>
getEkpBankCodeConfiglVo
();
// 更新工资支出的 银企出纳
// 更新工资支出的 银企出纳
void
updateGongZiZhiChuTable
(
@Param
(
"fdId"
)
String
fdId
,
@Param
(
"chuNaName"
)
String
chuNaName
);
void
updateGongZiZhiChuTable
(
@Param
(
"
tableName"
)
String
tableName
,
@Param
(
"
fdId"
)
String
fdId
,
@Param
(
"chuNaName"
)
String
chuNaName
);
// 更新工资支出Main表的 银企出纳
// 更新工资支出Main表的 银企出纳
void
updateGongZiZhiChuMain
(
@Param
(
"fdId"
)
String
fdId
,
@Param
(
"chuNaName"
)
String
chuNaName
);
void
updateGongZiZhiChuMain
(
@Param
(
"fdId"
)
String
fdId
,
@Param
(
"chuNaName"
)
String
chuNaName
);
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/mapper/EkpBankPayTaskMapper.java
View file @
ef40c3fe
...
@@ -40,4 +40,10 @@ public interface EkpBankPayTaskMapper extends BaseMapper<EkpBankPayTask> {
...
@@ -40,4 +40,10 @@ public interface EkpBankPayTaskMapper extends BaseMapper<EkpBankPayTask> {
// 获取发放中的明细表,查询结果
// 获取发放中的明细表,查询结果
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetail
(
@Param
(
"typeName"
)
String
typeName
);
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetail
(
@Param
(
"typeName"
)
String
typeName
);
// 获取发放中的主表,查询结果——其他(非扣税、报销等)
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultMainByOther
();
// 获取发放中的明细表,查询结果——其他(非扣税、报销等)
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetailByOther
();
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpBankGrantDetailService.java
View file @
ef40c3fe
...
@@ -77,7 +77,7 @@ public interface EkpBankGrantDetailService extends IService<EkpBankGrantDetail>
...
@@ -77,7 +77,7 @@ public interface EkpBankGrantDetailService extends IService<EkpBankGrantDetail>
* @Date: 2024/12/26 11:41
* @Date: 2024/12/26 11:41
* @return: void
* @return: void
**/
**/
void
updateGongZiZhiChuTable
(
String
fdId
,
String
chuNaName
);
void
updateGongZiZhiChuTable
(
String
tableName
,
String
fdId
,
String
chuNaName
);
/**
/**
* @param fdId 工资支出 表id
* @param fdId 工资支出 表id
* @param chuNaName 银企出纳名字
* @param chuNaName 银企出纳名字
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpBankPayTaskService.java
View file @
ef40c3fe
...
@@ -47,4 +47,10 @@ public interface EkpBankPayTaskService extends IService<EkpBankPayTask> {
...
@@ -47,4 +47,10 @@ public interface EkpBankPayTaskService extends IService<EkpBankPayTask> {
**/
**/
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetail
(
String
typeName
);
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetail
(
String
typeName
);
// 获取发放中的主表,查询结果——其他(非扣税、报销等)
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultMainByOther
();
// 获取发放中的明细表,查询结果——其他(非扣税、报销等)
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetailByOther
();
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpBankGrantDetailServiceImpl.java
View file @
ef40c3fe
...
@@ -129,8 +129,8 @@ public class EkpBankGrantDetailServiceImpl extends ServiceImpl<EkpBankGrantDetai
...
@@ -129,8 +129,8 @@ public class EkpBankGrantDetailServiceImpl extends ServiceImpl<EkpBankGrantDetai
}
}
@Override
@Override
public
void
updateGongZiZhiChuTable
(
String
fdId
,
String
chuNaName
)
{
public
void
updateGongZiZhiChuTable
(
String
tableName
,
String
fdId
,
String
chuNaName
)
{
baseMapper
.
updateGongZiZhiChuTable
(
fdId
,
chuNaName
);
baseMapper
.
updateGongZiZhiChuTable
(
tableName
,
fdId
,
chuNaName
);
}
}
@Override
@Override
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpBankPayTaskServiceImpl.java
View file @
ef40c3fe
...
@@ -57,4 +57,25 @@ public class EkpBankPayTaskServiceImpl extends ServiceImpl<EkpBankPayTaskMapper,
...
@@ -57,4 +57,25 @@ public class EkpBankPayTaskServiceImpl extends ServiceImpl<EkpBankPayTaskMapper,
public
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetail
(
String
typeName
)
{
public
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetail
(
String
typeName
)
{
return
baseMapper
.
getEkpBankMainByNeedResultDetail
(
typeName
);
return
baseMapper
.
getEkpBankMainByNeedResultDetail
(
typeName
);
}
}
/**
* @Description: 获取发放中的主表,查询结果
* @Author: hgw
* @Date: 2024/11/25 10:26
* @return: java.util.List<com.yifu.cloud.plus.v1.ekp.entity.EkpBankPayTask>
**/
@Override
public
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultMainByOther
()
{
return
baseMapper
.
getEkpBankMainByNeedResultMainByOther
();
}
/**
* @Description: 获取发放中的明细表,查询结果
* @Author: hgw
* @Date: 2024/11/25 10:39
* @return: java.util.List<com.yifu.cloud.plus.v1.ekp.vo.EkpBankResultVo>
**/
@Override
public
List
<
EkpBankResultVo
>
getEkpBankMainByNeedResultDetailByOther
()
{
return
baseMapper
.
getEkpBankMainByNeedResultDetailByOther
();
}
}
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
View file @
ef40c3fe
...
@@ -798,6 +798,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -798,6 +798,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
@Transactional
@Transactional
public
R
<
String
>
submitBankTask
(
String
fdId
,
String
type
,
String
submitUser
)
{
public
R
<
String
>
submitBankTask
(
String
fdId
,
String
type
,
String
submitUser
)
{
if
(
Common
.
isNotNull
(
fdId
)
&&
Common
.
isNotNull
(
type
))
{
if
(
Common
.
isNotNull
(
fdId
)
&&
Common
.
isNotNull
(
type
))
{
// 工资支出表名称
String
tableName
=
"ekp_fd9be224c214ad0992aa"
;
String
redisKey
=
"SUBMIT_BANK_"
+
fdId
;
String
redisKey
=
"SUBMIT_BANK_"
+
fdId
;
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
redisKey
)))
{
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
redisKey
)))
{
return
R
.
failed
(
"数据锁定中,请耐心等待!"
);
return
R
.
failed
(
"数据锁定中,请耐心等待!"
);
...
@@ -840,7 +842,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -840,7 +842,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 同步更新明细的发放时间、发放状态
// 同步更新明细的发放时间、发放状态
ekpBankGrantDetailService
.
updateStatusByGrant
(
fdId
);
ekpBankGrantDetailService
.
updateStatusByGrant
(
fdId
);
// 更新 工资支出 的 银企出纳名字
// 更新 工资支出 的 银企出纳名字
ekpBankGrantDetailService
.
updateGongZiZhiChuTable
(
fdId
,
submitUser
);
ekpBankGrantDetailService
.
updateGongZiZhiChuTable
(
tableName
,
fdId
,
submitUser
);
ekpBankGrantDetailService
.
updateGongZiZhiChuMain
(
fdId
,
submitUser
);
ekpBankGrantDetailService
.
updateGongZiZhiChuMain
(
fdId
,
submitUser
);
}
}
redisUtil
.
remove
(
redisKey
);
redisUtil
.
remove
(
redisKey
);
...
@@ -911,6 +913,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -911,6 +913,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
@Transactional
@Transactional
public
synchronized
R
<
String
>
submitNoTaxTask
(
String
fdId
,
String
type
,
String
submitUser
)
{
public
synchronized
R
<
String
>
submitNoTaxTask
(
String
fdId
,
String
type
,
String
submitUser
)
{
if
(
Common
.
isNotNull
(
fdId
)
&&
Common
.
isNotNull
(
type
))
{
if
(
Common
.
isNotNull
(
fdId
)
&&
Common
.
isNotNull
(
type
))
{
// 非扣税表名称
String
tableName
=
"ekp_75edcee9b5e4b198035a"
;
String
wxNoPre
=
"FKS"
;
String
redisKey
=
"SUBMIT_NO_TAX_BANK_"
+
fdId
;
String
redisKey
=
"SUBMIT_NO_TAX_BANK_"
+
fdId
;
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
redisKey
)))
{
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
redisKey
)))
{
return
R
.
failed
(
"数据锁定中,请耐心等待!"
);
return
R
.
failed
(
"数据锁定中,请耐心等待!"
);
...
@@ -936,6 +941,21 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -936,6 +941,21 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
redisUtil
.
remove
(
redisKey
);
redisUtil
.
remove
(
redisKey
);
return
R
.
failed
(
"数据错误,无金额!"
);
return
R
.
failed
(
"数据错误,无金额!"
);
}
}
if
(
Common
.
isNotNull
(
main
.
getFdPayType
())
&&
"报销"
.
equals
(
main
.
getFdPayType
()))
{
if
(
"行政报销"
.
equals
(
main
.
getFdCustomerName
()))
{
wxNoPre
=
"XZBX"
;
tableName
=
"ekp_6f55b508bcf492cae93d"
;
}
else
if
(
"业务报销"
.
equals
(
main
.
getFdCustomerName
()))
{
wxNoPre
=
"YWBX"
;
tableName
=
"ekp_a2b51052cb1324b5f92f"
;
}
else
if
(
"项目报销"
.
equals
(
main
.
getFdCustomerName
()))
{
wxNoPre
=
"XMBX"
;
tableName
=
"ekp_a185e090a77a14211ab0"
;
}
else
if
(
"差旅费报销"
.
equals
(
main
.
getFdCustomerName
()))
{
wxNoPre
=
"CLFBX"
;
tableName
=
"ekp_af0fda0b28888440fa17"
;
}
}
int
count
=
ekpBankGrantDetailService
.
getCountByIdAndMain
(
fdId
);
int
count
=
ekpBankGrantDetailService
.
getCountByIdAndMain
(
fdId
);
String
totalAmt
=
String
.
valueOf
(
BigDecimalUtils
.
safeMultiply
(
main
.
getFdMoney
(),
new
BigDecimal
(
"100"
),
0
));
String
totalAmt
=
String
.
valueOf
(
BigDecimalUtils
.
safeMultiply
(
main
.
getFdMoney
(),
new
BigDecimal
(
"100"
),
0
));
String
totalCount
=
String
.
valueOf
(
count
);
String
totalCount
=
String
.
valueOf
(
count
);
...
@@ -943,10 +963,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -943,10 +963,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 为空或者失败数=-1,则生成新的wxNo
// 为空或者失败数=-1,则生成新的wxNo
if
(
Common
.
isEmpty
(
wxNo
)
||
if
(
Common
.
isEmpty
(
wxNo
)
||
(
Common
.
isNotNull
(
main
.
getFdFailNum
())
&&
main
.
getFdFailNum
()
==
CommonConstants
.
ONE_INT_NEGATE
))
{
(
Common
.
isNotNull
(
main
.
getFdFailNum
())
&&
main
.
getFdFailNum
()
==
CommonConstants
.
ONE_INT_NEGATE
))
{
wxNo
=
"FKS"
+
new
Date
().
getTime
();
wxNo
=
wxNoPre
+
new
Date
().
getTime
();
String
cur
=
ekpBankGrantDetailService
.
getWxNoByWxNo
(
wxNo
);
String
cur
=
ekpBankGrantDetailService
.
getWxNoByWxNo
(
wxNo
);
if
(
Common
.
isNotNull
(
cur
))
{
if
(
Common
.
isNotNull
(
cur
))
{
wxNo
=
"FKS"
+
new
Date
().
getTime
();
wxNo
=
wxNoPre
+
new
Date
().
getTime
();
}
}
main
.
setFdWxNo
(
wxNo
);
main
.
setFdWxNo
(
wxNo
);
main
.
setFdFailNum
(
CommonConstants
.
ZERO_INT
);
main
.
setFdFailNum
(
CommonConstants
.
ZERO_INT
);
...
@@ -980,12 +1000,13 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -980,12 +1000,13 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 同步更新明细的发放时间、发放状态
// 同步更新明细的发放时间、发放状态
ekpBankGrantDetailService
.
updateStatusByGrant
(
fdId
);
ekpBankGrantDetailService
.
updateStatusByGrant
(
fdId
);
// 更新 工资支出 的 银企出纳名字
// 更新 工资支出 的 银企出纳名字
ekpBankGrantDetailService
.
updateGongZiZhiChuTable
(
fdId
,
submitUser
);
ekpBankGrantDetailService
.
updateGongZiZhiChuTable
(
tableName
,
fdId
,
submitUser
);
ekpBankGrantDetailService
.
updateGongZiZhiChuMain
(
fdId
,
submitUser
);
ekpBankGrantDetailService
.
updateGongZiZhiChuMain
(
fdId
,
submitUser
);
}
}
redisUtil
.
remove
(
redisKey
);
redisUtil
.
remove
(
redisKey
);
return
returnR
;
return
returnR
;
}
else
{
}
else
{
wxNoPre
=
"FKSMX"
;
// 2明细表
// 2明细表
EkpBankGrantDetail
detail
=
ekpBankGrantDetailService
.
getById
(
fdId
);
EkpBankGrantDetail
detail
=
ekpBankGrantDetailService
.
getById
(
fdId
);
if
(
detail
==
null
)
{
if
(
detail
==
null
)
{
...
@@ -1000,6 +1021,24 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1000,6 +1021,24 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
redisUtil
.
remove
(
redisKey
);
redisUtil
.
remove
(
redisKey
);
return
R
.
failed
(
"数据错误,无金额!"
);
return
R
.
failed
(
"数据错误,无金额!"
);
}
}
if
(
Common
.
isNotNull
(
detail
.
getFdParentId
()))
{
EkpBankPayTask
main
=
ekpBankPayTaskService
.
getById
(
detail
.
getFdParentId
());
if
(
main
==
null
)
{
redisUtil
.
remove
(
redisKey
);
return
R
.
failed
(
"未找到主表数据!"
);
}
if
(
Common
.
isNotNull
(
main
.
getFdPayType
())
&&
"报销"
.
equals
(
main
.
getFdPayType
()))
{
if
(
"行政报销"
.
equals
(
main
.
getFdCustomerName
()))
{
wxNoPre
=
"XZBXMX"
;
}
else
if
(
"业务报销"
.
equals
(
main
.
getFdCustomerName
()))
{
wxNoPre
=
"YWBXMX"
;
}
else
if
(
"项目报销"
.
equals
(
main
.
getFdCustomerName
()))
{
wxNoPre
=
"XMBXMX"
;
}
else
if
(
"差旅费报销"
.
equals
(
main
.
getFdCustomerName
()))
{
wxNoPre
=
"CLFBXMX"
;
}
}
}
String
totalAmt
=
String
.
valueOf
(
BigDecimalUtils
.
safeMultiply
(
detail
.
getFdMoney
(),
new
BigDecimal
(
"100"
),
0
));
String
totalAmt
=
String
.
valueOf
(
BigDecimalUtils
.
safeMultiply
(
detail
.
getFdMoney
(),
new
BigDecimal
(
"100"
),
0
));
String
totalCount
=
"1"
;
String
totalCount
=
"1"
;
String
wxNo
=
detail
.
getFdWxNo
();
String
wxNo
=
detail
.
getFdWxNo
();
...
@@ -1007,10 +1046,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1007,10 +1046,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
if
(
Common
.
isEmpty
(
wxNo
)
||
if
(
Common
.
isEmpty
(
wxNo
)
||
(
Common
.
isNotNull
(
detail
.
getFdFailNum
())
&&
detail
.
getFdFailNum
()
>
CommonConstants
.
ZERO_INT
(
Common
.
isNotNull
(
detail
.
getFdFailNum
())
&&
detail
.
getFdFailNum
()
>
CommonConstants
.
ZERO_INT
&&
Common
.
isNotNull
(
detail
.
getFdGrantNum
())
&&
detail
.
getFdFailNum
()
>=
detail
.
getFdGrantNum
()))
{
&&
Common
.
isNotNull
(
detail
.
getFdGrantNum
())
&&
detail
.
getFdFailNum
()
>=
detail
.
getFdGrantNum
()))
{
wxNo
=
"FKSMX"
+
new
Date
().
getTime
();
wxNo
=
wxNoPre
+
new
Date
().
getTime
();
String
cur
=
ekpBankGrantDetailService
.
getWxNoByWxNo
(
wxNo
);
String
cur
=
ekpBankGrantDetailService
.
getWxNoByWxNo
(
wxNo
);
if
(
Common
.
isNotNull
(
cur
))
{
if
(
Common
.
isNotNull
(
cur
))
{
wxNo
=
"FKSMX"
+
new
Date
().
getTime
();
wxNo
=
wxNoPre
+
new
Date
().
getTime
();
}
}
detail
.
setFdWxNo
(
wxNo
);
detail
.
setFdWxNo
(
wxNo
);
ekpBankGrantDetailService
.
updateById
(
detail
);
ekpBankGrantDetailService
.
updateById
(
detail
);
...
@@ -1327,7 +1366,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1327,7 +1366,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
MybankEnterprisePayQpayentResponseV1
responseV1
;
MybankEnterprisePayQpayentResponseV1
responseV1
;
String
title
=
"转账"
;
String
title
=
"转账"
;
String
typeName
=
"非扣税"
;
String
seqNoPre
=
"AHWX"
;
String
seqNoPre
=
"AHWX"
;
String
seqNo
;
String
seqNo
;
...
@@ -1347,7 +1385,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1347,7 +1385,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
List
<
EkpBankGrantDetail
>
detailDataList
;
List
<
EkpBankGrantDetail
>
detailDataList
;
EkpBankGrantDetail
detailData
;
EkpBankGrantDetail
detailData
;
// 1:获取需要查询结果的非扣税支付任务(发放中的任务)——主表
// 1:获取需要查询结果的非扣税支付任务(发放中的任务)——主表
List
<
EkpBankResultVo
>
mainList
=
ekpBankPayTaskService
.
getEkpBankMainByNeedResultMain
(
typeName
);
List
<
EkpBankResultVo
>
mainList
=
ekpBankPayTaskService
.
getEkpBankMainByNeedResultMain
ByOther
(
);
String
statusRemark
;
String
statusRemark
;
// 终结态:失败6/8/41或成功7
// 终结态:失败6/8/41或成功7
String
failStatus
=
"41"
;
String
failStatus
=
"41"
;
...
@@ -1361,6 +1399,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1361,6 +1399,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 是否经过了检查,经过检查后则不继续检查结果
// 是否经过了检查,经过检查后则不继续检查结果
boolean
isShouQuanCheck
=
true
;
boolean
isShouQuanCheck
=
true
;
for
(
EkpBankResultVo
vo
:
mainList
)
{
for
(
EkpBankResultVo
vo
:
mainList
)
{
if
(
Common
.
isNotNull
(
vo
.
getFdPayType
())
&&
"报销"
.
equals
(
vo
.
getFdPayType
()))
{
title
=
vo
.
getFdPayType
();
}
seqNo
=
seqNoPre
+
System
.
currentTimeMillis
()
+
(
i
++);
seqNo
=
seqNoPre
+
System
.
currentTimeMillis
()
+
(
i
++);
responseV1
=
icbcTransactionFlowQueryService
.
getResultNoTax
(
vo
,
tranDate
,
tranTime
,
seqNo
,
client
);
responseV1
=
icbcTransactionFlowQueryService
.
getResultNoTax
(
vo
,
tranDate
,
tranTime
,
seqNo
,
client
);
if
(
Common
.
isNotNull
(
responseV1
))
{
if
(
Common
.
isNotNull
(
responseV1
))
{
...
@@ -1427,7 +1469,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1427,7 +1469,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
moneyAll
=
BigDecimalUtils
.
safeAdd
(
moneyAll
,
money
);
moneyAll
=
BigDecimalUtils
.
safeAdd
(
moneyAll
,
money
);
// 初始化日志明细
// 初始化日志明细
logDetail
=
new
EkpBankGrantLogDetail
();
logDetail
=
new
EkpBankGrantLogDetail
();
setLogDetailBaseInfoNoTax
(
logs
,
money
,
logDetail
,
data
);
setLogDetailBaseInfoNoTax
(
logs
,
money
,
logDetail
,
data
,
title
);
if
(
Common
.
isNotNull
(
data
.
getUniBusiId
()))
{
if
(
Common
.
isNotNull
(
data
.
getUniBusiId
()))
{
detailData
=
oldMap
.
get
(
data
.
getUniBusiId
());
detailData
=
oldMap
.
get
(
data
.
getUniBusiId
());
...
@@ -1498,7 +1540,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1498,7 +1540,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
}
}
// 2:获取主表已发放且明细表发放中的明细表数据,查询工行接口
// 2:获取主表已发放且明细表发放中的明细表数据,查询工行接口
List
<
EkpBankResultVo
>
detailList
=
ekpBankPayTaskService
.
getEkpBankMainByNeedResultDetail
(
typeName
);
List
<
EkpBankResultVo
>
detailList
=
ekpBankPayTaskService
.
getEkpBankMainByNeedResultDetail
ByOther
(
);
// 明细表
// 明细表
if
(
detailList
!=
null
&&
!
detailList
.
isEmpty
())
{
if
(
detailList
!=
null
&&
!
detailList
.
isEmpty
())
{
detailDataList
=
new
ArrayList
<>();
detailDataList
=
new
ArrayList
<>();
...
@@ -1507,6 +1549,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1507,6 +1549,9 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 初始化
// 初始化
i
=
0
;
i
=
0
;
for
(
EkpBankResultVo
vo
:
detailList
)
{
for
(
EkpBankResultVo
vo
:
detailList
)
{
if
(
Common
.
isNotNull
(
vo
.
getFdPayType
())
&&
"报销"
.
equals
(
vo
.
getFdPayType
()))
{
title
=
vo
.
getFdPayType
();
}
seqNo
=
seqNoPre
+
System
.
currentTimeMillis
()
+
(
i
++);
seqNo
=
seqNoPre
+
System
.
currentTimeMillis
()
+
(
i
++);
responseV1
=
icbcTransactionFlowQueryService
.
getResultNoTax
(
vo
,
tranDate
,
tranTime
,
seqNo
,
client
);
responseV1
=
icbcTransactionFlowQueryService
.
getResultNoTax
(
vo
,
tranDate
,
tranTime
,
seqNo
,
client
);
...
@@ -1564,7 +1609,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1564,7 +1609,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
saveNewEkpBankGrantLog
(
responseV1
.
getPackageName
(),
vo
,
vo
.
getFdParentId
(),
logs
,
title
);
saveNewEkpBankGrantLog
(
responseV1
.
getPackageName
(),
vo
,
vo
.
getFdParentId
(),
logs
,
title
);
// 初始化日志明细
// 初始化日志明细
logDetail
=
new
EkpBankGrantLogDetail
();
logDetail
=
new
EkpBankGrantLogDetail
();
setLogDetailBaseInfoNoTax
(
logs
,
money
,
logDetail
,
data
);
setLogDetailBaseInfoNoTax
(
logs
,
money
,
logDetail
,
data
,
title
);
// 收款人名称
// 收款人名称
logDetail
.
setFdPayee
(
vo
.
getFdPayeeName
());
logDetail
.
setFdPayee
(
vo
.
getFdPayeeName
());
logDetail
.
setFdRecipientBank
(
vo
.
getFdRecipientBank
());
logDetail
.
setFdRecipientBank
(
vo
.
getFdRecipientBank
());
...
@@ -1602,7 +1647,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -1602,7 +1647,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
saveNewEkpBankGrantLog
(
responseV1
.
getPackageName
(),
vo
,
vo
.
getFdParentId
(),
logs
,
title
);
saveNewEkpBankGrantLog
(
responseV1
.
getPackageName
(),
vo
,
vo
.
getFdParentId
(),
logs
,
title
);
// 初始化日志明细
// 初始化日志明细
logDetail
=
new
EkpBankGrantLogDetail
();
logDetail
=
new
EkpBankGrantLogDetail
();
setLogDetailBaseInfoNoTax
(
logs
,
money
,
logDetail
,
null
);
setLogDetailBaseInfoNoTax
(
logs
,
money
,
logDetail
,
null
,
title
);
// 收款人名称
// 收款人名称
logDetail
.
setFdPayee
(
vo
.
getFdPayeeName
());
logDetail
.
setFdPayee
(
vo
.
getFdPayeeName
());
logDetail
.
setFdRecipientBank
(
vo
.
getFdRecipientBank
());
logDetail
.
setFdRecipientBank
(
vo
.
getFdRecipientBank
());
...
@@ -2156,7 +2201,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -2156,7 +2201,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
}
}
private
void
setLogDetailBaseInfoNoTax
(
EkpBankGrantLog
logs
,
BigDecimal
money
,
EkpBankGrantLogDetail
logDetail
private
void
setLogDetailBaseInfoNoTax
(
EkpBankGrantLog
logs
,
BigDecimal
money
,
EkpBankGrantLogDetail
logDetail
,
MybankEnterprisePayQpayentResponseV1
.
MybankEnterprisePayQpayentResponseRdV1
data
)
{
,
MybankEnterprisePayQpayentResponseV1
.
MybankEnterprisePayQpayentResponseRdV1
data
,
String
title
)
{
logDetail
.
setFdParentId
(
logs
.
getFdId
());
logDetail
.
setFdParentId
(
logs
.
getFdId
());
logDetail
.
setFdMoney
(
money
);
logDetail
.
setFdMoney
(
money
);
...
@@ -2167,8 +2212,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -2167,8 +2212,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
logDetail
.
setFdPayeeAccount
(
data
.
getRecAccNo
());
logDetail
.
setFdPayeeAccount
(
data
.
getRecAccNo
());
logDetail
.
setFdRemark
(
data
.
getSummary
());
logDetail
.
setFdRemark
(
data
.
getSummary
());
}
}
// 汇款用途
// 汇款用途
:工资、转账、报销
logDetail
.
setFdRemittancePurpose
(
"转账"
);
logDetail
.
setFdRemittancePurpose
(
title
);
}
}
/**
/**
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowQueryServiceImpl.java
View file @
ef40c3fe
...
@@ -364,6 +364,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -364,6 +364,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
String
fSeqNo
;
String
fSeqNo
;
MybankEnterpriseTradeQhisdResponseV1
response
;
MybankEnterpriseTradeQhisdResponseV1
response
;
// int i=1;
for
(
Map
<
String
,
String
>
accountInfo:
accountList
)
{
for
(
Map
<
String
,
String
>
accountInfo:
accountList
)
{
bizContent
=
new
MybankEnterpriseTradeQhisdRequestV1
.
MybankEnterpriseTradeQhisdRequestBizV1
();
bizContent
=
new
MybankEnterpriseTradeQhisdRequestV1
.
MybankEnterpriseTradeQhisdRequestBizV1
();
...
@@ -384,6 +385,8 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -384,6 +385,8 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
request
.
setServiceUrl
(
icbcConfigProperties
.
getServerUrl
());
request
.
setServiceUrl
(
icbcConfigProperties
.
getServerUrl
());
request
.
setBizContent
(
bizContent
);
request
.
setBizContent
(
bizContent
);
response
=
client
.
execute
(
request
);
response
=
client
.
execute
(
request
);
// 如果工行人要传参,把这个打出来,复制给他
//System.out.println("传参" + (i++) + ":" + JSON.toJSONString(request));
if
(
response
.
isSuccess
())
{
if
(
response
.
isSuccess
())
{
getInfoListByNoTax
(
request
,
mainMap
,
returnMap
,
detailMap
,
client
,
bizContent
);
getInfoListByNoTax
(
request
,
mainMap
,
returnMap
,
detailMap
,
client
,
bizContent
);
}
}
...
@@ -422,6 +425,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
...
@@ -422,6 +425,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
if
(
no
.
contains
(
"-"
))
{
if
(
no
.
contains
(
"-"
))
{
no
=
no
.
split
(
"-"
)[
0
];
no
=
no
.
split
(
"-"
)[
0
];
}
}
// no 的值将是 "HQP923041354291"
// no 的值将是 "HQP923041354291"
infoOldVo
=
mainMap
.
get
(
no
);
infoOldVo
=
mainMap
.
get
(
no
);
if
(
infoOldVo
!=
null
)
{
if
(
infoOldVo
!=
null
)
{
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpBankGrantDetailMapper.xml
View file @
ef40c3fe
...
@@ -231,7 +231,7 @@
...
@@ -231,7 +231,7 @@
<!-- 更新工资支出 的 银企出纳 -->
<!-- 更新工资支出 的 银企出纳 -->
<update
id=
"updateGongZiZhiChuTable"
>
<update
id=
"updateGongZiZhiChuTable"
>
UPDATE
ekp_fd9be224c214ad0992aa
SET fd_bank_pay_chu_na = #{chuNaName} WHERE fd_id = #{fdId};
UPDATE
${tableName}
SET fd_bank_pay_chu_na = #{chuNaName} WHERE fd_id = #{fdId};
</update>
</update>
<!-- 更新工资支出Main表的 银企出纳 -->
<!-- 更新工资支出Main表的 银企出纳 -->
<update
id=
"updateGongZiZhiChuMain"
>
<update
id=
"updateGongZiZhiChuMain"
>
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpBankPayTaskMapper.xml
View file @
ef40c3fe
...
@@ -106,6 +106,25 @@
...
@@ -106,6 +106,25 @@
where a.fd_grant_status = '已发放' and d.fd_grant_status = '发放失败' and d.fd_handle_status = '发放中' and a.fd_pay_type = #{typeName}
where a.fd_grant_status = '已发放' and d.fd_grant_status = '发放失败' and d.fd_handle_status = '发放中' and a.fd_pay_type = #{typeName}
</select>
</select>
<!-- 获取发放中的主表,查询结果 -->
<select
id=
"getEkpBankMainByNeedResultMainByOther"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpBankResultVo"
>
select a.fd_id fdId,a.fd_wx_no fdWxNo
,count(d.fd_id) num,a.fd_bank_name fdBankName,a.fd_bank_no fdBankNo,a.fd_bank_account fdBankAccount
,a.fd_grant_num fdGrantNum,a.fd_atta_src fdAttaSrc,a.fd_pay_type fdPayType
from ekp_bank_pay_task a left join ekp_bank_grant_detail d on a.fd_id = d.fd_parent_id
where a.fd_grant_status = '发放中' and a.fd_pay_type in ("非扣税","报销")
GROUP BY a.fd_id
</select>
<!-- 获取发放中的明细表,查询结果 -->
<select
id=
"getEkpBankMainByNeedResultDetailByOther"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpBankResultVo"
>
select d.fd_id fdId,d.fd_wx_no fdWxNo,d.fd_parent_id fdParentId,d.fd_fail_num fdFailNum,d.fd_salary_id fdSalaryId
,'1' num,a.fd_bank_name fdBankName,a.fd_bank_no fdBankNo,a.fd_bank_account fdBankAccount,d.fd_payee_name fdPayeeName
,d.fd_grant_num fdGrantNum,d.fd_recipient_bank fdRecipientBank,d.fd_atta_src fdAttaSrc,d.fd_money fdMoney,a.fd_pay_type fdPayType
from ekp_bank_grant_detail d left join ekp_bank_pay_task a on a.fd_id = d.fd_parent_id
where a.fd_grant_status = '已发放' and d.fd_grant_status = '发放失败' and d.fd_handle_status = '发放中' and a.fd_pay_type in ("非扣税","报销")
</select>
</mapper>
</mapper>
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpSocialInfoMapper.xml
View file @
ef40c3fe
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
<!--查询所有需要查询的单号-主表-->
<!--查询所有需要查询的单号-主表-->
<select
id=
"getNoToQueryByMain"
resultType=
"com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseIdNameNoVo"
>
<select
id=
"getNoToQueryByMain"
resultType=
"com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseIdNameNoVo"
>
SELECT a.fd_wx_no id,a.fd_atta_src no FROM ekp_bank_pay_task a
SELECT a.fd_wx_no id,a.fd_atta_src no FROM ekp_bank_pay_task a
where a.fd_pay_type
= '非扣税'
and a.fd_atta_src is not null
where a.fd_pay_type
in ('非扣税','报销')
and a.fd_atta_src is not null
and a.fd_create_time >= DATE_SUB(curdate(), INTERVAL 3 MONTH)
and a.fd_create_time >= DATE_SUB(curdate(), INTERVAL 3 MONTH)
and not EXISTS (
and not EXISTS (
select 1 from ekp_bank_atta b where b.fd_link_type='4' and a.fd_wx_no=b.fd_link_id
select 1 from ekp_bank_atta b where b.fd_link_type='4' and a.fd_wx_no=b.fd_link_id
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
<select
id=
"getNoToQueryByDetail"
resultType=
"com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseIdNameNoVo"
>
<select
id=
"getNoToQueryByDetail"
resultType=
"com.yifu.cloud.plus.v1.yifu.common.core.vo.BaseIdNameNoVo"
>
SELECT a.fd_wx_no id,a.fd_atta_src no FROM ekp_bank_grant_detail a
SELECT a.fd_wx_no id,a.fd_atta_src no FROM ekp_bank_grant_detail a
left join ekp_bank_pay_task m on m.fd_id=a.fd_parent_id
left join ekp_bank_pay_task m on m.fd_id=a.fd_parent_id
where m.fd_pay_type
= '非扣税'
and a.fd_atta_src is not null
where m.fd_pay_type
in ('非扣税','报销')
and a.fd_atta_src is not null
and a.fd_create_time >= DATE_SUB(curdate(), INTERVAL 6 MONTH)
and a.fd_create_time >= DATE_SUB(curdate(), INTERVAL 6 MONTH)
and not EXISTS (
and not EXISTS (
select 1 from ekp_bank_atta b where b.fd_link_type='4' and a.fd_wx_no=b.fd_link_id
select 1 from ekp_bank_atta b where b.fd_link_type='4' and a.fd_wx_no=b.fd_link_id
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryZeroServiceImpl.java
View file @
ef40c3fe
...
@@ -300,8 +300,7 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
...
@@ -300,8 +300,7 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
errorMessageList
.
add
(
new
ErrorMessage
(-
1
,
"超过500条,不存储数据,请处理导入表格"
));
errorMessageList
.
add
(
new
ErrorMessage
(-
1
,
"超过500条,不存储数据,请处理导入表格"
));
cachedDataList
.
clear
();
cachedDataList
.
clear
();
// 中断读取
// 中断读取
context
.
interrupt
();
throw
new
RuntimeException
(
"超过500条,请减少数据条数!"
);
return
;
}
}
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
ReadRowHolder
readRowHolder
=
context
.
readRowHolder
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
Integer
rowIndex
=
readRowHolder
.
getRowIndex
();
...
@@ -395,8 +394,13 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
...
@@ -395,8 +394,13 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
}).
sheet
().
doRead
();
}).
sheet
().
doRead
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
,
e
);
// 判断 为RuntimeException
return
R
.
failed
(
CommonConstants
.
IMPORT_DATA_ANALYSIS_ERROR
);
if
(
e
instanceof
RuntimeException
)
{
return
R
.
failed
(
e
.
getMessage
());
}
String
errorInfo
=
"数据导入解析失败,请将单元格设为文本!"
+
e
.
getMessage
();
log
.
error
(
errorInfo
,
e
);
return
R
.
failed
(
errorInfo
);
}
}
boolean
isTrue
=
true
;
boolean
isTrue
=
true
;
for
(
ErrorMessage
message
:
errorMessageList
)
{
for
(
ErrorMessage
message
:
errorMessageList
)
{
...
@@ -482,6 +486,10 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
...
@@ -482,6 +486,10 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
continue
;
continue
;
}
}
if
(
judgeTaxMonth
(
excel
.
getTaxMonth
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"计税月份格式不正确!"
,
excel
));
continue
;
}
insert
=
new
TSalaryZero
();
insert
=
new
TSalaryZero
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
BeanUtil
.
copyProperties
(
excel
,
insert
);
insert
.
setSettleMonth
(
settleMonth
);
insert
.
setSettleMonth
(
settleMonth
);
...
@@ -512,6 +520,21 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
...
@@ -512,6 +520,21 @@ public class TSalaryZeroServiceImpl extends ServiceImpl<TSalaryZeroMapper, TSala
}
}
}
}
// 返回false则对
private
boolean
judgeTaxMonth
(
String
taxMonth
)
{
if
(
Common
.
isEmpty
(
taxMonth
))
{
return
true
;
}
if
(
taxMonth
.
length
()
>
CommonConstants
.
dingleDigitIntArray
[
6
])
{
taxMonth
=
taxMonth
.
substring
(
0
,
6
);
}
else
if
(
taxMonth
.
length
()
<
CommonConstants
.
dingleDigitIntArray
[
6
])
{
return
true
;
}
if
(
DateUtil
.
compareYearMonth
(
taxMonth
,
DateUtil
.
addMonth
(
0
)))
{
return
true
;
}
return
false
;
}
// 批量新增0申报
// 批量新增0申报
public
void
saveBatchWithTableName
(
List
<
TSalaryZero
>
insertList
,
String
tableName
)
{
public
void
saveBatchWithTableName
(
List
<
TSalaryZero
>
insertList
,
String
tableName
)
{
if
(
insertList
==
null
||
insertList
.
isEmpty
())
{
if
(
insertList
==
null
||
insertList
.
isEmpty
())
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
ef40c3fe
...
@@ -190,6 +190,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -190,6 +190,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
}
}
finally
{
}
finally
{
atomicPushFriend
.
decrementAndGet
();
atomicPushFriend
.
decrementAndGet
();
cleanSpireTempFiles
();
}
}
return
R
.
ok
();
return
R
.
ok
();
}
else
{
}
else
{
...
@@ -198,6 +199,41 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -198,6 +199,41 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
}
}
}
// 2026-03-26 hgw
// 不可以并发,会使花名册转图片的字体不正确
// 后续优化,考虑升级(spire.xls)的版本
// 此方法是:删除临时文件
public
void
cleanSpireTempFiles
()
{
try
{
String
tempDirPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
tempDir
=
new
File
(
tempDirPath
);
if
(
tempDir
.
exists
()
&&
tempDir
.
isDirectory
())
{
File
[]
spireTempFiles
=
tempDir
.
listFiles
((
dir
,
name
)
->
name
.
startsWith
(
"+~JF"
)
&&
name
.
endsWith
(
".tmp"
)
);
if
(
spireTempFiles
!=
null
&&
spireTempFiles
.
length
>
0
)
{
int
count
=
0
;
long
totalSize
=
0
;
for
(
File
file
:
spireTempFiles
)
{
if
(
file
.
isFile
()
&&
file
.
canWrite
())
{
long
fileSize
=
file
.
length
();
if
(
file
.
delete
())
{
count
++;
totalSize
+=
fileSize
;
}
}
}
log
.
info
(
"清理 Spire.XLS 临时文件完成:删除 {} 个文件,释放 {} MB 空间"
,
count
,
totalSize
/
1024
/
1024
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"清理 Spire.XLS 临时文件失败"
,
e
);
}
}
// 获取特殊的户名称,当前给 徽州区 使用,徽州区需要走不同的分支
// 获取特殊的户名称,当前给 徽州区 使用,徽州区需要走不同的分支
private
Map
<
String
,
Integer
>
getSpecialHuNameMap
()
{
private
Map
<
String
,
Integer
>
getSpecialHuNameMap
()
{
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
...
@@ -332,7 +368,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -332,7 +368,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
if
(
rosterAutoFlagYgs
&&
!
huaListVo
.
isEmpty
())
{
if
(
rosterAutoFlagYgs
&&
!
huaListVo
.
isEmpty
())
{
urlR
=
doExportRosterNew
(
vo
,
type
,
huaListVo
,
zhangMap
,
templateSrcMap
);
urlR
=
doExportRosterNew
(
vo
,
type
,
huaListVo
,
zhangMap
,
templateSrcMap
);
// 新增:强制垃圾回收以清理 Spire.XLS 的临时字体文件
//System.gc();
// 房工接口,获取 企业职工基本医疗保险参保登记表 url
// 房工接口,获取 企业职工基本医疗保险参保登记表 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
()))
{
if
(
urlR
!=
null
&&
urlR
.
getCode
()
==
200
&&
Common
.
isNotNull
(
urlR
.
getData
()))
{
...
@@ -1292,7 +1329,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -1292,7 +1329,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
String
filePath
=
projectRoot
+
CommonConstants
.
DOUBLE_LINE
+
fileName
;
String
filePath
=
projectRoot
+
CommonConstants
.
DOUBLE_LINE
+
fileName
;
//获取要导出的列表
//获取要导出的列表
List
<
TDispatchSocialPersionExportVo
>
list
=
new
ArrayList
<>();
List
<
TDispatchSocialPersionExportVo
>
list
=
new
ArrayList
<>();
ExcelWriter
excelWriter
=
null
;
//
ExcelWriter excelWriter = null;
File
createFile
=
null
;
File
createFile
=
null
;
try
{
try
{
...
@@ -1346,13 +1383,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -1346,13 +1383,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
throw
new
RuntimeException
(
"填充Excel模板失败"
,
e
);
throw
new
RuntimeException
(
"填充Excel模板失败"
,
e
);
}
}
File
inputFile
=
null
;
FileInputStream
inputStream
=
null
;
FileInputStream
inputStream
=
null
;
InputStream
inStream
=
null
;
InputStream
inStream
=
null
;
try
{
try
{
//读取文件 生成电子章
//读取文件 生成电子章
input
File
=
new
File
(
filePath
);
create
File
=
new
File
(
filePath
);
inputStream
=
new
FileInputStream
(
input
File
);
inputStream
=
new
FileInputStream
(
create
File
);
if
(
Common
.
isEmpty
(
url
))
{
if
(
Common
.
isEmpty
(
url
))
{
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":电子印章OSS获取URL异常"
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":电子印章OSS获取URL异常"
);
...
@@ -1376,12 +1412,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -1376,12 +1412,12 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
return
R
.
failed
(
"税友附件生成异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"税友附件生成异常:"
+
e
.
getMessage
());
}
finally
{
}
finally
{
// 清理文件
// 清理文件
finallyClose
(
inputFile
,
null
,
null
,
inputStream
,
null
,
inStream
,
null
);
finallyClose
(
null
,
null
,
null
,
inputStream
,
null
,
inStream
,
null
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
excelWriter
!=
null
)
{
/*
if (excelWriter != null) {
excelWriter.finish();
excelWriter.finish();
}
}
*/
log
.
error
(
"税友附件生成异常"
,
e
);
log
.
error
(
"税友附件生成异常"
,
e
);
return
R
.
failed
(
"税友附件生成异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"税友附件生成异常:"
+
e
.
getMessage
());
}
finally
{
}
finally
{
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
View file @
ef40c3fe
...
@@ -53,26 +53,28 @@ public class ExcelToImage {
...
@@ -53,26 +53,28 @@ public class ExcelToImage {
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagParamError
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagParamError
);
}
}
String
projectRoot
=
System
.
getProperty
(
CommonConstants
.
USER_DIR
);
String
projectRoot
=
System
.
getProperty
(
CommonConstants
.
USER_DIR
);
File
tempFile
=
null
;
File
compressedTempFile
=
null
;
//加载Excel工作表
//加载Excel工作表
Workbook
wb
=
new
Workbook
();
Workbook
wb
=
new
Workbook
();
wb
.
loadFromHtml
(
inputStream
);
//获取工作表
Worksheet
sheet
=
wb
.
getWorksheets
().
get
(
0
);
//调用方法将Excel工作表保存为图片
sheet
.
saveToImage
(
projectRoot
+
toImag
);
File
file
=
null
;
try
{
try
{
wb
.
loadFromHtml
(
inputStream
);
//获取工作表
Worksheet
sheet
=
wb
.
getWorksheets
().
get
(
0
);
String
toImagePath
=
projectRoot
+
toImag
;
sheet
.
saveToImage
(
toImagePath
);
tempFile
=
new
File
(
toImagePath
);
// 上传税友文件服务器,返回文件路径
// 上传税友文件服务器,返回文件路径
file
=
new
File
(
projectRoot
+
toImag
);
if
(
tempFile
.
exists
()){
if
(
file
.
exists
()){
// file 压缩到1M以内
// file 压缩到1M以内
backLog
.
setLogInfo
(
"压缩大小前"
);
backLog
.
setLogInfo
(
"压缩大小前"
);
// 压缩并加章
// 压缩并加章
file
=
compressImage
(
file
,
projectRoot
,
zhangStream
);
tempFile
=
compressImage
(
tempFile
,
projectRoot
,
zhangStream
,
compressedTempFile
);
backLog
.
setLogInfo
(
"压缩大小后"
);
backLog
.
setLogInfo
(
"压缩大小后"
);
String
key
=
System
.
currentTimeMillis
()
+
f
ile
.
getName
();
String
key
=
System
.
currentTimeMillis
()
+
tempF
ile
.
getName
();
byte
[]
fileContent
=
Files
.
readAllBytes
(
f
ile
.
toPath
());
byte
[]
fileContent
=
Files
.
readAllBytes
(
tempF
ile
.
toPath
());
String
base64String
=
Base64
.
getEncoder
().
encodeToString
(
fileContent
);
String
base64String
=
Base64
.
getEncoder
().
encodeToString
(
fileContent
);
backLog
.
setLogInfo
(
"转化为base64String"
);
backLog
.
setLogInfo
(
"转化为base64String"
);
String
url
=
socialFriendConfig
.
uploadPng
(
restTemplate
,
key
,
base64String
,
backLog
);
String
url
=
socialFriendConfig
.
uploadPng
(
restTemplate
,
key
,
base64String
,
backLog
);
...
@@ -80,15 +82,21 @@ public class ExcelToImage {
...
@@ -80,15 +82,21 @@ public class ExcelToImage {
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagOSSError
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagOSSError
);
}
}
// 上传花名册到阿里云
// 上传花名册到阿里云
this
.
uploadHuaMingCeToOss
(
ossUtil
,
tSocialFriendBackLogService
,
socialId
,
file
.
getName
(),
f
ile
);
this
.
uploadHuaMingCeToOss
(
ossUtil
,
tSocialFriendBackLogService
,
socialId
,
tempFile
.
getName
(),
tempF
ile
);
return
R
.
ok
(
url
);
return
R
.
ok
(
url
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagConvertError
+
e
.
getMessage
());
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagConvertError
+
e
.
getMessage
());
}
finally
{
}
finally
{
if
(
file
.
exists
()){
if
(
wb
!=
null
)
{
file
.
delete
();
wb
.
dispose
();
// 重要:释放资源并删除临时文件
}
if
(
tempFile
!=
null
&&
tempFile
.
exists
()){
tempFile
.
delete
();
}
if
(
compressedTempFile
!=
null
&&
compressedTempFile
.
exists
()){
compressedTempFile
.
delete
();
}
}
if
(
null
!=
inputStream
){
if
(
null
!=
inputStream
){
try
{
try
{
...
@@ -133,33 +141,26 @@ public class ExcelToImage {
...
@@ -133,33 +141,26 @@ public class ExcelToImage {
}
}
//压缩文件到指定大小
//压缩文件到指定大小
private
File
compressImage
(
File
originalFile
,
String
projectRoot
,
InputStream
zhangStream
)
throws
IOException
{
private
File
compressImage
(
File
originalFile
,
String
projectRoot
,
InputStream
zhangStream
,
File
compressedTempFile
)
throws
IOException
{
BufferedImage
image
=
ImageIO
.
read
(
originalFile
);
BufferedImage
image
=
ImageIO
.
read
(
originalFile
);
// 新: 加盖公章
// 新: 加盖公章
BufferedImage
sealedImage
=
addSealToImage
(
image
,
zhangStream
);
BufferedImage
sealedImage
=
addSealToImage
(
image
,
zhangStream
);
ImageIO
.
write
(
sealedImage
,
"png"
,
originalFile
);
ImageIO
.
write
(
sealedImage
,
"png"
,
originalFile
);
int
quality
=
100
;
// 从100%开始
int
quality
=
100
;
// 从100%开始
File
compressedFile
=
new
File
(
projectRoot
,
TO_IMAGE_TEMP
);
int
maxSize
=
1024
*
1024
;
int
maxSize
=
1024
*
1024
;
try
{
try
{
while
(
originalFile
.
length
()
>
maxSize
&&
quality
>
10
)
{
while
(
originalFile
.
length
()
>
maxSize
&&
quality
>
10
)
{
quality
-=
5
;
quality
-=
5
;
ImageIO
.
write
(
sealedImage
,
"png"
,
compressedFile
);
ImageIO
.
write
(
sealedImage
,
"png"
,
compressed
Temp
File
);
if
(
compressedFile
.
length
()
<
maxSize
)
{
if
(
compressed
Temp
File
.
length
()
<
maxSize
)
{
originalFile
.
delete
();
originalFile
.
delete
();
compressedFile
.
renameTo
(
originalFile
);
compressed
Temp
File
.
renameTo
(
originalFile
);
break
;
break
;
}
}
compressedFile
.
delete
();
compressed
Temp
File
.
delete
();
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
if
(
compressedFile
!=
null
&&
compressedFile
.
exists
())
{
throw
e
;
compressedFile
.
delete
();
}
}
finally
{
if
(
compressedFile
!=
null
&&
compressedFile
.
exists
())
{
compressedFile
.
delete
();
}
}
}
return
originalFile
;
return
originalFile
;
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/WordToImageUtil.java
View file @
ef40c3fe
...
@@ -142,7 +142,6 @@ public class WordToImageUtil {
...
@@ -142,7 +142,6 @@ public class WordToImageUtil {
if
(
imgFile
!=
null
)
{
if
(
imgFile
!=
null
)
{
imgFile
.
delete
();
imgFile
.
delete
();
}
}
}
}
return
"---"
;
return
"---"
;
}
}
...
...
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