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
6108d0c0
Commit
6108d0c0
authored
Feb 16, 2022
by
王晓倩
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
3a65f92a
f9f0b73d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1110 additions
and
0 deletions
+1110
-0
TDeviceReportDataController.java
...troller/operationMonitor/TDeviceReportDataController.java
+103
-0
TDeviceReportData.java
...main/java/com/zehong/system/domain/TDeviceReportData.java
+241
-0
TDeviceReportDataMapper.java
...ava/com/zehong/system/mapper/TDeviceReportDataMapper.java
+61
-0
ITDeviceReportDataService.java
.../com/zehong/system/service/ITDeviceReportDataService.java
+61
-0
TDeviceReportDataServiceImpl.java
...ong/system/service/impl/TDeviceReportDataServiceImpl.java
+96
-0
TDeviceReportDataMapper.xml
.../main/resources/mapper/system/TDeviceReportDataMapper.xml
+137
-0
data.js
gassafetyprogress-web/src/api/operationMonitor/data.js
+53
-0
index.vue
...ress-web/src/views/operationMonitor/monitorData/index.vue
+358
-0
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/operationMonitor/TDeviceReportDataController.java
0 → 100644
View file @
6108d0c0
package
com
.
zehong
.
web
.
controller
.
operationMonitor
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.service.ITDeviceReportDataService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 设备监控Controller
*
* @author zehong
* @date 2022-02-16
*/
@RestController
@RequestMapping
(
"/system/data"
)
public
class
TDeviceReportDataController
extends
BaseController
{
@Autowired
private
ITDeviceReportDataService
tDeviceReportDataService
;
/**
* 查询设备监控列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:data:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TDeviceReportData
tDeviceReportData
)
{
startPage
();
List
<
TDeviceReportData
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
tDeviceReportData
);
return
getDataTable
(
list
);
}
/**
* 导出设备监控列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:data:export')"
)
@Log
(
title
=
"设备监控"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TDeviceReportData
tDeviceReportData
)
{
List
<
TDeviceReportData
>
list
=
tDeviceReportDataService
.
selectTDeviceReportDataList
(
tDeviceReportData
);
ExcelUtil
<
TDeviceReportData
>
util
=
new
ExcelUtil
<
TDeviceReportData
>(
TDeviceReportData
.
class
);
return
util
.
exportExcel
(
list
,
"设备监控数据"
);
}
/**
* 获取设备监控详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:data:query')"
)
@GetMapping
(
value
=
"/{deviceReportDataId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"deviceReportDataId"
)
Long
deviceReportDataId
)
{
return
AjaxResult
.
success
(
tDeviceReportDataService
.
selectTDeviceReportDataById
(
deviceReportDataId
));
}
/**
* 新增设备监控
*/
@PreAuthorize
(
"@ss.hasPermi('system:data:add')"
)
@Log
(
title
=
"设备监控"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TDeviceReportData
tDeviceReportData
)
{
return
toAjax
(
tDeviceReportDataService
.
insertTDeviceReportData
(
tDeviceReportData
));
}
/**
* 修改设备监控
*/
@PreAuthorize
(
"@ss.hasPermi('system:data:edit')"
)
@Log
(
title
=
"设备监控"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TDeviceReportData
tDeviceReportData
)
{
return
toAjax
(
tDeviceReportDataService
.
updateTDeviceReportData
(
tDeviceReportData
));
}
/**
* 删除设备监控
*/
@PreAuthorize
(
"@ss.hasPermi('system:data:remove')"
)
@Log
(
title
=
"设备监控"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{deviceReportDataIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
deviceReportDataIds
)
{
return
toAjax
(
tDeviceReportDataService
.
deleteTDeviceReportDataByIds
(
deviceReportDataIds
));
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/TDeviceReportData.java
0 → 100644
View file @
6108d0c0
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 设备监控对象 t_device_report_data
*
* @author zehong
* @date 2022-02-16
*/
public
class
TDeviceReportData
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 设备上报id */
private
Long
deviceReportDataId
;
/** 设备id(物联网编号) */
@Excel
(
name
=
"设备id"
,
readConverterExp
=
"物=联网编号"
)
private
String
deviceNum
;
/** 标况累计量 */
@Excel
(
name
=
"标况累计量"
)
private
BigDecimal
standardConditionAccumulation
;
/** 工况累计量 */
@Excel
(
name
=
"工况累计量"
)
private
BigDecimal
workingConditionAccumulation
;
/** 逆向标况累计量 */
@Excel
(
name
=
"逆向标况累计量"
)
private
BigDecimal
backingStandardConditionAccumulation
;
/** 剩余量 */
@Excel
(
name
=
"剩余量"
)
private
BigDecimal
residualQuantity
;
/** 标况流量 */
@Excel
(
name
=
"标况流量"
)
private
BigDecimal
standardConditionFlow
;
/** 工况流量 */
@Excel
(
name
=
"工况流量"
)
private
BigDecimal
workingConditionFlow
;
/** 温度 */
@Excel
(
name
=
"温度"
)
private
BigDecimal
temperature
;
/** 压力 */
@Excel
(
name
=
"压力"
)
private
BigDecimal
pressure
;
/** 上报时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"上报时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
reportTime
;
/** 通讯状态 */
@Excel
(
name
=
"通讯状态"
)
private
String
communicationStatus
;
/** 设备状态 */
@Excel
(
name
=
"设备状态"
)
private
String
deviceStatus
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
public
void
setDeviceReportDataId
(
Long
deviceReportDataId
)
{
this
.
deviceReportDataId
=
deviceReportDataId
;
}
public
Long
getDeviceReportDataId
()
{
return
deviceReportDataId
;
}
public
void
setDeviceNum
(
String
deviceNum
)
{
this
.
deviceNum
=
deviceNum
;
}
public
String
getDeviceNum
()
{
return
deviceNum
;
}
public
void
setStandardConditionAccumulation
(
BigDecimal
standardConditionAccumulation
)
{
this
.
standardConditionAccumulation
=
standardConditionAccumulation
;
}
public
BigDecimal
getStandardConditionAccumulation
()
{
return
standardConditionAccumulation
;
}
public
void
setWorkingConditionAccumulation
(
BigDecimal
workingConditionAccumulation
)
{
this
.
workingConditionAccumulation
=
workingConditionAccumulation
;
}
public
BigDecimal
getWorkingConditionAccumulation
()
{
return
workingConditionAccumulation
;
}
public
void
setBackingStandardConditionAccumulation
(
BigDecimal
backingStandardConditionAccumulation
)
{
this
.
backingStandardConditionAccumulation
=
backingStandardConditionAccumulation
;
}
public
BigDecimal
getBackingStandardConditionAccumulation
()
{
return
backingStandardConditionAccumulation
;
}
public
void
setResidualQuantity
(
BigDecimal
residualQuantity
)
{
this
.
residualQuantity
=
residualQuantity
;
}
public
BigDecimal
getResidualQuantity
()
{
return
residualQuantity
;
}
public
void
setStandardConditionFlow
(
BigDecimal
standardConditionFlow
)
{
this
.
standardConditionFlow
=
standardConditionFlow
;
}
public
BigDecimal
getStandardConditionFlow
()
{
return
standardConditionFlow
;
}
public
void
setWorkingConditionFlow
(
BigDecimal
workingConditionFlow
)
{
this
.
workingConditionFlow
=
workingConditionFlow
;
}
public
BigDecimal
getWorkingConditionFlow
()
{
return
workingConditionFlow
;
}
public
void
setTemperature
(
BigDecimal
temperature
)
{
this
.
temperature
=
temperature
;
}
public
BigDecimal
getTemperature
()
{
return
temperature
;
}
public
void
setPressure
(
BigDecimal
pressure
)
{
this
.
pressure
=
pressure
;
}
public
BigDecimal
getPressure
()
{
return
pressure
;
}
public
void
setReportTime
(
Date
reportTime
)
{
this
.
reportTime
=
reportTime
;
}
public
Date
getReportTime
()
{
return
reportTime
;
}
public
void
setCommunicationStatus
(
String
communicationStatus
)
{
this
.
communicationStatus
=
communicationStatus
;
}
public
String
getCommunicationStatus
()
{
return
communicationStatus
;
}
public
void
setDeviceStatus
(
String
deviceStatus
)
{
this
.
deviceStatus
=
deviceStatus
;
}
public
String
getDeviceStatus
()
{
return
deviceStatus
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"deviceReportDataId"
,
getDeviceReportDataId
())
.
append
(
"deviceNum"
,
getDeviceNum
())
.
append
(
"standardConditionAccumulation"
,
getStandardConditionAccumulation
())
.
append
(
"workingConditionAccumulation"
,
getWorkingConditionAccumulation
())
.
append
(
"backingStandardConditionAccumulation"
,
getBackingStandardConditionAccumulation
())
.
append
(
"residualQuantity"
,
getResidualQuantity
())
.
append
(
"standardConditionFlow"
,
getStandardConditionFlow
())
.
append
(
"workingConditionFlow"
,
getWorkingConditionFlow
())
.
append
(
"temperature"
,
getTemperature
())
.
append
(
"pressure"
,
getPressure
())
.
append
(
"reportTime"
,
getReportTime
())
.
append
(
"communicationStatus"
,
getCommunicationStatus
())
.
append
(
"deviceStatus"
,
getDeviceStatus
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TDeviceReportDataMapper.java
0 → 100644
View file @
6108d0c0
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceReportData
;
/**
* 设备监控Mapper接口
*
* @author zehong
* @date 2022-02-16
*/
public
interface
TDeviceReportDataMapper
{
/**
* 查询设备监控
*
* @param deviceReportDataId 设备监控ID
* @return 设备监控
*/
public
TDeviceReportData
selectTDeviceReportDataById
(
Long
deviceReportDataId
);
/**
* 查询设备监控列表
*
* @param tDeviceReportData 设备监控
* @return 设备监控集合
*/
public
List
<
TDeviceReportData
>
selectTDeviceReportDataList
(
TDeviceReportData
tDeviceReportData
);
/**
* 新增设备监控
*
* @param tDeviceReportData 设备监控
* @return 结果
*/
public
int
insertTDeviceReportData
(
TDeviceReportData
tDeviceReportData
);
/**
* 修改设备监控
*
* @param tDeviceReportData 设备监控
* @return 结果
*/
public
int
updateTDeviceReportData
(
TDeviceReportData
tDeviceReportData
);
/**
* 删除设备监控
*
* @param deviceReportDataId 设备监控ID
* @return 结果
*/
public
int
deleteTDeviceReportDataById
(
Long
deviceReportDataId
);
/**
* 批量删除设备监控
*
* @param deviceReportDataIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTDeviceReportDataByIds
(
Long
[]
deviceReportDataIds
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITDeviceReportDataService.java
0 → 100644
View file @
6108d0c0
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TDeviceReportData
;
/**
* 设备监控Service接口
*
* @author zehong
* @date 2022-02-16
*/
public
interface
ITDeviceReportDataService
{
/**
* 查询设备监控
*
* @param deviceReportDataId 设备监控ID
* @return 设备监控
*/
public
TDeviceReportData
selectTDeviceReportDataById
(
Long
deviceReportDataId
);
/**
* 查询设备监控列表
*
* @param tDeviceReportData 设备监控
* @return 设备监控集合
*/
public
List
<
TDeviceReportData
>
selectTDeviceReportDataList
(
TDeviceReportData
tDeviceReportData
);
/**
* 新增设备监控
*
* @param tDeviceReportData 设备监控
* @return 结果
*/
public
int
insertTDeviceReportData
(
TDeviceReportData
tDeviceReportData
);
/**
* 修改设备监控
*
* @param tDeviceReportData 设备监控
* @return 结果
*/
public
int
updateTDeviceReportData
(
TDeviceReportData
tDeviceReportData
);
/**
* 批量删除设备监控
*
* @param deviceReportDataIds 需要删除的设备监控ID
* @return 结果
*/
public
int
deleteTDeviceReportDataByIds
(
Long
[]
deviceReportDataIds
);
/**
* 删除设备监控信息
*
* @param deviceReportDataId 设备监控ID
* @return 结果
*/
public
int
deleteTDeviceReportDataById
(
Long
deviceReportDataId
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TDeviceReportDataServiceImpl.java
0 → 100644
View file @
6108d0c0
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TDeviceReportDataMapper
;
import
com.zehong.system.domain.TDeviceReportData
;
import
com.zehong.system.service.ITDeviceReportDataService
;
/**
* 设备监控Service业务层处理
*
* @author zehong
* @date 2022-02-16
*/
@Service
public
class
TDeviceReportDataServiceImpl
implements
ITDeviceReportDataService
{
@Autowired
private
TDeviceReportDataMapper
tDeviceReportDataMapper
;
/**
* 查询设备监控
*
* @param deviceReportDataId 设备监控ID
* @return 设备监控
*/
@Override
public
TDeviceReportData
selectTDeviceReportDataById
(
Long
deviceReportDataId
)
{
return
tDeviceReportDataMapper
.
selectTDeviceReportDataById
(
deviceReportDataId
);
}
/**
* 查询设备监控列表
*
* @param tDeviceReportData 设备监控
* @return 设备监控
*/
@Override
public
List
<
TDeviceReportData
>
selectTDeviceReportDataList
(
TDeviceReportData
tDeviceReportData
)
{
return
tDeviceReportDataMapper
.
selectTDeviceReportDataList
(
tDeviceReportData
);
}
/**
* 新增设备监控
*
* @param tDeviceReportData 设备监控
* @return 结果
*/
@Override
public
int
insertTDeviceReportData
(
TDeviceReportData
tDeviceReportData
)
{
tDeviceReportData
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tDeviceReportDataMapper
.
insertTDeviceReportData
(
tDeviceReportData
);
}
/**
* 修改设备监控
*
* @param tDeviceReportData 设备监控
* @return 结果
*/
@Override
public
int
updateTDeviceReportData
(
TDeviceReportData
tDeviceReportData
)
{
tDeviceReportData
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
tDeviceReportDataMapper
.
updateTDeviceReportData
(
tDeviceReportData
);
}
/**
* 批量删除设备监控
*
* @param deviceReportDataIds 需要删除的设备监控ID
* @return 结果
*/
@Override
public
int
deleteTDeviceReportDataByIds
(
Long
[]
deviceReportDataIds
)
{
return
tDeviceReportDataMapper
.
deleteTDeviceReportDataByIds
(
deviceReportDataIds
);
}
/**
* 删除设备监控信息
*
* @param deviceReportDataId 设备监控ID
* @return 结果
*/
@Override
public
int
deleteTDeviceReportDataById
(
Long
deviceReportDataId
)
{
return
tDeviceReportDataMapper
.
deleteTDeviceReportDataById
(
deviceReportDataId
);
}
}
gassafetyprogress-system/src/main/resources/mapper/system/TDeviceReportDataMapper.xml
0 → 100644
View file @
6108d0c0
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TDeviceReportDataMapper"
>
<resultMap
type=
"TDeviceReportData"
id=
"TDeviceReportDataResult"
>
<result
property=
"deviceReportDataId"
column=
"device_report_data_id"
/>
<result
property=
"deviceNum"
column=
"device_num"
/>
<result
property=
"standardConditionAccumulation"
column=
"standard_condition_accumulation"
/>
<result
property=
"workingConditionAccumulation"
column=
"working_condition_accumulation"
/>
<result
property=
"backingStandardConditionAccumulation"
column=
"backing_standard_condition_accumulation"
/>
<result
property=
"residualQuantity"
column=
"residual_quantity"
/>
<result
property=
"standardConditionFlow"
column=
"standard_condition_flow"
/>
<result
property=
"workingConditionFlow"
column=
"working_condition_flow"
/>
<result
property=
"temperature"
column=
"temperature"
/>
<result
property=
"pressure"
column=
"pressure"
/>
<result
property=
"reportTime"
column=
"report_time"
/>
<result
property=
"communicationStatus"
column=
"communication_status"
/>
<result
property=
"deviceStatus"
column=
"device_status"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
<sql
id=
"selectTDeviceReportDataVo"
>
select device_report_data_id, device_num, standard_condition_accumulation, working_condition_accumulation, backing_standard_condition_accumulation, residual_quantity, standard_condition_flow, working_condition_flow, temperature, pressure, report_time, communication_status, device_status, create_by, create_time, update_by, update_time, is_del, remarks from t_device_report_data
</sql>
<select
id=
"selectTDeviceReportDataList"
parameterType=
"TDeviceReportData"
resultMap=
"TDeviceReportDataResult"
>
<include
refid=
"selectTDeviceReportDataVo"
/>
<where>
<if
test=
"deviceNum != null and deviceNum != ''"
>
and device_num = #{deviceNum}
</if>
<if
test=
"standardConditionAccumulation != null "
>
and standard_condition_accumulation = #{standardConditionAccumulation}
</if>
<if
test=
"workingConditionAccumulation != null "
>
and working_condition_accumulation = #{workingConditionAccumulation}
</if>
<if
test=
"backingStandardConditionAccumulation != null "
>
and backing_standard_condition_accumulation = #{backingStandardConditionAccumulation}
</if>
<if
test=
"residualQuantity != null "
>
and residual_quantity = #{residualQuantity}
</if>
<if
test=
"standardConditionFlow != null "
>
and standard_condition_flow = #{standardConditionFlow}
</if>
<if
test=
"workingConditionFlow != null "
>
and working_condition_flow = #{workingConditionFlow}
</if>
<if
test=
"temperature != null "
>
and temperature = #{temperature}
</if>
<if
test=
"pressure != null "
>
and pressure = #{pressure}
</if>
<if
test=
"reportTime != null "
>
and report_time = #{reportTime}
</if>
<if
test=
"communicationStatus != null and communicationStatus != ''"
>
and communication_status = #{communicationStatus}
</if>
<if
test=
"deviceStatus != null and deviceStatus != ''"
>
and device_status = #{deviceStatus}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
</select>
<select
id=
"selectTDeviceReportDataById"
parameterType=
"Long"
resultMap=
"TDeviceReportDataResult"
>
<include
refid=
"selectTDeviceReportDataVo"
/>
where device_report_data_id = #{deviceReportDataId}
</select>
<insert
id=
"insertTDeviceReportData"
parameterType=
"TDeviceReportData"
useGeneratedKeys=
"true"
keyProperty=
"deviceReportDataId"
>
insert into t_device_report_data
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"deviceNum != null and deviceNum != ''"
>
device_num,
</if>
<if
test=
"standardConditionAccumulation != null"
>
standard_condition_accumulation,
</if>
<if
test=
"workingConditionAccumulation != null"
>
working_condition_accumulation,
</if>
<if
test=
"backingStandardConditionAccumulation != null"
>
backing_standard_condition_accumulation,
</if>
<if
test=
"residualQuantity != null"
>
residual_quantity,
</if>
<if
test=
"standardConditionFlow != null"
>
standard_condition_flow,
</if>
<if
test=
"workingConditionFlow != null"
>
working_condition_flow,
</if>
<if
test=
"temperature != null"
>
temperature,
</if>
<if
test=
"pressure != null"
>
pressure,
</if>
<if
test=
"reportTime != null"
>
report_time,
</if>
<if
test=
"communicationStatus != null"
>
communication_status,
</if>
<if
test=
"deviceStatus != null"
>
device_status,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"deviceNum != null and deviceNum != ''"
>
#{deviceNum},
</if>
<if
test=
"standardConditionAccumulation != null"
>
#{standardConditionAccumulation},
</if>
<if
test=
"workingConditionAccumulation != null"
>
#{workingConditionAccumulation},
</if>
<if
test=
"backingStandardConditionAccumulation != null"
>
#{backingStandardConditionAccumulation},
</if>
<if
test=
"residualQuantity != null"
>
#{residualQuantity},
</if>
<if
test=
"standardConditionFlow != null"
>
#{standardConditionFlow},
</if>
<if
test=
"workingConditionFlow != null"
>
#{workingConditionFlow},
</if>
<if
test=
"temperature != null"
>
#{temperature},
</if>
<if
test=
"pressure != null"
>
#{pressure},
</if>
<if
test=
"reportTime != null"
>
#{reportTime},
</if>
<if
test=
"communicationStatus != null"
>
#{communicationStatus},
</if>
<if
test=
"deviceStatus != null"
>
#{deviceStatus},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
</trim>
</insert>
<update
id=
"updateTDeviceReportData"
parameterType=
"TDeviceReportData"
>
update t_device_report_data
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"deviceNum != null and deviceNum != ''"
>
device_num = #{deviceNum},
</if>
<if
test=
"standardConditionAccumulation != null"
>
standard_condition_accumulation = #{standardConditionAccumulation},
</if>
<if
test=
"workingConditionAccumulation != null"
>
working_condition_accumulation = #{workingConditionAccumulation},
</if>
<if
test=
"backingStandardConditionAccumulation != null"
>
backing_standard_condition_accumulation = #{backingStandardConditionAccumulation},
</if>
<if
test=
"residualQuantity != null"
>
residual_quantity = #{residualQuantity},
</if>
<if
test=
"standardConditionFlow != null"
>
standard_condition_flow = #{standardConditionFlow},
</if>
<if
test=
"workingConditionFlow != null"
>
working_condition_flow = #{workingConditionFlow},
</if>
<if
test=
"temperature != null"
>
temperature = #{temperature},
</if>
<if
test=
"pressure != null"
>
pressure = #{pressure},
</if>
<if
test=
"reportTime != null"
>
report_time = #{reportTime},
</if>
<if
test=
"communicationStatus != null"
>
communication_status = #{communicationStatus},
</if>
<if
test=
"deviceStatus != null"
>
device_status = #{deviceStatus},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
</trim>
where device_report_data_id = #{deviceReportDataId}
</update>
<delete
id=
"deleteTDeviceReportDataById"
parameterType=
"Long"
>
delete from t_device_report_data where device_report_data_id = #{deviceReportDataId}
</delete>
<delete
id=
"deleteTDeviceReportDataByIds"
parameterType=
"String"
>
delete from t_device_report_data where device_report_data_id in
<foreach
item=
"deviceReportDataId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{deviceReportDataId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
gassafetyprogress-web/src/api/operationMonitor/data.js
0 → 100644
View file @
6108d0c0
import
request
from
'@/utils/request'
// 查询设备监控列表
export
function
listData
(
query
)
{
return
request
({
url
:
'/system/data/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询设备监控详细
export
function
getData
(
deviceReportDataId
)
{
return
request
({
url
:
'/system/data/'
+
deviceReportDataId
,
method
:
'get'
})
}
// 新增设备监控
export
function
addData
(
data
)
{
return
request
({
url
:
'/system/data'
,
method
:
'post'
,
data
:
data
})
}
// 修改设备监控
export
function
updateData
(
data
)
{
return
request
({
url
:
'/system/data'
,
method
:
'put'
,
data
:
data
})
}
// 删除设备监控
export
function
delData
(
deviceReportDataId
)
{
return
request
({
url
:
'/system/data/'
+
deviceReportDataId
,
method
:
'delete'
})
}
// 导出设备监控
export
function
exportData
(
query
)
{
return
request
({
url
:
'/system/data/export'
,
method
:
'get'
,
params
:
query
})
}
\ No newline at end of file
gassafetyprogress-web/src/views/operationMonitor/monitorData/index.vue
0 → 100644
View file @
6108d0c0
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"设备编号"
prop=
"deviceNum"
>
<el-input
v-model=
"queryParams.deviceNum"
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>
</el-form-item>
</el-form>
<!--
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:data:add']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:data:edit']"
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:data:remove']"
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
v-hasPermi=
"['system:data:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
-->
<el-table
v-loading=
"loading"
:data=
"dataList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"设备编号"
align=
"center"
prop=
"deviceNum"
width=
"155"
/>
<el-table-column
label=
"标况累计量"
align=
"center"
prop=
"standardConditionAccumulation"
/>
<el-table-column
label=
"工况累计量"
align=
"center"
prop=
"workingConditionAccumulation"
/>
<el-table-column
label=
"逆向标况累计量"
align=
"center"
prop=
"backingStandardConditionAccumulation"
/>
<el-table-column
label=
"剩余量"
align=
"center"
prop=
"residualQuantity"
/>
<el-table-column
label=
"标况流量"
align=
"center"
prop=
"standardConditionFlow"
/>
<el-table-column
label=
"工况流量"
align=
"center"
prop=
"workingConditionFlow"
/>
<el-table-column
label=
"温度"
align=
"center"
prop=
"temperature"
/>
<el-table-column
label=
"压力"
align=
"center"
prop=
"pressure"
/>
<el-table-column
label=
"上报时间"
align=
"center"
prop=
"reportTime"
width=
"180"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
reportTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<!--
<
el
-
table
-
column
label
=
"创建时间"
align
=
"center"
prop
=
"createTime"
/>-->
<!--
<
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-edit"
@
click
=
"handleUpdate(scope.row)"
v
-
hasPermi
=
"['system:data:edit']"
>
修改
<
/el-button
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-delete"
@
click
=
"handleDelete(scope.row)"
v
-
hasPermi
=
"['system:data:remove']"
>
删除
<
/el-button
>
<
/template
>
<
/el-table-column>--
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改设备监控对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"设备编号"
prop
=
"deviceNum"
>
<
el
-
input
v
-
model
=
"form.deviceNum"
placeholder
=
"请输入设备编号"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"标况累计量"
prop
=
"standardConditionAccumulation"
>
<
el
-
input
v
-
model
=
"form.standardConditionAccumulation"
placeholder
=
"请输入标况累计量"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"工况累计量"
prop
=
"workingConditionAccumulation"
>
<
el
-
input
v
-
model
=
"form.workingConditionAccumulation"
placeholder
=
"请输入工况累计量"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"逆向标况累计量"
prop
=
"backingStandardConditionAccumulation"
>
<
el
-
input
v
-
model
=
"form.backingStandardConditionAccumulation"
placeholder
=
"请输入逆向标况累计量"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"剩余量"
prop
=
"residualQuantity"
>
<
el
-
input
v
-
model
=
"form.residualQuantity"
placeholder
=
"请输入剩余量"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"标况流量"
prop
=
"standardConditionFlow"
>
<
el
-
input
v
-
model
=
"form.standardConditionFlow"
placeholder
=
"请输入标况流量"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"工况流量"
prop
=
"workingConditionFlow"
>
<
el
-
input
v
-
model
=
"form.workingConditionFlow"
placeholder
=
"请输入工况流量"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"温度"
prop
=
"temperature"
>
<
el
-
input
v
-
model
=
"form.temperature"
placeholder
=
"请输入温度"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"压力"
prop
=
"pressure"
>
<
el
-
input
v
-
model
=
"form.pressure"
placeholder
=
"请输入压力"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"上报时间"
prop
=
"reportTime"
>
<
el
-
date
-
picker
clearable
size
=
"small"
v
-
model
=
"form.reportTime"
type
=
"date"
value
-
format
=
"yyyy-MM-dd"
placeholder
=
"选择上报时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<!--
<
el
-
form
-
item
label
=
"通讯状态"
>
<
el
-
radio
-
group
v
-
model
=
"form.communicationStatus"
>
<
el
-
radio
label
=
"1"
>
请选择字典生成
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"设备状态"
>
<
el
-
radio
-
group
v
-
model
=
"form.deviceStatus"
>
<
el
-
radio
label
=
"1"
>
请选择字典生成
<
/el-radio
>
<
/el-radio-group
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"是否删除(0正常,1删除)"
prop
=
"isDel"
>
<
el
-
input
v
-
model
=
"form.isDel"
placeholder
=
"请输入是否删除(0正常,1删除)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"备注"
prop
=
"remarks"
>
<
el
-
input
v
-
model
=
"form.remarks"
placeholder
=
"请输入备注"
/>
<
/el-form-item>--
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
listData
,
getData
,
delData
,
addData
,
updateData
,
exportData
}
from
"@/api/operationMonitor/data"
;
export
default
{
name
:
"Data"
,
components
:
{
}
,
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 设备监控表格数据
dataList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
deviceNum
:
null
,
standardConditionAccumulation
:
null
,
workingConditionAccumulation
:
null
,
backingStandardConditionAccumulation
:
null
,
residualQuantity
:
null
,
standardConditionFlow
:
null
,
workingConditionFlow
:
null
,
temperature
:
null
,
pressure
:
null
,
reportTime
:
null
,
communicationStatus
:
null
,
deviceStatus
:
null
,
isDel
:
null
,
remarks
:
null
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
deviceNum
:
[
{
required
:
true
,
message
:
"设备id不能为空"
,
trigger
:
"blur"
}
],
}
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
/** 查询设备监控列表 */
getList
()
{
this
.
loading
=
true
;
listData
(
this
.
queryParams
).
then
(
response
=>
{
this
.
dataList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
deviceReportDataId
:
null
,
deviceNum
:
null
,
standardConditionAccumulation
:
null
,
workingConditionAccumulation
:
null
,
backingStandardConditionAccumulation
:
null
,
residualQuantity
:
null
,
standardConditionFlow
:
null
,
workingConditionFlow
:
null
,
temperature
:
null
,
pressure
:
null
,
reportTime
:
null
,
communicationStatus
:
"0"
,
deviceStatus
:
"0"
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
isDel
:
null
,
remarks
:
null
}
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
deviceReportDataId
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加设备监控"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
deviceReportDataId
=
row
.
deviceReportDataId
||
this
.
ids
getData
(
deviceReportDataId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改设备监控"
;
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
deviceReportDataId
!=
null
)
{
updateData
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addData
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
deviceReportDataIds
=
row
.
deviceReportDataId
||
this
.
ids
;
this
.
$confirm
(
'是否确认删除设备监控编号为"'
+
deviceReportDataIds
+
'"的数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(
function
()
{
return
delData
(
deviceReportDataIds
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$confirm
(
'是否确认导出所有设备监控数据项?'
,
"警告"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportData
(
queryParams
);
}
).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
}
}
;
<
/script
>
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