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
485b2ff8
Commit
485b2ff8
authored
Jan 03, 2025
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏监管新增等级设备趋势统计增加去年searchType为lastYear
parent
40911c25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
JGStatisticsMapper.java
...boot/module/statistics/api/mapper/JGStatisticsMapper.java
+2
-0
JGStatisticsMapper.xml
...tics-api/src/main/resources/mapper/JGStatisticsMapper.xml
+38
-0
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+17
-0
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/mapper/JGStatisticsMapper.java
View file @
485b2ff8
...
...
@@ -39,8 +39,10 @@ public interface JGStatisticsMapper {
List
<
Map
<
String
,
Object
>>
newVehicleEquCountByMonth
(
@Param
(
"cityCode"
)
String
cityCode
);
List
<
Map
<
String
,
Object
>>
newRegEquCountByYear
(
@Param
(
"cityCode"
)
String
cityCode
);
List
<
Map
<
String
,
Object
>>
newRegEquCountByLastYear
(
@Param
(
"cityCode"
)
String
cityCode
);
List
<
Map
<
String
,
Object
>>
newVehicleEquCountByYear
(
@Param
(
"cityCode"
)
String
cityCode
);
List
<
Map
<
String
,
Object
>>
newVehicleEquCountByLastYear
(
@Param
(
"cityCode"
)
String
cityCode
);
String
newVehicleCountByYear
(
@Param
(
"cityCode"
)
String
cityCode
);
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/JGStatisticsMapper.xml
View file @
485b2ff8
...
...
@@ -253,6 +253,25 @@
ur.rec_date
</select>
<select
id=
"newRegEquCountByLastYear"
resultType=
"java.util.Map"
>
SELECT COUNT
( 1 ) ,
DATE_FORMAT(ur.rec_date,'%Y-%m')
FROM
privilege_company pc
INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( pc.org_code, '%' )
INNER JOIN tzs_jg_use_registration ur ON ur.use_unit_credit_code = bi.use_unit_code
AND ur.status = '已完成'
INNER JOIN tzs_jg_use_registration_eq te ON te.equip_transfer_id = ur.sequence_nbr
WHERE
pc.company_code = #{cityCode}
AND ur.rec_date like concat('%',DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 YEAR), '%Y') ,'%')
GROUP BY
DATE_FORMAT(ur.rec_date,'%Y-%m')
ORDER BY
ur.rec_date
</select>
<select
id=
"newVehicleEquCountByYear"
resultType=
"java.util.Map"
>
SELECT COUNT
( 1 ) ,
...
...
@@ -272,6 +291,25 @@
ur.rec_date
</select>
<select
id=
"newVehicleEquCountByLastYear"
resultType=
"java.util.Map"
>
SELECT COUNT
( 1 ) ,
DATE_FORMAT(ur.rec_date,'%Y-%m')
FROM
privilege_company pc
INNER JOIN tz_base_enterprise_info bi ON bi.supervise_org_code LIKE CONCAT ( pc.org_code, '%' )
INNER JOIN tzs_jg_vehicle_information ur ON ur.use_unit_credit_code = bi.use_unit_code
AND ur.status = '已完成'
INNER JOIN tzs_jg_vehicle_information_eq te ON te.vehicle_id = ur.sequence_nbr
WHERE
pc.company_code = #{cityCode}
AND ur.rec_date like concat('%',DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 YEAR), '%Y') ,'%')
GROUP BY
DATE_FORMAT(ur.rec_date,'%Y-%m')
ORDER BY
ur.rec_date
</select>
<select
id=
"newVehicleCountByYear"
resultType=
"String"
>
SELECT COUNT
( 1 )
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
View file @
485b2ff8
...
...
@@ -1576,6 +1576,23 @@ public class JGDPStatisticsServiceImpl {
+
Integer
.
valueOf
(
vehicleCountMap
.
getOrDefault
(
LocalDate
.
now
().
minusMonths
(
i
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
)),
0
)
+
""
));
}
}
else
if
(
"lastYear"
.
equals
(
dpFilterParamDto
.
getSearchType
())){
List
<
Map
<
String
,
Object
>>
useCountList
=
jgStatisticsMapper
.
newRegEquCountByLastYear
(
dpFilterParamDto
.
getCityCode
());
List
<
Map
<
String
,
Object
>>
vehicleCountList
=
jgStatisticsMapper
.
newVehicleEquCountByLastYear
(
dpFilterParamDto
.
getCityCode
());
for
(
int
i
=
0
;
i
<
useCountList
.
size
();
i
++)
{
useCountMap
.
put
(
useCountList
.
get
(
i
).
getOrDefault
(
"date_format"
,
""
)
+
""
,
Integer
.
valueOf
(
useCountList
.
get
(
i
).
getOrDefault
(
"count"
,
0
)
+
""
));
}
for
(
int
i
=
0
;
i
<
vehicleCountList
.
size
();
i
++)
{
vehicleCountMap
.
put
(
vehicleCountList
.
get
(
i
).
getOrDefault
(
"date_format"
,
""
)
+
""
,
Integer
.
valueOf
(
vehicleCountList
.
get
(
i
).
getOrDefault
(
"count"
,
0
)
+
""
));
}
int
lastYear
=
LocalDate
.
now
().
getYear
()
-
1
;
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
);
for
(
int
i
=
12
;
i
>=
1
;
i
--){
String
time
=
LocalDate
.
of
(
lastYear
,
i
,
1
).
format
(
formatter
);
xDataList
.
add
(
time
);
newRegisterEq
.
add
(
Integer
.
valueOf
(
useCountMap
.
getOrDefault
(
time
,
0
)
+
""
)
+
Integer
.
valueOf
(
vehicleCountMap
.
getOrDefault
(
time
,
0
)
+
""
));
}
}
Collections
.
reverse
(
xDataList
);
Collections
.
reverse
(
newRegisterEq
);
...
...
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