Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
65b54d3f
Commit
65b54d3f
authored
Nov 22, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
96333统计添加生成当月数据逻辑
parent
e8e2dde7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
26 deletions
+61
-26
StatisticsController.java
.../module/elevator/biz/controller/StatisticsController.java
+12
-12
AlertDispatchStatisticsServiceImpl.java
.../biz/service/impl/AlertDispatchStatisticsServiceImpl.java
+9
-2
AlertMaintenanceUnitStatisticsServiceImpl.java
...rvice/impl/AlertMaintenanceUnitStatisticsServiceImpl.java
+9
-2
AlertPlaceStatisticsServiceImpl.java
...tor/biz/service/impl/AlertPlaceStatisticsServiceImpl.java
+8
-2
AlertRescueStatisticsServiceImpl.java
...or/biz/service/impl/AlertRescueStatisticsServiceImpl.java
+7
-2
AlertStatisticsServiceImpl.java
...elevator/biz/service/impl/AlertStatisticsServiceImpl.java
+8
-3
AlertUseUnitStatisticsServiceImpl.java
...r/biz/service/impl/AlertUseUnitStatisticsServiceImpl.java
+8
-3
No files found.
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/StatisticsController.java
View file @
65b54d3f
...
@@ -55,8 +55,8 @@ public class StatisticsController extends BaseController {
...
@@ -55,8 +55,8 @@ public class StatisticsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/statisticalGeneration"
)
@GetMapping
(
value
=
"/statisticalGeneration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
public
ResponseModel
<
Object
>
statisticalGeneration
()
{
public
ResponseModel
<
Object
>
statisticalGeneration
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
alertStatisticsService
.
statisticalGeneration
();
alertStatisticsService
.
statisticalGeneration
(
type
);
return
ResponseHelper
.
buildResponse
(
"success"
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
...
@@ -106,8 +106,8 @@ public class StatisticsController extends BaseController {
...
@@ -106,8 +106,8 @@ public class StatisticsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/rescueStatisticalGeneration"
)
@GetMapping
(
value
=
"/rescueStatisticalGeneration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
public
ResponseModel
<
Object
>
rescueStatisticalGeneration
()
{
public
ResponseModel
<
Object
>
rescueStatisticalGeneration
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
alertRescueStatisticsService
.
statisticalGeneration
();
alertRescueStatisticsService
.
statisticalGeneration
(
type
);
return
ResponseHelper
.
buildResponse
(
"success"
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
...
@@ -156,8 +156,8 @@ public class StatisticsController extends BaseController {
...
@@ -156,8 +156,8 @@ public class StatisticsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/statisticalPlaceGeneration"
)
@GetMapping
(
value
=
"/statisticalPlaceGeneration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
public
ResponseModel
<
Object
>
statisticalPlaceGeneration
()
{
public
ResponseModel
<
Object
>
statisticalPlaceGeneration
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
alertPlaceStatisticsService
.
statisticalGeneration
();
alertPlaceStatisticsService
.
statisticalGeneration
(
type
);
return
ResponseHelper
.
buildResponse
(
"success"
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
...
@@ -205,8 +205,8 @@ public class StatisticsController extends BaseController {
...
@@ -205,8 +205,8 @@ public class StatisticsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/statisticalUseUnitGeneration"
)
@GetMapping
(
value
=
"/statisticalUseUnitGeneration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
public
ResponseModel
<
Object
>
statisticalUseUnitGeneration
()
{
public
ResponseModel
<
Object
>
statisticalUseUnitGeneration
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
alertUseUnitStatisticsService
.
statisticalGeneration
();
alertUseUnitStatisticsService
.
statisticalGeneration
(
type
);
return
ResponseHelper
.
buildResponse
(
"success"
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
...
@@ -254,8 +254,8 @@ public class StatisticsController extends BaseController {
...
@@ -254,8 +254,8 @@ public class StatisticsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/statisticalMaintenanceUnitGeneration"
)
@GetMapping
(
value
=
"/statisticalMaintenanceUnitGeneration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
public
ResponseModel
<
Object
>
statisticalMaintenanceUnitGeneration
()
{
public
ResponseModel
<
Object
>
statisticalMaintenanceUnitGeneration
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
alertMaintenanceUnitStatisticsService
.
statisticalGeneration
();
alertMaintenanceUnitStatisticsService
.
statisticalGeneration
(
type
);
return
ResponseHelper
.
buildResponse
(
"success"
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
...
@@ -302,8 +302,8 @@ public class StatisticsController extends BaseController {
...
@@ -302,8 +302,8 @@ public class StatisticsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/statisticalDispatchGeneration"
)
@GetMapping
(
value
=
"/statisticalDispatchGeneration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成统计数据"
,
notes
=
"生成统计数据"
)
public
ResponseModel
<
Object
>
statisticalDispatchGeneration
()
{
public
ResponseModel
<
Object
>
statisticalDispatchGeneration
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
alertDispatchStatisticsService
.
statisticalGeneration
();
alertDispatchStatisticsService
.
statisticalGeneration
(
type
);
return
ResponseHelper
.
buildResponse
(
"success"
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertDispatchStatisticsServiceImpl.java
View file @
65b54d3f
...
@@ -31,14 +31,21 @@ public class AlertDispatchStatisticsServiceImpl extends BaseService<AlertDispatc
...
@@ -31,14 +31,21 @@ public class AlertDispatchStatisticsServiceImpl extends BaseService<AlertDispatc
@Autowired
@Autowired
private
AlertStatisticsServiceImpl
alertStatisticsService
;
private
AlertStatisticsServiceImpl
alertStatisticsService
;
@Override
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@SchedulerLock
(
name
=
"AlertDispatchStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
@SchedulerLock
(
name
=
"AlertDispatchStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
public
void
statisticalGeneration
()
{
public
void
statisticalGenerationTask
()
{
statisticalGeneration
(
null
);
}
@Override
public
void
statisticalGeneration
(
String
type
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
new
Date
());
cal
.
setTime
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
type
))
{
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
}
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
Date
firstDayOfMonth
=
cal
.
getTime
();
Date
firstDayOfMonth
=
cal
.
getTime
();
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertMaintenanceUnitStatisticsServiceImpl.java
View file @
65b54d3f
...
@@ -33,16 +33,23 @@ public class AlertMaintenanceUnitStatisticsServiceImpl extends BaseService<Alert
...
@@ -33,16 +33,23 @@ public class AlertMaintenanceUnitStatisticsServiceImpl extends BaseService<Alert
@Autowired
@Autowired
private
AlertStatisticsServiceImpl
alertStatisticsService
;
private
AlertStatisticsServiceImpl
alertStatisticsService
;
@Override
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@SchedulerLock
(
name
=
"AlertMaintenanceUnitStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
@SchedulerLock
(
name
=
"AlertMaintenanceUnitStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
public
void
statisticalGeneration
()
{
public
void
statisticalGenerationTask
(){
statisticalGeneration
(
null
);
}
@Override
public
void
statisticalGeneration
(
String
type
)
{
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"0.00"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"0.00"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
ArrayList
<
AlertMaintenanceUnitStatistics
>
list
=
new
ArrayList
<>();
ArrayList
<
AlertMaintenanceUnitStatistics
>
list
=
new
ArrayList
<>();
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
new
Date
());
cal
.
setTime
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
type
)){
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
}
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
Date
firstDayOfMonth
=
cal
.
getTime
();
Date
firstDayOfMonth
=
cal
.
getTime
();
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertPlaceStatisticsServiceImpl.java
View file @
65b54d3f
...
@@ -27,15 +27,21 @@ import java.util.*;
...
@@ -27,15 +27,21 @@ import java.util.*;
public
class
AlertPlaceStatisticsServiceImpl
extends
BaseService
<
AlertPlaceStatisticsDto
,
AlertPlaceStatistics
,
AlertPlaceStatisticsMapper
>
implements
IAlertPlaceStatisticsService
{
public
class
AlertPlaceStatisticsServiceImpl
extends
BaseService
<
AlertPlaceStatisticsDto
,
AlertPlaceStatistics
,
AlertPlaceStatisticsMapper
>
implements
IAlertPlaceStatisticsService
{
@Override
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@SchedulerLock
(
name
=
"AlertPlaceStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
@SchedulerLock
(
name
=
"AlertPlaceStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
public
void
statisticalGeneration
()
{
public
void
statisticalGenerationTask
(){
statisticalGeneration
(
null
);
}
@Override
public
void
statisticalGeneration
(
String
type
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"0.00"
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"0.00"
);
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
new
Date
());
cal
.
setTime
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
type
)){
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
}
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
Date
firstDayOfMonth
=
cal
.
getTime
();
Date
firstDayOfMonth
=
cal
.
getTime
();
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertRescueStatisticsServiceImpl.java
View file @
65b54d3f
...
@@ -32,14 +32,19 @@ public class AlertRescueStatisticsServiceImpl extends BaseService<AlertRescueSta
...
@@ -32,14 +32,19 @@ public class AlertRescueStatisticsServiceImpl extends BaseService<AlertRescueSta
@Autowired
@Autowired
private
AlertStatisticsServiceImpl
alertStatisticsService
;
private
AlertStatisticsServiceImpl
alertStatisticsService
;
@Override
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@SchedulerLock
(
name
=
"AlertRescueStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
@SchedulerLock
(
name
=
"AlertRescueStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
public
void
statisticalGeneration
()
{
public
void
statisticalGenerationTask
(){
statisticalGeneration
(
null
);
}
@Override
public
void
statisticalGeneration
(
String
type
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
new
Date
());
cal
.
setTime
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
type
)){
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
}
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
Date
firstDayOfMonth
=
cal
.
getTime
();
Date
firstDayOfMonth
=
cal
.
getTime
();
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertStatisticsServiceImpl.java
View file @
65b54d3f
...
@@ -31,15 +31,20 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
...
@@ -31,15 +31,20 @@ public class AlertStatisticsServiceImpl extends BaseService<AlertStatisticsDto,
@Autowired
@Autowired
RedisUtils
redisUtils
;
RedisUtils
redisUtils
;
@Override
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@SchedulerLock
(
name
=
"AlertStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
@SchedulerLock
(
name
=
"AlertStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
public
void
statisticalGeneration
()
{
public
void
statisticalGenerationTask
(){
statisticalGeneration
(
null
);
}
@Override
public
void
statisticalGeneration
(
String
type
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
new
Date
());
cal
.
setTime
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
type
)){
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
}
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
Date
firstDayOfMonth
=
cal
.
getTime
();
Date
firstDayOfMonth
=
cal
.
getTime
();
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/AlertUseUnitStatisticsServiceImpl.java
View file @
65b54d3f
...
@@ -27,15 +27,20 @@ import java.util.*;
...
@@ -27,15 +27,20 @@ import java.util.*;
@Service
@Service
public
class
AlertUseUnitStatisticsServiceImpl
extends
BaseService
<
AlertUseUnitStatisticsDto
,
AlertUseUnitStatistics
,
AlertUseUnitStatisticsMapper
>
implements
IAlertUseUnitStatisticsService
{
public
class
AlertUseUnitStatisticsServiceImpl
extends
BaseService
<
AlertUseUnitStatisticsDto
,
AlertUseUnitStatistics
,
AlertUseUnitStatisticsMapper
>
implements
IAlertUseUnitStatisticsService
{
@Override
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
@SchedulerLock
(
name
=
"AlertUseUnitStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
@SchedulerLock
(
name
=
"AlertUseUnitStatisticsServiceImpl"
,
lockAtMostFor
=
"PT10M"
,
lockAtLeastFor
=
"PT10M"
)
public
void
statisticalGeneration
()
{
public
void
statisticalGenerationTask
(){
statisticalGeneration
(
null
);
}
@Override
public
void
statisticalGeneration
(
String
type
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
cal
=
Calendar
.
getInstance
();
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
new
Date
());
cal
.
setTime
(
new
Date
());
if
(
ObjectUtils
.
isEmpty
(
type
)){
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
cal
.
add
(
Calendar
.
MONTH
,
-
1
);
}
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
Date
firstDayOfMonth
=
cal
.
getTime
();
Date
firstDayOfMonth
=
cal
.
getTime
();
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
));
...
...
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