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
f2546ac1
Commit
f2546ac1
authored
Nov 22, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.2 工行4次提交_发放
parent
0ec07fc8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
152 additions
and
29 deletions
+152
-29
EkpBankPayTask.java
...ava/com/yifu/cloud/plus/v1/ekp/entity/EkpBankPayTask.java
+2
-7
IcbcTransactionFlowIssueController.java
...v1/ekp/controller/IcbcTransactionFlowIssueController.java
+29
-5
EkpBankGrantDetailMapper.java
...fu/cloud/plus/v1/ekp/mapper/EkpBankGrantDetailMapper.java
+2
-0
EkpBankGrantDetailService.java
.../cloud/plus/v1/ekp/service/EkpBankGrantDetailService.java
+6
-0
IcbcTransactionFlowIssueService.java
.../plus/v1/ekp/service/IcbcTransactionFlowIssueService.java
+14
-3
EkpBankGrantDetailServiceImpl.java
...us/v1/ekp/service/impl/EkpBankGrantDetailServiceImpl.java
+5
-0
IcbcTransactionFlowIssueServiceImpl.java
...ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
+85
-11
EkpBankGrantDetailMapper.xml
...iz/src/main/resources/mapper/EkpBankGrantDetailMapper.xml
+9
-1
EkpBankPayTaskMapper.xml
...kp-biz/src/main/resources/mapper/EkpBankPayTaskMapper.xml
+0
-2
No files found.
yifu-ekp/yifu-ekp-api/src/main/java/com/yifu/cloud/plus/v1/ekp/entity/EkpBankPayTask.java
View file @
f2546ac1
...
...
@@ -27,6 +27,7 @@ import lombok.Data;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
/**
...
...
@@ -101,7 +102,7 @@ public class EkpBankPayTask {
@ExcelAttribute
(
name
=
"金额"
)
@ExcelProperty
(
"金额"
)
@Schema
(
description
=
"金额"
)
private
Double
fdMoney
;
private
BigDecimal
fdMoney
;
/**
* 支付类别:工资、社保
*/
...
...
@@ -245,12 +246,6 @@ public class EkpBankPayTask {
@Schema
(
description
=
"发放次数"
)
private
Integer
fdGrantNum
;
// 工资支出结算单上的封面备注
@ExcelAttribute
(
name
=
"备注信息"
)
@ExcelProperty
(
"备注信息"
)
@Schema
(
description
=
"备注信息"
)
private
String
fdCoverRemark
;
@ExcelAttribute
(
name
=
"批次号"
,
maxLength
=
36
)
@Length
(
max
=
36
,
message
=
"批次号不能超过36个字符"
)
@ExcelProperty
(
"批次号"
)
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/controller/IcbcTransactionFlowIssueController.java
View file @
f2546ac1
...
...
@@ -42,8 +42,17 @@ public class IcbcTransactionFlowIssueController {
*/
@Operation
(
summary
=
"聚富通代发工资确认提交接口"
,
description
=
"聚富通代发工资确认提交接口"
)
@PostMapping
(
"/submit"
)
public
R
submitIcbcTransactionFlow
()
{
return
icbcTransactionFlowIssueService
.
submitIcbcTransactionFlow
();
public
R
<
String
>
submitIcbcTransactionFlow
(
@RequestParam
(
required
=
false
)
String
totalAmt
,
@RequestParam
(
required
=
false
)
String
totalCount
,
@RequestParam
(
required
=
false
)
String
wxNo
,
@RequestParam
(
required
=
false
)
String
url
,
@RequestParam
(
required
=
false
)
String
mdCode
)
{
if
(
Common
.
isEmpty
(
totalAmt
)
||
!
CommonConstants
.
ONE_STRING
.
equals
(
totalAmt
))
{
totalAmt
=
"1"
;
totalCount
=
"1"
;
wxNo
=
"WX202411201649110001732092551023"
;
url
=
"020101190_WX202411201649110001732092551023_0_20241120.xls"
;
mdCode
=
"49003789330801136756328772184671605624443424719041259624457722383503273821290"
;
}
return
icbcTransactionFlowIssueService
.
submitIcbcTransactionFlow
(
totalAmt
,
totalCount
,
wxNo
,
url
,
mdCode
);
}
/**
...
...
@@ -88,18 +97,33 @@ public class IcbcTransactionFlowIssueController {
/**
* @param fdId 主键ID
* @param type 类型 1:主表附件;2:明细表附件
* @Description:
* @Description:
下载代发任务附件
* @Author: hgw
* @Date: 2024/11/15 14:51
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta>
**/
@Operation
(
summary
=
"
获取代发任务附件--EKP调用接口"
,
description
=
"获取
代发任务附件--EKP调用接口"
)
@SysLog
(
"
获取
代发任务附件--EKP调用接口"
)
@Operation
(
summary
=
"
下载代发任务附件--EKP调用接口"
,
description
=
"下载
代发任务附件--EKP调用接口"
)
@SysLog
(
"
下载
代发任务附件--EKP调用接口"
)
@GetMapping
(
"/getIssueFileByFdId"
)
public
R
<
EkpBankAttaReturnVo
>
getIssueFileByFdId
(
@RequestParam
String
fdId
,
@RequestParam
String
type
)
{
return
icbcTransactionFlowIssueService
.
getIssueFileByFdId
(
fdId
,
type
);
}
/**
* @param fdId 主键ID
* @param type 类型 1:主表附件;2:明细表附件
* @Description: 发放
* @Author: hgw
* @Date: 2024-11-22 11:32:21
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta>
**/
@Operation
(
summary
=
"发放银企付款--EKP调用接口"
,
description
=
"发放银企付款--EKP调用接口"
)
@SysLog
(
"发放银企付款--EKP调用接口"
)
@GetMapping
(
"/submitBankTask"
)
public
R
<
String
>
submitBankTask
(
@RequestParam
String
fdId
,
@RequestParam
String
type
)
{
return
icbcTransactionFlowIssueService
.
submitBankTask
(
fdId
,
type
);
}
@Operation
(
description
=
"下载文件测试"
)
@PostMapping
(
"/exportAll"
)
@SysLog
(
"下载文件测试"
)
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/mapper/EkpBankGrantDetailMapper.java
View file @
f2546ac1
...
...
@@ -34,6 +34,8 @@ import java.util.List;
@Mapper
public
interface
EkpBankGrantDetailMapper
extends
BaseMapper
<
EkpBankGrantDetail
>
{
// 查询待发放条数
int
getCountByIdAndMain
(
@Param
(
"fdParentId"
)
String
fdParentId
);
// 查询主表下的全部数据
List
<
EkpBankExcelVo
>
getEkpBankExcelVoByIdAndMain
(
@Param
(
"fdParentId"
)
String
fdParentId
);
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/EkpBankGrantDetailService.java
View file @
f2546ac1
...
...
@@ -31,10 +31,16 @@ import java.util.List;
*/
public
interface
EkpBankGrantDetailService
extends
IService
<
EkpBankGrantDetail
>
{
// 查询待发条数
int
getCountByIdAndMain
(
String
fdParentId
);
// 查询下载的待发 明细数据
List
<
EkpBankExcelVo
>
getEkpBankExcelVoByIdAndMain
(
String
fdParentId
);
// 查询下载的待发 明细数据
List
<
EkpBankExcelVo
>
getEkpBankExcelVoByIdAndDetail
(
String
fdId
);
// 查询编码是否重复
String
getWxNoByWxNo
(
String
wxNo
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/IcbcTransactionFlowIssueService.java
View file @
f2546ac1
...
...
@@ -23,7 +23,8 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo>
* @Date: 2024-11-12
* @return: R
**/
R
submitIcbcTransactionFlow
();
R
<
String
>
submitIcbcTransactionFlow
(
String
totalAmt
,
String
totalCount
,
String
wxNo
,
String
url
,
String
mdCode
);
/**
* @Description: 代发任务批次明细查询
...
...
@@ -44,15 +45,25 @@ public interface IcbcTransactionFlowIssueService extends IService<EkpSocialInfo>
R
querybankinfo
();
/**
* @param fdId
* @param fdId
主键ID
* @param type 类型 1:主表附件;2:明细表附件
* @Description:
* @Description:
下载银企付款
* @Author: hgw
* @Date: 2024/11/18 10:18
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.ekp.entity.EkpBankAtta>
**/
R
<
EkpBankAttaReturnVo
>
getIssueFileByFdId
(
String
fdId
,
String
type
);
/**
* @param fdId 主键ID
* @param type 类型 1:主表附件;2:明细表附件
* @Description: 发放银企付款
* @Author: hgw
* @Date: 2024/11/22 11:32
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
submitBankTask
(
String
fdId
,
String
type
);
void
exportAll
(
HttpServletResponse
response
);
}
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/EkpBankGrantDetailServiceImpl.java
View file @
f2546ac1
...
...
@@ -37,6 +37,11 @@ import java.util.List;
public
class
EkpBankGrantDetailServiceImpl
extends
ServiceImpl
<
EkpBankGrantDetailMapper
,
EkpBankGrantDetail
>
implements
EkpBankGrantDetailService
{
@Override
public
int
getCountByIdAndMain
(
String
fdParentId
)
{
return
baseMapper
.
getCountByIdAndMain
(
fdParentId
);
}
@Override
public
List
<
EkpBankExcelVo
>
getEkpBankExcelVoByIdAndMain
(
String
fdParentId
)
{
return
baseMapper
.
getEkpBankExcelVoByIdAndMain
(
fdParentId
);
...
...
yifu-ekp/yifu-ekp-biz/src/main/java/com/yifu/cloud/plus/v1/ekp/service/impl/IcbcTransactionFlowIssueServiceImpl.java
View file @
f2546ac1
...
...
@@ -22,10 +22,7 @@ import com.yifu.cloud.plus.v1.ekp.service.*;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpBankAttaReturnVo
;
import
com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -40,6 +37,7 @@ import java.io.File;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.net.URL
;
import
java.net.URLDecoder
;
...
...
@@ -89,7 +87,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
* @Date: 2024-11-12
* @return: R
**/
public
R
submitIcbcTransactionFlow
()
{
public
R
<
String
>
submitIcbcTransactionFlow
(
String
totalAmt
,
String
totalCount
,
String
wxNo
,
String
url
,
String
mdCode
)
{
//应用方加密串
UiIcbcClient
client
=
new
UiIcbcClient
(
icbcConfigProperties
.
getAppId
(),
IcbcConstants
.
SIGN_TYPE_RSA2
,
icbcConfigProperties
.
getAppPrivateKey
(),
IcbcConstants
.
CHARSET_UTF8
);
...
...
@@ -106,19 +105,23 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
//操作类型:1-受理 2-审核
bizContent
.
setOprType
(
"1"
);
//总金额 oprType 为2时,非必输,金额单位分
bizContent
.
setTotalAmt
(
"2"
);
//bizContent.setTotalAmt("2")
bizContent
.
setTotalAmt
(
totalAmt
);
//总笔数 oprType 为2时,非必输
bizContent
.
setTotalCount
(
"2"
);
//bizContent.setTotalCount("2");
bizContent
.
setTotalCount
(
totalCount
);
//批次号--每日批号不能重复,系统生成批次号
bizContent
.
setAppSerialno
(
"WX203"
);
//bizContent.setAppSerialno("WX203")
bizContent
.
setAppSerialno
(
wxNo
);
//文件校验方式 1:sha256校验、2:sm3校验;上送为空默认按照sha256校验
bizContent
.
setFileCheckSign
(
"1"
);
//客户本地文件路径 {企业编号}_{批次号}_{代发方式}_yyyyMMdd.xls 拼接起来总长不能超过36位
//{平台编号}_{企业编号}_{批次号}_{代发方式}_yyyyMMdd .zip 压缩文件中,包含代发工资指令文件信息,为xls格式,xls文件名称同zip包文件名称
bizContent
.
setLocalFilepath
(
"D:/icbcFile/
020101190_WX203_0_20241112.xls"
);
bizContent
.
setLocalFilepath
(
"D:/icbcFile/
"
+
url
);
//文件md码
// TODO-直接取值mdCode
bizContent
.
setFileMdcode
(
getMdCode
(
"D:/icbcFile/020101190_WX203_0_20241112.xls"
));
//bizContent.setFileMdcode(getMdCode("D:/icbcFile/020101190_WX203_0_20241112.xls"));
bizContent
.
setFileMdcode
(
mdCode
);
//文件类型:1-代发工资 2-报销
bizContent
.
setFileType
(
"1"
);
...
...
@@ -130,7 +133,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
try
{
String
result
=
client
.
buildPostForm
(
request
);
if
(
Common
.
isNotNull
(
result
))
{
return
R
.
ok
();
return
R
.
ok
(
result
);
}
}
catch
(
IcbcApiException
e
)
{
e
.
printStackTrace
();
...
...
@@ -621,4 +624,75 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
}
}
/**
* @param fdId 主键
* @param type 类型 1:主表;2明细表
* @Description: 发放银企付款
* @Author: hgw
* @Date: 2024/11/22 14:13
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
@Transactional
public
synchronized
R
<
String
>
submitBankTask
(
String
fdId
,
String
type
)
{
if
(
Common
.
isNotNull
(
fdId
)
&&
Common
.
isNotNull
(
type
))
{
// 1主表
if
(
CommonConstants
.
ONE_STRING
.
equals
(
type
))
{
EkpBankPayTask
main
=
ekpBankPayTaskService
.
getById
(
fdId
);
if
(
main
==
null
)
{
return
R
.
failed
(
"未找到表数据!"
);
}
if
(!
"待发放"
.
equals
(
main
.
getFdGrantStatus
()))
{
return
R
.
failed
(
"状态不是待发放!"
);
}
if
(
Common
.
isNotNull
(
main
.
getFdDownloadNum
())
&&
Common
.
isNotNull
(
main
.
getFdGrantNum
())
&&
main
.
getFdDownloadNum
()
>
main
.
getFdFailNum
())
{
if
(
Common
.
isEmpty
(
main
.
getFdMoney
()))
{
return
R
.
failed
(
"数据错误,无金额!"
);
}
int
count
=
ekpBankGrantDetailService
.
getCountByIdAndMain
(
fdId
);
String
totalAmt
=
String
.
valueOf
(
BigDecimalUtils
.
safeMultiply
(
main
.
getFdMoney
(),
new
BigDecimal
(
"100"
),
0
));
if
(!
"1"
.
equals
(
totalAmt
))
{
return
R
.
failed
(
"测试阶段,金额不是1分钱,请联系hgw解除禁止!"
);
}
String
totalCount
=
String
.
valueOf
(
count
);
String
wxNo
=
main
.
getFdWxNo
();
String
url
=
main
.
getFdAttaName
();
String
mdCode
=
main
.
getFdMdCode
();
return
submitIcbcTransactionFlow
(
totalAmt
,
totalCount
,
wxNo
,
url
,
mdCode
);
}
else
{
return
R
.
failed
(
"请检查状态!"
);
}
}
else
{
// 2明细表
EkpBankGrantDetail
detail
=
ekpBankGrantDetailService
.
getById
(
fdId
);
if
(
detail
==
null
)
{
return
R
.
failed
(
"未找到明细表数据!"
);
}
if
(!
"待发放"
.
equals
(
detail
.
getFdGrantStatus
()))
{
return
R
.
failed
(
"状态不是待发放!"
);
}
if
(
Common
.
isNotNull
(
detail
.
getFdDownloadNum
())
&&
Common
.
isNotNull
(
detail
.
getFdGrantNum
())
&&
detail
.
getFdDownloadNum
()
>
detail
.
getFdFailNum
())
{
if
(
Common
.
isEmpty
(
detail
.
getFdMoney
()))
{
return
R
.
failed
(
"数据错误,无金额!"
);
}
String
totalAmt
=
String
.
valueOf
(
BigDecimalUtils
.
safeMultiply
(
detail
.
getFdMoney
(),
new
BigDecimal
(
"100"
),
0
));
if
(!
"1"
.
equals
(
totalAmt
))
{
return
R
.
failed
(
"测试阶段,金额不是1分钱,请联系hgw解除禁止!"
);
}
String
totalCount
=
"1"
;
String
wxNo
=
detail
.
getFdWxNo
();
String
url
=
detail
.
getFdAttaName
();
String
mdCode
=
detail
.
getFdMdCode
();
return
submitIcbcTransactionFlow
(
totalAmt
,
totalCount
,
wxNo
,
url
,
mdCode
);
}
else
{
return
R
.
failed
(
"请检查状态!"
);
}
}
}
else
{
return
R
.
failed
(
"传参错误!"
);
}
}
}
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpBankGrantDetailMapper.xml
View file @
f2546ac1
...
...
@@ -69,7 +69,7 @@
a.fd_payee_name fdPayeeName,
concat('',round(a.fd_money * 100,0)) fdMoney,
a.fd_remittance_purpose fdRemittancePurpose,
ifnull(
m.fd_cover_remark,'
') fdCoverRemark,
ifnull(
a.fd_remark,'工资
') fdCoverRemark,
a.fd_emp_phone fdEmpPhone
from ekp_bank_grant_detail a
left join ekp_bank_pay_task m on a.fd_parent_id=m.fd_id
...
...
@@ -77,6 +77,14 @@
where a.fd_handle_status = '待发放'
</sql>
<!-- 查询待发放条数 -->
<select
id=
"getCountByIdAndMain"
resultType=
"java.lang.Integer"
>
select count(1)
from ekp_bank_grant_detail a
where a.fd_handle_status = '待发放'
and a.fd_parent_id = #{fdParentId}
</select>
<!-- 查询主表下的所有待发放数据 -->
<select
id=
"getEkpBankExcelVoByIdAndMain"
resultType=
"com.yifu.cloud.plus.v1.ekp.vo.EkpBankExcelVo"
>
<include
refid=
"Base_Excel_Sql"
/>
...
...
yifu-ekp/yifu-ekp-biz/src/main/resources/mapper/EkpBankPayTaskMapper.xml
View file @
f2546ac1
...
...
@@ -51,7 +51,6 @@
<result
property=
"fdFailNum"
column=
"fd_fail_num"
/>
<result
property=
"fdGrantNum"
column=
"fd_grant_num"
/>
<result
property=
"fdCoverRemark"
column=
"fd_cover_remark"
/>
<result
property=
"fdWxNo"
column=
"fd_wx_no"
/>
<result
property=
"fdMdCode"
column=
"fd_md_dcode"
/>
</resultMap>
...
...
@@ -82,7 +81,6 @@
a.fd_download_num,
a.fd_fail_num,
a.fd_grant_num,
a.fd_cover_remark,
a.fd_wx_no,
a.fd_md_dcode
</sql>
...
...
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