Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
windows
Project
Project
Details
Activity
Releases
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
zhanhai
windows
Commits
3d57f045
Commit
3d57f045
authored
Nov 23, 2023
by
LSL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结清默认结清账单
parent
15e02931
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
+31
-4
BackedBurdenJob.java
src/main/java/com/jqtx/windows/job/BackedBurdenJob.java
+17
-2
RedeemJob.java
src/main/java/com/jqtx/windows/job/RedeemJob.java
+14
-2
No files found.
src/main/java/com/jqtx/windows/job/BackedBurdenJob.java
View file @
3d57f045
...
@@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -65,8 +66,7 @@ public class BackedBurdenJob {
...
@@ -65,8 +66,7 @@ public class BackedBurdenJob {
sftp
.
cd
(
"/download/assurance/"
+
date
);
sftp
.
cd
(
"/download/assurance/"
+
date
);
sftp
.
get
(
"assurance_"
+
date
+
".txt"
,
"/assurance_sftp.txt"
);
sftp
.
get
(
"assurance_"
+
date
+
".txt"
,
"/assurance_sftp.txt"
);
ossUtils
.
ossUpload
(
"ZN/assurance/"
+
"assurance_"
+
date
+
".txt"
,
FileUtil
.
file
(
"/assurance_sftp.txt"
));
ossUtils
.
ossUpload
(
"ZN/assurance/"
+
"assurance_"
+
date
+
".txt"
,
FileUtil
.
file
(
"/assurance_sftp.txt"
));
FileUtil
.
del
(
"/assurance_sftp.txt"
);
String
stringObject
=
getStringObject
(
"ZN/assurance/"
+
"assurance_"
+
date
+
".txt"
);
String
stringObject
=
ossUtils
.
getStringObject
(
"ZN/assurance/"
+
"assurance_"
+
date
+
".txt"
);
log
.
info
(
"oss融担数据:{}"
,
stringObject
);
log
.
info
(
"oss融担数据:{}"
,
stringObject
);
//存储并去平账
//存储并去平账
List
<
BurdenModel
>
getlist
=
getlist
(
stringObject
);
List
<
BurdenModel
>
getlist
=
getlist
(
stringObject
);
...
@@ -74,12 +74,23 @@ public class BackedBurdenJob {
...
@@ -74,12 +74,23 @@ public class BackedBurdenJob {
backedBurdenComponent
.
insert
(
model
);
backedBurdenComponent
.
insert
(
model
);
backedBurden
(
model
);
backedBurden
(
model
);
}
}
FileUtil
.
del
(
"/assurance_sftp.txt"
);
}
else
{
}
else
{
log
.
info
(
"浙农融担文件不存在:{}"
,
date
);
log
.
info
(
"浙农融担文件不存在:{}"
,
date
);
}
}
}
}
public
String
getStringObject
(
String
uri
)
{
byte
[]
bytes
=
new
byte
[
0
];
try
{
bytes
=
ossUtils
.
ossDownLoad
(
uri
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
new
String
(
bytes
);
}
/**
/**
* 组装还融担的全部model
* 组装还融担的全部model
...
@@ -221,4 +232,8 @@ public class BackedBurdenJob {
...
@@ -221,4 +232,8 @@ public class BackedBurdenJob {
loanComponent
.
updateByLoanNo
(
loanModel
);
loanComponent
.
updateByLoanNo
(
loanModel
);
}
}
public
static
void
main
(
String
[]
args
)
{
}
}
}
src/main/java/com/jqtx/windows/job/RedeemJob.java
View file @
3d57f045
...
@@ -16,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -16,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -45,16 +46,27 @@ public class RedeemJob {
...
@@ -45,16 +46,27 @@ public class RedeemJob {
sftp
.
cd
(
"/download/compensatory/"
+
date
);
sftp
.
cd
(
"/download/compensatory/"
+
date
);
sftp
.
get
(
"compensatory_"
+
date
+
".txt"
,
"/compensatory_sftp.txt"
);
sftp
.
get
(
"compensatory_"
+
date
+
".txt"
,
"/compensatory_sftp.txt"
);
ossUtils
.
ossUpload
(
"ZN/compensatory/"
+
"compensatory_"
+
date
+
".txt"
,
FileUtil
.
file
(
"/compensatory_sftp.txt"
));
ossUtils
.
ossUpload
(
"ZN/compensatory/"
+
"compensatory_"
+
date
+
".txt"
,
FileUtil
.
file
(
"/compensatory_sftp.txt"
));
FileUtil
.
del
(
"/compensatory_sftp.txt"
);
String
stringObject
=
getStringObject
(
"ZN/compensatory/"
+
"compensatory_"
+
date
+
".txt"
);
String
stringObject
=
ossUtils
.
getStringObject
(
"ZN/compensatory/"
+
"compensatory_"
+
date
+
".txt"
);
log
.
info
(
"oss代偿数据:{}"
,
stringObject
);
log
.
info
(
"oss代偿数据:{}"
,
stringObject
);
redeemComponent
.
insert
(
getlist
(
stringObject
));
redeemComponent
.
insert
(
getlist
(
stringObject
));
FileUtil
.
del
(
"/compensatory_sftp.txt"
);
}
else
{
}
else
{
log
.
info
(
"浙农代偿文件不存在:{}"
,
date
);
log
.
info
(
"浙农代偿文件不存在:{}"
,
date
);
}
}
}
}
public
String
getStringObject
(
String
uri
)
{
byte
[]
bytes
=
new
byte
[
0
];
try
{
bytes
=
ossUtils
.
ossDownLoad
(
uri
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
new
String
(
bytes
);
}
/**
/**
* 封装model
* 封装model
*
*
...
...
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