Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zh-baseversion-project
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
王浩
zh-baseversion-project
Commits
50b17cd4
Commit
50b17cd4
authored
Jun 25, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
停气监管
parent
2d4e630c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
257 additions
and
33 deletions
+257
-33
TSupBalStopSupController.java
...eb/controller/supplybalance/TSupBalStopSupController.java
+5
-0
TSupBalStopSup.java
...rc/main/java/com/zehong/system/domain/TSupBalStopSup.java
+13
-2
TSupBalStopSupServiceImpl.java
...zehong/system/service/impl/TSupBalStopSupServiceImpl.java
+6
-0
TSupBalStopSupMapper.xml
...src/main/resources/mapper/system/TSupBalStopSupMapper.xml
+28
-5
index.vue
zh-baseversion-web/src/components/DrawArea/index.vue
+3
-1
DetailInfo.vue
...eb/src/views/supplybalance/stop/components/DetailInfo.vue
+139
-0
index.vue
zh-baseversion-web/src/views/supplybalance/stop/index.vue
+63
-25
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/supplybalance/TSupBalStopSupController.java
View file @
50b17cd4
package
com
.
zehong
.
web
.
controller
.
supplybalance
;
import
java.util.List
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -40,6 +42,9 @@ public class TSupBalStopSupController extends BaseController
public
TableDataInfo
list
(
TSupBalStopSup
tSupBalStopSup
)
{
startPage
();
if
(!
"-2"
.
equals
(
SecurityUtils
.
getLoginUser
().
getUser
().
getDeptId
())){
tSupBalStopSup
.
setfCompanyInfoId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getDeptId
());
}
List
<
TSupBalStopSup
>
list
=
tSupBalStopSupService
.
selectTSupBalStopSupList
(
tSupBalStopSup
);
return
getDataTable
(
list
);
}
...
...
zh-baseversion-system/src/main/java/com/zehong/system/domain/TSupBalStopSup.java
View file @
50b17cd4
...
...
@@ -21,9 +21,11 @@ public class TSupBalStopSup extends BaseEntity
private
Long
fGasStopId
;
/** 企业uuid */
@Excel
(
name
=
"企业uuid"
)
private
String
fCompanyInfoId
;
@Excel
(
name
=
"企业名称"
)
private
String
enterpriseName
;
/** 停气开始日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"停气开始日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
...
...
@@ -93,7 +95,16 @@ public class TSupBalStopSup extends BaseEntity
{
return
fCompanyInfoId
;
}
public
void
setfStartDate
(
Date
fStartDate
)
public
String
getEnterpriseName
()
{
return
enterpriseName
;
}
public
void
setEnterpriseName
(
String
enterpriseName
)
{
this
.
enterpriseName
=
enterpriseName
;
}
public
void
setfStartDate
(
Date
fStartDate
)
{
this
.
fStartDate
=
fStartDate
;
}
...
...
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TSupBalStopSupServiceImpl.java
View file @
50b17cd4
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.Date
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TSupBalStopSupMapper
;
...
...
@@ -54,6 +56,7 @@ public class TSupBalStopSupServiceImpl implements ITSupBalStopSupService
public
int
insertTSupBalStopSup
(
TSupBalStopSup
tSupBalStopSup
)
{
tSupBalStopSup
.
setCreateTime
(
DateUtils
.
getNowDate
());
tSupBalStopSup
.
setfCompanyInfoId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getDeptId
());
return
tSupBalStopSupMapper
.
insertTSupBalStopSup
(
tSupBalStopSup
);
}
...
...
@@ -67,6 +70,9 @@ public class TSupBalStopSupServiceImpl implements ITSupBalStopSupService
public
int
updateTSupBalStopSup
(
TSupBalStopSup
tSupBalStopSup
)
{
tSupBalStopSup
.
setUpdateTime
(
DateUtils
.
getNowDate
());
if
(
"2"
.
equals
(
tSupBalStopSup
.
getfStopProgress
())){
tSupBalStopSup
.
setfRecoveryGasTime
(
new
Date
());
}
return
tSupBalStopSupMapper
.
updateTSupBalStopSup
(
tSupBalStopSup
);
}
...
...
zh-baseversion-system/src/main/resources/mapper/system/TSupBalStopSupMapper.xml
View file @
50b17cd4
...
...
@@ -26,16 +26,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTSupBalStopSupVo"
>
select f_gas_stop_id, f_company_info_id, f_start_date, f_end_date, f_stop_type, f_influence_cus, f_stop_reason, f_stop_range, f_stop_progress, f_recovery_gas_time, f_rep_status, f_gas_stop_area, create_by, create_time, update_by, update_time, is_del, remarks from t_sup_bal_stop_sup
SELECT
st.f_gas_stop_id,
st.f_company_info_id,
st.f_start_date,
st.f_end_date,
st.f_stop_type,
st.f_influence_cus,
st.f_stop_reason,
st.f_stop_range,
st.f_stop_progress,
st.f_recovery_gas_time,
st.f_rep_status,
st.f_gas_stop_area,
st.create_by,
st.create_time,
st.update_by,
st.update_time,
st.is_del,
st.remarks,
en.enterprise_name AS enterpriseName
FROM
t_sup_bal_stop_sup st
LEFT JOIN t_enterprise_info en ON en.enterprise_id = st.f_company_info_id
</sql>
<select
id=
"selectTSupBalStopSupList"
parameterType=
"TSupBalStopSup"
resultMap=
"TSupBalStopSupResult"
>
<include
refid=
"selectTSupBalStopSupVo"
/>
<where>
<if
test=
"fCompanyInfoId != null and fCompanyInfoId != ''"
>
and f_company_info_id = #{fCompanyInfoId}
</if>
<if
test=
"fStopType != null and fStopType != ''"
>
and f_stop_type = #{fStopType}
</if>
<if
test=
"fStopProgress != null and fStopProgress != ''"
>
and f_stop_progress = #{fStopProgress}
</if>
<if
test=
"fRepStatus != null and fRepStatus != ''"
>
and f_rep_status = #{fRepStatus}
</if>
<if
test=
"fCompanyInfoId != null and fCompanyInfoId != ''"
>
and st.f_company_info_id = #{fCompanyInfoId}
</if>
<if
test=
"fStopType != null and fStopType != ''"
>
and st.f_stop_type = #{fStopType}
</if>
<if
test=
"fStopProgress != null and fStopProgress != ''"
>
and st.f_stop_progress = #{fStopProgress}
</if>
<if
test=
"fRepStatus != null and fRepStatus != ''"
>
and st.f_rep_status = #{fRepStatus}
</if>
<if
test=
"enterpriseName != null and enterpriseName != ''"
>
and en.enterprise_name like concat('%', #{enterpriseName}, '%')
</if>
</where>
</select>
...
...
zh-baseversion-web/src/components/DrawArea/index.vue
View file @
50b17cd4
...
...
@@ -174,7 +174,9 @@
polygon
.
on
(
"rightclick"
,()
=>
{
this
.
firstClick
=
0
;
this
.
nowMouseTarget
.
polygonEditor
&&
this
.
nowMouseTarget
.
polygonEditor
.
close
();
})
});
this
.
gaoMap
.
setCenter
(
this
.
value
[
0
]);
this
.
gaoMap
.
map
.
setZoom
(
12
)
}
}
}
...
...
zh-baseversion-web/src/views/supplybalance/stop/components/DetailInfo.vue
0 → 100644
View file @
50b17cd4
<
template
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"1200px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
label-width=
"120px"
>
<el-row>
<el-col
:span=
"12"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"停气开始日期"
>
<span
v-if=
"detailInfo.fStartDate"
>
{{
detailInfo
.
fStartDate
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"停气结束日期"
>
<span
v-if=
"detailInfo.fEndDate"
>
{{
detailInfo
.
fEndDate
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"停气类型"
>
<span
v-if=
"detailInfo.fStopType"
>
{{
$parent
.
fStopTypeFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"停气进度"
>
<span
v-if=
"detailInfo.fStopType"
>
{{
$parent
.
fStopProgressFormat
(
detailInfo
)
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"影响用户"
>
<span
v-if=
"detailInfo.fInfluenceCus"
>
{{
detailInfo
.
fInfluenceCus
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"停气原因"
>
<span
v-if=
"detailInfo.fStopReason"
>
{{
detailInfo
.
fStopReason
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"停气范围"
>
<span
v-if=
"detailInfo.fStopRange"
>
{{
detailInfo
.
fStopRange
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
>
<span
v-if=
"detailInfo.createTime"
>
{{
detailInfo
.
createTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"更新时间"
>
<span
v-if=
"detailInfo.updateTime"
>
{{
detailInfo
.
updateTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col
:span=
"12"
style=
"padding-left: 10px"
>
<div
style=
"font-size: 14px;color: #606266;margin-bottom: 10px;font-weight: 700"
>
停气区域
</div>
<div
id=
"areaInfo"
></div>
</el-col>
</el-row>
</el-form>
</el-dialog>
</
template
>
<
script
>
import
{
getSup
}
from
"@/api/supplybalance/stop"
;
import
{
EditorMap
}
from
"@/utils/mapClass/getPath.js"
;
export
default
{
name
:
"detail-info"
,
data
(){
return
{
detailInfo
:
{},
detailOpen
:
false
,
}
},
watch
:{
detailOpen
(
newVal
){
if
(
newVal
){
//if(this.detailInfo.fGasStopArea) this.path = JSON.parse(this.detailInfo.fGasStopArea);
this
.
$nextTick
(()
=>
{
this
.
initMap
();
})
}
}
},
methods
:{
getDetailInfo
(
id
){
getSup
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
&&
res
.
data
){
this
.
detailInfo
=
res
.
data
;
this
.
detailOpen
=
true
;
}
})
},
initMap
(){
const
path
=
eval
(
this
.
$store
.
state
.
user
.
systemSetting
.
map_center
);
const
gaoMap
=
new
EditorMap
(
"areaInfo"
,
{
center
:
path
},
this
);
if
(
this
.
detailInfo
.
fGasStopArea
){
new
AMap
.
Polygon
({
map
:
gaoMap
.
map
,
path
:
JSON
.
parse
(
this
.
detailInfo
.
fGasStopArea
),
fillColor
:
'#00b0ff'
,
strokeColor
:
'#80d8ff'
});
gaoMap
.
setCenter
(
JSON
.
parse
(
this
.
detailInfo
.
fGasStopArea
)[
0
]);
gaoMap
.
map
.
setZoom
(
12
)
}
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
#areaInfo
{
width
:
100%
;
height
:
500px
;
}
</
style
>
zh-baseversion-web/src/views/supplybalance/stop/index.vue
View file @
50b17cd4
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"企业名称"
prop=
"
fCompanyInfoId
"
>
<el-form-item
label=
"企业名称"
prop=
"
enterpriseName
"
>
<el-input
v-model=
"queryParams.
fCompanyInfoId
"
v-model=
"queryParams.
enterpriseName
"
placeholder=
"请输入企业名称"
clearable
size=
"small"
...
...
@@ -87,15 +87,15 @@
<el-table
v-loading=
"loading"
:data=
"supList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"企业名称"
align=
"center"
prop=
"
fCompanyInfoId
"
/>
<el-table-column
label=
"停气开始日期"
align=
"center"
prop=
"fStartDate"
width=
"1
8
0"
>
<el-table-column
label=
"企业名称"
align=
"center"
prop=
"
enterpriseName
"
/>
<el-table-column
label=
"停气开始日期"
align=
"center"
prop=
"fStartDate"
width=
"1
5
0"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
fStartDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<span>
{{
parseTime
(
scope
.
row
.
fStartDate
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"停气结束日期"
align
=
"center"
prop
=
"fEndDate"
width
=
"1
8
0"
>
<
el
-
table
-
column
label
=
"停气结束日期"
align
=
"center"
prop
=
"fEndDate"
width
=
"1
5
0"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
parseTime
(
scope
.
row
.
fEndDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
span
>
{{
parseTime
(
scope
.
row
.
fEndDate
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"停气类型"
align
=
"center"
prop
=
"fStopType"
:
formatter
=
"fStopTypeFormat"
/>
...
...
@@ -116,6 +116,12 @@
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-document"
@
click
=
"handleDetail(scope.row)"
>
详情
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
...
...
@@ -142,7 +148,7 @@
<!--
添加或修改停气监管对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"1200px"
append
-
to
-
body
destroy
-
on
-
close
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"120px"
>
<
el
-
form
label
-
position
=
"top"
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"120px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
row
class
=
"el-row-table"
>
...
...
@@ -152,7 +158,7 @@
v
-
model
=
"form.fStartDate"
type
=
"datetime"
value
-
format
=
"yyyy-MM-dd HH:mm:ss"
style
=
"width:
100
%"
style
=
"width:
98
%"
placeholder
=
"选择停气开始日期"
>
<
/el-date-picker
>
<
/el-form-item
>
...
...
@@ -172,7 +178,7 @@
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"停气类型"
prop
=
"fStopType"
>
<
el
-
select
v
-
model
=
"form.fStopType"
style
=
"width:
100
%"
placeholder
=
"请选择停气类型"
>
<
el
-
select
v
-
model
=
"form.fStopType"
style
=
"width:
98
%"
placeholder
=
"请选择停气类型"
>
<
el
-
option
v
-
for
=
"dict in fStopTypeOptions"
:
key
=
"dict.dictValue"
...
...
@@ -183,6 +189,19 @@
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"停气进度"
prop
=
"fStopProgress"
>
<
el
-
select
v
-
model
=
"form.fStopProgress"
style
=
"width: 98%"
placeholder
=
"请选择停气进度"
>
<
el
-
option
v
-
for
=
"dict in fStopProgressOptions"
:
key
=
"dict.dictValue"
:
label
=
"dict.dictLabel"
:
value
=
"dict.dictValue"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"影响用户"
prop
=
"fInfluenceCus"
>
<
el
-
input
type
=
"Number"
v
-
model
=
"form.fInfluenceCus"
placeholder
=
"请输入影响用户"
/>
...
...
@@ -200,39 +219,40 @@
<
el
-
input
type
=
"textarea"
v
-
model
=
"form.fStopRange"
placeholder
=
"请输入停气范围"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"停气区域"
prop
=
"fGasStopArea"
>
<
el
-
input
v
-
model
=
"form.fGasStopArea"
type
=
"textarea"
placeholder
=
"请输入内容"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
style
=
"padding-left: 10px"
>
<
div
>
停气
<
/div
>
<
DrawArea
v
-
model
=
"path"
/>
<
el
-
form
-
item
label
=
"停气区域"
prop
=
"fGasStopArea"
>
<
DrawArea
class
=
"area-change"
v
-
model
=
"path"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm()"
>
保
存
<
/el-button
>
<
el
-
button
@
click
=
"submitForm(1)"
>
上
报
<
/el-button
>
<!--
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button>--
>
<
/div
>
<
/el-dialog
>
<!--
详情
-->
<
DetailInfo
ref
=
"detail"
/>
<
/div
>
<
/template
>
<
script
>
import
{
listSup
,
getSup
,
delSup
,
addSup
,
updateSup
,
exportSup
}
from
"@/api/supplybalance/stop"
;
import
DrawArea
from
"@/components/DrawArea"
;
import
DetailInfo
from
"./components/DetailInfo"
;
export
default
{
name
:
"Sup"
,
components
:
{
DrawArea
DrawArea
,
DetailInfo
}
,
data
()
{
return
{
...
...
@@ -268,6 +288,7 @@ export default {
fStopType
:
null
,
fStopProgress
:
null
,
fRepStatus
:
null
,
enterpriseName
:
null
}
,
// 表单参数
form
:
{
}
,
...
...
@@ -291,8 +312,8 @@ export default {
fStopProgress
:
[
{
required
:
true
,
message
:
"停气进度不能为空"
,
trigger
:
"change"
}
],
f
RepStatus
:
[
{
required
:
true
,
message
:
"
上报状态 0-未上报,1-已上报不能为空"
,
trigger
:
"blur
"
}
f
GasStopArea
:
[
{
required
:
true
,
message
:
"
停气区域不能为空
"
}
],
}
,
path
:[
...
...
@@ -314,6 +335,10 @@ export default {
}
,
watch
:{
path
(
newVal
,
oldVal
){
if
(
newVal
.
length
==
0
){
this
.
form
.
fGasStopArea
=
""
;
return
}
this
.
form
.
fGasStopArea
=
JSON
.
stringify
(
newVal
);
}
}
,
...
...
@@ -363,6 +388,7 @@ export default {
remarks
:
null
}
;
this
.
resetForm
(
"form"
);
this
.
path
=
[];
}
,
/** 搜索按钮操作 */
handleQuery
()
{
...
...
@@ -400,7 +426,10 @@ export default {
}
);
}
,
/** 提交按钮 */
submitForm
()
{
submitForm
(
type
)
{
if
(
1
==
type
){
this
.
form
.
fRepStatus
=
'1'
;
}
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
fGasStopId
!=
null
)
{
...
...
@@ -447,7 +476,16 @@ export default {
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
}
,
//详情
handleDetail
(
row
){
this
.
$refs
.
detail
.
getDetailInfo
(
row
.
fGasStopId
);
}
,
}
}
;
<
/script
>
<
style
lang
=
"scss"
>
.
area
-
change
input
{
border
:
1
px
solid
#
DCDFE6
!
important
;
}
<
/style
>
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