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
9dc2fa11
Commit
9dc2fa11
authored
Mar 22, 2022
by
wuqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022-3-22 吴卿华
parent
7c8ae314
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
67 deletions
+121
-67
TProjectInfoController.java
...hong/web/controller/supervise/TProjectInfoController.java
+10
-5
TProjectInfo.java
.../src/main/java/com/zehong/system/domain/TProjectInfo.java
+38
-26
TProjectInfoMapper.xml
...m/src/main/resources/mapper/system/TProjectInfoMapper.xml
+5
-1
station.png
gassafetyprogress-web/src/assets/project/station.png
+0
-0
theConduit.png
gassafetyprogress-web/src/assets/project/theConduit.png
+0
-0
index.vue
gassafetyprogress-web/src/views/regulation/project/index.vue
+68
-35
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/supervise/TProjectInfoController.java
View file @
9dc2fa11
package
com
.
zehong
.
web
.
controller
.
supervise
;
import
java.io.File
;
import
java.text.ParseException
;
import
java.util.List
;
import
com.zehong.common.config.GassafetyProgressConfig
;
import
com.zehong.common.core.domain.entity.SysUser
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -77,8 +79,7 @@ public class TProjectInfoController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('project:info:add')"
)
@Log
(
title
=
"工程项目信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TProjectInfo
tProjectInfo
)
{
public
AjaxResult
add
(
@RequestBody
TProjectInfo
tProjectInfo
)
throws
ParseException
{
//查询是否已经有重复的年份数据
List
<
TProjectInfo
>
tProjectInfos
=
tProjectInfoService
.
selectSameYear
(
tProjectInfo
.
getProjectYear
());
//说明有重复的年份 将重复的年份删除
...
...
@@ -86,6 +87,10 @@ public class TProjectInfoController extends BaseController
//重复年份删除方法
tProjectInfoService
.
deleteisSameYear
(
tProjectInfo
.
getProjectYear
());
}
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
//获取用户所属单位
String
enterpriseName
=
user
.
getEnterpriseName
();
tProjectInfo
.
setEnterpriseCode
(
String
.
valueOf
(
enterpriseName
));
return
toAjax
(
tProjectInfoService
.
insertTProjectInfo
(
tProjectInfo
));
}
...
...
@@ -99,7 +104,7 @@ public class TProjectInfoController extends BaseController
{
//查询修改文件之前的路径
TProjectInfo
tProjectInfos
=
tProjectInfoService
.
selectNearbyAddress
(
tProjectInfo
.
getProjectId
());
if
(
tProjectInfos
.
getNearbyAddress
()
!=
null
){
if
(
tProjectInfos
!=
null
){
// 上传文件路径
String
filePath
=
GassafetyProgressConfig
.
getUploadPath
();
String
[]
strs
=
tProjectInfos
.
getNearbyAddress
().
split
(
"upload"
);
...
...
gassafetyprogress-system/src/main/java/com/zehong/system/domain/TProjectInfo.java
View file @
9dc2fa11
...
...
@@ -46,6 +46,10 @@ public class TProjectInfo extends BaseEntity
@Excel
(
name
=
"管道金额"
)
private
BigDecimal
pipeInvestment
;
/**企业编码*/
@Excel
(
name
=
"企业编码"
)
private
String
enterpriseCode
;
/** 附件地址 */
private
String
nearbyAddress
;
...
...
@@ -56,26 +60,37 @@ public class TProjectInfo extends BaseEntity
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
String
getEnterpriseCode
()
{
return
enterpriseCode
;
}
public
void
setEnterpriseCode
(
String
enterpriseCode
)
{
this
.
enterpriseCode
=
enterpriseCode
;
}
public
void
setProjectId
(
Long
projectId
)
{
this
.
projectId
=
projectId
;
}
public
Long
getProjectId
()
{
return
projectId
;
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
void
setProjectYear
(
Date
projectYear
)
{
this
.
projectYear
=
projectYear
;
public
Long
getProjectId
()
{
return
projectId
;
}
public
Date
getProjectYear
()
{
public
Date
getProjectYear
()
{
return
projectYear
;
}
public
void
setGateStationAddress
(
String
gateStationAddress
)
{
public
void
setProjectYear
(
Date
projectYear
)
{
this
.
projectYear
=
projectYear
;
}
public
void
setGateStationAddress
(
String
gateStationAddress
)
{
this
.
gateStationAddress
=
gateStationAddress
;
}
...
...
@@ -149,21 +164,18 @@ public class TProjectInfo extends BaseEntity
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"projectId"
,
getProjectId
())
.
append
(
"projectYear"
,
getProjectYear
())
.
append
(
"gateStationAddress"
,
getGateStationAddress
())
.
append
(
"gateStationInvestment"
,
getGateStationInvestment
())
.
append
(
"numberGateStations"
,
getNumberGateStations
())
.
append
(
"pipeLength"
,
getPipeLength
())
.
append
(
"pipeInvestment"
,
getPipeInvestment
())
.
append
(
"nearbyAddress"
,
getNearbyAddress
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
return
"TProjectInfo{"
+
"projectId="
+
projectId
+
", projectYear="
+
projectYear
+
", gateStationAddress='"
+
gateStationAddress
+
'\''
+
", gateStationInvestment="
+
gateStationInvestment
+
", numberGateStations="
+
numberGateStations
+
", pipeLength="
+
pipeLength
+
", pipeInvestment="
+
pipeInvestment
+
", enterpriseCode='"
+
enterpriseCode
+
'\''
+
", nearbyAddress='"
+
nearbyAddress
+
'\''
+
", isDel='"
+
isDel
+
'\''
+
", remarks='"
+
remarks
+
'\''
+
'}'
;
}
}
gassafetyprogress-system/src/main/resources/mapper/system/TProjectInfoMapper.xml
View file @
9dc2fa11
...
...
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"TProjectInfo"
id=
"TProjectInfoResult"
>
<result
property=
"projectId"
column=
"project_id"
/>
<result
property=
"enterpriseCode"
column=
"enterprise_code"
/>
<result
property=
"projectYear"
column=
"project_year"
/>
<result
property=
"gateStationAddress"
column=
"gate_station_address"
/>
<result
property=
"gateStationInvestment"
column=
"gate_station_investment"
/>
...
...
@@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectTProjectInfoVo"
>
select project_id,
project_year, gate_station_address, gate_station_investment, number_gate_stations, pipe_length, pipe_investment, nearby_address, create_by, create_time, update_by, update_time, is_del, remarks from t_project_info
select project_id,
enterprise_code,
project_year, gate_station_address, gate_station_investment, number_gate_stations, pipe_length, pipe_investment, nearby_address, create_by, create_time, update_by, update_time, is_del, remarks from t_project_info
</sql>
<select
id=
"selectTProjectInfoList"
parameterType=
"TProjectInfo"
resultMap=
"TProjectInfoResult"
>
...
...
@@ -51,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_project_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectYear != null"
>
project_year,
</if>
<if
test=
"enterpriseCode != null"
>
enterprise_code,
</if>
<if
test=
"gateStationAddress != null"
>
gate_station_address,
</if>
<if
test=
"gateStationInvestment != null"
>
gate_station_investment,
</if>
<if
test=
"numberGateStations != null"
>
number_gate_stations,
</if>
...
...
@@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectYear != null"
>
#{projectYear},
</if>
<if
test=
"enterpriseCode != null"
>
#{enterpriseCode},
</if>
<if
test=
"gateStationAddress != null"
>
#{gateStationAddress},
</if>
<if
test=
"gateStationInvestment != null"
>
#{gateStationInvestment},
</if>
<if
test=
"numberGateStations != null"
>
#{numberGateStations},
</if>
...
...
@@ -85,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_project_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"projectYear != null"
>
project_year = #{projectYear},
</if>
<if
test=
"enterpriseCode != null"
>
enterprise_code = #{enterpriseCode},
</if>
<if
test=
"gateStationAddress != null"
>
gate_station_address = #{gateStationAddress},
</if>
<if
test=
"gateStationInvestment != null"
>
gate_station_investment = #{gateStationInvestment},
</if>
<if
test=
"numberGateStations != null"
>
number_gate_stations = #{numberGateStations},
</if>
...
...
gassafetyprogress-web/src/assets/project/station.png
0 → 100644
View file @
9dc2fa11
6.04 KB
gassafetyprogress-web/src/assets/project/theConduit.png
0 → 100644
View file @
9dc2fa11
2.73 KB
gassafetyprogress-web/src/views/regulation/project/index.vue
View file @
9dc2fa11
...
...
@@ -9,15 +9,6 @@
placeholder=
"选择工程项目年度"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"门站地址"
prop=
"gateStationAddress"
>
<el-input
v-model=
"queryParams.gateStationAddress"
placeholder=
"请输入门站地址"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
...
...
@@ -75,20 +66,29 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"工程项目年度"
align=
"center"
prop=
"projectYear"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
projectYear
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<span>
{{
parseTime
(
scope
.
row
.
projectYear
,
'{y
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"门站地址"
align
=
"center"
prop
=
"gateStationAddress"
/>
<
el
-
table
-
column
label
=
"门站金额"
align
=
"center"
prop
=
"gateStationInvestment"
/>
<
el
-
table
-
column
label
=
"企业名称"
align
=
"center"
prop
=
"enterpriseCode"
>
<
span
slot
-
scope
=
"scope"
v
-
if
=
"scope.row.enterpriseCode"
>
{{
scope
.
row
.
enterpriseCode
}}
<
/span
>
<
span
v
-
else
>-<
/span
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"门站数量"
align
=
"center"
prop
=
"numberGateStations"
/>
<
el
-
table
-
column
label
=
"门站投资额(万元)"
align
=
"center"
prop
=
"gateStationInvestment"
>
<
span
slot
-
scope
=
"scope"
v
-
if
=
"scope.row.gateStationInvestment"
>
{{
scope
.
row
.
gateStationInvestment
}}
<
/span
>
<
span
v
-
else
>-<
/span
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"管道长度"
align
=
"center"
prop
=
"pipeLength"
/>
<
el
-
table
-
column
label
=
"管道金额"
align
=
"center"
prop
=
"pipeInvestment"
/>
<
el
-
table
-
column
label
=
"附件"
align
=
"center"
prop
=
"nearbyAddress"
>
<
el
-
table
-
column
label
=
"管道投资额(万元)"
align
=
"center"
prop
=
"pipeInvestment"
>
<
span
slot
-
scope
=
"scope"
v
-
if
=
"scope.row.pipeInvestment"
>
{{
scope
.
row
.
pipeInvestment
}}
<
/span
>
<
span
v
-
else
>-<
/span
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"附件"
align
=
"center"
prop
=
"nearbyAddress"
>
<
template
slot
-
scope
=
"scope"
>
<
span
class
=
"dbtn"
@
click
=
"checkFile(scope.row.nearbyAddress)"
v
-
if
=
"scope.row.
dealPlan != ''
"
v
-
if
=
"scope.row.
nearbyAddress
"
>
<
i
class
=
"el-icon el-icon-view"
><
/i>查看/
下载
<
/span
>
...
...
@@ -126,8 +126,7 @@
<!--
添加或修改工程项目信息对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"780px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"90px"
>
<
el
-
row
>
<
el
-
col
:
span
=
"11"
>
<
el
-
form
-
item
label
=
"项目年度"
prop
=
"projectYear"
>
...
...
@@ -140,40 +139,54 @@
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"11"
>
<
el
-
form
-
item
label
=
"门站地址"
prop
=
"gateStationAddress"
>
<
el
-
input
v
-
model
=
"form.gateStationAddress"
placeholder
=
"请输入门站地址"
/>
<
el
-
col
:
span
=
"11"
>
<
el
-
form
-
item
label
=
"企业名称"
prop
=
"enterpriseCode"
>
<
el
-
input
:
disabled
=
"true"
v
-
model
=
"form.enterpriseCode"
placeholder
=
"企业名称"
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
div
class
=
"tableTitle"
>
<
img
:
src
=
"stationImg"
style
=
"width: 24px; height: 25px;position: relative; left: -326px; top: -12px;"
/>
<
span
class
=
"midText"
>
门站
<
/span
>
<
/div
>
<
el
-
row
>
<
el
-
col
:
span
=
"11"
>
<
el
-
form
-
item
label
=
"门站数量"
prop
=
"numberGateStations"
>
<
el
-
input
@
change
=
"numberGateStations()"
v
-
model
=
"form.numberGateStations"
placeholder
=
"请输入门站数量"
/>
<
el
-
input
@
change
=
"numberGateStations()"
v
-
model
=
"form.numberGateStations"
placeholder
=
"请输入门站数量"
>
<
template
slot
=
"append"
>
个
<
/template
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"11"
>
<
el
-
form
-
item
label
=
"门站
金
额"
prop
=
"gateStationInvestment"
>
<
el
-
input
:
disabled
=
"isGateStationDisabled"
v
-
model
=
"form.gateStationInvestment"
placeholder
=
"请输入门站
金
额"
>
<
template
slot
=
"append"
>
元
<
/template
>
<
el
-
form
-
item
label
=
"门站
投资
额"
prop
=
"gateStationInvestment"
>
<
el
-
input
:
disabled
=
"isGateStationDisabled"
v
-
model
=
"form.gateStationInvestment"
placeholder
=
"请输入门站
投资
额"
>
<
template
slot
=
"append"
>
万
元
<
/template
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
div
class
=
"tableTitle"
>
<
img
:
src
=
"bookImg"
style
=
"width: 24px; height: 25px; position: relative; left: -326px; top: -12px;"
/>
<
span
class
=
"midText"
>
管道
<
/span
>
<
/div
>
<
el
-
row
>
<
el
-
col
:
span
=
"11"
>
<
el
-
form
-
item
label
=
"管道长度"
prop
=
"pipeLength"
>
<
el
-
input
@
change
=
"conduitGateStations()"
v
-
model
=
"form.pipeLength"
placeholder
=
"请输入管道长度"
/>
<
el
-
input
@
change
=
"conduitGateStations()"
v
-
model
=
"form.pipeLength"
placeholder
=
"请输入管道长度"
>
<
template
slot
=
"append"
>
米
<
/template
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"11"
>
<
el
-
form
-
item
label
=
"管道
金
额"
prop
=
"pipeInvestment"
>
<
el
-
input
:
disabled
=
"isPipelineAmount"
v
-
model
=
"form.pipeInvestment"
placeholder
=
"请输入管道
金
额"
>
<
template
slot
=
"append"
>
元
<
/template
>
<
el
-
form
-
item
label
=
"管道
投资
额"
prop
=
"pipeInvestment"
>
<
el
-
input
:
disabled
=
"isPipelineAmount"
v
-
model
=
"form.pipeInvestment"
placeholder
=
"请输入管道
投资
额"
>
<
template
slot
=
"append"
>
万
元
<
/template
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
...
...
@@ -220,6 +233,8 @@ export default {
}
,
data
()
{
return
{
stationImg
:
require
(
'@/assets/project/station.png'
),
bookImg
:
require
(
'@/assets/project/theConduit.png'
),
// 上传文件列表
fileList
:
[],
//门站金额输入框是否输入
...
...
@@ -251,7 +266,6 @@ export default {
pageNum
:
1
,
pageSize
:
10
,
projectYear
:
null
,
gateStationAddress
:
null
,
gateStationInvestment
:
null
,
numberGateStations
:
null
,
pipeLength
:
null
,
...
...
@@ -325,10 +339,9 @@ export default {
this
.
form
=
{
projectId
:
null
,
projectYear
:
null
,
gateStationAddress
:
null
,
gateStationInvestment
:
null
,
numberGateStations
:
null
,
pipeLength
:
null
,
numberGateStations
:
0
,
pipeLength
:
0
,
pipeInvestment
:
null
,
nearbyAddress
:
null
,
createBy
:
null
,
...
...
@@ -336,7 +349,8 @@ export default {
updateBy
:
null
,
updateTime
:
null
,
isDel
:
null
,
remarks
:
null
remarks
:
null
,
enterpriseCode
:
null
}
;
this
.
resetForm
(
"form"
);
this
.
fileList
=
[];
...
...
@@ -482,4 +496,23 @@ export default {
border
-
width
:
1
px
;
border
-
color
:
rgb
(
48
,
180
,
107
);
}
.
tableTitle
{
position
:
relative
;
margin
:
24
px
auto
;
width
:
600
px
;
height
:
2
px
;
background
-
color
:
#
d4d4d4
;
text
-
align
:
center
;
font
-
size
:
16
px
;
color
:
rgba
(
101
,
101
,
101
,
1
);
}
.
midText
{
position
:
absolute
;
left
:
3
%
;
background
-
color
:
#
ffffff
;
padding
:
0
15
px
;
transform
:
translateX
(
-
50
%
)
translateY
(
-
50
%
);
}
<
/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