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
0b181fee
Commit
0b181fee
authored
Feb 21, 2022
by
王晓倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页数据接口及路由
parent
17621578
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
262 additions
and
43 deletions
+262
-43
StatisticController.java
.../zehong/web/controller/statistic/StatisticController.java
+36
-2
HomepageVo.java
...src/main/java/com/zehong/system/domain/vo/HomepageVo.java
+31
-0
TComplainDealMapper.java
...in/java/com/zehong/system/mapper/TComplainDealMapper.java
+8
-0
TWorkOrderMapper.java
.../main/java/com/zehong/system/mapper/TWorkOrderMapper.java
+8
-0
ITComplainDealService.java
...java/com/zehong/system/service/ITComplainDealService.java
+8
-0
ITWorkOrderService.java
...in/java/com/zehong/system/service/ITWorkOrderService.java
+8
-0
TComplainDealServiceImpl.java
.../zehong/system/service/impl/TComplainDealServiceImpl.java
+11
-0
TWorkOrderServiceImpl.java
...com/zehong/system/service/impl/TWorkOrderServiceImpl.java
+11
-0
TComplainDealMapper.xml
.../src/main/resources/mapper/system/TComplainDealMapper.xml
+7
-0
TVideoManagerMapper.xml
.../src/main/resources/mapper/system/TVideoManagerMapper.xml
+1
-2
TWorkOrderMapper.xml
...tem/src/main/resources/mapper/system/TWorkOrderMapper.xml
+6
-0
statisticAnalysis.js
gassafetyprogress-web/src/api/statistic/statisticAnalysis.js
+12
-6
equipment.png
gassafetyprogress-web/src/assets/equipment.png
+0
-0
index.vue
gassafetyprogress-web/src/views/index.vue
+115
-32
index.vue
...ogress-web/src/views/operationMonitor/workOrder/index.vue
+0
-1
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/statistic/StatisticController.java
View file @
0b181fee
...
...
@@ -8,13 +8,15 @@ 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.TSafeEquipmentStandingBook
;
import
com.zehong.system.domain.TTroubleStandingBook
;
import
com.zehong.system.domain.TVideoManager
;
import
com.zehong.system.domain.form.THiddenDangerStandingBookForm
;
import
com.zehong.system.domain.form.TTroubleStandingBookForm
;
import
com.zehong.system.domain.vo.HomepageVo
;
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
com.zehong.system.service.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -41,10 +43,18 @@ public class StatisticController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
StatisticController
.
class
);
@Autowired
private
ITVideoManagerService
tVideoManagerService
;
@Autowired
private
ITSafeEquipmentStandingBookService
tSafeEquipmentStandingBookService
;
@Autowired
private
ITTroubleStandingBookService
tTroubleStandingBookService
;
@Autowired
private
ITHiddenDangerStandingBookService
tHiddenDangerStandingBookService
;
@Autowired
private
ITComplainDealService
tComplainDealService
;
@Autowired
private
ITWorkOrderService
tWorkOrderService
;
/**
* 燃气事故台账统计
...
...
@@ -64,4 +74,28 @@ public class StatisticController
return
AjaxResult
.
success
(
tHiddenDangerStandingBookService
.
selectTHiddenDangerStandingBookStatistic
());
}
/**
* 首页统计
*/
@GetMapping
(
"/homepageStatistic"
)
public
AjaxResult
homepageStatistic
()
{
HomepageVo
homepageVo
=
new
HomepageVo
();
homepageVo
=
tComplainDealService
.
countTComplainDeal
();
homepageVo
=
tWorkOrderService
.
countTWorkOrder
();
List
<
TVideoManager
>
tVideoManagerList
=
tVideoManagerService
.
selectTVideoManagerList
(
null
);
List
<
TSafeEquipmentStandingBook
>
tSafeEquipmentStandingBookList
=
tSafeEquipmentStandingBookService
.
selectTSafeEquipmentStandingBookList
(
null
);
List
<
TTroubleStandingBook
>
tTroubleStandingBookList
=
tTroubleStandingBookService
.
selectTTroubleStandingBookList
(
null
);
List
<
THiddenDangerStandingBook
>
tHiddenDangerStandingBookList
=
tHiddenDangerStandingBookService
.
selectTHiddenDangerStandingBookList
(
null
);
homepageVo
.
setVideoTotal
(
tVideoManagerList
.
size
());
homepageVo
.
setEquipmentTotal
(
tSafeEquipmentStandingBookList
.
size
());
homepageVo
.
setTroubleTotal
(
tTroubleStandingBookList
.
size
());
homepageVo
.
setHiddenTotal
(
tHiddenDangerStandingBookList
.
size
());
return
AjaxResult
.
success
(
homepageVo
);
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/vo/HomepageVo.java
0 → 100644
View file @
0b181fee
package
com
.
zehong
.
system
.
domain
.
vo
;
import
lombok.Data
;
@Data
public
class
HomepageVo
{
// 任务总数
private
int
taskTotal
;
// 任务反馈总数
private
int
taskFeedbackTotal
;
// 投诉总数
private
int
complaintTotal
;
// 投诉反馈总数
private
int
complaintFeedbackTotal
;
// 视频监控总数
private
int
videoTotal
;
// 安全装置总数
private
int
equipmentTotal
;
// 事故总数
private
int
troubleTotal
;
// 隐患总数
private
int
hiddenTotal
;
}
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TComplainDealMapper.java
View file @
0b181fee
...
...
@@ -5,6 +5,7 @@ import java.util.Map;
import
java.util.Objects
;
import
com.zehong.system.domain.TComplainDeal
;
import
com.zehong.system.domain.vo.HomepageVo
;
import
org.apache.ibatis.annotations.Param
;
/**
...
...
@@ -31,6 +32,13 @@ public interface TComplainDealMapper
*/
public
List
<
TComplainDeal
>
selectTComplainDealList
(
TComplainDeal
tComplainDeal
);
/**
* 投诉处置统计
*
* @return 投诉处置统计
*/
public
HomepageVo
countTComplainDeal
();
/**
* 新增投诉处置
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TWorkOrderMapper.java
View file @
0b181fee
...
...
@@ -2,6 +2,7 @@ package com.zehong.system.mapper;
import
java.util.List
;
import
com.zehong.system.domain.TWorkOrder
;
import
com.zehong.system.domain.vo.HomepageVo
;
/**
* 燃气任务Mapper接口
...
...
@@ -27,6 +28,13 @@ public interface TWorkOrderMapper
*/
public
List
<
TWorkOrder
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
);
/**
* 燃气任务统计
*
* @return 燃气任务统计
*/
public
HomepageVo
countTWorkOrder
();
/**
* 新增燃气任务
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITComplainDealService.java
View file @
0b181fee
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
java.util.Map
;
import
com.zehong.system.domain.TComplainDeal
;
import
com.zehong.system.domain.vo.HomepageVo
;
/**
* 投诉处置Service接口
...
...
@@ -29,6 +30,13 @@ public interface ITComplainDealService
*/
public
List
<
TComplainDeal
>
selectTComplainDealList
(
TComplainDeal
tComplainDeal
);
/**
* 投诉处置统计
*
* @return 投诉处置统计
*/
public
HomepageVo
countTComplainDeal
();
/**
* 新增投诉处置
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITWorkOrderService.java
View file @
0b181fee
...
...
@@ -2,6 +2,7 @@ package com.zehong.system.service;
import
java.util.List
;
import
com.zehong.system.domain.TWorkOrder
;
import
com.zehong.system.domain.vo.HomepageVo
;
/**
* 燃气任务Service接口
...
...
@@ -27,6 +28,13 @@ public interface ITWorkOrderService
*/
public
List
<
TWorkOrder
>
selectTWorkOrderList
(
TWorkOrder
tWorkOrder
);
/**
* 燃气任务统计
*
* @return 燃气任务统计
*/
public
HomepageVo
countTWorkOrder
();
/**
* 新增燃气任务
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TComplainDealServiceImpl.java
View file @
0b181fee
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
java.util.Map
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.system.domain.vo.HomepageVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TComplainDealMapper
;
...
...
@@ -46,6 +47,16 @@ public class TComplainDealServiceImpl implements ITComplainDealService
return
tComplainDealMapper
.
selectTComplainDealList
(
tComplainDeal
);
}
/**
* 投诉处置统计
*
* @return 投诉处置统计
*/
public
HomepageVo
countTComplainDeal
()
{
return
tComplainDealMapper
.
countTComplainDeal
();
}
/**
* 新增投诉处置
*
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
View file @
0b181fee
...
...
@@ -5,6 +5,7 @@ import com.zehong.common.utils.SecurityUtils;
import
com.zehong.common.utils.StringUtils
;
import
com.zehong.system.domain.TEnterpriseInfo
;
import
com.zehong.system.domain.TWorkOrder
;
import
com.zehong.system.domain.vo.HomepageVo
;
import
com.zehong.system.mapper.TEnterpriseInfoMapper
;
import
com.zehong.system.mapper.TWorkOrderMapper
;
import
com.zehong.system.service.ITWorkOrderService
;
...
...
@@ -52,6 +53,16 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
return
tWorkOrderMapper
.
selectTWorkOrderList
(
tWorkOrder
);
}
/**
* 燃气任务统计
*
* @return 燃气任务统计
*/
public
HomepageVo
countTWorkOrder
()
{
return
tWorkOrderMapper
.
countTWorkOrder
();
}
/**
* 新增燃气任务
*
...
...
gassafetyprogress-system/src/main/resources/mapper/system/TComplainDealMapper.xml
View file @
0b181fee
...
...
@@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
ORDER BY create_time DESC
</select>
<select
id=
"selectTComplainDealById"
parameterType=
"Long"
resultMap=
"TComplainDealResult"
>
...
...
@@ -52,6 +53,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where complain_deal_id = #{complainDealId}
</select>
<select
id=
"countTComplainDeal"
resultType=
"HomepageVo"
>
select COUNT(t.complain_deal_id) AS complaintTotal,
SUM(CASE t.complain_status WHEN '2' THEN 1 ELSE 0 END) AS complaintFeedbackTotal
from (select * from t_complain_deal where is_del = '0') t
</select>
<insert
id=
"insertTComplainDeal"
parameterType=
"TComplainDeal"
useGeneratedKeys=
"true"
keyProperty=
"complainDealId"
>
insert into t_complain_deal
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
gassafetyprogress-system/src/main/resources/mapper/system/TVideoManagerMapper.xml
View file @
0b181fee
...
...
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"selectTVideoManagerList"
parameterType=
"TVideoManager"
resultMap=
"TVideoManagerResult"
>
<include
refid=
"selectTVideoManagerVo"
/>
<where>
<where>
is_del = '0'
<if
test=
"videoName != null and videoName != ''"
>
and video_name like concat('%', #{videoName}, '%')
</if>
<if
test=
"resourceId != null and resourceId != ''"
>
and resource_id = #{resourceId}
</if>
<if
test=
"longitude != null "
>
and longitude = #{longitude}
</if>
...
...
@@ -37,7 +37,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"type != null and type != ''"
>
and type = #{type}
</if>
<if
test=
"beyondEnterpriseId != null "
>
and beyond_enterprise_id = #{beyondEnterpriseId}
</if>
<if
test=
"beyondEnterpriseName != null and beyondEnterpriseName != ''"
>
and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
</select>
...
...
gassafetyprogress-system/src/main/resources/mapper/system/TWorkOrderMapper.xml
View file @
0b181fee
...
...
@@ -101,6 +101,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where workOrder.work_id = #{workId}
</select>
<select
id=
"countTWorkOrder"
resultType=
"HomepageVo"
>
select COUNT(t.work_id) AS taskTotal,
SUM(CASE t.work_status WHEN '2' THEN 1 ELSE 0 END) AS taskFeedbackTotal
from (select * from t_work_order where is_del = '0') t
</select>
<insert
id=
"insertTWorkOrder"
parameterType=
"TWorkOrder"
useGeneratedKeys=
"true"
keyProperty=
"workId"
>
insert into t_work_order
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
gassafetyprogress-web/src/api/statistic/statisticAnalysis.js
View file @
0b181fee
import
request
from
'@/utils/request'
// 燃气事故台账统计
export
function
troubleStatistic
(
query
)
{
export
function
troubleStatistic
()
{
return
request
({
url
:
'/statistic/troubleStatistic'
,
method
:
'get'
,
params
:
query
method
:
'get'
})
}
// 隐患整治台账统计
export
function
hiddenStatistic
(
query
)
{
export
function
hiddenStatistic
()
{
return
request
({
url
:
'/statistic/hiddenStatistic'
,
method
:
'get'
,
params
:
query
method
:
'get'
})
}
// 隐患整治台账统计
export
function
homepageStatistic
()
{
return
request
({
url
:
'/statistic/homepageStatistic'
,
method
:
'get'
})
}
gassafetyprogress-web/src/assets/
detector
.png
→
gassafetyprogress-web/src/assets/
equipment
.png
View file @
0b181fee
File moved
gassafetyprogress-web/src/views/index.vue
View file @
0b181fee
This diff is collapsed.
Click to expand it.
gassafetyprogress-web/src/views/operationMonitor/workOrder/index.vue
View file @
0b181fee
...
...
@@ -431,7 +431,6 @@ export default {
// 导出遮罩层
exportLoading
:
false
,
detailDialogVisible
:
false
,
workForm
:
{
}
,
// 选中数组
ids
:
[],
// 非单个禁用
...
...
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