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
a5c7c0db
Commit
a5c7c0db
authored
Dec 04, 2023
by
LSL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浙农定时时间问题
parent
7c693b3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
BackedBurdenJob.java
src/main/java/com/jqtx/windows/job/BackedBurdenJob.java
+9
-5
RedeemJob.java
src/main/java/com/jqtx/windows/job/RedeemJob.java
+9
-1
No files found.
src/main/java/com/jqtx/windows/job/BackedBurdenJob.java
View file @
a5c7c0db
...
@@ -30,6 +30,7 @@ import java.math.BigDecimal;
...
@@ -30,6 +30,7 @@ import java.math.BigDecimal;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -63,9 +64,16 @@ public class BackedBurdenJob {
...
@@ -63,9 +64,16 @@ public class BackedBurdenJob {
public
void
run
()
{
public
void
run
()
{
String
param
=
XxlJobHelper
.
getJobParam
();
String
param
=
XxlJobHelper
.
getJobParam
();
Sftp
sftp
=
new
Sftp
(
sftpConfig
.
getSshHost
(),
sftpConfig
.
getSshPort
(),
sftpConfig
.
getSshUser
(),
sftpConfig
.
getSshPass
(),
CharsetUtil
.
CHARSET_UTF_8
);
Sftp
sftp
=
new
Sftp
(
sftpConfig
.
getSshHost
(),
sftpConfig
.
getSshPort
(),
sftpConfig
.
getSshUser
(),
sftpConfig
.
getSshPass
(),
CharsetUtil
.
CHARSET_UTF_8
);
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)
;
String
date
=
""
;
if
(
StringUtils
.
isNotEmpty
(
param
))
{
if
(
StringUtils
.
isNotEmpty
(
param
))
{
date
=
param
;
date
=
param
;
}
else
{
Calendar
cal
=
Calendar
.
getInstance
();
//获取前面的时间用-负号
cal
.
setTime
(
new
Date
());
cal
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
1
);
Date
time
=
cal
.
getTime
();
date
=
DateUtil
.
format
(
time
,
"yyyyMMdd"
);
}
}
if
(
sftp
.
isDir
(
"/download/assurance/"
+
date
))
{
if
(
sftp
.
isDir
(
"/download/assurance/"
+
date
))
{
sftp
.
cd
(
"/download/assurance/"
+
date
);
sftp
.
cd
(
"/download/assurance/"
+
date
);
...
@@ -234,8 +242,4 @@ public class BackedBurdenJob {
...
@@ -234,8 +242,4 @@ 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 @
a5c7c0db
...
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Component;
...
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Component;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -42,9 +43,16 @@ public class RedeemJob {
...
@@ -42,9 +43,16 @@ public class RedeemJob {
public
void
run
()
{
public
void
run
()
{
String
param
=
XxlJobHelper
.
getJobParam
();
String
param
=
XxlJobHelper
.
getJobParam
();
Sftp
sftp
=
new
Sftp
(
sftpConfig
.
getSshHost
(),
sftpConfig
.
getSshPort
(),
sftpConfig
.
getSshUser
(),
sftpConfig
.
getSshPass
(),
CharsetUtil
.
CHARSET_UTF_8
);
Sftp
sftp
=
new
Sftp
(
sftpConfig
.
getSshHost
(),
sftpConfig
.
getSshPort
(),
sftpConfig
.
getSshUser
(),
sftpConfig
.
getSshPass
(),
CharsetUtil
.
CHARSET_UTF_8
);
String
date
=
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)
;
String
date
=
""
;
if
(
StringUtils
.
isNotEmpty
(
param
))
{
if
(
StringUtils
.
isNotEmpty
(
param
))
{
date
=
param
;
date
=
param
;
}
else
{
Calendar
cal
=
Calendar
.
getInstance
();
//获取前面的时间用-负号
cal
.
setTime
(
new
Date
());
cal
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
1
);
Date
time
=
cal
.
getTime
();
date
=
DateUtil
.
format
(
time
,
"yyyyMMdd"
);
}
}
if
(
sftp
.
isDir
(
"/download/compensatory/"
+
date
))
{
if
(
sftp
.
isDir
(
"/download/compensatory/"
+
date
))
{
sftp
.
cd
(
"/download/compensatory/"
+
date
);
sftp
.
cd
(
"/download/compensatory/"
+
date
);
...
...
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