Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gas-management
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
吴卿华
gas-management
Commits
9764361c
Commit
9764361c
authored
Jul 19, 2022
by
wuqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022-7-19
parent
13a00380
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
58 deletions
+81
-58
TDeviceInfo.java
...m/src/main/java/com/zehong/system/domain/TDeviceInfo.java
+61
-44
TDeviceInfoServiceImpl.java
...om/zehong/system/service/impl/TDeviceInfoServiceImpl.java
+2
-2
TDeviceInfoMapper.xml
...em/src/main/resources/mapper/system/TDeviceInfoMapper.xml
+8
-7
TPipeMapper.xml
...t-system/src/main/resources/mapper/system/TPipeMapper.xml
+10
-5
No files found.
gas-management-system/src/main/java/com/zehong/system/domain/TDeviceInfo.java
View file @
9764361c
...
...
@@ -21,6 +21,9 @@ public class TDeviceInfo extends BaseEntity
/** 设备id */
private
Integer
deviceId
;
/** 管道名称*/
private
String
pipeName
;
/** 企业id */
@Excel
(
name
=
"企业id"
)
private
Integer
enterpriseId
;
...
...
@@ -91,6 +94,18 @@ public class TDeviceInfo extends BaseEntity
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
static
long
getSerialVersionUID
()
{
return
serialVersionUID
;
}
public
String
getPipeName
()
{
return
pipeName
;
}
public
void
setPipeName
(
String
pipeName
)
{
this
.
pipeName
=
pipeName
;
}
public
void
setDeviceId
(
Integer
deviceId
)
{
this
.
deviceId
=
deviceId
;
...
...
@@ -256,24 +271,26 @@ public class TDeviceInfo extends BaseEntity
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"deviceId"
,
getDeviceId
())
.
append
(
"enterpriseId"
,
getEnterpriseId
())
.
append
(
"pipeCode"
,
getPipeId
())
.
append
(
"deviceName"
,
getDeviceName
())
.
append
(
"deviceCode"
,
getDeviceCode
())
.
append
(
"deviceAddr"
,
getDeviceAddr
())
.
append
(
"deviceModel"
,
getDeviceModel
())
.
append
(
"deviceType"
,
getDeviceType
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"iotNo"
,
getIotNo
())
.
append
(
"iconUrl"
,
getIconUrl
())
.
append
(
"linkman"
,
getLinkman
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"installationTime"
,
getInstallationTime
())
.
append
(
"inspectionTime"
,
getInspectionTime
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
return
"TDeviceInfo{"
+
"deviceId="
+
deviceId
+
", pipeName='"
+
pipeName
+
'\''
+
", enterpriseId="
+
enterpriseId
+
", pipeId="
+
pipeId
+
", deviceName='"
+
deviceName
+
'\''
+
", deviceCode='"
+
deviceCode
+
'\''
+
", deviceAddr='"
+
deviceAddr
+
'\''
+
", deviceModel='"
+
deviceModel
+
'\''
+
", deviceType='"
+
deviceType
+
'\''
+
", longitude="
+
longitude
+
", latitude="
+
latitude
+
", iotNo='"
+
iotNo
+
'\''
+
", iconUrl='"
+
iconUrl
+
'\''
+
", linkman='"
+
linkman
+
'\''
+
", phone='"
+
phone
+
'\''
+
", installationTime="
+
installationTime
+
", inspectionTime="
+
inspectionTime
+
", isDel='"
+
isDel
+
'\''
+
", remarks='"
+
remarks
+
'\''
+
'}'
;
}
}
gas-management-system/src/main/java/com/zehong/system/service/impl/TDeviceInfoServiceImpl.java
View file @
9764361c
...
...
@@ -69,8 +69,8 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
DeviceInfoVo
deviceInfoVo
=
new
DeviceInfoVo
();
BeanUtils
.
copyProperties
(
device
,
deviceInfoVo
);
TPipe
pipe
=
tPipeMapper
.
selectTPipeById
(
device
.
getPipeId
());
deviceInfoVo
.
setPipeName
(
pipe
.
getPipeName
());
//
TPipe pipe = tPipeMapper.selectTPipeById(device.getPipeId());
//
deviceInfoVo.setPipeName(pipe.getPipeName());
list
.
add
(
deviceInfoVo
);
}
...
...
gas-management-system/src/main/resources/mapper/system/TDeviceInfoMapper.xml
View file @
9764361c
...
...
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap
type=
"TDeviceInfo"
id=
"TDeviceInfoResult"
>
<result
property=
"deviceId"
column=
"device_id"
/>
<result
property=
"pipeName"
column=
"pipe_name"
/>
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
<result
property=
"pipeId"
column=
"pipe_id"
/>
<result
property=
"deviceName"
column=
"device_name"
/>
...
...
@@ -30,9 +31,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select
id=
"selectTDeviceInfoList"
parameterType=
"TDeviceInfo"
resultMap=
"TDeviceInfoResult"
>
<include
refid=
"selectTDeviceInfoVo"
/>
select a.*,b.pipe_name from t_device_info a left join t_pipe b on a.pipe_id=b.pipe_id
<where>
is_del = '0'
a.
is_del = '0'
<if
test=
"enterpriseId != null and enterpriseId != 0 "
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"deviceName != null and deviceName != ''"
>
and device_name like concat('%', #{deviceName}, '%')
</if>
<if
test=
"deviceCode != null and deviceCode != ''"
>
and device_code like concat('%', #{deviceCode}, '%')
</if>
...
...
gas-management-system/src/main/resources/mapper/system/TPipeMapper.xml
View file @
9764361c
...
...
@@ -48,6 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where pipe_id = #{pipeId}
</select>
<!-- <select id="selectTPipeById" parameterType="int" resultMap="TPipeResult">-->
<!-- select pipe_id, pipe_code, pipe_addr, coordinates, pipe_length, pipe_type, pipe_pressure, icon_url, installation_time, inspection_time, remarks from t_pipe-->
<!-- where pipe_id = #{pipeId}-->
<!-- </select>-->
<select
id=
"countPipeLength"
resultType=
"double"
>
select COALESCE(sum(pipe_length), 0) from t_pipe
where is_del = '0'
...
...
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