Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
541f326c
Commit
541f326c
authored
Dec 23, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工行代扣接口修改
parent
09c66ffa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
6 deletions
+26
-6
UploadStatusEnum.java
...join/amos/boot/module/hygf/api/Enum/UploadStatusEnum.java
+1
-1
SFTPUtil.java
.../com/yeejoin/amos/boot/module/hygf/api/util/SFTPUtil.java
+2
-0
IcbcWithholdServiceImpl.java
...module/hygf/biz/service/impl/IcbcWithholdServiceImpl.java
+23
-5
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/UploadStatusEnum.java
View file @
541f326c
...
...
@@ -23,7 +23,7 @@ public enum UploadStatusEnum {
public
static
UploadStatusEnum
getNodeByCode
(
String
code
)
{
UploadStatusEnum
anEnum
=
null
;
for
(
UploadStatusEnum
type
:
UploadStatusEnum
.
values
())
{
if
(
type
.
getCode
()
==
code
)
{
if
(
type
.
getCode
()
.
equals
(
code
)
)
{
anEnum
=
type
;
break
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/util/SFTPUtil.java
View file @
541f326c
...
...
@@ -922,12 +922,14 @@ public class SFTPUtil {
if
(!
fileName
.
equals
(
"."
)
&&
!
fileName
.
equals
(
".."
))
{
// 排除当前和上级目录条目
String
fileContentAsString
=
getFileContentAsString
(
remotePath
,
fileName
);
List
<
String
>
contents
=
Arrays
.
asList
(
fileContentAsString
.
split
(
"\r\n"
));
if
(
null
!=
contents
&&
contents
.
size
()
>
0
)
{
for
(
String
content
:
contents
)
{
ResultLinkField
resultLinkField
=
contentHandle
(
content
);
allJsonData
.
add
(
resultLinkField
);
}
}
}
}
}
catch
(
SftpException
e
)
{
logger
.
error
(
"Failed to list files in directory: {}. Error: {}"
,
remotePath
,
e
.
getMessage
(),
e
);
throw
e
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/IcbcWithholdServiceImpl.java
View file @
541f326c
...
...
@@ -424,18 +424,36 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
if
(
sftp
.
isExist
(
downLoadPath
))
{
//获取回盘文件扣款状态
List
<
ResultLinkField
>
files
=
sftp
.
getAllResultFilesContentAsJson
(
downLoadPath
);
for
(
ResultLinkField
resultLinkField
:
files
)
{
if
(
CollectionUtil
.
isNotEmpty
(
files
)){
Map
<
String
,
List
<
ResultLinkField
>>
collect
=
files
.
stream
().
collect
(
Collectors
.
groupingBy
(
ResultLinkField:
:
getBatchNo
));
for
(
String
batchNo
:
collect
.
keySet
())
{
LambdaQueryWrapper
<
IcbcWithhold
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
IcbcWithhold:
:
getBatchNo
,
batchNo
);
IcbcWithhold
model
=
this
.
getBaseMapper
().
selectOne
(
queryWrapper
);
List
<
IcbcWithholdRecord
>
icbcWithholdRecords
=
JSONArray
.
parseArray
(
model
.
getIcbcRecordInfos
(),
IcbcWithholdRecord
.
class
);
Boolean
isSuccess
=
true
;
List
<
ResultLinkField
>
resultLinkFields
=
collect
.
get
(
batchNo
);
//若失败 组装失败农户姓名及原因
String
err
=
""
;
for
(
ResultLinkField
resultLinkField
:
resultLinkFields
)
{
if
(!
resultLinkField
.
getErrMsg
().
contains
(
"成功"
)){
err
=
err
+
icbcWithholdRecords
.
get
(
Integer
.
valueOf
(
resultLinkField
.
getBillNo
())).
getCustName
()
+
":"
+
resultLinkField
.
getErrMsg
()
+
";"
;
isSuccess
=
false
;
}
}
LambdaUpdateWrapper
<
IcbcWithhold
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
if
(
resultLinkField
.
getStatus
().
equals
(
"1"
)
)
{
updateWrapper
.
set
(
IcbcWithhold:
:
getPaymentErrorDesc
,
resultLinkField
.
getErrMsg
()
);
if
(!
isSuccess
)
{
updateWrapper
.
set
(
IcbcWithhold:
:
getPaymentErrorDesc
,
err
);
updateWrapper
.
set
(
IcbcWithhold:
:
getWithholdStatus
,
UploadStatusEnum
.
失败
.
getName
());
}
else
{
updateWrapper
.
set
(
IcbcWithhold:
:
getWithholdStatus
,
UploadStatusEnum
.
成功
.
getName
());
}
updateWrapper
.
eq
(
IcbcWithhold:
:
getBatchNo
,
resultLinkField
.
getBatchNo
()
);
updateWrapper
.
eq
(
IcbcWithhold:
:
getBatchNo
,
batchNo
);
this
.
getBaseMapper
().
update
(
null
,
updateWrapper
);
}
}
}
}
...
...
@@ -547,7 +565,7 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
response
=
client
.
execute
(
request
,
System
.
currentTimeMillis
()
+
""
);
if
(
response
.
isSuccess
())
{
List
<
JftApiPayFeewithholdQuerydetailResponseV1
.
TradeInfo
>
tradeList
=
response
.
getTradeList
();
List
<
JftApiPayFeewithholdQuerydetailResponseV1
.
TradeInfo
>
filterList
=
tradeList
.
stream
().
filter
(
e
->
batchNos
.
contains
(
e
)).
collect
(
Collectors
.
toList
());
List
<
JftApiPayFeewithholdQuerydetailResponseV1
.
TradeInfo
>
filterList
=
tradeList
.
stream
().
filter
(
e
->
batchNos
.
contains
(
e
.
getBatchNo
()
)).
collect
(
Collectors
.
toList
());
filterList
.
forEach
(
e
->{
LambdaUpdateWrapper
<
IcbcWithholdRecord
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IcbcWithholdRecord:
:
getBatchNo
,
e
.
getBatchNo
());
...
...
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