Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-cloud
Overview
Overview
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
data-hook
gic-cloud
Commits
2f2163d9
Commit
2f2163d9
authored
Nov 01, 2022
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:下载显示周期延长到48小时
parent
4aa8a588
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
6 deletions
+79
-6
.flattened-pom.xml
gic-cloud-data-hook-api/.flattened-pom.xml
+4
-4
DownloadTaskServiceImpl.java
...cloud/data/hook/service/impl/DownloadTaskServiceImpl.java
+1
-1
FlatQueryResultServiceImpl.java
...ud/data/hook/service/impl/FlatQueryResultServiceImpl.java
+1
-0
FreeQueryServiceImpl.java
...ic/cloud/data/hook/service/impl/FreeQueryServiceImpl.java
+1
-0
DownloadTaskDao.xml
...ook-service/src/main/resources/mapper/DownloadTaskDao.xml
+2
-1
ExceTest2.java
gic-cloud-data-hook-service/src/test/java/ExceTest2.java
+18
-0
ExcelTest.java
gic-cloud-data-hook-service/src/test/java/ExcelTest.java
+52
-0
No files found.
gic-cloud-data-hook-api/.flattened-pom.xml
View file @
2f2163d9
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.gic
</groupId>
<groupId>
com.gic
</groupId>
<artifactId>
gic-cloud-data-hook-api
</artifactId>
<artifactId>
gic-cloud-data-hook-api
</artifactId>
<version>
3.0-SNAPSHOT
</version>
<version>
2.40
</version>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.gic
</groupId>
<groupId>
com.gic
</groupId>
<artifactId>
gic-cloud-web-service-api
</artifactId>
<artifactId>
gic-cloud-web-service-api
</artifactId>
<version>
3.
0-SNAPSHOT
</version>
<version>
3.
80
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
<exclusions>
<exclusions>
<exclusion>
<exclusion>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<dependency>
<dependency>
<groupId>
com.gic
</groupId>
<groupId>
com.gic
</groupId>
<artifactId>
gic-cloud-commons
</artifactId>
<artifactId>
gic-cloud-commons
</artifactId>
<version>
3.
0-SNAPSHOT
</version>
<version>
3.
64
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
<exclusions>
<exclusions>
<exclusion>
<exclusion>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<dependency>
<dependency>
<groupId>
com.gic
</groupId>
<groupId>
com.gic
</groupId>
<artifactId>
gic-platform-config
</artifactId>
<artifactId>
gic-platform-config
</artifactId>
<version>
3.0-SNAPSHOT
</version>
<version>
2.26
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/DownloadTaskServiceImpl.java
View file @
2f2163d9
...
@@ -160,7 +160,7 @@ public class DownloadTaskServiceImpl implements IDownloadTaskService {
...
@@ -160,7 +160,7 @@ public class DownloadTaskServiceImpl implements IDownloadTaskService {
public
void
run
()
{
public
void
run
()
{
Calendar
calc
=
Calendar
.
getInstance
();
Calendar
calc
=
Calendar
.
getInstance
();
//calc.add(Calendar.DATE, -1);
//calc.add(Calendar.DATE, -1);
calc
.
add
(
Calendar
.
HOUR
,
-
12
);
// 从一天改为 12 小时
calc
.
add
(
Calendar
.
HOUR
,
-
48
);
// 从一天改为 12 小时
Date
expireDate
=
calc
.
getTime
();
Date
expireDate
=
calc
.
getTime
();
List
<
DownloadTask
>
expiredTasks
=
downloadTaskDao
.
getExpiredDownloadTaskList
(
expireDate
);
List
<
DownloadTask
>
expiredTasks
=
downloadTaskDao
.
getExpiredDownloadTaskList
(
expireDate
);
if
(
expiredTasks
.
size
()
>
0
)
{
if
(
expiredTasks
.
size
()
>
0
)
{
...
...
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FlatQueryResultServiceImpl.java
View file @
2f2163d9
...
@@ -1097,6 +1097,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -1097,6 +1097,7 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
}
else
if
(
applyStatusText
.
indexOf
(
"\"checkStatus\":1"
)
>
0
)
{
// 如果审核超时
}
else
if
(
applyStatusText
.
indexOf
(
"\"checkStatus\":1"
)
>
0
)
{
// 如果审核超时
task
.
setApplyStatus
(
DownloadApplyStatus
.
TIMEOUT
);
task
.
setApplyStatus
(
DownloadApplyStatus
.
TIMEOUT
);
task
.
setApplyPermitted
(
Global
.
NO
);
task
.
setApplyPermitted
(
Global
.
NO
);
task
.
setOverTime
(
new
Date
());
conditionRemove
=
true
;
conditionRemove
=
true
;
}
}
if
(
conditionRemove
||
conditionUpdate
)
{
if
(
conditionRemove
||
conditionUpdate
)
{
...
...
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FreeQueryServiceImpl.java
View file @
2f2163d9
...
@@ -750,6 +750,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
...
@@ -750,6 +750,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
conditionUpdate
=
true
;
conditionUpdate
=
true
;
}
else
if
(
applyStatusText
.
indexOf
(
"\"checkStatus\":1"
)
>
0
)
{
// 如果审核超时
}
else
if
(
applyStatusText
.
indexOf
(
"\"checkStatus\":1"
)
>
0
)
{
// 如果审核超时
task
.
setApplyStatus
(
DownloadApplyStatus
.
TIMEOUT
);
task
.
setApplyStatus
(
DownloadApplyStatus
.
TIMEOUT
);
task
.
setOverTime
(
new
Date
());
task
.
setApplyPermitted
(
Global
.
NO
);
task
.
setApplyPermitted
(
Global
.
NO
);
conditionRemove
=
true
;
conditionRemove
=
true
;
}
}
...
...
gic-cloud-data-hook-service/src/main/resources/mapper/DownloadTaskDao.xml
View file @
2f2163d9
...
@@ -198,7 +198,8 @@
...
@@ -198,7 +198,8 @@
<update
id=
"updateTaskStatusError"
>
<update
id=
"updateTaskStatusError"
>
UPDATE
<include
refid=
"updateTable"
/>
SET
UPDATE
<include
refid=
"updateTable"
/>
SET
status = 'error'
status = 'error',
over_time=now()
WHERE
WHERE
id in
id in
<foreach
collection=
"idList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"idList"
item=
"item"
open=
"("
close=
")"
separator=
","
>
...
...
gic-cloud-data-hook-service/src/test/java/ExceTest2.java
0 → 100644
View file @
2f2163d9
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
java.io.FileOutputStream
;
import
java.util.Date
;
public
class
ExceTest2
{
public
static
void
main
(
String
[]
args
)
{
int
n
=
25
;
int
c
=
100
;
Double
aDouble
=
Double
.
valueOf
((
double
)
n
/
c
);
System
.
out
.
println
(
aDouble
);
}
}
gic-cloud-data-hook-service/src/test/java/ExcelTest.java
0 → 100644
View file @
2f2163d9
import
org.apache.poi.hssf.usermodel.HSSFCellStyle
;
import
org.apache.poi.hssf.usermodel.HSSFDataFormat
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
java.io.FileOutputStream
;
import
java.util.Date
;
public
class
ExcelTest
{
public
static
void
main
(
String
[]
args
)
{
try
{
// String originalFilePath = SAVE_FOLDER + "/" + condition.getTaskId() + ".xlsx";
SXSSFWorkbook
wb
=
new
SXSSFWorkbook
(
100
);
// 内存中保留 100 行
Sheet
sheet
=
wb
.
createSheet
();
CellStyle
cellStyle
=
wb
.
createCellStyle
();
DataFormat
format
=
wb
.
createDataFormat
();
cellStyle
.
setDataFormat
(
format
.
getFormat
(
"yyyy-MM-dd HH:mm:ss"
));
// CellStyle cellStyle = wb.createCellStyle();
// DataFormat format = wb.createDataFormat();
// cellStyle.setDataFormat(format.getFormat("yyyy-MM-dd HH:mm:ss"));
int
n
=
0
;
do
{
Row
row
=
sheet
.
createRow
(
n
);
{
Cell
midCell
=
row
.
createCell
(
0
);
midCell
.
setCellStyle
(
cellStyle
);
midCell
.
setCellValue
(
new
Date
());
}
{
Cell
midCell
=
row
.
createCell
(
1
);
// midCell.setCellStyle(cellStyle);
midCell
.
setCellValue
(
Math
.
random
());
}
}
while
(
n
++<
10
);
FileOutputStream
fileOut
=
new
FileOutputStream
(
"d://test.xlsx"
);
wb
.
write
(
fileOut
);
//fileOut.flush(); // SXSSFWorkbook 使用 auto-flush 模式
fileOut
.
close
();
//wb.close();
wb
.
dispose
();
// SXSSFWorkbook 没有 close 方法
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
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