Commit 66584520 authored by 耿迪迪's avatar 耿迪迪
parents 598fa7bc 37139dcb
package com.zehong.web.controller.supervise;
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.TDetectorUser;
import com.zehong.system.service.ITDetectorUserService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 燃气用户Controller
*
* @author zehong
* @date 2022-02-07
*/
@RestController
@RequestMapping("/supervise/user")
public class TDetectorUserController extends BaseController
{
@Autowired
private ITDetectorUserService tDetectorUserService;
/**
* 查询燃气用户列表
*/
@PreAuthorize("@ss.hasPermi('supervise:user:list')")
@GetMapping("/list")
public TableDataInfo list(TDetectorUser tDetectorUser)
{
startPage();
List<TDetectorUser> list = tDetectorUserService.selectTDetectorUserList(tDetectorUser);
return getDataTable(list);
}
/**
* 导出燃气用户列表
*/
@PreAuthorize("@ss.hasPermi('supervise:user:export')")
@Log(title = "燃气用户", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDetectorUser tDetectorUser)
{
List<TDetectorUser> list = tDetectorUserService.selectTDetectorUserList(tDetectorUser);
ExcelUtil<TDetectorUser> util = new ExcelUtil<TDetectorUser>(TDetectorUser.class);
return util.exportExcel(list, "燃气用户数据");
}
/**
* 获取燃气用户详细信息
*/
@PreAuthorize("@ss.hasPermi('supervise:user:query')")
@GetMapping(value = "/{userId}")
public AjaxResult getInfo(@PathVariable("userId") Long userId)
{
return AjaxResult.success(tDetectorUserService.selectTDetectorUserById(userId));
}
/**
* 新增燃气用户
*/
@PreAuthorize("@ss.hasPermi('supervise:user:add')")
@Log(title = "燃气用户", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDetectorUser tDetectorUser)
{
return toAjax(tDetectorUserService.insertTDetectorUser(tDetectorUser));
}
/**
* 修改燃气用户
*/
@PreAuthorize("@ss.hasPermi('supervise:user:edit')")
@Log(title = "燃气用户", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDetectorUser tDetectorUser)
{
return toAjax(tDetectorUserService.updateTDetectorUser(tDetectorUser));
}
/**
* 删除燃气用户
*/
@PreAuthorize("@ss.hasPermi('supervise:user:remove')")
@Log(title = "燃气用户", businessType = BusinessType.DELETE)
@DeleteMapping("/{userIds}")
public AjaxResult remove(@PathVariable Long[] userIds)
{
return toAjax(tDetectorUserService.deleteTDetectorUserByIds(userIds));
}
}
package com.zehong.web.controller.supervise;
import java.util.List;
import com.zehong.system.domain.Listaw;
import com.zehong.system.domain.TDeviceInfoS;
import com.zehong.system.service.ITEmployedPeopleInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 设备信息Controller
*
* @author zehong
* @date 2022-01-27
*/
@RestController
@RequestMapping("/device/device")
public class TDeviceInfoController extends BaseController
{
@Autowired
private ITDeviceInfoService tDeviceInfoService;
@Autowired
private ITEmployedPeopleInfoService tEmployedPeopleInfoService;
/**
* 查询设备信息列表
*/
@PreAuthorize("@ss.hasPermi('device:device:list')")
@GetMapping("/list")
public TableDataInfo list(TDeviceInfo tDeviceInfo)
{
startPage();
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return getDataTable(list);
}
/**
* 导出设备信息列表
*/
@PreAuthorize("@ss.hasPermi('device:device:export')")
@Log(title = "设备信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDeviceInfo tDeviceInfo)
{
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
ExcelUtil<TDeviceInfo> util = new ExcelUtil<TDeviceInfo>(TDeviceInfo.class);
return util.exportExcel(list, "设备信息数据");
}
/**
* 获取设备信息详细信息
*/
@PreAuthorize("@ss.hasPermi('device:device:query')")
@GetMapping(value = "/{deviceId}")
public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId)
{
return AjaxResult.success(tDeviceInfoService.selectTDeviceInfoById(deviceId));
}
/**
* 新增设备信息
*/
@PreAuthorize("@ss.hasPermi('device:device:add')")
@Log(title = "设备信息", businessType = BusinessType.INSERT)
@PostMapping
public void add(@RequestBody Listaw listaw)
{
//添加设备信息表数据 并且返回新增id
tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo());
Long deviceId = listaw.gettDeviceInfo().getDeviceId();
if (listaw.gettDeviceInfoS().size()!=0){
//添加 关联设备表 设备id添加
for (int i=0;i<listaw.gettDeviceInfoS().size();i++){
listaw.gettDeviceInfoS().get(i).setRelationDeviceId(Math.toIntExact(deviceId));
}
//添加关联设备信息表数据
tDeviceInfoService.insertDeviceDetailInfo(listaw.gettDeviceInfoS());
}
// TDeviceInfo tDeviceInfo = new TDeviceInfo();
// //根据企业id查询企业名称
// String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tDeviceInfo.getBeyondEnterpriseId());
// tDeviceInfo.setBeyondEnterpriseName(EnterpriseName);
}
/**
* 修改设备信息
*/
@PreAuthorize("@ss.hasPermi('device:device:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDeviceInfo tDeviceInfo)
{
//根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tDeviceInfo.getBeyondEnterpriseId());
tDeviceInfo.setBeyondEnterpriseName(EnterpriseName);
return toAjax(tDeviceInfoService.updateTDeviceInfo(tDeviceInfo));
}
/**
* 删除设备信息
*/
@PreAuthorize("@ss.hasPermi('device:device:remove')")
@Log(title = "设备信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{deviceIds}")
public AjaxResult remove(@PathVariable Long[] deviceIds)
{
return toAjax(tDeviceInfoService.deleteTDeviceInfoByIds(deviceIds));
}
/**
* 获取设备详细信息列表
*/
@PreAuthorize("@ss.hasPermi('device:device:deviceDetailInfo')")
@GetMapping(value = "/{getdeviceDetailInfo}")
public AjaxResult getdeviceDetailInfo(@PathVariable("deviceId") Long deviceId)
{
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoService.getdeviceDetailInfo(deviceId);
System.out.println("111111111");
System.out.println(tDeviceInfoS+"111111111");
return AjaxResult.success(tDeviceInfoS);
}
}
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.util.List; import java.util.List;
import com.zehong.system.service.ITEmployedPeopleInfoService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -33,6 +33,9 @@ public class TPipeInfoController extends BaseController ...@@ -33,6 +33,9 @@ public class TPipeInfoController extends BaseController
@Autowired @Autowired
private ITPipeInfoService tPipeInfoService; private ITPipeInfoService tPipeInfoService;
@Autowired
private ITEmployedPeopleInfoService tEmployedPeopleInfoService;
/** /**
* 查询管道信息列表 * 查询管道信息列表
*/ */
...@@ -74,8 +77,10 @@ public class TPipeInfoController extends BaseController ...@@ -74,8 +77,10 @@ public class TPipeInfoController extends BaseController
@PreAuthorize("@ss.hasPermi('supervise:pipe:add')") @PreAuthorize("@ss.hasPermi('supervise:pipe:add')")
@Log(title = "管道信息", businessType = BusinessType.INSERT) @Log(title = "管道信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TPipeInfo tPipeInfo) public AjaxResult add(@RequestBody TPipeInfo tPipeInfo) {
{ //根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tPipeInfo.getBeyondEnterpriseId());
tPipeInfo.setBeyondEnterpriseName(EnterpriseName);
return toAjax(tPipeInfoService.insertTPipeInfo(tPipeInfo)); return toAjax(tPipeInfoService.insertTPipeInfo(tPipeInfo));
} }
...@@ -85,8 +90,10 @@ public class TPipeInfoController extends BaseController ...@@ -85,8 +90,10 @@ public class TPipeInfoController extends BaseController
@PreAuthorize("@ss.hasPermi('supervise:pipe:edit')") @PreAuthorize("@ss.hasPermi('supervise:pipe:edit')")
@Log(title = "管道信息", businessType = BusinessType.UPDATE) @Log(title = "管道信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TPipeInfo tPipeInfo) public AjaxResult edit(@RequestBody TPipeInfo tPipeInfo) {
{ //根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tPipeInfo.getBeyondEnterpriseId());
tPipeInfo.setBeyondEnterpriseName(EnterpriseName);
return toAjax(tPipeInfoService.updateTPipeInfo(tPipeInfo)); return toAjax(tPipeInfoService.updateTPipeInfo(tPipeInfo));
} }
......
package com.zehong.web.controller.supervise;
import java.util.List;
import com.zehong.system.service.ITEmployedPeopleInfoService;
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.TSiteStationInfo;
import com.zehong.system.service.ITSiteStationInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 场站信息Controller
*
* @author zehong
* @date 2022-01-27
*/
@RestController
@RequestMapping("/supervise/station")
public class TSiteStationInfoController extends BaseController {
@Autowired
private ITSiteStationInfoService tSiteStationInfoService;
@Autowired
private ITEmployedPeopleInfoService tEmployedPeopleInfoService;
/**
* 查询场站信息列表
*/
@PreAuthorize("@ss.hasPermi('supervise:station:list')")
@GetMapping("/list")
public TableDataInfo list(TSiteStationInfo tSiteStationInfo)
{
startPage();
List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo);
return getDataTable(list);
}
/**
* 导出场站信息列表
*/
@PreAuthorize("@ss.hasPermi('supervise:station:export')")
@Log(title = "场站信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSiteStationInfo tSiteStationInfo)
{
List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo);
ExcelUtil<TSiteStationInfo> util = new ExcelUtil<TSiteStationInfo>(TSiteStationInfo.class);
return util.exportExcel(list, "场站信息数据");
}
/**
* 获取场站信息详细信息
*/
@PreAuthorize("@ss.hasPermi('supervise:station:query')")
@GetMapping(value = "/{siteStationId}")
public AjaxResult getInfo(@PathVariable("siteStationId") Long siteStationId)
{
return AjaxResult.success(tSiteStationInfoService.selectTSiteStationInfoById(siteStationId));
}
/**
* 新增场站信息
*/
@PreAuthorize("@ss.hasPermi('supervise:station:add')")
@Log(title = "场站信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSiteStationInfo tSiteStationInfo)
{
//根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tSiteStationInfo.getBeyondEnterpriseId());
tSiteStationInfo.setBeyondEnterpriseName(EnterpriseName);
return toAjax(tSiteStationInfoService.insertTSiteStationInfo(tSiteStationInfo));
}
/**
* 修改场站信息
*/
@PreAuthorize("@ss.hasPermi('supervise:station:edit')")
@Log(title = "场站信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSiteStationInfo tSiteStationInfo)
{
//根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tSiteStationInfo.getBeyondEnterpriseId());
tSiteStationInfo.setBeyondEnterpriseName(EnterpriseName);
return toAjax(tSiteStationInfoService.updateTSiteStationInfo(tSiteStationInfo));
}
/**
* 删除场站信息
*/
@PreAuthorize("@ss.hasPermi('supervise:station:remove')")
@Log(title = "场站信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{siteStationIds}")
public AjaxResult remove(@PathVariable Long[] siteStationIds)
{
return toAjax(tSiteStationInfoService.deleteTSiteStationInfoByIds(siteStationIds));
}
}
package com.zehong.system.domain;
import java.util.List;
public class Listaw {
private TDeviceInfo tDeviceInfo;
private List<TDeviceInfoS> tDeviceInfoS;
public TDeviceInfo gettDeviceInfo() {
return tDeviceInfo;
}
public void settDeviceInfo(TDeviceInfo tDeviceInfo) {
this.tDeviceInfo = tDeviceInfo;
}
public List<TDeviceInfoS> gettDeviceInfoS() {
return tDeviceInfoS;
}
public void settDeviceInfoS(List<TDeviceInfoS> tDeviceInfoS) {
this.tDeviceInfoS = tDeviceInfoS;
}
}
package com.zehong.system.domain;
import java.math.BigDecimal;
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_detector_user
*
* @author zehong
* @date 2022-02-07
*/
public class TDetectorUser extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 用户id */
private Long userId;
/** 用户账号 */
@Excel(name = "用户账号")
private String username;
/** 用户名称 */
@Excel(name = "用户名称")
private String nickName;
/** 用户类型(1居民用户,2商业用户,3工业用户) */
@Excel(name = "用户类型", readConverterExp = "1=居民用户,2商业用户,3工业用户")
private String userType;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 联系人 */
@Excel(name = "联系人")
private String linkman;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 邮箱 */
@Excel(name = "邮箱")
private String email;
/** 是否删除(0正常,1删除) */
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setUsername(String username)
{
this.username = username;
}
public String getUsername()
{
return username;
}
public void setNickName(String nickName)
{
this.nickName = nickName;
}
public String getNickName()
{
return nickName;
}
public void setUserType(String userType)
{
this.userType = userType;
}
public String getUserType()
{
return userType;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public void setLinkman(String linkman)
{
this.linkman = linkman;
}
public String getLinkman()
{
return linkman;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setEmail(String email)
{
this.email = email;
}
public String getEmail()
{
return email;
}
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("userId", getUserId())
.append("username", getUsername())
.append("nickName", getNickName())
.append("userType", getUserType())
.append("address", getAddress())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("linkman", getLinkman())
.append("phone", getPhone())
.append("email", getEmail())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
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_info
*
* @author zehong
* @date 2022-01-27
*/
public class TDeviceInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 设备id */
private Long deviceId;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 设备编号 */
@Excel(name = "设备编号")
private String deviceCode;
/** 所在地址 */
@Excel(name = "所在地址")
private String deviceAddr;
/** 设备型号 */
@Excel(name = "设备型号")
private String deviceModel;
/** 设备类型:1.阀井 2.调压箱 3.巡检员 4.视频 */
@Excel(name = "设备类型:1.阀井 2.调压箱 3.巡检员 4.视频")
private String deviceType;
/** 权属单位 */
private Long beyondEnterpriseId;
/** 权属单位名称 */
@Excel(name = "权属单位名称")
private String beyondEnterpriseName;
/** 经度 */
private BigDecimal longitude;
/** 纬度 */
private BigDecimal latitude;
/** 设备图片路径 */
private String iconUrl;
/** 联系人 */
private String linkman;
/** 电话 */
private String phone;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
private Date inspectionTime;
/** 是否删除(0正常,1删除) */
private String isDel;
/** 备注 */
private String remarks;
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
{
return deviceName;
}
public void setDeviceCode(String deviceCode)
{
this.deviceCode = deviceCode;
}
public String getDeviceCode()
{
return deviceCode;
}
public void setDeviceAddr(String deviceAddr)
{
this.deviceAddr = deviceAddr;
}
public String getDeviceAddr()
{
return deviceAddr;
}
public void setDeviceModel(String deviceModel)
{
this.deviceModel = deviceModel;
}
public String getDeviceModel()
{
return deviceModel;
}
public void setDeviceType(String deviceType)
{
this.deviceType = deviceType;
}
public String getDeviceType()
{
return deviceType;
}
public void setBeyondEnterpriseId(Long beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public Long getBeyondEnterpriseId()
{
return beyondEnterpriseId;
}
public void setBeyondEnterpriseName(String beyondEnterpriseName)
{
this.beyondEnterpriseName = beyondEnterpriseName;
}
public String getBeyondEnterpriseName()
{
return beyondEnterpriseName;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public void setIconUrl(String iconUrl)
{
this.iconUrl = iconUrl;
}
public String getIconUrl()
{
return iconUrl;
}
public void setLinkman(String linkman)
{
this.linkman = linkman;
}
public String getLinkman()
{
return linkman;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setInstallationTime(Date installationTime)
{
this.installationTime = installationTime;
}
public Date getInstallationTime()
{
return installationTime;
}
public void setInspectionTime(Date inspectionTime)
{
this.inspectionTime = inspectionTime;
}
public Date getInspectionTime()
{
return inspectionTime;
}
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("deviceId", getDeviceId())
.append("deviceName", getDeviceName())
.append("deviceCode", getDeviceCode())
.append("deviceAddr", getDeviceAddr())
.append("deviceModel", getDeviceModel())
.append("deviceType", getDeviceType())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
.append("beyondEnterpriseName", getBeyondEnterpriseName())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("iconUrl", getIconUrl())
.append("linkman", getLinkman())
.append("phone", getPhone())
.append("installationTime", getInstallationTime())
.append("inspectionTime", getInspectionTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain;
import com.zehong.common.core.domain.BaseEntity;
/**
* 关联设备封装类
*/
public class TDeviceInfoS extends BaseEntity {
/**
* 关联设备详情ID
*/
private Integer relationDeviceDetailId;
/**
* 关联设备id
*/
private Integer relationDeviceId;
/**
* 设备名称
*/
private String deviceName;
/**
* 设备型号
*/
private String deviceModel;
/**
* 设备类型:1.压力表 2.流量计
*/
private Integer deviceType;
/**
* 物联网编号
*/
private String iotNo;
/**
* 备注
*/
private String remarksn;
public Integer getRelationDeviceDetailId() {
return relationDeviceDetailId;
}
public void setRelationDeviceDetailId(Integer relationDeviceDetailId) {
this.relationDeviceDetailId = relationDeviceDetailId;
}
public Integer getRelationDeviceId() {
return relationDeviceId;
}
public void setRelationDeviceId(Integer relationDeviceId) {
this.relationDeviceId = relationDeviceId;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getDeviceModel() {
return deviceModel;
}
public void setDeviceModel(String deviceModel) {
this.deviceModel = deviceModel;
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
public String getIotNo() {
return iotNo;
}
public void setIotNo(String iotNo) {
this.iotNo = iotNo;
}
public String getRemarksn() {
return remarksn;
}
public void setRemarksn(String remarksn) {
this.remarksn = remarksn;
}
@Override
public String toString() {
return "TDeviceInfoS{" +
"relationDeviceDetailId=" + relationDeviceDetailId +
", relationDeviceId=" + relationDeviceId +
", deviceName='" + deviceName + '\'' +
", deviceModel='" + deviceModel + '\'' +
", deviceType=" + deviceType +
", iotNo='" + iotNo + '\'' +
", remarksn='" + remarksn + '\'' +
'}';
}
}
package com.zehong.system.domain;
import java.math.BigDecimal;
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_site_station_info
*
* @author zehong
* @date 2022-01-27
*/
public class TSiteStationInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 场站id */
private Long siteStationId;
/** 场站类型:1.加气站 2.门站 3.调压站 4.储备站 5.气化站 */
@Excel(name = "场站类型")
private String siteStationType;
/** 场站名称 */
@Excel(name = "场站名称")
private String siteStationName;
/** 建设年代 */
@Excel(name = "建设年代")
private String buildDate;
/** 建设单位 */
@Excel(name = "建设单位")
private String buildUnit;
/** 权属单位 */
private Long beyondEnterpriseId;
/** 权属单位名称 */
@Excel(name = "权属单位名称")
private String beyondEnterpriseName;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 是否删除(0正常,1删除) */
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setSiteStationId(Long siteStationId)
{
this.siteStationId = siteStationId;
}
public Long getSiteStationId()
{
return siteStationId;
}
public void setSiteStationType(String siteStationType)
{
this.siteStationType = siteStationType;
}
public String getSiteStationType()
{
return siteStationType;
}
public void setSiteStationName(String siteStationName)
{
this.siteStationName = siteStationName;
}
public String getSiteStationName()
{
return siteStationName;
}
public void setBuildDate(String buildDate)
{
this.buildDate = buildDate;
}
public String getBuildDate()
{
return buildDate;
}
public void setBuildUnit(String buildUnit)
{
this.buildUnit = buildUnit;
}
public String getBuildUnit()
{
return buildUnit;
}
public void setBeyondEnterpriseId(Long beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public Long getBeyondEnterpriseId()
{
return beyondEnterpriseId;
}
public void setBeyondEnterpriseName(String beyondEnterpriseName)
{
this.beyondEnterpriseName = beyondEnterpriseName;
}
public String getBeyondEnterpriseName()
{
return beyondEnterpriseName;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
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("siteStationId", getSiteStationId())
.append("siteStationType", getSiteStationType())
.append("siteStationName", getSiteStationName())
.append("buildDate", getBuildDate())
.append("buildUnit", getBuildUnit())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
.append("beyondEnterpriseName", getBeyondEnterpriseName())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TDetectorUser;
/**
* 燃气用户Mapper接口
*
* @author zehong
* @date 2022-02-07
*/
public interface TDetectorUserMapper
{
/**
* 查询燃气用户
*
* @param userId 燃气用户ID
* @return 燃气用户
*/
public TDetectorUser selectTDetectorUserById(Long userId);
/**
* 查询燃气用户列表
*
* @param tDetectorUser 燃气用户
* @return 燃气用户集合
*/
public List<TDetectorUser> selectTDetectorUserList(TDetectorUser tDetectorUser);
/**
* 新增燃气用户
*
* @param tDetectorUser 燃气用户
* @return 结果
*/
public int insertTDetectorUser(TDetectorUser tDetectorUser);
/**
* 修改燃气用户
*
* @param tDetectorUser 燃气用户
* @return 结果
*/
public int updateTDetectorUser(TDetectorUser tDetectorUser);
/**
* 删除燃气用户
*
* @param userId 燃气用户ID
* @return 结果
*/
public int deleteTDetectorUserById(Long userId);
/**
* 批量删除燃气用户
*
* @param userIds 需要删除的数据ID
* @return 结果
*/
public int deleteTDetectorUserByIds(Long[] userIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS;
/**
* 设备信息Mapper接口
*
* @author zehong
* @date 2022-01-27
*/
public interface TDeviceInfoMapper
{
/**
* 查询设备信息
*
* @param deviceId 设备信息ID
* @return 设备信息
*/
public TDeviceInfo selectTDeviceInfoById(Long deviceId);
/**
* 查询设备信息列表
*
* @param tDeviceInfo 设备信息
* @return 设备信息集合
*/
public List<TDeviceInfo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo);
/**
* 新增设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
public int insertTDeviceInfo(TDeviceInfo tDeviceInfo);
/**
* 修改设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
public int updateTDeviceInfo(TDeviceInfo tDeviceInfo);
/**
* 删除设备信息
*
* @param deviceId 设备信息ID
* @return 结果
*/
public int deleteTDeviceInfoById(Long deviceId);
/**
* 批量删除设备信息
*
* @param deviceIds 需要删除的数据ID
* @return 结果
*/
public int deleteTDeviceInfoByIds(Long[] deviceIds);
/**
* 添加关联设备信息表数据
* @param gettDeviceInfoS
*/
void insertDeviceDetailInfo(List<TDeviceInfoS> gettDeviceInfoS);
/**
* 获取设备详细信息列表
* @param deviceId
* @return
*/
List<TDeviceInfoS> getdeviceDetailInfo(Long deviceId);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TSiteStationInfo;
/**
* 场站信息Mapper接口
*
* @author zehong
* @date 2022-01-27
*/
public interface TSiteStationInfoMapper
{
/**
* 查询场站信息
*
* @param siteStationId 场站信息ID
* @return 场站信息
*/
public TSiteStationInfo selectTSiteStationInfoById(Long siteStationId);
/**
* 查询场站信息列表
*
* @param tSiteStationInfo 场站信息
* @return 场站信息集合
*/
public List<TSiteStationInfo> selectTSiteStationInfoList(TSiteStationInfo tSiteStationInfo);
/**
* 新增场站信息
*
* @param tSiteStationInfo 场站信息
* @return 结果
*/
public int insertTSiteStationInfo(TSiteStationInfo tSiteStationInfo);
/**
* 修改场站信息
*
* @param tSiteStationInfo 场站信息
* @return 结果
*/
public int updateTSiteStationInfo(TSiteStationInfo tSiteStationInfo);
/**
* 删除场站信息
*
* @param siteStationId 场站信息ID
* @return 结果
*/
public int deleteTSiteStationInfoById(Long siteStationId);
/**
* 批量删除场站信息
*
* @param siteStationIds 需要删除的数据ID
* @return 结果
*/
public int deleteTSiteStationInfoByIds(Long[] siteStationIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TDetectorUser;
/**
* 燃气用户Service接口
*
* @author zehong
* @date 2022-02-07
*/
public interface ITDetectorUserService
{
/**
* 查询燃气用户
*
* @param userId 燃气用户ID
* @return 燃气用户
*/
public TDetectorUser selectTDetectorUserById(Long userId);
/**
* 查询燃气用户列表
*
* @param tDetectorUser 燃气用户
* @return 燃气用户集合
*/
public List<TDetectorUser> selectTDetectorUserList(TDetectorUser tDetectorUser);
/**
* 新增燃气用户
*
* @param tDetectorUser 燃气用户
* @return 结果
*/
public int insertTDetectorUser(TDetectorUser tDetectorUser);
/**
* 修改燃气用户
*
* @param tDetectorUser 燃气用户
* @return 结果
*/
public int updateTDetectorUser(TDetectorUser tDetectorUser);
/**
* 批量删除燃气用户
*
* @param userIds 需要删除的燃气用户ID
* @return 结果
*/
public int deleteTDetectorUserByIds(Long[] userIds);
/**
* 删除燃气用户信息
*
* @param userId 燃气用户ID
* @return 结果
*/
public int deleteTDetectorUserById(Long userId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS;
/**
* 设备信息Service接口
*
* @author zehong
* @date 2022-01-27
*/
public interface ITDeviceInfoService
{
/**
* 查询设备信息
*
* @param deviceId 设备信息ID
* @return 设备信息
*/
public TDeviceInfo selectTDeviceInfoById(Long deviceId);
/**
* 查询设备信息列表
*
* @param tDeviceInfo 设备信息
* @return 设备信息集合
*/
public List<TDeviceInfo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo);
/**
* 新增设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
public int insertTDeviceInfo(TDeviceInfo tDeviceInfo);
/**
* 修改设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
public int updateTDeviceInfo(TDeviceInfo tDeviceInfo);
/**
* 批量删除设备信息
*
* @param deviceIds 需要删除的设备信息ID
* @return 结果
*/
public int deleteTDeviceInfoByIds(Long[] deviceIds);
/**
* 删除设备信息信息
*
* @param deviceId 设备信息ID
* @return 结果
*/
public int deleteTDeviceInfoById(Long deviceId);
/**
* 添加关联设备信息表数据
* @param gettDeviceInfoS
*/
void insertDeviceDetailInfo(List<TDeviceInfoS> gettDeviceInfoS);
/**
* 获取设备详细信息列表
* @param deviceId
* @return
*/
List<TDeviceInfoS> getdeviceDetailInfo(Long deviceId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TSiteStationInfo;
/**
* 场站信息Service接口
*
* @author zehong
* @date 2022-01-27
*/
public interface ITSiteStationInfoService
{
/**
* 查询场站信息
*
* @param siteStationId 场站信息ID
* @return 场站信息
*/
public TSiteStationInfo selectTSiteStationInfoById(Long siteStationId);
/**
* 查询场站信息列表
*
* @param tSiteStationInfo 场站信息
* @return 场站信息集合
*/
public List<TSiteStationInfo> selectTSiteStationInfoList(TSiteStationInfo tSiteStationInfo);
/**
* 新增场站信息
*
* @param tSiteStationInfo 场站信息
* @return 结果
*/
public int insertTSiteStationInfo(TSiteStationInfo tSiteStationInfo);
/**
* 修改场站信息
*
* @param tSiteStationInfo 场站信息
* @return 结果
*/
public int updateTSiteStationInfo(TSiteStationInfo tSiteStationInfo);
/**
* 批量删除场站信息
*
* @param siteStationIds 需要删除的场站信息ID
* @return 结果
*/
public int deleteTSiteStationInfoByIds(Long[] siteStationIds);
/**
* 删除场站信息信息
*
* @param siteStationId 场站信息ID
* @return 结果
*/
public int deleteTSiteStationInfoById(Long siteStationId);
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TDetectorUserMapper;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.service.ITDetectorUserService;
/**
* 燃气用户Service业务层处理
*
* @author zehong
* @date 2022-02-07
*/
@Service
public class TDetectorUserServiceImpl implements ITDetectorUserService
{
@Autowired
private TDetectorUserMapper tDetectorUserMapper;
/**
* 查询燃气用户
*
* @param userId 燃气用户ID
* @return 燃气用户
*/
@Override
public TDetectorUser selectTDetectorUserById(Long userId)
{
return tDetectorUserMapper.selectTDetectorUserById(userId);
}
/**
* 查询燃气用户列表
*
* @param tDetectorUser 燃气用户
* @return 燃气用户
*/
@Override
public List<TDetectorUser> selectTDetectorUserList(TDetectorUser tDetectorUser)
{
return tDetectorUserMapper.selectTDetectorUserList(tDetectorUser);
}
/**
* 新增燃气用户
*
* @param tDetectorUser 燃气用户
* @return 结果
*/
@Override
public int insertTDetectorUser(TDetectorUser tDetectorUser)
{
return tDetectorUserMapper.insertTDetectorUser(tDetectorUser);
}
/**
* 修改燃气用户
*
* @param tDetectorUser 燃气用户
* @return 结果
*/
@Override
public int updateTDetectorUser(TDetectorUser tDetectorUser)
{
return tDetectorUserMapper.updateTDetectorUser(tDetectorUser);
}
/**
* 批量删除燃气用户
*
* @param userIds 需要删除的燃气用户ID
* @return 结果
*/
@Override
public int deleteTDetectorUserByIds(Long[] userIds)
{
return tDetectorUserMapper.deleteTDetectorUserByIds(userIds);
}
/**
* 删除燃气用户信息
*
* @param userId 燃气用户ID
* @return 结果
*/
@Override
public int deleteTDetectorUserById(Long userId)
{
return tDetectorUserMapper.deleteTDetectorUserById(userId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TDeviceInfoS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TDeviceInfoMapper;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService;
/**
* 设备信息Service业务层处理
*
* @author zehong
* @date 2022-01-27
*/
@Service
public class TDeviceInfoServiceImpl implements ITDeviceInfoService
{
@Autowired
private TDeviceInfoMapper tDeviceInfoMapper;
/**
* 查询设备信息
*
* @param deviceId 设备信息ID
* @return 设备信息
*/
@Override
public TDeviceInfo selectTDeviceInfoById(Long deviceId)
{
return tDeviceInfoMapper.selectTDeviceInfoById(deviceId);
}
/**
* 查询设备信息列表
*
* @param tDeviceInfo 设备信息
* @return 设备信息
*/
@Override
public List<TDeviceInfo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo)
{
return tDeviceInfoMapper.selectTDeviceInfoList(tDeviceInfo);
}
/**
* 新增设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
@Override
public int insertTDeviceInfo(TDeviceInfo tDeviceInfo)
{
tDeviceInfo.setCreateTime(DateUtils.getNowDate());
return tDeviceInfoMapper.insertTDeviceInfo(tDeviceInfo);
}
/**
* 修改设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
@Override
public int updateTDeviceInfo(TDeviceInfo tDeviceInfo)
{
tDeviceInfo.setUpdateTime(DateUtils.getNowDate());
return tDeviceInfoMapper.updateTDeviceInfo(tDeviceInfo);
}
/**
* 批量删除设备信息
*
* @param deviceIds 需要删除的设备信息ID
* @return 结果
*/
@Override
public int deleteTDeviceInfoByIds(Long[] deviceIds)
{
return tDeviceInfoMapper.deleteTDeviceInfoByIds(deviceIds);
}
/**
* 删除设备信息信息
*
* @param deviceId 设备信息ID
* @return 结果
*/
@Override
public int deleteTDeviceInfoById(Long deviceId)
{
return tDeviceInfoMapper.deleteTDeviceInfoById(deviceId);
}
/**
* 添加关联设备信息表数据
* @param gettDeviceInfoS
*/
@Override
public void insertDeviceDetailInfo(List<TDeviceInfoS> gettDeviceInfoS) {
tDeviceInfoMapper.insertDeviceDetailInfo(gettDeviceInfoS);
}
/**
* 获取设备详细信息列表
* @param deviceId
* @return
*/
@Override
public List<TDeviceInfoS> getdeviceDetailInfo(Long deviceId) {
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoMapper.getdeviceDetailInfo(deviceId);
return tDeviceInfoS;
}
}
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.TSiteStationInfoMapper;
import com.zehong.system.domain.TSiteStationInfo;
import com.zehong.system.service.ITSiteStationInfoService;
/**
* 场站信息Service业务层处理
*
* @author zehong
* @date 2022-01-27
*/
@Service
public class TSiteStationInfoServiceImpl implements ITSiteStationInfoService
{
@Autowired
private TSiteStationInfoMapper tSiteStationInfoMapper;
/**
* 查询场站信息
*
* @param siteStationId 场站信息ID
* @return 场站信息
*/
@Override
public TSiteStationInfo selectTSiteStationInfoById(Long siteStationId)
{
return tSiteStationInfoMapper.selectTSiteStationInfoById(siteStationId);
}
/**
* 查询场站信息列表
*
* @param tSiteStationInfo 场站信息
* @return 场站信息
*/
@Override
public List<TSiteStationInfo> selectTSiteStationInfoList(TSiteStationInfo tSiteStationInfo)
{
return tSiteStationInfoMapper.selectTSiteStationInfoList(tSiteStationInfo);
}
/**
* 新增场站信息
*
* @param tSiteStationInfo 场站信息
* @return 结果
*/
@Override
public int insertTSiteStationInfo(TSiteStationInfo tSiteStationInfo)
{
tSiteStationInfo.setCreateTime(DateUtils.getNowDate());
return tSiteStationInfoMapper.insertTSiteStationInfo(tSiteStationInfo);
}
/**
* 修改场站信息
*
* @param tSiteStationInfo 场站信息
* @return 结果
*/
@Override
public int updateTSiteStationInfo(TSiteStationInfo tSiteStationInfo)
{
tSiteStationInfo.setUpdateTime(DateUtils.getNowDate());
return tSiteStationInfoMapper.updateTSiteStationInfo(tSiteStationInfo);
}
/**
* 批量删除场站信息
*
* @param siteStationIds 需要删除的场站信息ID
* @return 结果
*/
@Override
public int deleteTSiteStationInfoByIds(Long[] siteStationIds)
{
return tSiteStationInfoMapper.deleteTSiteStationInfoByIds(siteStationIds);
}
/**
* 删除场站信息信息
*
* @param siteStationId 场站信息ID
* @return 结果
*/
@Override
public int deleteTSiteStationInfoById(Long siteStationId)
{
return tSiteStationInfoMapper.deleteTSiteStationInfoById(siteStationId);
}
}
<?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.TDetectorUserMapper">
<resultMap type="TDetectorUser" id="TDetectorUserResult">
<result property="userId" column="user_id" />
<result property="username" column="username" />
<result property="nickName" column="nick_name" />
<result property="userType" column="user_type" />
<result property="address" column="address" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="linkman" column="linkman" />
<result property="phone" column="phone" />
<result property="email" column="email" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTDetectorUserVo">
select user_id, username, nick_name, user_type, address, longitude, latitude, linkman, phone, email, is_del, remarks from t_detector_user
</sql>
<select id="selectTDetectorUserList" parameterType="TDetectorUser" resultMap="TDetectorUserResult">
select user_id, username, nick_name, (CASE user_type WHEN '1' THEN '居民用户' WHEN '2' THEN '商业用户'WHEN '3' THEN '工业用户'end) as user_type , address, longitude, latitude, linkman, phone, email, is_del, remarks from t_detector_user
<where>
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
</where>
</select>
<select id="selectTDetectorUserById" parameterType="Long" resultMap="TDetectorUserResult">
<include refid="selectTDetectorUserVo"/>
where user_id = #{userId}
</select>
<insert id="insertTDetectorUser" parameterType="TDetectorUser" useGeneratedKeys="true" keyProperty="userId">
insert into t_detector_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="username != null">username,</if>
<if test="nickName != null">nick_name,</if>
<if test="userType != null">user_type,</if>
<if test="address != null">address,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="linkman != null">linkman,</if>
<if test="phone != null">phone,</if>
<if test="email != null">email,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="username != null">#{username},</if>
<if test="nickName != null">#{nickName},</if>
<if test="userType != null">#{userType},</if>
<if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="linkman != null">#{linkman},</if>
<if test="phone != null">#{phone},</if>
<if test="email != null">#{email},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTDetectorUser" parameterType="TDetectorUser">
update t_detector_user
<trim prefix="SET" suffixOverrides=",">
<if test="username != null">username = #{username},</if>
<if test="nickName != null">nick_name = #{nickName},</if>
<if test="userType != null">user_type = #{userType},</if>
<if test="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="linkman != null">linkman = #{linkman},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="email != null">email = #{email},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where user_id = #{userId}
</update>
<delete id="deleteTDetectorUserById" parameterType="Long">
delete from t_detector_user where user_id = #{userId}
</delete>
<delete id="deleteTDetectorUserByIds" parameterType="String">
delete from t_detector_user where user_id in
<foreach item="userId" collection="array" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
</mapper>
<?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.TDeviceInfoMapper">
<resultMap type="TDeviceInfo" id="TDeviceInfoResult">
<result property="deviceId" column="device_id" />
<result property="deviceName" column="device_name" />
<result property="deviceCode" column="device_code" />
<result property="deviceAddr" column="device_addr" />
<result property="deviceModel" column="device_model" />
<result property="deviceType" column="device_type" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="beyondEnterpriseName" column="beyond_enterprise_name" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="iconUrl" column="icon_url" />
<result property="linkman" column="linkman" />
<result property="phone" column="phone" />
<result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" />
<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>
<!--关联设备map-->
<resultMap type="TDeviceInfoS" id="TDeviceInfoResultS">
<result property="relationDeviceDetailId" column="relation_device_detail_id" />
<result property="relationDeviceId" column="relation_device_id" />
<result property="deviceName" column="device_name" />
<result property="deviceModel" column="device_model" />
<result property="deviceType" column="device_type" />
<result property="iotNo" column="iot_no" />
<result property="remarksn" column="remarks" />
</resultMap>
<sql id="selectTDeviceInfoVo">
select a.device_id, a.device_name, a.device_code, a.device_addr, a.device_model,
(CASE a.device_type WHEN '1' THEN '阀井' WHEN '2' THEN '调压箱'WHEN '3' THEN '巡检员' WHEN '4' THEN '视频' end) as device_type ,
a.beyond_enterprise_id, a.longitude, a.latitude, a.icon_url, a.linkman, a.phone, a.installation_time, a.inspection_time, a.create_by, a.create_time, a.update_by, a.update_time, a.is_del, a.remarks
,b.enterprise_name as beyond_enterprise_name
from t_device_info a left join t_enterprise_info b on a.beyond_enterprise_id=b.enterprise_id
</sql>
<select id="selectTDeviceInfoList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult">
<include refid="selectTDeviceInfoVo"/>
<where>
a.is_del='0'
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceCode != null and deviceCode != ''"> and device_code = #{deviceCode}</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
</where>
</select>
<select id="selectTDeviceInfoById" parameterType="Long" resultMap="TDeviceInfoResult">
select device_id, device_name, device_code, device_addr, device_model,device_type,
beyond_enterprise_id, beyond_enterprise_name, longitude, latitude, icon_url, linkman, phone, installation_time, inspection_time, create_by, create_time, update_by, update_time, is_del, remarks from t_device_info
where device_id = #{deviceId} and is_del='0'
</select>
<insert id="insertTDeviceInfo" parameterType="TDeviceInfo" useGeneratedKeys="true" keyProperty="deviceId">
insert into t_device_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceName != null">device_name,</if>
<if test="deviceCode != null">device_code,</if>
<if test="deviceAddr != null">device_addr,</if>
<if test="deviceModel != null">device_model,</if>
<if test="deviceType != null">device_type,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="beyondEnterpriseName != null">beyond_enterprise_name,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="iconUrl != null">icon_url,</if>
<if test="linkman != null">linkman,</if>
<if test="phone != null">phone,</if>
<if test="installationTime != null">installation_time,</if>
<if test="inspectionTime != null">inspection_time,</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="deviceName != null">#{deviceName},</if>
<if test="deviceCode != null">#{deviceCode},</if>
<if test="deviceAddr != null">#{deviceAddr},</if>
<if test="deviceModel != null">#{deviceModel},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="beyondEnterpriseName != null">#{beyondEnterpriseName},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="iconUrl != null">#{iconUrl},</if>
<if test="linkman != null">#{linkman},</if>
<if test="phone != null">#{phone},</if>
<if test="installationTime != null">#{installationTime},</if>
<if test="inspectionTime != null">#{inspectionTime},</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="updateTDeviceInfo" parameterType="TDeviceInfo">
update t_device_info
<trim prefix="SET" suffixOverrides=",">
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="deviceCode != null">device_code = #{deviceCode},</if>
<if test="deviceAddr != null">device_addr = #{deviceAddr},</if>
<if test="deviceModel != null">device_model = #{deviceModel},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
<if test="beyondEnterpriseName != null">beyond_enterprise_name = #{beyondEnterpriseName},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="linkman != null">linkman = #{linkman},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</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_id = #{deviceId}
</update>
<update id="deleteTDeviceInfoById" parameterType="Long">
update t_device_info set is_del='1' where device_id = #{deviceId}
</update>
<update id="deleteTDeviceInfoByIds" parameterType="String">
update t_device_info set is_del='1' where device_id in
<foreach item="deviceId" collection="array" open="(" separator="," close=")">
#{deviceId}
</foreach>
</update>
<!--添加关联设备信息表数据-->
<insert id="insertDeviceDetailInfo" parameterType="java.util.List">
INSERT INTO t_relation_device_detail_info (relation_device_id,device_name,device_model,device_type,iot_no)
VALUES
<foreach collection="list" item="item" index="key" separator=",">
(#{item.relationDeviceId},#{item.deviceName},#{item.deviceModel},#{item.deviceType},#{item.iotNo})
</foreach>
</insert>
<!--获取设备详细信息列表-->
<select id="getdeviceDetailInfo" resultMap="TDeviceInfoResultS">
select relation_device_detail_id,relation_device_id,device_name,device_model,device_type,iot_no,remarks
from t_relation_device_detail_info where relation_device_id =#{deviceId}
</select>
</mapper>
<?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.TSiteStationInfoMapper">
<resultMap type="TSiteStationInfo" id="TSiteStationInfoResult">
<result property="siteStationId" column="site_station_id" />
<result property="siteStationType" column="site_station_type" />
<result property="siteStationName" column="site_station_name" />
<result property="buildDate" column="build_date" />
<result property="buildUnit" column="build_unit" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="beyondEnterpriseName" column="beyond_enterprise_name" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<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="selectTSiteStationInfoVo">
select site_station_id,(CASE site_station_type WHEN '1' THEN '加气站' WHEN '2' THEN '门站'WHEN '3' THEN '调压站' WHEN '4' THEN '储备站'WHEN '5' THEN '气化站'end ) as site_station_type,
site_station_name, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, longitude, latitude,
create_by, create_time, update_by, update_time, is_del, remarks from t_site_station_info
</sql>
<select id="selectTSiteStationInfoList" parameterType="TSiteStationInfo" resultMap="TSiteStationInfoResult">
<include refid="selectTSiteStationInfoVo"/>
<where>
is_del='0'
<if test="siteStationName != null and siteStationName != ''"> and site_station_name like concat('%', #{siteStationName}, '%')</if>
<if test="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTSiteStationInfoById" parameterType="Long" resultMap="TSiteStationInfoResult">
select site_station_id,site_station_type,
site_station_name, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, longitude, latitude,
create_by, create_time, update_by, update_time, is_del, remarks from t_site_station_info
where site_station_id = #{siteStationId} and is_del='0'
</select>
<insert id="insertTSiteStationInfo" parameterType="TSiteStationInfo" useGeneratedKeys="true" keyProperty="siteStationId">
insert into t_site_station_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="siteStationType != null">site_station_type,</if>
<if test="siteStationName != null">site_station_name,</if>
<if test="buildDate != null">build_date,</if>
<if test="buildUnit != null">build_unit,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="beyondEnterpriseName != null">beyond_enterprise_name,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</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="siteStationType != null">#{siteStationType},</if>
<if test="siteStationName != null">#{siteStationName},</if>
<if test="buildDate != null">#{buildDate},</if>
<if test="buildUnit != null">#{buildUnit},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="beyondEnterpriseName != null">#{beyondEnterpriseName},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</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="updateTSiteStationInfo" parameterType="TSiteStationInfo">
update t_site_station_info
<trim prefix="SET" suffixOverrides=",">
<if test="siteStationType != null">site_station_type = #{siteStationType},</if>
<if test="siteStationName != null">site_station_name = #{siteStationName},</if>
<if test="buildDate != null">build_date = #{buildDate},</if>
<if test="buildUnit != null">build_unit = #{buildUnit},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
<if test="beyondEnterpriseName != null">beyond_enterprise_name = #{beyondEnterpriseName},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</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 site_station_id = #{siteStationId}
</update>
<update id="deleteTSiteStationInfoById" parameterType="Long">
update t_site_station_info set is_del='1' where site_station_id = #{siteStationId}
</update>
<update id="deleteTSiteStationInfoByIds" parameterType="String">
update t_site_station_info set is_del='1' where site_station_id in
<foreach item="siteStationId" collection="array" open="(" separator="," close=")">
#{siteStationId}
</foreach>
</update>
</mapper>
import request from '@/utils/request'
// 查询设备信息列表
export function listDevice(query) {
return request({
url: '/device/device/list',
method: 'get',
params: query
})
}
// 查询设备信息详细
export function getDevice(deviceId) {
return request({
url: '/device/device/' + deviceId,
method: 'get'
})
}
// 新增设备信息
export function addDevice(data) {
return request({
url: '/device/device',
method: 'post',
data: data
})
}
// 修改设备信息
export function updateDevice(data) {
return request({
url: '/device/device',
method: 'put',
data: data
})
}
// 删除设备信息
export function delDevice(deviceId) {
return request({
url: '/device/device/' + deviceId,
method: 'delete'
})
}
// 导出设备信息
export function exportDevice(query) {
return request({
url: '/device/device/export',
method: 'get',
params: query
})
}
// 企业信息查询(下拉框)
export function selectTEnterprise() {
return request({
url: '/regulation/supervise/selectTEnterprise',
method: 'get'
})
}
// 关联设备详情信息
export function getDdeviceDetailInfo(deviceId) {
return request({
url: '/device/device/getdeviceDetailInfo' + deviceId,
method: 'get'
})
}
...@@ -51,3 +51,11 @@ export function exportPipe(query) { ...@@ -51,3 +51,11 @@ export function exportPipe(query) {
params: query params: query
}) })
} }
// 企业信息查询(下拉框)
export function selectTEnterprise() {
return request({
url: '/regulation/supervise/selectTEnterprise',
method: 'get'
})
}
import request from '@/utils/request'
// 查询场站信息列表
export function listStation(query) {
return request({
url: '/supervise/station/list',
method: 'get',
params: query
})
}
// 查询场站信息详细
export function getStation(siteStationId) {
return request({
url: '/supervise/station/' + siteStationId,
method: 'get'
})
}
// 新增场站信息
export function addStation(data) {
return request({
url: '/supervise/station',
method: 'post',
data: data
})
}
// 修改场站信息
export function updateStation(data) {
return request({
url: '/supervise/station',
method: 'put',
data: data
})
}
// 删除场站信息
export function delStation(siteStationId) {
return request({
url: '/supervise/station/' + siteStationId,
method: 'delete'
})
}
// 导出场站信息
export function exportStation(query) {
return request({
url: '/supervise/station/export',
method: 'get',
params: query
})
}
// 企业信息查询(下拉框)
export function selectTEnterprise() {
return request({
url: '/regulation/supervise/selectTEnterprise',
method: 'get'
})
}
import request from '@/utils/request'
// 查询燃气用户列表
export function listUser(query) {
return request({
url: '/supervise/user/list',
method: 'get',
params: query
})
}
// 查询燃气用户详细
export function getUser(userId) {
return request({
url: '/supervise/user/' + userId,
method: 'get'
})
}
// 新增燃气用户
export function addUser(data) {
return request({
url: '/supervise/user',
method: 'post',
data: data
})
}
// 修改燃气用户
export function updateUser(data) {
return request({
url: '/supervise/user',
method: 'put',
data: data
})
}
// 删除燃气用户
export function delUser(userId) {
return request({
url: '/supervise/user/' + userId,
method: 'delete'
})
}
// 导出燃气用户
export function exportUser(query) {
return request({
url: '/supervise/user/export',
method: 'get',
params: query
})
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="管道长度" prop="pipeLength">
<el-input
v-model="queryParams.pipeLength"
placeholder="请输入管道长度"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="建设单位" prop="buildUnit"> <el-form-item label="管径" prop="pipeDiameter">
<el-input <el-input
v-model="queryParams.buildUnit" v-model="queryParams.pipeDiameter"
placeholder="请输入建设单位" placeholder="请输入管径"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="权属单位名称" prop="beyondEnterpriseName"> <el-form-item label="压力" prop="pipePressure">
<el-input <el-input
v-model="queryParams.beyondEnterpriseName" v-model="queryParams.pipePressure"
placeholder="请输入权属单位名称" placeholder="请输入压力"
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
...@@ -35,7 +43,7 @@ ...@@ -35,7 +43,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:info:add']" v-hasPermi="['supervise:pipe:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -46,7 +54,7 @@ ...@@ -46,7 +54,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:info:edit']" v-hasPermi="['supervise:pipe:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -57,7 +65,7 @@ ...@@ -57,7 +65,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:info:remove']" v-hasPermi="['supervise:pipe:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -68,24 +76,22 @@ ...@@ -68,24 +76,22 @@
size="mini" size="mini"
:loading="exportLoading" :loading="exportLoading"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:info:export']" v-hasPermi="['supervise:pipe:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="pipeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="管道长度" align="center" prop="pipeLength" /> <el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="管径" align="center" prop="pipeDiameter" />
<el-table-column label="压力" align="center" prop="pipePressure" />
<el-table-column label="材质" align="center" prop="pipeMaterial" />
<el-table-column label="管道地址" align="center" prop="pipeAddr" />
<el-table-column label="埋深" align="center" prop="buriedDepth" />
<el-table-column label="走向" align="center" prop="pipeTrend" /> <el-table-column label="走向" align="center" prop="pipeTrend" />
<el-table-column label="人员类型" align="center" prop="peopleOccupation" />
<el-table-column label="建设年代" align="center" prop="buildDate" /> <el-table-column label="建设年代" align="center" prop="buildDate" />
<el-table-column label="建设单位" align="center" prop="buildUnit" /> <el-table-column label="建设单位" align="center" prop="buildUnit" />
<el-table-column label="权属单位名称" align="center" prop="beyondEnterpriseName" /> <el-table-column label="权属单位" align="center" prop="beyondEnterpriseId" />
<el-table-column label="坐标" align="center" prop="coordinates" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -93,14 +99,14 @@ ...@@ -93,14 +99,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:info:edit']" v-hasPermi="['supervise:pipe:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:info:remove']" v-hasPermi="['supervise:pipe:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -129,15 +135,19 @@ ...@@ -129,15 +135,19 @@
<el-form-item label="材质" prop="pipeMaterial"> <el-form-item label="材质" prop="pipeMaterial">
<el-input v-model="form.pipeMaterial" placeholder="请输入材质" /> <el-input v-model="form.pipeMaterial" placeholder="请输入材质" />
</el-form-item> </el-form-item>
<el-form-item label="管道地址" prop="pipeAddr">
<el-input v-model="form.pipeAddr" placeholder="请输入管道地址" />
</el-form-item>
<el-form-item label="埋深" prop="buriedDepth"> <el-form-item label="埋深" prop="buriedDepth">
<el-input v-model="form.buriedDepth" placeholder="请输入埋深" /> <el-input v-model="form.buriedDepth" placeholder="请输入埋深" />
</el-form-item> </el-form-item>
<el-form-item label="走向" prop="pipeTrend"> <el-form-item label="走向" prop="pipeTrend">
<el-input v-model="form.pipeTrend" placeholder="请输入走向" /> <el-input v-model="form.pipeTrend" placeholder="请输入走向" />
</el-form-item> </el-form-item>
<el-form-item label="人员类型" prop="peopleOccupation">
<el-select v-model="form.peopleOccupation" placeholder="请选择人员类型">
<el-option label="运行维护人员" value="1" />
<el-option label="抢修人员" value="2" />
</el-select>
</el-form-item>
<el-form-item label="建设年代" prop="buildDate"> <el-form-item label="建设年代" prop="buildDate">
<el-date-picker <el-date-picker
v-model="form.buildDate" v-model="form.buildDate"
...@@ -150,11 +160,28 @@ ...@@ -150,11 +160,28 @@
<el-form-item label="建设单位" prop="buildUnit"> <el-form-item label="建设单位" prop="buildUnit">
<el-input v-model="form.buildUnit" placeholder="请输入建设单位" /> <el-input v-model="form.buildUnit" placeholder="请输入建设单位" />
</el-form-item> </el-form-item>
<el-form-item label="权属单位" prop="beyondEnterpriseId">
<el-input v-model="form.beyondEnterpriseId" placeholder="请输入权属单位" />
<!-- <el-form-item label="权属单位" prop="beyondEnterpriseId">-->
<!-- <el-input v-model="form.beyondEnterpriseId" placeholder="请输入权属单位" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="权属单位名称" prop="beyondEnterpriseName">-->
<!-- <el-input v-model="form.beyondEnterpriseName" placeholder="请输入权属单位名称" />-->
<!-- </el-form-item>-->
<el-form-item label="权属单位" prop="beyondEnterpriseName">
<el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable>
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="坐标" prop="coordinates">
<el-input v-model="form.coordinates" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="权属单位名称" prop="beyondEnterpriseName"> <el-form-item label="备注" prop="remarks">
<el-input v-model="form.beyondEnterpriseName" placeholder="请输入权属单位名称" /> <el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -166,10 +193,10 @@ ...@@ -166,10 +193,10 @@
</template> </template>
<script> <script>
import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe } from "@/api/regulation/pipe"; import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe, selectTEnterprise} from "@/api/regulation/pipe";
export default { export default {
name: "Info", name: "Pipe",
components: { components: {
}, },
data() { data() {
...@@ -194,6 +221,8 @@ export default { ...@@ -194,6 +221,8 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
//下拉框数据
test:{},
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -202,9 +231,9 @@ export default { ...@@ -202,9 +231,9 @@ export default {
pipeDiameter: null, pipeDiameter: null,
pipePressure: null, pipePressure: null,
pipeMaterial: null, pipeMaterial: null,
pipeAddr: null,
buriedDepth: null, buriedDepth: null,
pipeTrend: null, pipeTrend: null,
peopleOccupation: null,
buildDate: null, buildDate: null,
buildUnit: null, buildUnit: null,
beyondEnterpriseId: null, beyondEnterpriseId: null,
...@@ -215,6 +244,8 @@ export default { ...@@ -215,6 +244,8 @@ export default {
}, },
// 表单参数 // 表单参数
form: {}, form: {},
//下拉列表数据
test: {},
// 表单校验 // 表单校验
rules: { rules: {
} }
...@@ -228,7 +259,7 @@ export default { ...@@ -228,7 +259,7 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
listPipe(this.queryParams).then(response => { listPipe(this.queryParams).then(response => {
this.infoList = response.rows; this.pipeList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
...@@ -246,9 +277,9 @@ export default { ...@@ -246,9 +277,9 @@ export default {
pipeDiameter: null, pipeDiameter: null,
pipePressure: null, pipePressure: null,
pipeMaterial: null, pipeMaterial: null,
pipeAddr: null,
buriedDepth: null, buriedDepth: null,
pipeTrend: null, pipeTrend: null,
peopleOccupation: null,
buildDate: null, buildDate: null,
buildUnit: null, buildUnit: null,
beyondEnterpriseId: null, beyondEnterpriseId: null,
...@@ -281,12 +312,20 @@ export default { ...@@ -281,12 +312,20 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
//查询企业名称下拉框数据
selectTEnterprise().then(response => {
this.test = response.data;
});
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加管道信息"; this.title = "添加管道信息";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
//查询企业名称下拉框数据
selectTEnterprise().then(response => {
this.test = response.data;
});
this.reset(); this.reset();
const pipeId = row.pipeId || this.ids const pipeId = row.pipeId || this.ids
getPipe(pipeId).then(response => { getPipe(pipeId).then(response => {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment