Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
customer-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QG
customer-service
Commits
df2178f9
Commit
df2178f9
authored
Mar 05, 2022
by
吴琼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新数据
parent
6358abdd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
TransactionReceiptRecordRepo.java
...uantgroup/customer/repo/TransactionReceiptRecordRepo.java
+3
-4
TransactionReceiptRecordServiceImpl.java
...mer/service/impl/TransactionReceiptRecordServiceImpl.java
+21
-4
No files found.
src/main/java/cn/quantgroup/customer/repo/TransactionReceiptRecordRepo.java
View file @
df2178f9
...
...
@@ -36,9 +36,8 @@ public interface TransactionReceiptRecordRepo extends JpaRepository<TransactionR
@Query
(
value
=
"update transaction_receipt_record set import_status = ?1 where import_status = 0 and order_no =?2 "
,
nativeQuery
=
true
)
int
updateTransactionStatusByImportStatus
(
Integer
status
,
String
orderNo
);
@Modifying
@Transactional
@Query
(
value
=
"update transaction_receipt_record set sign_status =?1 ,export_status =?2 where order_no =?3 and import_status = 1 and export_status = 0 "
,
nativeQuery
=
true
)
int
updatePDFStatusByOrderNo
(
Integer
status
,
Integer
exportStatus
,
String
orderNo
);
@Query
(
value
=
"select * from transaction_receipt_record where order_no = ?1 and import_status = 1 "
,
nativeQuery
=
true
)
List
<
TransactionReceiptRecord
>
selectRecords
(
String
orderNo
);
}
src/main/java/cn/quantgroup/customer/service/impl/TransactionReceiptRecordServiceImpl.java
View file @
df2178f9
...
...
@@ -116,6 +116,8 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
if
(
StringUtils
.
isNotEmpty
(
query
.
getExportStatus
()))
{
predicates
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"exportStatus"
),
query
.
getExportStatus
()));
}
else
{
predicates
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"exportStatus"
),
1
));
}
// 设置查询条件
criteriaQuery
.
where
(
criteriaBuilder
.
and
(
predicates
.
toArray
(
new
Predicate
[
predicates
.
size
()])));
...
...
@@ -375,6 +377,9 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
log
.
info
(
"uploadFile | 断开ftp"
);
log
.
info
(
"[TransactionReceiptRecordServiceImpl.kdspOperationUrl 调用kdsp-op 接口end]"
,
System
.
currentTimeMillis
());
//调用签章接口
if
(
filePathList
.
isEmpty
()){
throw
new
RuntimeException
(
"没有可以签章的数据"
);
}
log
.
info
(
"contractUrl /contract/batch/sign 调用签章接口"
);
String
url
=
contractUrl
+
"/contract/batch/sign"
;
Map
<
String
,
String
>
header
=
Maps
.
newHashMap
();
...
...
@@ -606,15 +611,27 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
//pdf签章成功
if
(!
successList
.
isEmpty
()){
for
(
String
orderNo
:
successList
){
int
i
=
transactionReceiptRecordRepo
.
updatePDFStatusByOrderNo
(
1
,
1
,
orderNo
);
System
.
out
.
println
(
i
);
if
(
StringUtils
.
isNotBlank
(
orderNo
)){
List
<
TransactionReceiptRecord
>
list
=
transactionReceiptRecordRepo
.
selectRecords
(
orderNo
);
if
(!
list
.
isEmpty
()){
list
.
get
(
0
).
setExportStatus
(
1
);
list
.
get
(
0
).
setSignStatus
(
1
);
transactionReceiptRecordRepo
.
save
(
list
.
get
(
0
));
}
}
}
}
//pdf签章失败
if
(!
failList
.
isEmpty
()){
for
(
String
orderNo
:
failList
){
int
i
=
transactionReceiptRecordRepo
.
updatePDFStatusByOrderNo
(
2
,
2
,
orderNo
);
//System.out.println(i);
if
(
StringUtils
.
isNotBlank
(
orderNo
))
{
List
<
TransactionReceiptRecord
>
list
=
transactionReceiptRecordRepo
.
selectRecords
(
orderNo
);
if
(!
list
.
isEmpty
()){
list
.
get
(
0
).
setExportStatus
(
2
);
list
.
get
(
0
).
setSignStatus
(
2
);
transactionReceiptRecordRepo
.
save
(
list
.
get
(
0
));
}
}
}
}
}
...
...
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