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
796609fc
Commit
796609fc
authored
Aug 29, 2023
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
充装统计
parent
c8b4a711
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
296 additions
and
5 deletions
+296
-5
TAirChargeRecordController.java
...controller/gasBottleTrack/TAirChargeRecordController.java
+39
-0
AirChargeOperatorStatistics.java
...com/zehong/system/domain/AirChargeOperatorStatistics.java
+22
-0
AirChargeStationStatistics.java
.../com/zehong/system/domain/AirChargeStationStatistics.java
+69
-0
AirChargeStatisticsVo.java
...va/com/zehong/system/domain/vo/AirChargeStatisticsVo.java
+57
-0
TAirChargeRecordMapper.java
...java/com/zehong/system/mapper/TAirChargeRecordMapper.java
+19
-1
ITAirChargeRecordService.java
...a/com/zehong/system/service/ITAirChargeRecordService.java
+18
-0
TAirChargeRecordServiceImpl.java
...hong/system/service/impl/TAirChargeRecordServiceImpl.java
+22
-4
TAirChargeRecordMapper.xml
...c/main/resources/mapper/system/TAirChargeRecordMapper.xml
+50
-0
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/gasBottleTrack/TAirChargeRecordController.java
View file @
796609fc
...
...
@@ -2,7 +2,10 @@ package com.zehong.web.controller.gasBottleTrack;
import
java.util.List
;
import
com.zehong.system.domain.AirChargeOperatorStatistics
;
import
com.zehong.system.domain.AirChargeStationStatistics
;
import
com.zehong.system.domain.TGasUserInfo
;
import
com.zehong.system.domain.vo.AirChargeStatisticsVo
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -127,4 +130,40 @@ public class TAirChargeRecordController extends BaseController
ExcelUtil
<
TAirChargeRecord
>
util
=
new
ExcelUtil
<>(
TAirChargeRecord
.
class
);
return
util
.
importTemplateExcel
(
"充装记录数据"
);
}
/**
* 储配站充装统计
* @param airChargeStatisticsVo 统计实体
* @return
*/
@GetMapping
(
"/airChargeStationStatistics"
)
public
TableDataInfo
airChargeStationStatistics
(
AirChargeStatisticsVo
airChargeStatisticsVo
){
startPage
();
return
getDataTable
(
tAirChargeRecordService
.
airChargeStationStatistics
(
airChargeStatisticsVo
));
}
@GetMapping
(
"/airChargeStationStatisticExport"
)
public
AjaxResult
airChargeStationStatisticExport
(
AirChargeStatisticsVo
airChargeStatisticsVo
){
List
<
AirChargeStationStatistics
>
list
=
tAirChargeRecordService
.
airChargeStationStatistics
(
airChargeStatisticsVo
);
ExcelUtil
<
AirChargeStationStatistics
>
util
=
new
ExcelUtil
<>(
AirChargeStationStatistics
.
class
);
return
util
.
exportExcel
(
list
,
"充装统计数据"
);
}
/**
* 充装人员统计
* @param airChargeStatisticsVo 统计
* @return
*/
@GetMapping
(
"/airChargeOperatorStatistics"
)
public
TableDataInfo
airChargeOperatorStatistics
(
AirChargeStatisticsVo
airChargeStatisticsVo
){
startPage
();
return
getDataTable
(
tAirChargeRecordService
.
airChargeOperatorStatistics
(
airChargeStatisticsVo
));
}
@GetMapping
(
"/airChargeOperatorStatisticsExport"
)
public
AjaxResult
airChargeOperatorStatisticsExport
(
AirChargeStatisticsVo
airChargeStatisticsVo
){
List
<
AirChargeOperatorStatistics
>
list
=
tAirChargeRecordService
.
airChargeOperatorStatistics
(
airChargeStatisticsVo
);
ExcelUtil
<
AirChargeOperatorStatistics
>
util
=
new
ExcelUtil
<>(
AirChargeOperatorStatistics
.
class
);
return
util
.
exportExcel
(
list
,
"充装统计数据"
);
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/AirChargeOperatorStatistics.java
0 → 100644
View file @
796609fc
package
com
.
zehong
.
system
.
domain
;
import
com.zehong.common.annotation.Excel
;
/**
* @author geng
* 充装人员统计
*/
public
class
AirChargeOperatorStatistics
extends
AirChargeStationStatistics
{
/**充装人*/
@Excel
(
name
=
"充装人"
)
private
String
operator
;
public
String
getOperator
()
{
return
operator
;
}
public
void
setOperator
(
String
operator
)
{
this
.
operator
=
operator
;
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/AirChargeStationStatistics.java
0 → 100644
View file @
796609fc
package
com
.
zehong
.
system
.
domain
;
import
com.zehong.common.annotation.Excel
;
/**
* @author geng
* 充装储配站统计
*/
public
class
AirChargeStationStatistics
{
private
Long
StationId
;
/**储配站*/
@Excel
(
name
=
"储配站"
)
private
String
stationName
;
/**充装气瓶数*/
@Excel
(
name
=
"充装气瓶数"
)
private
Integer
bottleNum
;
/**充装总量*/
@Excel
(
name
=
"充装总量"
)
private
Integer
chargeMeasure
;
/**充装统计类型*/
private
String
statisticsType
;
public
Long
getStationId
()
{
return
StationId
;
}
public
void
setStationId
(
Long
stationId
)
{
StationId
=
stationId
;
}
public
String
getStationName
()
{
return
stationName
;
}
public
void
setStationName
(
String
stationName
)
{
this
.
stationName
=
stationName
;
}
public
Integer
getBottleNum
()
{
return
bottleNum
;
}
public
void
setBottleNum
(
Integer
bottleNum
)
{
this
.
bottleNum
=
bottleNum
;
}
public
Integer
getChargeMeasure
()
{
return
chargeMeasure
;
}
public
void
setChargeMeasure
(
Integer
chargeMeasure
)
{
this
.
chargeMeasure
=
chargeMeasure
;
}
public
String
getStatisticsType
()
{
return
statisticsType
;
}
public
void
setStatisticsType
(
String
statisticsType
)
{
this
.
statisticsType
=
statisticsType
;
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/vo/AirChargeStatisticsVo.java
0 → 100644
View file @
796609fc
package
com
.
zehong
.
system
.
domain
.
vo
;
import
java.util.Date
;
public
class
AirChargeStatisticsVo
{
private
Long
StationId
;
/**充装人*/
private
String
operator
;
private
String
statisticsType
;
private
Date
operateBeginTime
;
private
Date
operateEndTime
;
public
Long
getStationId
()
{
return
StationId
;
}
public
void
setStationId
(
Long
stationId
)
{
StationId
=
stationId
;
}
public
String
getOperator
()
{
return
operator
;
}
public
void
setOperator
(
String
operator
)
{
this
.
operator
=
operator
;
}
public
String
getStatisticsType
()
{
return
statisticsType
;
}
public
void
setStatisticsType
(
String
statisticsType
)
{
this
.
statisticsType
=
statisticsType
;
}
public
Date
getOperateBeginTime
()
{
return
operateBeginTime
;
}
public
void
setOperateBeginTime
(
Date
operateBeginTime
)
{
this
.
operateBeginTime
=
operateBeginTime
;
}
public
Date
getOperateEndTime
()
{
return
operateEndTime
;
}
public
void
setOperateEndTime
(
Date
operateEndTime
)
{
this
.
operateEndTime
=
operateEndTime
;
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TAirChargeRecordMapper.java
View file @
796609fc
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.AirChargeOperatorStatistics
;
import
com.zehong.system.domain.AirChargeStationStatistics
;
import
com.zehong.system.domain.TAirChargeRecord
;
import
com.zehong.system.domain.vo.AirChargeStatisticsVo
;
import
java.util.List
;
/**
* 充装记录Mapper接口
...
...
@@ -58,4 +62,18 @@ public interface TAirChargeRecordMapper
* @return 结果
*/
public
int
deleteTAirChargeRecordByIds
(
Long
[]
chargeRecordIds
);
/**
* 储配站充装统计
* @param airChargeStatisticsVo 统计实体
* @return
*/
List
<
AirChargeStationStatistics
>
airChargeStationStatistics
(
AirChargeStatisticsVo
airChargeStatisticsVo
);
/**
* 充装人员统计
* @param airChargeStatisticsVo 统计
* @return
*/
List
<
AirChargeOperatorStatistics
>
airChargeOperatorStatistics
(
AirChargeStatisticsVo
airChargeStatisticsVo
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITAirChargeRecordService.java
View file @
796609fc
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.AirChargeOperatorStatistics
;
import
com.zehong.system.domain.AirChargeStationStatistics
;
import
com.zehong.system.domain.TAirChargeRecord
;
import
com.zehong.system.domain.vo.AirChargeStatisticsVo
;
/**
* 充装记录Service接口
...
...
@@ -66,4 +70,18 @@ public interface ITAirChargeRecordService
* @return
*/
String
importAirChargeRecordInfo
(
List
<
TAirChargeRecord
>
airChargeRecordList
,
boolean
isUpdateSupport
);
/**
* 储配站充装统计
* @param airChargeStatisticsVo 统计实体
* @return
*/
List
<
AirChargeStationStatistics
>
airChargeStationStatistics
(
AirChargeStatisticsVo
airChargeStatisticsVo
);
/**
* 充装人员统计
* @param airChargeStatisticsVo 统计
* @return
*/
List
<
AirChargeOperatorStatistics
>
airChargeOperatorStatistics
(
AirChargeStatisticsVo
airChargeStatisticsVo
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TAirChargeRecordServiceImpl.java
View file @
796609fc
...
...
@@ -3,10 +3,8 @@ 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.TAirChargeRecord
;
import
com.zehong.system.domain.TGasBottleInfo
;
import
com.zehong.system.domain.TGasStorageStationInfo
;
import
com.zehong.system.domain.TPractitionerInfo
;
import
com.zehong.system.domain.*
;
import
com.zehong.system.domain.vo.AirChargeStatisticsVo
;
import
com.zehong.system.mapper.TAirChargeRecordMapper
;
import
com.zehong.system.mapper.TGasBottleInfoMapper
;
import
com.zehong.system.mapper.TGasStorageStationInfoMapper
;
...
...
@@ -191,4 +189,24 @@ public class TAirChargeRecordServiceImpl implements ITAirChargeRecordService
}
return
successMsg
.
toString
();
}
/**
* 储配站充装统计
* @param airChargeStatisticsVo 统计实体
* @return
*/
@Override
public
List
<
AirChargeStationStatistics
>
airChargeStationStatistics
(
AirChargeStatisticsVo
airChargeStatisticsVo
){
return
tAirChargeRecordMapper
.
airChargeStationStatistics
(
airChargeStatisticsVo
);
}
/**
* 充装人员统计
* @param airChargeStatisticsVo 统计
* @return
*/
@Override
public
List
<
AirChargeOperatorStatistics
>
airChargeOperatorStatistics
(
AirChargeStatisticsVo
airChargeStatisticsVo
){
return
tAirChargeRecordMapper
.
airChargeOperatorStatistics
(
airChargeStatisticsVo
);
}
}
gassafetyprogress-system/src/main/resources/mapper/system/TAirChargeRecordMapper.xml
View file @
796609fc
...
...
@@ -117,4 +117,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{chargeRecordId}
</foreach>
</delete>
<select
id=
"airChargeStationStatistics"
parameterType=
"com.zehong.system.domain.vo.AirChargeStatisticsVo"
resultType=
"com.zehong.system.domain.AirChargeStationStatistics"
>
select
station.station_name as stationName,
count(air.charge_record_id)as bottleNum,
sum(air.charge_measure) as chargeMeasure
from
t_air_charge_record air
left join t_gas_storage_station_info station on station.station_id = air.station_id
left join t_gas_bottle_info bottle on bottle.bottle_id = air.bottle_id
left join t_practitioner_info pr ON pr.practitioner_id = air.charge_operator
<where>
<if
test=
"stationId != null"
>
and air.station_id = #{stationId}
</if>
<if
test=
"operator != null"
>
and pr.name like concat('%', #{operator}, '%')
</if>
<if
test=
"operateBeginTime != null and operateEndTime != null"
>
and air.charge_date between #{operateBeginTime} and #{operateEndTime}
</if>
</where>
group by air.station_id
</select>
<select
id=
"airChargeOperatorStatistics"
parameterType=
"com.zehong.system.domain.vo.AirChargeStatisticsVo"
resultType=
"com.zehong.system.domain.AirChargeOperatorStatistics"
>
select
station.station_name as stationName,
count(air.charge_record_id)as bottleNum,
sum(air.charge_measure) as chargeMeasure,
pr.name as operator
from
t_air_charge_record air
left join t_gas_storage_station_info station on station.station_id = air.station_id
left join t_gas_bottle_info bottle on bottle.bottle_id = air.bottle_id
left join t_practitioner_info pr ON pr.practitioner_id = air.charge_operator
<where>
<if
test=
"stationId != null"
>
and air.station_id = #{stationId}
</if>
<if
test=
"operator != null"
>
and pr.name like concat('%', #{operator}, '%')
</if>
<if
test=
"operateBeginTime != null and operateEndTime != null"
>
and air.charge_date between #{operateBeginTime} and #{operateEndTime}
</if>
</where>
group by air.station_id,air.charge_operator
</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