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
533635b6
Commit
533635b6
authored
Feb 17, 2022
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计分析
parent
6108d0c0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
782 additions
and
0 deletions
+782
-0
StatisticController.java
.../zehong/web/controller/statistic/StatisticController.java
+67
-0
THiddenDangerStandingBookVo.java
.../zehong/system/domain/vo/THiddenDangerStandingBookVo.java
+25
-0
TTroubleStandingBookVo.java
...a/com/zehong/system/domain/vo/TTroubleStandingBookVo.java
+19
-0
THiddenDangerStandingBookMapper.java
...zehong/system/mapper/THiddenDangerStandingBookMapper.java
+8
-0
TTroubleStandingBookMapper.java
.../com/zehong/system/mapper/TTroubleStandingBookMapper.java
+8
-0
ITHiddenDangerStandingBookService.java
...ong/system/service/ITHiddenDangerStandingBookService.java
+8
-0
ITTroubleStandingBookService.java
...m/zehong/system/service/ITTroubleStandingBookService.java
+8
-0
THiddenDangerStandingBookServiceImpl.java
...em/service/impl/THiddenDangerStandingBookServiceImpl.java
+11
-0
TTroubleStandingBookServiceImpl.java
.../system/service/impl/TTroubleStandingBookServiceImpl.java
+12
-0
THiddenDangerStandingBookMapper.xml
...sources/mapper/system/THiddenDangerStandingBookMapper.xml
+11
-0
TSafeEquipmentStandingBookMapper.xml
...ources/mapper/system/TSafeEquipmentStandingBookMapper.xml
+1
-0
TTroubleStandingBookMapper.xml
...in/resources/mapper/system/TTroubleStandingBookMapper.xml
+9
-0
statisticAnalysis.js
gassafetyprogress-web/src/api/statistic/statisticAnalysis.js
+19
-0
hidden.png
gassafetyprogress-web/src/assets/hidden.png
+0
-0
trouble.png
gassafetyprogress-web/src/assets/trouble.png
+0
-0
yh1.png
gassafetyprogress-web/src/assets/yh1.png
+0
-0
yh2.png
gassafetyprogress-web/src/assets/yh2.png
+0
-0
yh3.png
gassafetyprogress-web/src/assets/yh3.png
+0
-0
index.vue
...web/src/views/statistic/hiddenStatisticAnalysis/index.vue
+299
-0
index.vue
...eb/src/views/statistic/troubleStatisticAnalysis/index.vue
+277
-0
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/statistic/StatisticController.java
0 → 100644
View file @
533635b6
package
com
.
zehong
.
web
.
controller
.
statistic
;
import
com.zehong.common.config.GassafetyProgressConfig
;
import
com.zehong.common.constant.Constants
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.common.utils.file.FileUploadUtils
;
import
com.zehong.common.utils.file.FileUtils
;
import
com.zehong.framework.config.ServerConfig
;
import
com.zehong.system.domain.THiddenDangerStandingBook
;
import
com.zehong.system.domain.TTroubleStandingBook
;
import
com.zehong.system.domain.form.THiddenDangerStandingBookForm
;
import
com.zehong.system.domain.form.TTroubleStandingBookForm
;
import
com.zehong.system.domain.vo.THiddenDangerStandingBookVo
;
import
com.zehong.system.domain.vo.TTroubleStandingBookVo
;
import
com.zehong.system.service.ITHiddenDangerStandingBookService
;
import
com.zehong.system.service.ITTroubleStandingBookService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 统计分析
*
* @author zehong
*/
@RestController
@RequestMapping
(
"/statistic"
)
public
class
StatisticController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
StatisticController
.
class
);
@Autowired
private
ITTroubleStandingBookService
tTroubleStandingBookService
;
@Autowired
private
ITHiddenDangerStandingBookService
tHiddenDangerStandingBookService
;
/**
* 燃气事故台账统计
*/
@GetMapping
(
"/troubleStatistic"
)
public
AjaxResult
troubleStatistic
()
{
return
AjaxResult
.
success
(
tTroubleStandingBookService
.
selectTTroubleStandingBookStatistic
());
}
/**
* 隐患整治台账统计
*/
@GetMapping
(
"/hiddenStatistic"
)
public
AjaxResult
hiddenStatistic
()
{
return
AjaxResult
.
success
(
tHiddenDangerStandingBookService
.
selectTHiddenDangerStandingBookStatistic
());
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/vo/THiddenDangerStandingBookVo.java
0 → 100644
View file @
533635b6
package
com
.
zehong
.
system
.
domain
.
vo
;
import
lombok.Data
;
@Data
public
class
THiddenDangerStandingBookVo
{
// 隐患总数
private
int
hiddenTotal
;
// 一级隐患总数
private
int
oneLevelTotal
;
// 二级隐患总数
private
int
twoLevelTotal
;
// 三级隐患总数
private
int
threeLevelTotal
;
// 已完成总数
private
int
completedTotal
;
// 未完成总数
private
int
incompleteTotal
;
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/vo/TTroubleStandingBookVo.java
0 → 100644
View file @
533635b6
package
com
.
zehong
.
system
.
domain
.
vo
;
import
lombok.Data
;
@Data
public
class
TTroubleStandingBookVo
{
// 事故总数
private
int
troubleTotal
;
// 受伤总数
private
int
injuryTotal
;
// 死亡总数
private
int
deathTotal
;
// 事故处理办结率
private
String
completionRate
;
}
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/THiddenDangerStandingBookMapper.java
View file @
533635b6
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
com.zehong.system.domain.THiddenDangerStandingBook
;
import
com.zehong.system.domain.form.THiddenDangerStandingBookForm
;
import
com.zehong.system.domain.vo.THiddenDangerStandingBookVo
;
/**
* 隐患整治台账Mapper接口
...
...
@@ -28,6 +29,13 @@ public interface THiddenDangerStandingBookMapper
*/
public
List
<
THiddenDangerStandingBook
>
selectTHiddenDangerStandingBookList
(
THiddenDangerStandingBookForm
tHiddenDangerStandingBook
);
/**
* 隐患台账统计
*
* @return 隐患整治台账集合
*/
public
THiddenDangerStandingBookVo
selectTHiddenDangerStandingBookStatistic
();
/**
* 新增隐患整治台账
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TTroubleStandingBookMapper.java
View file @
533635b6
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
com.zehong.system.domain.TTroubleStandingBook
;
import
com.zehong.system.domain.form.TTroubleStandingBookForm
;
import
com.zehong.system.domain.vo.TTroubleStandingBookVo
;
/**
* 事故台账Mapper接口
...
...
@@ -28,6 +29,13 @@ public interface TTroubleStandingBookMapper
*/
public
List
<
TTroubleStandingBook
>
selectTTroubleStandingBookList
(
TTroubleStandingBookForm
tTroubleStandingBook
);
/**
* 事故台账统计
*
* @return 事故台账统计
*/
public
TTroubleStandingBookVo
selectTTroubleStandingBookStatistic
();
/**
* 新增事故台账
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITHiddenDangerStandingBookService.java
View file @
533635b6
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
com.zehong.system.domain.THiddenDangerStandingBook
;
import
com.zehong.system.domain.form.THiddenDangerStandingBookForm
;
import
com.zehong.system.domain.vo.THiddenDangerStandingBookVo
;
/**
* 隐患整治台账Service接口
...
...
@@ -28,6 +29,13 @@ public interface ITHiddenDangerStandingBookService
*/
public
List
<
THiddenDangerStandingBook
>
selectTHiddenDangerStandingBookList
(
THiddenDangerStandingBookForm
tHiddenDangerStandingBook
);
/**
* 隐患台账统计
*
* @return 隐患整治台账集合
*/
public
THiddenDangerStandingBookVo
selectTHiddenDangerStandingBookStatistic
();
/**
* 新增隐患整治台账
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITTroubleStandingBookService.java
View file @
533635b6
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
com.zehong.system.domain.TTroubleStandingBook
;
import
com.zehong.system.domain.form.TTroubleStandingBookForm
;
import
com.zehong.system.domain.vo.TTroubleStandingBookVo
;
/**
* 事故台账Service接口
...
...
@@ -28,6 +29,13 @@ public interface ITTroubleStandingBookService
*/
public
List
<
TTroubleStandingBook
>
selectTTroubleStandingBookList
(
TTroubleStandingBookForm
tTroubleStandingBook
);
/**
* 事故台账统计
*
* @return 事故台账统计
*/
public
TTroubleStandingBookVo
selectTTroubleStandingBookStatistic
();
/**
* 新增事故台账
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/THiddenDangerStandingBookServiceImpl.java
View file @
533635b6
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.form.THiddenDangerStandingBookForm
;
import
com.zehong.system.domain.vo.THiddenDangerStandingBookVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.THiddenDangerStandingBookMapper
;
...
...
@@ -45,6 +46,16 @@ public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStand
return
tHiddenDangerStandingBookMapper
.
selectTHiddenDangerStandingBookList
(
tHiddenDangerStandingBook
);
}
/**
* 隐患台账统计
*
* @return 隐患整治台账集合
*/
public
THiddenDangerStandingBookVo
selectTHiddenDangerStandingBookStatistic
()
{
return
tHiddenDangerStandingBookMapper
.
selectTHiddenDangerStandingBookStatistic
();
}
/**
* 新增隐患整治台账
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TTroubleStandingBookServiceImpl.java
View file @
533635b6
...
...
@@ -3,6 +3,7 @@ package com.zehong.system.service.impl;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.form.TTroubleStandingBookForm
;
import
com.zehong.system.domain.vo.TTroubleStandingBookVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TTroubleStandingBookMapper
;
...
...
@@ -45,6 +46,17 @@ public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookSer
return
tTroubleStandingBookMapper
.
selectTTroubleStandingBookList
(
tTroubleStandingBook
);
}
/**
* 事故台账统计
*
* @return 事故台账统计
*/
@Override
public
TTroubleStandingBookVo
selectTTroubleStandingBookStatistic
()
{
return
tTroubleStandingBookMapper
.
selectTTroubleStandingBookStatistic
();
}
/**
* 新增事故台账
*
...
...
gassafetyprogress-system/src/main/resources/mapper/system/THiddenDangerStandingBookMapper.xml
View file @
533635b6
...
...
@@ -38,6 +38,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"hiddenFindDateStart != null "
>
and hidden_find_date
>
= #{hiddenFindDateStart}
</if>
<if
test=
"hiddenFindDateEnd != null "
>
and hidden_find_date
<
= #{hiddenFindDateEnd}
</if>
</where>
order by create_time desc
</select>
<select
id=
"selectTHiddenDangerStandingBookStatistic"
resultType=
"THiddenDangerStandingBookVo"
>
select COUNT(t.hidden_id) AS hiddenTotal,
SUM(CASE t.hidden_type WHEN '1' THEN 1 ELSE 0 END) AS oneLevelTotal,
SUM(CASE t.hidden_type WHEN '2' THEN 1 ELSE 0 END) AS twoLevelTotal,
SUM(CASE t.hidden_type WHEN '3' THEN 1 ELSE 0 END) AS threeLevelTotal,
SUM(CASE t.remediation WHEN '1' THEN 1 ELSE 0 END) AS completedTotal,
SUM(CASE t.remediation WHEN '2' THEN 1 ELSE 0 END) AS incompleteTotal
from (select * from t_hidden_danger_standing_book where is_del = '0') t
</select>
<select
id=
"selectTHiddenDangerStandingBookById"
parameterType=
"Long"
resultMap=
"THiddenDangerStandingBookResult"
>
...
...
gassafetyprogress-system/src/main/resources/mapper/system/TSafeEquipmentStandingBookMapper.xml
View file @
533635b6
...
...
@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"installTimeStart != null "
>
and install_time
>
= #{installTimeStart}
</if>
<if
test=
"installTimeEnd != null "
>
and install_time
<
= #{installTimeEnd}
</if>
</where>
order by create_time desc
</select>
<select
id=
"selectTSafeEquipmentStandingBookById"
parameterType=
"Long"
resultMap=
"TSafeEquipmentStandingBookResult"
>
...
...
gassafetyprogress-system/src/main/resources/mapper/system/TTroubleStandingBookMapper.xml
View file @
533635b6
...
...
@@ -44,6 +44,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"dealDateStart != null "
>
and deal_date
>
= #{dealDateStart}
</if>
<if
test=
"dealDateEnd != null "
>
and deal_date
<
= #{dealDateEnd}
</if>
</where>
order by create_time desc
</select>
<select
id=
"selectTTroubleStandingBookStatistic"
resultType=
"TTroubleStandingBookVo"
>
select COUNT(t.trouble_id) AS troubleTotal,
SUM(t.injury_num) AS injutyTotal,
SUM(t.death_num) AS deathTotal,
ROUND(SUM(CASE t.is_deal WHEN '1' THEN 1 ELSE 0 END)/COUNT(t.trouble_id)*100, 1) AS completionRate
from (select * from t_trouble_standing_book where is_del = '0') t
</select>
<select
id=
"selectTTroubleStandingBookById"
parameterType=
"Long"
resultMap=
"TTroubleStandingBookResult"
>
...
...
gassafetyprogress-web/src/api/statistic/statisticAnalysis.js
0 → 100644
View file @
533635b6
import
request
from
'@/utils/request'
// 燃气事故台账统计
export
function
troubleStatistic
(
query
)
{
return
request
({
url
:
'/statistic/troubleStatistic'
,
method
:
'get'
,
params
:
query
})
}
// 隐患整治台账统计
export
function
hiddenStatistic
(
query
)
{
return
request
({
url
:
'/statistic/hiddenStatistic'
,
method
:
'get'
,
params
:
query
})
}
gassafetyprogress-web/src/assets/hidden.png
0 → 100644
View file @
533635b6
3.86 KB
gassafetyprogress-web/src/assets/trouble.png
0 → 100644
View file @
533635b6
2.13 KB
gassafetyprogress-web/src/assets/yh1.png
0 → 100644
View file @
533635b6
4.71 KB
gassafetyprogress-web/src/assets/yh2.png
0 → 100644
View file @
533635b6
4.78 KB
gassafetyprogress-web/src/assets/yh3.png
0 → 100644
View file @
533635b6
4.9 KB
gassafetyprogress-web/src/views/statistic/hiddenStatisticAnalysis/index.vue
0 → 100644
View file @
533635b6
This diff is collapsed.
Click to expand it.
gassafetyprogress-web/src/views/statistic/troubleStatisticAnalysis/index.vue
0 → 100644
View file @
533635b6
This diff is collapsed.
Click to expand it.
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