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
786e8a7e
Commit
786e8a7e
authored
Aug 14, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
气瓶大屏统计增加
1.充装量、卸液量总数 2.区域气站对接率排名
parent
27afc1e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
1 deletion
+81
-1
CylinderStatisticsMapper.java
...odule/statistics/api/mapper/CylinderStatisticsMapper.java
+6
-0
CylinderStatisticsMapper.xml
...pi/src/main/resources/mapper/CylinderStatisticsMapper.xml
+30
-0
CylinderDPStatisticsController.java
...tistcs/biz/controller/CylinderDPStatisticsController.java
+7
-0
CylinderDPStatisticsServiceImpl.java
...tcs/biz/service/impl/CylinderDPStatisticsServiceImpl.java
+38
-1
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/CylinderStatisticsMapper.java
View file @
786e8a7e
...
...
@@ -27,4 +27,10 @@ public interface CylinderStatisticsMapper {
* @return 办证数量
*/
Long
countForCylinderCertNum
(
String
orgCode
);
Long
countFillingVolumeCount
(
@Param
(
"orgCode"
)
String
orgCode
);
Long
countDischargeVolumeCount
(
@Param
(
"orgCode"
)
String
orgCode
);
Long
countEnterpriseUsed
(
@Param
(
"orgCode"
)
String
orgCode
);
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/CylinderStatisticsMapper.xml
View file @
786e8a7e
...
...
@@ -44,4 +44,34 @@
and a.equ_category_code = '2300'
and c.org_code like concat(#{orgCode},'%')
</select>
<select
id=
"countFillingVolumeCount"
resultType=
"java.lang.Long"
>
SELECT SUM
( T.filling_quantity )
FROM
tz_cylinder_filling_record T
INNER JOIN tz_base_enterprise_info E ON T.app_id = E.app_id
WHERE
E.supervise_org_code LIKE concat ( #{orgCode}, '%' )
</select>
<select
id=
"countDischargeVolumeCount"
resultType=
"java.lang.Long"
>
SELECT SUM
( T.offloading_volume )
FROM
tz_cylinder_offloading T
INNER JOIN tz_base_enterprise_info E ON T.app_id = E.app_id
WHERE
E.supervise_org_code LIKE concat ( #{orgCode}, '%' )
</select>
<select
id=
"countEnterpriseUsed"
resultType=
"java.lang.Long"
>
SELECT COUNT
( DISTINCT ( E.app_id ) )
FROM
tz_cylinder_filling_record
T INNER JOIN tz_base_enterprise_info E ON T.app_id = E.app_id
WHERE
E.supervise_org_code LIKE concat ( #{orgCode}, '%' )
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/CylinderDPStatisticsController.java
View file @
786e8a7e
...
...
@@ -100,4 +100,11 @@ public class CylinderDPStatisticsController extends BaseController {
return
ResponseHelper
.
buildResponse
(
dpStatisticsService
.
cylinderIssueMonthList
(
regionCode
.
toString
()));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"区域气站对接率排名"
)
@PostMapping
(
value
=
"/stationRate"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
stationRate
(
@RequestBody
DPFilterParamDto
dpFilterParamDto
)
{
return
ResponseHelper
.
buildResponse
(
dpStatisticsService
.
stationRate
(
dpFilterParamDto
));
}
}
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/CylinderDPStatisticsServiceImpl.java
View file @
786e8a7e
...
...
@@ -281,8 +281,14 @@ public class CylinderDPStatisticsServiceImpl {
result
.
put
(
"jylqsbCount"
,
this
.
countForCylinderTemporaryInspect
(
orgCode
));
// 检验超期气瓶数
result
.
put
(
"jycqsbCount"
,
this
.
countForCylinderOverdueInspect
(
orgCode
));
// 充气量
Long
fillingVolumeCount
=
cylinderStatisticsMapper
.
countFillingVolumeCount
(
orgCode
);
result
.
put
(
"fillingVolumeCount"
,
fillingVolumeCount
==
null
?
0L
:
fillingVolumeCount
);
// 卸液量
Long
dischargeVolumeCount
=
cylinderStatisticsMapper
.
countDischargeVolumeCount
(
orgCode
);
result
.
put
(
"dischargeVolumeCount"
,
dischargeVolumeCount
==
null
?
0L
:
dischargeVolumeCount
);
}
else
{
this
.
setDefaultValueIfNoData
(
result
,
"cylindersCount"
,
"stationCount"
,
"operatorCount"
,
"liquefiedGasCount"
,
"automotiveGasCount"
,
"industrialGasCount"
,
"useRegistrationQuantityCount"
,
"jylqsbCount"
,
"jycqsbCount"
);
this
.
setDefaultValueIfNoData
(
result
,
"cylindersCount"
,
"stationCount"
,
"operatorCount"
,
"liquefiedGasCount"
,
"automotiveGasCount"
,
"industrialGasCount"
,
"useRegistrationQuantityCount"
,
"jylqsbCount"
,
"jycqsbCount"
,
"fillingVolumeCount"
,
"dischargeVolumeCount"
);
}
return
result
;
}
...
...
@@ -405,4 +411,34 @@ public class CylinderDPStatisticsServiceImpl {
String
time
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
));
return
statisticsMapper
.
cylinderIssueMonthList
(
orgCode
,
time
);
}
public
List
<
Map
<
String
,
Object
>>
stationRate
(
DPFilterParamDto
dpFilterParamDto
)
{
List
<
RegionModel
>
regionList
=
stCommonService
.
setRegionIfRootParent
(
dpFilterParamDto
.
getCityCode
());
List
<
Map
<
String
,
Object
>>
returnList
=
regionList
.
parallelStream
().
map
(
r
->
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
r
.
getRegionCode
().
toString
());
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
item
.
put
(
"regionCode"
,
r
.
getRegionCode
());
item
.
put
(
"regionName"
,
r
.
getRegionName
());
getStationRate
(
orgCode
,
item
);
return
item
;
}).
collect
(
Collectors
.
toList
());
Collections
.
sort
(
returnList
,
(
o1
,
o2
)
->
((
Double
)
o2
.
get
(
"stationRate"
)).
compareTo
((
Double
)
o1
.
get
(
"stationRate"
)));
return
returnList
;
}
private
Map
<
String
,
Object
>
getStationRate
(
String
orgCode
,
Map
<
String
,
Object
>
result
){
// 气站总数
Long
totalNum
=
cylinderStatisticsMapper
.
countEnterpriseNumForCylinder
(
orgCode
);
// 已对接总数
Long
count
=
cylinderStatisticsMapper
.
countEnterpriseUsed
(
orgCode
);
if
(
totalNum
!=
null
&&
count
!=
null
){
result
.
put
(
"stationRate"
,
count
.
doubleValue
()/
totalNum
.
doubleValue
());
}
else
{
result
.
put
(
"stationRate"
,
0.0
);
}
result
.
put
(
"totalNum"
,
totalNum
);
result
.
put
(
"count"
,
count
);
return
result
;
}
}
\ No newline at end of file
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