Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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
耿迪迪
gassafety-progress
Commits
70b6ff1f
Commit
70b6ff1f
authored
Aug 23, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础信息统计
parent
348ddbea
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
119 additions
and
0 deletions
+119
-0
TGasStorageStationInfoController.java
...ller/gasBottleTrack/TGasStorageStationInfoController.java
+20
-0
BaseInfoStatistics.java
...ain/java/com/zehong/system/domain/BaseInfoStatistics.java
+55
-0
TGasStorageStationInfoMapper.java
...om/zehong/system/mapper/TGasStorageStationInfoMapper.java
+9
-0
ITGasStorageStationInfoService.java
...zehong/system/service/ITGasStorageStationInfoService.java
+9
-0
TGasStorageStationInfoServiceImpl.java
...ystem/service/impl/TGasStorageStationInfoServiceImpl.java
+11
-0
TGasStorageStationInfoMapper.xml
.../resources/mapper/system/TGasStorageStationInfoMapper.xml
+15
-0
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/gasBottleTrack/TGasStorageStationInfoController.java
View file @
70b6ff1f
...
...
@@ -6,6 +6,7 @@ import com.zehong.common.core.domain.AjaxResult;
import
com.zehong.common.core.page.TableDataInfo
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.system.domain.BaseInfoStatistics
;
import
com.zehong.system.domain.TGasStorageStationInfo
;
import
com.zehong.system.service.ITGasStorageStationInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -125,4 +126,23 @@ public class TGasStorageStationInfoController extends BaseController
ExcelUtil
<
TGasStorageStationInfo
>
util
=
new
ExcelUtil
<>(
TGasStorageStationInfo
.
class
);
return
util
.
importTemplateExcel
(
"储配站数据"
);
}
/**
* 基础信息统计
* @param stationId 储配站id
* @return
*/
@GetMapping
(
"/baseInfoStatistics"
)
public
TableDataInfo
baseInfoStatistics
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
Long
stationId
){
startPage
();
return
getDataTable
(
tGasStorageStationInfoService
.
baseInfoStatistics
(
stationId
));
}
@GetMapping
(
"/baseInfoStatisticsExport"
)
public
AjaxResult
baseInfoStatisticsExport
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
Long
stationId
)
{
List
<
BaseInfoStatistics
>
statistics
=
tGasStorageStationInfoService
.
baseInfoStatistics
(
stationId
);
ExcelUtil
<
BaseInfoStatistics
>
util
=
new
ExcelUtil
<>(
BaseInfoStatistics
.
class
);
return
util
.
exportExcel
(
statistics
,
"基础信息数据"
);
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/BaseInfoStatistics.java
0 → 100644
View file @
70b6ff1f
package
com
.
zehong
.
system
.
domain
;
import
com.zehong.common.annotation.Excel
;
public
class
BaseInfoStatistics
{
/**储配站*/
@Excel
(
name
=
"储配站"
)
private
String
stationName
;
/**气瓶数量*/
@Excel
(
name
=
"气瓶数量"
)
private
int
totalBottle
;
/**车辆数量*/
@Excel
(
name
=
"车辆数量"
)
private
int
totalVehicle
;
/**从业人员数量*/
@Excel
(
name
=
"从业人员数量"
)
private
int
totalPractitioner
;
public
String
getStationName
()
{
return
stationName
;
}
public
void
setStationName
(
String
stationName
)
{
this
.
stationName
=
stationName
;
}
public
int
getTotalBottle
()
{
return
totalBottle
;
}
public
void
setTotalBottle
(
int
totalBottle
)
{
this
.
totalBottle
=
totalBottle
;
}
public
int
getTotalVehicle
()
{
return
totalVehicle
;
}
public
void
setTotalVehicle
(
int
totalVehicle
)
{
this
.
totalVehicle
=
totalVehicle
;
}
public
int
getTotalPractitioner
()
{
return
totalPractitioner
;
}
public
void
setTotalPractitioner
(
int
totalPractitioner
)
{
this
.
totalPractitioner
=
totalPractitioner
;
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TGasStorageStationInfoMapper.java
View file @
70b6ff1f
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.BaseInfoStatistics
;
import
com.zehong.system.domain.TGasStorageStationInfo
;
/**
...
...
@@ -58,4 +60,11 @@ public interface TGasStorageStationInfoMapper
* @return 结果
*/
public
int
deleteTGasStorageStationInfoByIds
(
Long
[]
stationIds
);
/**
* 基础信息统计
* @param stationId 储配站id
* @return
*/
List
<
BaseInfoStatistics
>
baseInfoStatistics
(
Long
stationId
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITGasStorageStationInfoService.java
View file @
70b6ff1f
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.BaseInfoStatistics
;
import
com.zehong.system.domain.TGasStorageStationInfo
;
/**
...
...
@@ -67,4 +69,11 @@ public interface ITGasStorageStationInfoService
* @return 结果
*/
String
importTGasStorageStationInfo
(
List
<
TGasStorageStationInfo
>
tGasStorageStationInfoList
,
Boolean
isUpdateSupport
);
/**
* 基础信息统计
* @param stationId 储配站id
* @return
*/
List
<
BaseInfoStatistics
>
baseInfoStatistics
(
Long
stationId
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TGasStorageStationInfoServiceImpl.java
View file @
70b6ff1f
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
import
com.zehong.common.exception.CustomException
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.BaseInfoStatistics
;
import
com.zehong.system.domain.TGasStorageStationInfo
;
import
com.zehong.system.mapper.TGasStorageStationInfoMapper
;
import
com.zehong.system.service.ITGasStorageStationInfoService
;
...
...
@@ -159,4 +160,14 @@ public class TGasStorageStationInfoServiceImpl implements ITGasStorageStationInf
}
return
successMsg
.
toString
();
}
/**
* 基础信息统计
* @param stationId 储配站id
* @return
*/
@Override
public
List
<
BaseInfoStatistics
>
baseInfoStatistics
(
Long
stationId
){
return
tGasStorageStationInfoMapper
.
baseInfoStatistics
(
stationId
);
}
}
gassafetyprogress-system/src/main/resources/mapper/system/TGasStorageStationInfoMapper.xml
View file @
70b6ff1f
...
...
@@ -118,4 +118,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{stationId}
</foreach>
</delete>
<select
id=
"baseInfoStatistics"
parameterType=
"java.lang.String"
resultType=
"com.zehong.system.domain.BaseInfoStatistics"
>
SELECT
station.station_name as stationName,
(SELECT COUNT(1) FROM t_gas_bottle_info bottle WHERE bottle.station_id = station.station_id)as totalBottle,
(SELECT COUNT(1) FROM t_vehicle_info vehicle WHERE vehicle.station_id = station.station_id) AS totalVehicle,
(SELECT COUNT(1) FROM t_practitioner_info pr WHERE pr.station_id = station.station_id) AS totalPractitioner
FROM
t_gas_storage_station_info station
<where>
<if
test=
"stationId != null"
>
station.station_id = #{stationId}
</if>
</where>
</select>
</mapper>
\ 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