Commit 998af13c authored by 耿迪迪's avatar 耿迪迪

Merge branch 'master' of ssh://111.61.77.35:15/gengdidi/gassafety

parents 33280f5b c86c815b
......@@ -74,8 +74,10 @@ public class CommonController
// 上传文件路径
String filePath = GasSafetyConfig.getUploadPath();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName;
// String fileName = FileUploadUtils.upload(filePath, file);
// String url = serverConfig.getUrl() + fileName;
String fileName = file.getOriginalFilename();
String url = serverConfig.getUrl() + FileUploadUtils.upload(filePath, file);
AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName);
ajax.put("url", url);
......
package com.zehong.web.controller.device;
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.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 2021-07-09
*/
@RestController
@RequestMapping("/device/deviceInfo")
public class TDeviceInfoController extends BaseController
{
@Autowired
private ITDeviceInfoService tDeviceInfoService;
/**
* 查询设备信息列表
*/
@PreAuthorize("@ss.hasPermi('device:deviceInfo:list')")
@GetMapping("/list")
public TableDataInfo list(TDeviceInfo tDeviceInfo)
{
startPage();
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return getDataTable(list);
}
/**
* 导出设备信息列表
*/
@PreAuthorize("@ss.hasPermi('device:deviceInfo: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:deviceInfo:query')")
@GetMapping(value = "/{deviceId}")
public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId)
{
return AjaxResult.success(tDeviceInfoService.selectTDeviceInfoById(deviceId));
}
/**
* 新增设备信息
*/
@PreAuthorize("@ss.hasPermi('device:deviceInfo:add')")
@Log(title = "设备信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDeviceInfo tDeviceInfo)
{
return toAjax(tDeviceInfoService.insertTDeviceInfo(tDeviceInfo));
}
/**
* 修改设备信息
*/
@PreAuthorize("@ss.hasPermi('device:deviceInfo:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDeviceInfo tDeviceInfo)
{
return toAjax(tDeviceInfoService.updateTDeviceInfo(tDeviceInfo));
}
/**
* 删除设备信息
*/
@PreAuthorize("@ss.hasPermi('device:deviceInfo:remove')")
@Log(title = "设备信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{deviceIds}")
public AjaxResult remove(@PathVariable Long[] deviceIds)
{
return toAjax(tDeviceInfoService.deleteTDeviceInfoByIds(deviceIds));
}
}
package com.zehong.web.controller.device;
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.TInspectionData;
import com.zehong.system.service.ITInspectionDataService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 巡检记录Controller
*
* @author zehong
* @date 2021-07-09
*/
@RestController
@RequestMapping("/device/inspectionData")
public class TInspectionDataController extends BaseController
{
@Autowired
private ITInspectionDataService tInspectionDataService;
/**
* 查询巡检记录列表
*/
@PreAuthorize("@ss.hasPermi('device:inspectionData:list')")
@GetMapping("/list")
public TableDataInfo list(TInspectionData tInspectionData)
{
startPage();
List<TInspectionData> list = tInspectionDataService.selectTInspectionDataList(tInspectionData);
return getDataTable(list);
}
/**
* 导出巡检记录列表
*/
@PreAuthorize("@ss.hasPermi('device:inspectionData:export')")
@Log(title = "巡检记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInspectionData tInspectionData)
{
List<TInspectionData> list = tInspectionDataService.selectTInspectionDataList(tInspectionData);
ExcelUtil<TInspectionData> util = new ExcelUtil<TInspectionData>(TInspectionData.class);
return util.exportExcel(list, "巡检记录数据");
}
/**
* 获取巡检记录详细信息
*/
@PreAuthorize("@ss.hasPermi('device:inspectionData:query')")
@GetMapping(value = "/{dataId}")
public AjaxResult getInfo(@PathVariable("dataId") Long dataId)
{
return AjaxResult.success(tInspectionDataService.selectTInspectionDataById(dataId));
}
/**
* 新增巡检记录
*/
@PreAuthorize("@ss.hasPermi('device:inspectionData:add')")
@Log(title = "巡检记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInspectionData tInspectionData)
{
return toAjax(tInspectionDataService.insertTInspectionData(tInspectionData));
}
/**
* 修改巡检记录
*/
@PreAuthorize("@ss.hasPermi('device:inspectionData:edit')")
@Log(title = "巡检记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInspectionData tInspectionData)
{
return toAjax(tInspectionDataService.updateTInspectionData(tInspectionData));
}
/**
* 删除巡检记录
*/
@PreAuthorize("@ss.hasPermi('device:inspectionData:remove')")
@Log(title = "巡检记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{dataIds}")
public AjaxResult remove(@PathVariable Long[] dataIds)
{
return toAjax(tInspectionDataService.deleteTInspectionDataByIds(dataIds));
}
}
package com.zehong.web.controller.device;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TInspector;
import com.zehong.system.service.ITInspectorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 巡检员Controller
*
* @author zehong
* @date 2021-07-08
*/
@RestController
@RequestMapping("/device/inspector")
public class TInspectorController extends BaseController
{
@Autowired
private ITInspectorService tInspectorService;
/**
* 查询巡检员列表
*/
@PreAuthorize("@ss.hasPermi('device:inspector:list')")
@GetMapping("/list")
public TableDataInfo list(TInspector tInspector)
{
startPage();
List<TInspector> list = tInspectorService.selectTInspectorList(tInspector);
return getDataTable(list);
}
/**
* 导出巡检员列表
*/
@PreAuthorize("@ss.hasPermi('device:inspector:export')")
@Log(title = "巡检员", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInspector tInspector)
{
List<TInspector> list = tInspectorService.selectTInspectorList(tInspector);
ExcelUtil<TInspector> util = new ExcelUtil<TInspector>(TInspector.class);
return util.exportExcel(list, "巡检员数据");
}
/**
* 获取巡检员详细信息
*/
@PreAuthorize("@ss.hasPermi('device:inspector:query')")
@GetMapping(value = "/{inspectorId}")
public AjaxResult getInfo(@PathVariable("inspectorId") Long inspectorId)
{
return AjaxResult.success(tInspectorService.selectTInspectorById(inspectorId));
}
/**
* 新增巡检员
*/
@PreAuthorize("@ss.hasPermi('device:inspector:add')")
@Log(title = "巡检员", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInspector tInspector)
{
return toAjax(tInspectorService.insertTInspector(tInspector));
}
/**
* 修改巡检员
*/
@PreAuthorize("@ss.hasPermi('device:inspector:edit')")
@Log(title = "巡检员", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInspector tInspector)
{
return toAjax(tInspectorService.updateTInspector(tInspector));
}
/**
* 删除巡检员
*/
@PreAuthorize("@ss.hasPermi('device:inspector:remove')")
@Log(title = "巡检员", businessType = BusinessType.DELETE)
@DeleteMapping("/{inspectorIds}")
public AjaxResult remove(@PathVariable Long[] inspectorIds)
{
return toAjax(tInspectorService.deleteTInspectorByIds(inspectorIds));
}
}
package com.zehong.web.controller.device;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TPipe;
import com.zehong.system.service.ITPipeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 管道信息Controller
*
* @author zehong
* @date 2021-07-08
*/
@RestController
@RequestMapping("/device/pipe")
public class TPipeController extends BaseController
{
@Autowired
private ITPipeService tPipeService;
/**
* 查询管道信息列表
*/
@PreAuthorize("@ss.hasPermi('device:pipe:list')")
@GetMapping("/list")
public TableDataInfo list(TPipe tPipe)
{
startPage();
List<TPipe> list = tPipeService.selectTPipeList(tPipe);
return getDataTable(list);
}
/**
* 导出管道信息列表
*/
@PreAuthorize("@ss.hasPermi('device:pipe:export')")
@Log(title = "管道信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipe tPipe)
{
List<TPipe> list = tPipeService.selectTPipeList(tPipe);
ExcelUtil<TPipe> util = new ExcelUtil<TPipe>(TPipe.class);
return util.exportExcel(list, "管道信息数据");
}
/**
* 获取管道信息详细信息
*/
@PreAuthorize("@ss.hasPermi('device:pipe:query')")
@GetMapping(value = "/{pipeId}")
public AjaxResult getInfo(@PathVariable("pipeId") Long pipeId)
{
return AjaxResult.success(tPipeService.selectTPipeById(pipeId));
}
/**
* 新增管道信息
*/
@PreAuthorize("@ss.hasPermi('device:pipe:add')")
@Log(title = "管道信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipe tPipe)
{
return toAjax(tPipeService.insertTPipe(tPipe));
}
/**
* 修改管道信息
*/
@PreAuthorize("@ss.hasPermi('device:pipe:edit')")
@Log(title = "管道信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipe tPipe)
{
return toAjax(tPipeService.updateTPipe(tPipe));
}
/**
* 删除管道信息
*/
@PreAuthorize("@ss.hasPermi('device:pipe:remove')")
@Log(title = "管道信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{pipeIds}")
public AjaxResult remove(@PathVariable Long[] pipeIds)
{
return toAjax(tPipeService.deleteTPipeByIds(pipeIds));
}
}
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 2021-07-09
*/
public class TDeviceInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 设备id */
private Long deviceId;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
/** 所属管道id */
@Excel(name = "所属管道id")
private Long pipeId;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 所在地址 */
@Excel(name = "所在地址")
private String deviceAddr;
/** 设备型号 */
@Excel(name = "设备型号")
private String deviceModel;
/** 设备类型 */
@Excel(name = "设备类型")
private String deviceType;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 物联网编号 */
@Excel(name = "物联网编号")
private String iotNo;
/** 设备图片路径 */
@Excel(name = "设备图片路径")
private String iconUrl;
/** 联系人 */
@Excel(name = "联系人")
private String linkman;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
public void setPipeId(Long pipeId)
{
this.pipeId = pipeId;
}
public Long getPipeId()
{
return pipeId;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
{
return deviceName;
}
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 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 setIotNo(String iotNo)
{
this.iotNo = iotNo;
}
public String getIotNo()
{
return iotNo;
}
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 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("enterpriseId", getEnterpriseId())
.append("pipeId", getPipeId())
.append("deviceName", getDeviceName())
.append("deviceAddr", getDeviceAddr())
.append("deviceModel", getDeviceModel())
.append("deviceType", getDeviceType())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("iotNo", getIotNo())
.append("iconUrl", getIconUrl())
.append("linkman", getLinkman())
.append("phone", getPhone())
.append("installationTime", getInstallationTime())
.append("inspectionTime", getInspectionTime())
.append("remarks", getRemarks())
.toString();
}
}
......@@ -20,11 +20,11 @@ public class TEnterpriseInfo extends BaseEntity
private Long infoId;
/** 单位名称 */
@Excel(name = "单位名称")
@Excel(name = "企业名称")
private String unitName;
/** 组织机构代码 */
@Excel(name = "组织机构代码")
@Excel(name = "社会统一信用代码")
private String orgCode;
/** 营业执照图片路径 */
......@@ -43,46 +43,6 @@ public class TEnterpriseInfo extends BaseEntity
@Excel(name = "注册地址")
private String regAddress;
/** 监管分类大类 */
@Excel(name = "监管分类大类")
private String regulationBigType;
/** 监管分类小类 */
@Excel(name = "监管分类小类")
private String regulationSmallType;
/** 省份代码 */
@Excel(name = "省份代码")
private String provinceId;
/** 省份名称 */
@Excel(name = "省份名称")
private String provinceName;
/** 城市代码 */
@Excel(name = "城市代码")
private String cityId;
/** 城市名称 */
@Excel(name = "城市名称")
private String cityName;
/** 区县代码 */
@Excel(name = "区县代码")
private String countyId;
/** 区县名称 */
@Excel(name = "区县名称")
private String countyName;
/** 所属地区 */
@Excel(name = "所属地区")
private String areaName;
/** 所属街道 */
@Excel(name = "所属街道")
private String streetName;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
......@@ -96,33 +56,13 @@ public class TEnterpriseInfo extends BaseEntity
private String legalPerson;
/** 法定代表人手机 */
@Excel(name = "法定代表人手机")
@Excel(name = "法定代表人电话")
private String legalPersonPhone;
/** 法定代表人座机号码 */
@Excel(name = "法定代表人座机号码")
private String legalPersonTelephone;
/** 法人邮箱 */
@Excel(name = "法人邮箱")
private String legalPersonEmail;
/** 授权书 */
@Excel(name = "授权书")
private String authorizeFile;
/** 授权书文件原名 */
@Excel(name = "授权书文件原名")
private String authorizeFileOriginalName;
/** 厂区边界 */
@Excel(name = "厂区边界")
private String boundary;
/** 是否启用,0启用,1禁用 */
@Excel(name = "是否启用,0启用,1禁用")
private String isEnable;
/** 创建人id */
@Excel(name = "创建人id")
private String createUserId;
......@@ -198,97 +138,7 @@ public class TEnterpriseInfo extends BaseEntity
{
return regAddress;
}
public void setRegulationBigType(String regulationBigType)
{
this.regulationBigType = regulationBigType;
}
public String getRegulationBigType()
{
return regulationBigType;
}
public void setRegulationSmallType(String regulationSmallType)
{
this.regulationSmallType = regulationSmallType;
}
public String getRegulationSmallType()
{
return regulationSmallType;
}
public void setProvinceId(String provinceId)
{
this.provinceId = provinceId;
}
public String getProvinceId()
{
return provinceId;
}
public void setProvinceName(String provinceName)
{
this.provinceName = provinceName;
}
public String getProvinceName()
{
return provinceName;
}
public void setCityId(String cityId)
{
this.cityId = cityId;
}
public String getCityId()
{
return cityId;
}
public void setCityName(String cityName)
{
this.cityName = cityName;
}
public String getCityName()
{
return cityName;
}
public void setCountyId(String countyId)
{
this.countyId = countyId;
}
public String getCountyId()
{
return countyId;
}
public void setCountyName(String countyName)
{
this.countyName = countyName;
}
public String getCountyName()
{
return countyName;
}
public void setAreaName(String areaName)
{
this.areaName = areaName;
}
public String getAreaName()
{
return areaName;
}
public void setStreetName(String streetName)
{
this.streetName = streetName;
}
public String getStreetName()
{
return streetName;
}
public void setLongitude(BigDecimal longitude)
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
......@@ -324,15 +174,6 @@ public class TEnterpriseInfo extends BaseEntity
{
return legalPersonPhone;
}
public void setLegalPersonTelephone(String legalPersonTelephone)
{
this.legalPersonTelephone = legalPersonTelephone;
}
public String getLegalPersonTelephone()
{
return legalPersonTelephone;
}
public void setLegalPersonEmail(String legalPersonEmail)
{
this.legalPersonEmail = legalPersonEmail;
......@@ -342,42 +183,6 @@ public class TEnterpriseInfo extends BaseEntity
{
return legalPersonEmail;
}
public void setAuthorizeFile(String authorizeFile)
{
this.authorizeFile = authorizeFile;
}
public String getAuthorizeFile()
{
return authorizeFile;
}
public void setAuthorizeFileOriginalName(String authorizeFileOriginalName)
{
this.authorizeFileOriginalName = authorizeFileOriginalName;
}
public String getAuthorizeFileOriginalName()
{
return authorizeFileOriginalName;
}
public void setBoundary(String boundary)
{
this.boundary = boundary;
}
public String getBoundary()
{
return boundary;
}
public void setIsEnable(String isEnable)
{
this.isEnable = isEnable;
}
public String getIsEnable()
{
return isEnable;
}
public void setCreateUserId(String createUserId)
{
this.createUserId = createUserId;
......@@ -416,26 +221,11 @@ public class TEnterpriseInfo extends BaseEntity
.append("orgFileName", getOrgFileName())
.append("runAddress", getRunAddress())
.append("regAddress", getRegAddress())
.append("regulationBigType", getRegulationBigType())
.append("regulationSmallType", getRegulationSmallType())
.append("provinceId", getProvinceId())
.append("provinceName", getProvinceName())
.append("cityId", getCityId())
.append("cityName", getCityName())
.append("countyId", getCountyId())
.append("countyName", getCountyName())
.append("areaName", getAreaName())
.append("streetName", getStreetName())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("legalPerson", getLegalPerson())
.append("legalPersonPhone", getLegalPersonPhone())
.append("legalPersonTelephone", getLegalPersonTelephone())
.append("legalPersonEmail", getLegalPersonEmail())
.append("authorizeFile", getAuthorizeFile())
.append("authorizeFileOriginalName", getAuthorizeFileOriginalName())
.append("boundary", getBoundary())
.append("isEnable", getIsEnable())
.append("createUserId", getCreateUserId())
.append("updateUserId", getUpdateUserId())
.append("updateTime", getUpdateTime())
......
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_inspection_data
*
* @author zehong
* @date 2021-07-09
*/
public class TInspectionData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 巡检记录id */
private Long dataId;
/** 巡检员id */
@Excel(name = "巡检员id")
private Long inspectorId;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setDataId(Long dataId)
{
this.dataId = dataId;
}
public Long getDataId()
{
return dataId;
}
public void setInspectorId(Long inspectorId)
{
this.inspectorId = inspectorId;
}
public Long getInspectorId()
{
return inspectorId;
}
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 setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("dataId", getDataId())
.append("inspectorId", getInspectorId())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("createTime", getCreateTime())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain;
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_inspector
*
* @author zehong
* @date 2021-07-08
*/
public class TInspector extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 巡检员id */
private Long inspectorId;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
/** 姓名 */
@Excel(name = "姓名")
private String name;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setInspectorId(Long inspectorId)
{
this.inspectorId = inspectorId;
}
public Long getInspectorId()
{
return inspectorId;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
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("inspectorId", getInspectorId())
.append("enterpriseId", getEnterpriseId())
.append("name", getName())
.append("phone", getPhone())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain;
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_pipe
*
* @author zehong
* @date 2021-07-08
*/
public class TPipe extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 管道id */
private Long pipeId;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
/** 管道名称 */
@Excel(name = "管道名称")
private String pipeName;
/** 管道所在地址 */
@Excel(name = "管道所在地址")
private String pipeAddr;
/** 坐标 */
@Excel(name = "坐标")
private String coordinates;
/** 管道长度 */
@Excel(name = "管道长度")
private Long pipeLength;
/** 管道类型(1地埋管线、2地表管线) */
@Excel(name = "管道类型", readConverterExp = "1=地埋管线、2地表管线")
private String pipeType;
/** 管道压力(低压,中压,次高压,高压) */
@Excel(name = "管道压力", readConverterExp = "低=压,中压,次高压,高压")
private String pipePressure;
/** 设备图片路径 */
@Excel(name = "设备图片路径")
private String iconUrl;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setPipeId(Long pipeId)
{
this.pipeId = pipeId;
}
public Long getPipeId()
{
return pipeId;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
public void setPipeName(String pipeName)
{
this.pipeName = pipeName;
}
public String getPipeName()
{
return pipeName;
}
public void setPipeAddr(String pipeAddr)
{
this.pipeAddr = pipeAddr;
}
public String getPipeAddr()
{
return pipeAddr;
}
public void setCoordinates(String coordinates)
{
this.coordinates = coordinates;
}
public String getCoordinates()
{
return coordinates;
}
public void setPipeLength(Long pipeLength)
{
this.pipeLength = pipeLength;
}
public Long getPipeLength()
{
return pipeLength;
}
public void setPipeType(String pipeType)
{
this.pipeType = pipeType;
}
public String getPipeType()
{
return pipeType;
}
public void setPipePressure(String pipePressure)
{
this.pipePressure = pipePressure;
}
public String getPipePressure()
{
return pipePressure;
}
public void setIconUrl(String iconUrl)
{
this.iconUrl = iconUrl;
}
public String getIconUrl()
{
return iconUrl;
}
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 setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("pipeId", getPipeId())
.append("enterpriseId", getEnterpriseId())
.append("pipeName", getPipeName())
.append("pipeAddr", getPipeAddr())
.append("coordinates", getCoordinates())
.append("pipeLength", getPipeLength())
.append("pipeType", getPipeType())
.append("pipePressure", getPipePressure())
.append("iconUrl", getIconUrl())
.append("installationTime", getInstallationTime())
.append("inspectionTime", getInspectionTime())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TDeviceInfo;
/**
* 设备信息Mapper接口
*
* @author zehong
* @date 2021-07-09
*/
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);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInspectionData;
/**
* 巡检记录Mapper接口
*
* @author zehong
* @date 2021-07-09
*/
public interface TInspectionDataMapper
{
/**
* 查询巡检记录
*
* @param dataId 巡检记录ID
* @return 巡检记录
*/
public TInspectionData selectTInspectionDataById(Long dataId);
/**
* 查询巡检记录列表
*
* @param tInspectionData 巡检记录
* @return 巡检记录集合
*/
public List<TInspectionData> selectTInspectionDataList(TInspectionData tInspectionData);
/**
* 新增巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
public int insertTInspectionData(TInspectionData tInspectionData);
/**
* 修改巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
public int updateTInspectionData(TInspectionData tInspectionData);
/**
* 删除巡检记录
*
* @param dataId 巡检记录ID
* @return 结果
*/
public int deleteTInspectionDataById(Long dataId);
/**
* 批量删除巡检记录
*
* @param dataIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInspectionDataByIds(Long[] dataIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInspector;
/**
* 巡检员Mapper接口
*
* @author zehong
* @date 2021-07-08
*/
public interface TInspectorMapper
{
/**
* 查询巡检员
*
* @param inspectorId 巡检员ID
* @return 巡检员
*/
public TInspector selectTInspectorById(Long inspectorId);
/**
* 查询巡检员列表
*
* @param tInspector 巡检员
* @return 巡检员集合
*/
public List<TInspector> selectTInspectorList(TInspector tInspector);
/**
* 新增巡检员
*
* @param tInspector 巡检员
* @return 结果
*/
public int insertTInspector(TInspector tInspector);
/**
* 修改巡检员
*
* @param tInspector 巡检员
* @return 结果
*/
public int updateTInspector(TInspector tInspector);
/**
* 删除巡检员
*
* @param inspectorId 巡检员ID
* @return 结果
*/
public int deleteTInspectorById(Long inspectorId);
/**
* 批量删除巡检员
*
* @param inspectorIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInspectorByIds(Long[] inspectorIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TPipe;
/**
* 管道信息Mapper接口
*
* @author zehong
* @date 2021-07-08
*/
public interface TPipeMapper
{
/**
* 查询管道信息
*
* @param pipeId 管道信息ID
* @return 管道信息
*/
public TPipe selectTPipeById(Long pipeId);
/**
* 查询管道信息列表
*
* @param tPipe 管道信息
* @return 管道信息集合
*/
public List<TPipe> selectTPipeList(TPipe tPipe);
/**
* 新增管道信息
*
* @param tPipe 管道信息
* @return 结果
*/
public int insertTPipe(TPipe tPipe);
/**
* 修改管道信息
*
* @param tPipe 管道信息
* @return 结果
*/
public int updateTPipe(TPipe tPipe);
/**
* 删除管道信息
*
* @param pipeId 管道信息ID
* @return 结果
*/
public int deleteTPipeById(Long pipeId);
/**
* 批量删除管道信息
*
* @param pipeIds 需要删除的数据ID
* @return 结果
*/
public int deleteTPipeByIds(Long[] pipeIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TDeviceInfo;
/**
* 设备信息Service接口
*
* @author zehong
* @date 2021-07-09
*/
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);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInspectionData;
/**
* 巡检记录Service接口
*
* @author zehong
* @date 2021-07-09
*/
public interface ITInspectionDataService
{
/**
* 查询巡检记录
*
* @param dataId 巡检记录ID
* @return 巡检记录
*/
public TInspectionData selectTInspectionDataById(Long dataId);
/**
* 查询巡检记录列表
*
* @param tInspectionData 巡检记录
* @return 巡检记录集合
*/
public List<TInspectionData> selectTInspectionDataList(TInspectionData tInspectionData);
/**
* 新增巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
public int insertTInspectionData(TInspectionData tInspectionData);
/**
* 修改巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
public int updateTInspectionData(TInspectionData tInspectionData);
/**
* 批量删除巡检记录
*
* @param dataIds 需要删除的巡检记录ID
* @return 结果
*/
public int deleteTInspectionDataByIds(Long[] dataIds);
/**
* 删除巡检记录信息
*
* @param dataId 巡检记录ID
* @return 结果
*/
public int deleteTInspectionDataById(Long dataId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInspector;
/**
* 巡检员Service接口
*
* @author zehong
* @date 2021-07-08
*/
public interface ITInspectorService
{
/**
* 查询巡检员
*
* @param inspectorId 巡检员ID
* @return 巡检员
*/
public TInspector selectTInspectorById(Long inspectorId);
/**
* 查询巡检员列表
*
* @param tInspector 巡检员
* @return 巡检员集合
*/
public List<TInspector> selectTInspectorList(TInspector tInspector);
/**
* 新增巡检员
*
* @param tInspector 巡检员
* @return 结果
*/
public int insertTInspector(TInspector tInspector);
/**
* 修改巡检员
*
* @param tInspector 巡检员
* @return 结果
*/
public int updateTInspector(TInspector tInspector);
/**
* 批量删除巡检员
*
* @param inspectorIds 需要删除的巡检员ID
* @return 结果
*/
public int deleteTInspectorByIds(Long[] inspectorIds);
/**
* 删除巡检员信息
*
* @param inspectorId 巡检员ID
* @return 结果
*/
public int deleteTInspectorById(Long inspectorId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TPipe;
/**
* 管道信息Service接口
*
* @author zehong
* @date 2021-07-08
*/
public interface ITPipeService
{
/**
* 查询管道信息
*
* @param pipeId 管道信息ID
* @return 管道信息
*/
public TPipe selectTPipeById(Long pipeId);
/**
* 查询管道信息列表
*
* @param tPipe 管道信息
* @return 管道信息集合
*/
public List<TPipe> selectTPipeList(TPipe tPipe);
/**
* 新增管道信息
*
* @param tPipe 管道信息
* @return 结果
*/
public int insertTPipe(TPipe tPipe);
/**
* 修改管道信息
*
* @param tPipe 管道信息
* @return 结果
*/
public int updateTPipe(TPipe tPipe);
/**
* 批量删除管道信息
*
* @param pipeIds 需要删除的管道信息ID
* @return 结果
*/
public int deleteTPipeByIds(Long[] pipeIds);
/**
* 删除管道信息信息
*
* @param pipeId 管道信息ID
* @return 结果
*/
public int deleteTPipeById(Long pipeId);
}
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.TDeviceInfoMapper;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService;
/**
* 设备信息Service业务层处理
*
* @author zehong
* @date 2021-07-09
*/
@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)
{
return tDeviceInfoMapper.insertTDeviceInfo(tDeviceInfo);
}
/**
* 修改设备信息
*
* @param tDeviceInfo 设备信息
* @return 结果
*/
@Override
public int updateTDeviceInfo(TDeviceInfo tDeviceInfo)
{
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);
}
}
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.TInspectionDataMapper;
import com.zehong.system.domain.TInspectionData;
import com.zehong.system.service.ITInspectionDataService;
/**
* 巡检记录Service业务层处理
*
* @author zehong
* @date 2021-07-09
*/
@Service
public class TInspectionDataServiceImpl implements ITInspectionDataService
{
@Autowired
private TInspectionDataMapper tInspectionDataMapper;
/**
* 查询巡检记录
*
* @param dataId 巡检记录ID
* @return 巡检记录
*/
@Override
public TInspectionData selectTInspectionDataById(Long dataId)
{
return tInspectionDataMapper.selectTInspectionDataById(dataId);
}
/**
* 查询巡检记录列表
*
* @param tInspectionData 巡检记录
* @return 巡检记录
*/
@Override
public List<TInspectionData> selectTInspectionDataList(TInspectionData tInspectionData)
{
return tInspectionDataMapper.selectTInspectionDataList(tInspectionData);
}
/**
* 新增巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
@Override
public int insertTInspectionData(TInspectionData tInspectionData)
{
tInspectionData.setCreateTime(DateUtils.getNowDate());
return tInspectionDataMapper.insertTInspectionData(tInspectionData);
}
/**
* 修改巡检记录
*
* @param tInspectionData 巡检记录
* @return 结果
*/
@Override
public int updateTInspectionData(TInspectionData tInspectionData)
{
return tInspectionDataMapper.updateTInspectionData(tInspectionData);
}
/**
* 批量删除巡检记录
*
* @param dataIds 需要删除的巡检记录ID
* @return 结果
*/
@Override
public int deleteTInspectionDataByIds(Long[] dataIds)
{
return tInspectionDataMapper.deleteTInspectionDataByIds(dataIds);
}
/**
* 删除巡检记录信息
*
* @param dataId 巡检记录ID
* @return 结果
*/
@Override
public int deleteTInspectionDataById(Long dataId)
{
return tInspectionDataMapper.deleteTInspectionDataById(dataId);
}
}
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.TInspectorMapper;
import com.zehong.system.domain.TInspector;
import com.zehong.system.service.ITInspectorService;
/**
* 巡检员Service业务层处理
*
* @author zehong
* @date 2021-07-08
*/
@Service
public class TInspectorServiceImpl implements ITInspectorService
{
@Autowired
private TInspectorMapper tInspectorMapper;
/**
* 查询巡检员
*
* @param inspectorId 巡检员ID
* @return 巡检员
*/
@Override
public TInspector selectTInspectorById(Long inspectorId)
{
return tInspectorMapper.selectTInspectorById(inspectorId);
}
/**
* 查询巡检员列表
*
* @param tInspector 巡检员
* @return 巡检员
*/
@Override
public List<TInspector> selectTInspectorList(TInspector tInspector)
{
return tInspectorMapper.selectTInspectorList(tInspector);
}
/**
* 新增巡检员
*
* @param tInspector 巡检员
* @return 结果
*/
@Override
public int insertTInspector(TInspector tInspector)
{
return tInspectorMapper.insertTInspector(tInspector);
}
/**
* 修改巡检员
*
* @param tInspector 巡检员
* @return 结果
*/
@Override
public int updateTInspector(TInspector tInspector)
{
return tInspectorMapper.updateTInspector(tInspector);
}
/**
* 批量删除巡检员
*
* @param inspectorIds 需要删除的巡检员ID
* @return 结果
*/
@Override
public int deleteTInspectorByIds(Long[] inspectorIds)
{
return tInspectorMapper.deleteTInspectorByIds(inspectorIds);
}
/**
* 删除巡检员信息
*
* @param inspectorId 巡检员ID
* @return 结果
*/
@Override
public int deleteTInspectorById(Long inspectorId)
{
return tInspectorMapper.deleteTInspectorById(inspectorId);
}
}
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.TPipeMapper;
import com.zehong.system.domain.TPipe;
import com.zehong.system.service.ITPipeService;
/**
* 管道信息Service业务层处理
*
* @author zehong
* @date 2021-07-08
*/
@Service
public class TPipeServiceImpl implements ITPipeService
{
@Autowired
private TPipeMapper tPipeMapper;
/**
* 查询管道信息
*
* @param pipeId 管道信息ID
* @return 管道信息
*/
@Override
public TPipe selectTPipeById(Long pipeId)
{
return tPipeMapper.selectTPipeById(pipeId);
}
/**
* 查询管道信息列表
*
* @param tPipe 管道信息
* @return 管道信息
*/
@Override
public List<TPipe> selectTPipeList(TPipe tPipe)
{
return tPipeMapper.selectTPipeList(tPipe);
}
/**
* 新增管道信息
*
* @param tPipe 管道信息
* @return 结果
*/
@Override
public int insertTPipe(TPipe tPipe)
{
return tPipeMapper.insertTPipe(tPipe);
}
/**
* 修改管道信息
*
* @param tPipe 管道信息
* @return 结果
*/
@Override
public int updateTPipe(TPipe tPipe)
{
return tPipeMapper.updateTPipe(tPipe);
}
/**
* 批量删除管道信息
*
* @param pipeIds 需要删除的管道信息ID
* @return 结果
*/
@Override
public int deleteTPipeByIds(Long[] pipeIds)
{
return tPipeMapper.deleteTPipeByIds(pipeIds);
}
/**
* 删除管道信息信息
*
* @param pipeId 管道信息ID
* @return 结果
*/
@Override
public int deleteTPipeById(Long pipeId)
{
return tPipeMapper.deleteTPipeById(pipeId);
}
}
<?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="enterpriseId" column="enterprise_id" />
<result property="pipeId" column="pipe_id" />
<result property="deviceName" column="device_name" />
<result property="deviceAddr" column="device_addr" />
<result property="deviceModel" column="device_model" />
<result property="deviceType" column="device_type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="iotNo" column="iot_no" />
<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="remarks" column="remarks" />
</resultMap>
<sql id="selectTDeviceInfoVo">
select device_id, enterprise_id, pipe_id, device_name, device_addr, device_model, device_type, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, remarks from t_device_info
</sql>
<select id="selectTDeviceInfoList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult">
<include refid="selectTDeviceInfoVo"/>
<where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
<if test="pipeId != null "> and pipe_id = #{pipeId}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceAddr != null and deviceAddr != ''"> and device_addr = #{deviceAddr}</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model = #{deviceModel}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="iotNo != null and iotNo != ''"> and iot_no = #{iotNo}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="installationTime != null "> and installation_time = #{installationTime}</if>
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTDeviceInfoById" parameterType="Long" resultMap="TDeviceInfoResult">
<include refid="selectTDeviceInfoVo"/>
where device_id = #{deviceId}
</select>
<insert id="insertTDeviceInfo" parameterType="TDeviceInfo" useGeneratedKeys="true" keyProperty="deviceId">
insert into t_device_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="pipeId != null">pipe_id,</if>
<if test="deviceName != null">device_name,</if>
<if test="deviceAddr != null">device_addr,</if>
<if test="deviceModel != null">device_model,</if>
<if test="deviceType != null">device_type,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="iotNo != null">iot_no,</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="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="pipeId != null">#{pipeId},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="deviceAddr != null">#{deviceAddr},</if>
<if test="deviceModel != null">#{deviceModel},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="iotNo != null">#{iotNo},</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="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTDeviceInfo" parameterType="TDeviceInfo">
update t_device_info
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="pipeId != null">pipe_id = #{pipeId},</if>
<if test="deviceName != null">device_name = #{deviceName},</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="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="iotNo != null">iot_no = #{iotNo},</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="remarks != null">remarks = #{remarks},</if>
</trim>
where device_id = #{deviceId}
</update>
<delete id="deleteTDeviceInfoById" parameterType="Long">
delete from t_device_info where device_id = #{deviceId}
</delete>
<delete id="deleteTDeviceInfoByIds" parameterType="String">
delete from t_device_info where device_id in
<foreach item="deviceId" collection="array" open="(" separator="," close=")">
#{deviceId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TEnterpriseInfoMapper">
<resultMap type="TEnterpriseInfo" id="TEnterpriseInfoResult">
<result property="infoId" column="info_id" />
<result property="unitName" column="unit_name" />
<result property="orgCode" column="org_code" />
<result property="orgFilePath" column="org_file_path" />
<result property="orgFileName" column="org_file_name" />
<result property="runAddress" column="run_address" />
<result property="regAddress" column="reg_address" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="legalPerson" column="legal_person" />
<result property="legalPersonPhone" column="legal_person_phone" />
<result property="legalPersonEmail" column="legal_person_email" />
<result property="createUserId" column="create_user_id" />
<result property="updateUserId" column="update_user_id" />
<result property="updateTime" column="update_time" />
<result property="createTime" column="create_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTEnterpriseInfoVo">
select info_id, unit_name, org_code, org_file_path, org_file_name, run_address, reg_address, longitude, latitude, legal_person, legal_person_phone, legal_person_email, create_user_id, update_user_id, update_time, create_time, remarks from t_enterprise_info
</sql>
<select id="selectTEnterpriseInfoList" parameterType="TEnterpriseInfo" resultMap="TEnterpriseInfoResult">
<include refid="selectTEnterpriseInfoVo"/>
<where>
<if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if>
<if test="orgFilePath != null and orgFilePath != ''"> and org_file_path = #{orgFilePath}</if>
<if test="orgFileName != null and orgFileName != ''"> and org_file_name like concat('%', #{orgFileName}, '%')</if>
<if test="runAddress != null and runAddress != ''"> and run_address = #{runAddress}</if>
<if test="regAddress != null and regAddress != ''"> and reg_address = #{regAddress}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
<if test="legalPersonPhone != null and legalPersonPhone != ''"> and legal_person_phone = #{legalPersonPhone}</if>
<if test="legalPersonEmail != null and legalPersonEmail != ''"> and legal_person_email = #{legalPersonEmail}</if>
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId}</if>
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTEnterpriseInfoById" parameterType="Long" resultMap="TEnterpriseInfoResult">
<include refid="selectTEnterpriseInfoVo"/>
where info_id = #{infoId}
</select>
<insert id="insertTEnterpriseInfo" parameterType="TEnterpriseInfo">
insert into t_enterprise_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="infoId != null">info_id,</if>
<if test="unitName != null">unit_name,</if>
<if test="orgCode != null">org_code,</if>
<if test="orgFilePath != null">org_file_path,</if>
<if test="orgFileName != null">org_file_name,</if>
<if test="runAddress != null">run_address,</if>
<if test="regAddress != null">reg_address,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="legalPerson != null">legal_person,</if>
<if test="legalPersonPhone != null">legal_person_phone,</if>
<if test="legalPersonEmail != null">legal_person_email,</if>
<if test="createUserId != null">create_user_id,</if>
<if test="updateUserId != null">update_user_id,</if>
<if test="updateTime != null">update_time,</if>
<if test="createTime != null">create_time,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="infoId != null">#{infoId},</if>
<if test="unitName != null">#{unitName},</if>
<if test="orgCode != null">#{orgCode},</if>
<if test="orgFilePath != null">#{orgFilePath},</if>
<if test="orgFileName != null">#{orgFileName},</if>
<if test="runAddress != null">#{runAddress},</if>
<if test="regAddress != null">#{regAddress},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="legalPerson != null">#{legalPerson},</if>
<if test="legalPersonPhone != null">#{legalPersonPhone},</if>
<if test="legalPersonEmail != null">#{legalPersonEmail},</if>
<if test="createUserId != null">#{createUserId},</if>
<if test="updateUserId != null">#{updateUserId},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTEnterpriseInfo" parameterType="TEnterpriseInfo">
update t_enterprise_info
<trim prefix="SET" suffixOverrides=",">
<if test="unitName != null">unit_name = #{unitName},</if>
<if test="orgCode != null">org_code = #{orgCode},</if>
<if test="orgFilePath != null">org_file_path = #{orgFilePath},</if>
<if test="orgFileName != null">org_file_name = #{orgFileName},</if>
<if test="runAddress != null">run_address = #{runAddress},</if>
<if test="regAddress != null">reg_address = #{regAddress},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="legalPerson != null">legal_person = #{legalPerson},</if>
<if test="legalPersonPhone != null">legal_person_phone = #{legalPersonPhone},</if>
<if test="legalPersonEmail != null">legal_person_email = #{legalPersonEmail},</if>
<if test="createUserId != null">create_user_id = #{createUserId},</if>
<if test="updateUserId != null">update_user_id = #{updateUserId},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where info_id = #{infoId}
</update>
<delete id="deleteTEnterpriseInfoById" parameterType="Long">
delete from t_enterprise_info where info_id = #{infoId}
</delete>
<delete id="deleteTEnterpriseInfoByIds" parameterType="String">
delete from t_enterprise_info where info_id in
<foreach item="infoId" collection="array" open="(" separator="," close=")">
#{infoId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TInspectionDataMapper">
<resultMap type="TInspectionData" id="TInspectionDataResult">
<result property="dataId" column="data_id" />
<result property="inspectorId" column="inspector_id" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="createTime" column="create_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTInspectionDataVo">
select data_id, inspector_id, longitude, latitude, create_time, remarks from t_inspection_data
</sql>
<select id="selectTInspectionDataList" parameterType="TInspectionData" resultMap="TInspectionDataResult">
<include refid="selectTInspectionDataVo"/>
<where>
<if test="inspectorId != null "> and inspector_id = #{inspectorId}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTInspectionDataById" parameterType="Long" resultMap="TInspectionDataResult">
<include refid="selectTInspectionDataVo"/>
where data_id = #{dataId}
</select>
<insert id="insertTInspectionData" parameterType="TInspectionData">
insert into t_inspection_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dataId != null">data_id,</if>
<if test="inspectorId != null">inspector_id,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="createTime != null">create_time,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dataId != null">#{dataId},</if>
<if test="inspectorId != null">#{inspectorId},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTInspectionData" parameterType="TInspectionData">
update t_inspection_data
<trim prefix="SET" suffixOverrides=",">
<if test="inspectorId != null">inspector_id = #{inspectorId},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where data_id = #{dataId}
</update>
<delete id="deleteTInspectionDataById" parameterType="Long">
delete from t_inspection_data where data_id = #{dataId}
</delete>
<delete id="deleteTInspectionDataByIds" parameterType="String">
delete from t_inspection_data where data_id in
<foreach item="dataId" collection="array" open="(" separator="," close=")">
#{dataId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TInspectorMapper">
<resultMap type="TInspector" id="TInspectorResult">
<result property="inspectorId" column="inspector_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="name" column="name" />
<result property="phone" column="phone" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTInspectorVo">
select inspector_id, enterprise_id, name, phone, remarks from t_inspector
</sql>
<select id="selectTInspectorList" parameterType="TInspector" resultMap="TInspectorResult">
<include refid="selectTInspectorVo"/>
<where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTInspectorById" parameterType="Long" resultMap="TInspectorResult">
<include refid="selectTInspectorVo"/>
where inspector_id = #{inspectorId}
</select>
<insert id="insertTInspector" parameterType="TInspector" useGeneratedKeys="true" keyProperty="inspectorId">
insert into t_inspector
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="name != null">name,</if>
<if test="phone != null">phone,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="name != null">#{name},</if>
<if test="phone != null">#{phone},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTInspector" parameterType="TInspector">
update t_inspector
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="name != null">name = #{name},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where inspector_id = #{inspectorId}
</update>
<delete id="deleteTInspectorById" parameterType="Long">
delete from t_inspector where inspector_id = #{inspectorId}
</delete>
<delete id="deleteTInspectorByIds" parameterType="String">
delete from t_inspector where inspector_id in
<foreach item="inspectorId" collection="array" open="(" separator="," close=")">
#{inspectorId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TPipeMapper">
<resultMap type="TPipe" id="TPipeResult">
<result property="pipeId" column="pipe_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="pipeName" column="pipe_name" />
<result property="pipeAddr" column="pipe_addr" />
<result property="coordinates" column="coordinates" />
<result property="pipeLength" column="pipe_length" />
<result property="pipeType" column="pipe_type" />
<result property="pipePressure" column="pipe_pressure" />
<result property="iconUrl" column="icon_url" />
<result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTPipeVo">
select pipe_id, enterprise_id, pipe_name, pipe_addr, coordinates, pipe_length, pipe_type, pipe_pressure, icon_url, installation_time, inspection_time, remarks from t_pipe
</sql>
<select id="selectTPipeList" parameterType="TPipe" resultMap="TPipeResult">
<include refid="selectTPipeVo"/>
<where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
<if test="pipeName != null and pipeName != ''"> and pipe_name like concat('%', #{pipeName}, '%')</if>
<if test="pipeAddr != null and pipeAddr != ''"> and pipe_addr = #{pipeAddr}</if>
<if test="coordinates != null and coordinates != ''"> and coordinates = #{coordinates}</if>
<if test="pipeLength != null "> and pipe_length = #{pipeLength}</if>
<if test="pipeType != null and pipeType != ''"> and pipe_type = #{pipeType}</if>
<if test="pipePressure != null and pipePressure != ''"> and pipe_pressure = #{pipePressure}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
<if test="installationTime != null "> and installation_time = #{installationTime}</if>
<if test="inspectionTime != null "> and inspection_time = #{inspectionTime}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTPipeById" parameterType="Long" resultMap="TPipeResult">
<include refid="selectTPipeVo"/>
where pipe_id = #{pipeId}
</select>
<insert id="insertTPipe" parameterType="TPipe" useGeneratedKeys="true" keyProperty="pipeId">
insert into t_pipe
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="pipeName != null">pipe_name,</if>
<if test="pipeAddr != null">pipe_addr,</if>
<if test="coordinates != null">coordinates,</if>
<if test="pipeLength != null">pipe_length,</if>
<if test="pipeType != null">pipe_type,</if>
<if test="pipePressure != null">pipe_pressure,</if>
<if test="iconUrl != null">icon_url,</if>
<if test="installationTime != null">installation_time,</if>
<if test="inspectionTime != null">inspection_time,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="pipeName != null">#{pipeName},</if>
<if test="pipeAddr != null">#{pipeAddr},</if>
<if test="coordinates != null">#{coordinates},</if>
<if test="pipeLength != null">#{pipeLength},</if>
<if test="pipeType != null">#{pipeType},</if>
<if test="pipePressure != null">#{pipePressure},</if>
<if test="iconUrl != null">#{iconUrl},</if>
<if test="installationTime != null">#{installationTime},</if>
<if test="inspectionTime != null">#{inspectionTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTPipe" parameterType="TPipe">
update t_pipe
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="pipeName != null">pipe_name = #{pipeName},</if>
<if test="pipeAddr != null">pipe_addr = #{pipeAddr},</if>
<if test="coordinates != null">coordinates = #{coordinates},</if>
<if test="pipeLength != null">pipe_length = #{pipeLength},</if>
<if test="pipeType != null">pipe_type = #{pipeType},</if>
<if test="pipePressure != null">pipe_pressure = #{pipePressure},</if>
<if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where pipe_id = #{pipeId}
</update>
<delete id="deleteTPipeById" parameterType="Long">
delete from t_pipe where pipe_id = #{pipeId}
</delete>
<delete id="deleteTPipeByIds" parameterType="String">
delete from t_pipe where pipe_id in
<foreach item="pipeId" collection="array" open="(" separator="," close=")">
#{pipeId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
This diff is collapsed.
import request from '@/utils/request'
// 查询设备信息列表
export function listDeviceInfo(query) {
return request({
url: '/device/deviceInfo/list',
method: 'get',
params: query
})
}
// 查询设备信息详细
export function getDeviceInfo(deviceId) {
return request({
url: '/device/deviceInfo/' + deviceId,
method: 'get'
})
}
// 新增设备信息
export function addDeviceInfo(data) {
return request({
url: '/device/deviceInfo',
method: 'post',
data: data
})
}
// 修改设备信息
export function updateDeviceInfo(data) {
return request({
url: '/device/deviceInfo',
method: 'put',
data: data
})
}
// 删除设备信息
export function delDeviceInfo(deviceId) {
return request({
url: '/device/deviceInfo/' + deviceId,
method: 'delete'
})
}
// 导出设备信息
export function exportDeviceInfo(query) {
return request({
url: '/device/deviceInfo/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询巡检记录列表
export function listInspectionData(query) {
return request({
url: '/device/inspectionData/list',
method: 'get',
params: query
})
}
// 查询巡检记录详细
export function getInspectionData(dataId) {
return request({
url: '/device/inspectionData/' + dataId,
method: 'get'
})
}
// 新增巡检记录
export function addInspectionData(data) {
return request({
url: '/device/inspectionData',
method: 'post',
data: data
})
}
// 修改巡检记录
export function updateInspectionData(data) {
return request({
url: '/device/inspectionData',
method: 'put',
data: data
})
}
// 删除巡检记录
export function delInspectionData(dataId) {
return request({
url: '/device/inspectionData/' + dataId,
method: 'delete'
})
}
// 导出巡检记录
export function exportInspectionData(query) {
return request({
url: '/device/inspectionData/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询巡检员列表
export function listInspector(query) {
return request({
url: '/device/inspector/list',
method: 'get',
params: query
})
}
// 查询巡检员详细
export function getInspector(inspectorId) {
return request({
url: '/device/inspector/' + inspectorId,
method: 'get'
})
}
// 新增巡检员
export function addInspector(data) {
return request({
url: '/device/inspector',
method: 'post',
data: data
})
}
// 修改巡检员
export function updateInspector(data) {
return request({
url: '/device/inspector',
method: 'put',
data: data
})
}
// 删除巡检员
export function delInspector(inspectorId) {
return request({
url: '/device/inspector/' + inspectorId,
method: 'delete'
})
}
// 导出巡检员
export function exportInspector(query) {
return request({
url: '/device/inspector/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询管道信息列表
export function listPipe(query) {
return request({
url: '/device/pipe/list',
method: 'get',
params: query
})
}
// 查询管道信息详细
export function getPipe(pipeId) {
return request({
url: '/device/pipe/' + pipeId,
method: 'get'
})
}
// 新增管道信息
export function addPipe(data) {
return request({
url: '/device/pipe',
method: 'post',
data: data
})
}
// 修改管道信息
export function updatePipe(data) {
return request({
url: '/device/pipe',
method: 'put',
data: data
})
}
// 删除管道信息
export function delPipe(pipeId) {
return request({
url: '/device/pipe/' + pipeId,
method: 'delete'
})
}
// 导出管道信息
export function exportPipe(query) {
return request({
url: '/device/pipe/export',
method: 'get',
params: query
})
}
<svg width="130" height="130" xmlns="http://www.w3.org/2000/svg"><path d="M63.444 64.996c20.633 0 37.359-14.308 37.359-31.953 0-17.649-16.726-31.952-37.359-31.952-20.631 0-37.36 14.303-37.358 31.952 0 17.645 16.727 31.953 37.359 31.953zM80.57 75.65H49.434c-26.652 0-48.26 18.477-48.26 41.27v2.664c0 9.316 21.608 9.325 48.26 9.325H80.57c26.649 0 48.256-.344 48.256-9.325v-2.663c0-22.794-21.605-41.271-48.256-41.271z" stroke="#979797"/></svg>
\ No newline at end of file
<svg width="130" height="130" xmlns="http://www.w3.org/2000/svg"><path d="M63.444 64.996c20.633 0 37.359-14.308 37.359-31.953 0-17.649-16.726-31.952-37.359-31.952-20.631 0-37.36 14.303-37.358 31.952 0 17.645 16.727 31.953 37.359 31.953zM80.57 75.65H49.434c-26.652 0-48.26 18.477-48.26 41.27v2.664c0 9.316 21.608 9.325 48.26 9.325H80.57c26.649 0 48.256-.344 48.256-9.325v-2.663c0-22.794-21.605-41.271-48.256-41.271z" stroke="&#xe60a;"/></svg>
......@@ -11,19 +11,30 @@
-webkit-transition: width .28s;
transition: width 0.28s;
width: $sideBarWidth !important;
background-color: $menuBg;
background-color: #053B6A;
height: 100%;
position: fixed;
font-size: 0px;
top: 0;
top: 85px;
bottom: 0;
left: 0;
z-index: 1001;
overflow: hidden;
-webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35);
box-shadow: 2px 0 6px rgba(0,21,41,.35);
// reset element-ui css
.el-menu-item{
margin-top: 5px;
height: 84px;
line-height: 30px !important;
text-align: center;
.svg-icon{
margin-top: 10px;
font-size: 30px;
// width: 30px !important;
}
}
reset element-ui css
.horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
}
......@@ -57,10 +68,11 @@
}
.svg-icon {
margin-right: 16px;
margin-right: 5px;
}
.el-menu {
background-color: #053B6A;
border: none;
height: 100%;
width: 100% !important;
......@@ -69,7 +81,7 @@
.el-menu-item, .el-submenu__title {
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
// white-space: nowrap !important;
}
// menu hover
......@@ -81,7 +93,7 @@
}
& .theme-dark .is-active > .el-submenu__title {
color: $subMenuActiveText !important;
color: #5CD9D4 !important;
}
& .nest-menu .el-submenu>.el-submenu__title,
......@@ -95,10 +107,10 @@
& .theme-dark .nest-menu .el-submenu>.el-submenu__title,
& .theme-dark .el-submenu .el-menu-item {
background-color: $subMenuBg !important;
background-color: #053B6A !important;
&:hover {
background-color: $subMenuHover !important;
background-color: rgba(0, 0, 0, 0.06) !important;
}
}
}
......
......@@ -24,7 +24,7 @@ $sidebarLightTitle: #001529;
$subMenuBg:#1f2d3d;
$subMenuHover:#001528;
$sideBarWidth: 200px;
$sideBarWidth: 100px;
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
......
......@@ -3,12 +3,12 @@
<el-upload
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:file-list="fileList"
:file-list="fileArr"
:limit="1"
:on-error="handleUploadError"
:on-exceed="handleExceed"
:on-success="handleUploadSuccess"
:show-file-list="false"
:show-file-list="true"
:headers="headers"
class="upload-file-uploader"
ref="upload"
......@@ -50,15 +50,19 @@ export default {
type: Number,
default: 5,
},
fileArr: {
type: Array,
default: [],
},
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
default: () => ["doc", "xls", "ppt", "txt", "pdf",'png', 'jpg', 'jpeg'],
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: true
default: false
}
},
data() {
......@@ -135,12 +139,26 @@ export default {
// 上传成功回调
handleUploadSuccess(res, file) {
this.$message.success("上传成功");
this.$emit("input", res.url);
this.$emit("resFun", res);
},
// 删除文件
handleDelete(index) {
this.fileList.splice(index, 1);
this.$emit("input", '');
// let that = this,
// param;
// param = file.response ? file.response.fileName.replace(/\\/g, "%")
// : file.response.url.replace(/\\/g, "%").slice(9);
// $.ajax({
// type: "GET",
// url: process.env.VUE_APP_BASE_API + "/common/deleteFile",
// data: {savePath: param},
// dataType: "json",
// success: function(data){
// if (data) that.$message.success("删除成功");
// else return false;
// }
// });
},
// 获取文件名称
getFileName(name) {
......@@ -152,7 +170,7 @@ export default {
}
},
created() {
this.fileList = this.list;
// this.fileList = this.list;
},
};
</script>
......@@ -176,4 +194,4 @@ export default {
.ele-upload-list__item-content-action .el-link {
margin-right: 10px;
}
</style>
\ No newline at end of file
</style>
......@@ -5,10 +5,12 @@
@select="handleSelect"
>
<template v-for="(item, index) in topMenus">
<el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
><svg-icon :icon-class="item.meta.icon" />
{{ item.meta.title }}</el-menu-item
>
<!-- <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber" -->
<el-menu-item :style="" :index="item.path" :key="index" v-if="index < visibleNumber">
<!-- 导航栏左侧图标 -->
<!-- <svg-icon :icon-class="item.meta.icon" /> -->
{{ item.meta.title }}</el-menu-item>
</template>
<!-- 顶部菜单超出数量折叠 -->
......@@ -160,18 +162,25 @@ export default {
<style lang="scss">
.el-menu--horizontal > .el-menu-item {
float: left;
height: 50px;
line-height: 50px;
width: 150px;
height: 80px;
text-align: center;
line-height: 80px;
margin: 0;
border-bottom: 3px solid transparent;
color: #999093;
font-size: 18px;
font-weight: 600;
color: #fff;
/* background-color: #053B6A; */
/* border-bottom: 3px solid transparent; */
/* color: #999093; */
padding: 0 5px;
margin: 0 10px;
margin: 0 20px;
}
.el-menu--horizontal > .el-menu-item.is-active {
border-bottom: 3px solid #{'var(--theme)'};
color: #303133;
box-shadow: inset 2px 2px 20px #5CD9D4;
color: #5CD9D4;
}
/* submenu item */
......@@ -179,4 +188,10 @@ export default {
height: 50px !important;
line-height: 50px !important;
}
.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus{
background-color: rgba(0, 0, 0, 0);
/* opacity: 0; */
box-shadow: inset 2px 2px 20px #5CD9D4;
color: #5CD9D4;
}
</style>
<template>
<div class="navbar">
<div style="float: left;padding: 5px;">
<span style="width: 288px;
height: 43px;
font-size: 30px;
font-family: eryaxindahei;
font-weight: 600;
line-height: 43px;
color: #0FC7C0;
opacity: 1;">燃气综合管理平台</span></div>
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<!-- 顶部导航 -->
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu">
<template v-if="device!=='mobile'">
<!-- <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" />
<!--<el-tooltip content="源码地址" effect="dark" placement="bottom">
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip>-->
</el-tooltip>
<screenfull id="screenfull" class="right-menu-item hover-effect" />
......@@ -23,8 +36,13 @@
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template>
</template> -->
<div class="formatDate">
<img src="@/assets/logo/formleft.png" alt="">
<span>{{ nowDate }}</span>
</div>
<div class="yhm">用户名</div>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
......@@ -64,6 +82,11 @@ export default {
SizeSelect,
Search
},
data() {
return {
nowDate: "", // 当前日期
};
},
computed: {
...mapGetters([
'sidebar',
......@@ -101,6 +124,32 @@ export default {
location.href = '/index';
})
}).catch(() => {});
},
currentTime() {
setInterval(this.formatDate, 500);
},
formatDate() {
let date = new Date();
let year = date.getFullYear(); // 年
let month = date.getMonth() + 1; // 月
let day = date.getDate(); // 日
let week = date.getDay(); // 星期
let weekArr = [ "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" ];
let hour = date.getHours(); // 时
hour = hour < 10 ? "0" + hour : hour; // 如果只有一位,则前面补零
let minute = date.getMinutes(); // 分
minute = minute < 10 ? "0" + minute : minute; // 如果只有一位,则前面补零
let second = date.getSeconds(); // 秒
second = second < 10 ? "0" + second : second; // 如果只有一位,则前面补零
this.nowDate = `${year}/${month}/${day}`;
}
},
mounted() {
this.currentTime();
},
beforeDestroy() {
if (this.formatDate) {
clearInterval(this.formatDate); // 在Vue实例销毁前,清除时间定时器
}
}
}
......@@ -108,14 +157,17 @@ export default {
<style lang="scss" scoped>
.navbar {
height: 50px;
height: 80px;
width: 100%;
left: 0;
line-height: 80px;
overflow: hidden;
position: relative;
background: #fff;
position: fixed;
background: #053B6A;
box-shadow: 0 1px 4px rgba(0,21,41,.08);
.hamburger-container {
line-height: 46px;
line-height: 80px;
height: 100%;
float: left;
cursor: pointer;
......@@ -132,27 +184,52 @@ export default {
}
.topmenu-container {
width: 1100px;
background-color: red;
position: absolute;
left: 50px;
left: 350px;
background-color: #053B6A;
}
.errLog-container {
display: inline-block;
vertical-align: top;
}
.right-menu {
width: 366px;
float: right;
height: 100%;
line-height: 50px;
line-height: 80px;
&:focus {
outline: none;
}
.formatDate{
width: 200px;
float: left;
font-size: 24px;
font-family: PingFang SC;
font-weight: 400;
color: #fff;
img{
height: 100%;
float: left;
}
}
.yhm{
font-size: 24px;
font-family: PingFang SC;
font-weight: 400;
color: #fff;
float: left;
}
.right-menu-item {
display: inline-block;
margin-top: 8px;
padding: 0 8px;
float: right;
height: 100%;
font-size: 18px;
color: #5a5e66;
......
......@@ -3,7 +3,8 @@
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"/><br>
<item :title="onlyOneChild.meta.title" />
</el-menu-item>
</app-link>
</template>
......@@ -94,3 +95,18 @@ export default {
}
}
</script>
<style lang="scss">
#app .sidebar-container .submenu-title-noDropdown:hover, #app .sidebar-container .el-submenu__title:hover {
box-shadow: inset 2px 2px 20px #5CD9D4;
}
#app .sidebar-container .el-menu-item, #app .sidebar-container .el-submenu__title {
overflow: hidden !important;
text-overflow: ellipsis !important;
background: rgba(0, 0, 0, 0);
}
.el-menu-item:hover, .el-menu-item:focus,.is-active {
outline: none;
box-shadow: inset 2px 2px 20px #5CD9D4;
color: #5CD9D4 !important;
}
</style>
\ No newline at end of file
<template>
<div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }">
<logo v-if="showLogo" :collapse="isCollapse" />
<div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables : variables.menuLightBg }">
<!-- <logo v-if="showLogo" :collapse="isCollapse" /> -->
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="settings.sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg"
:background-color="settings.sideTheme === 'theme-dark' ? variables : variables.menuLightBg"
:text-color="settings.sideTheme === 'theme-dark' ? variables.menuText : 'rgba(0,0,0,.65)'"
:unique-opened="true"
:active-text-color="settings.theme"
......
<template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<sidebar class="sidebar-container" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{hasTagsView:needTagsView}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar />
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<div class="main-container" :class="{ 'hyseNo':!meunStyle,'hyse':meunStyle,hasTagsView:needTagsView}" >
<div :class="{'fixed-header':fixedHeader,'hyfixedNo':fixedHeader,'hyfixed':!fixedHeader}" v-if="!meunStyle">
<navbar :style=""/>
<sidebar class="sidebar-container" v-if="!meunStyle"/>
<!-- <tags-view v-if="needTagsView" style="width:100%"/> -->
</div>
<div v-if="meunStyle">
<head-navbar v-if="meunStyle" />
<tags-view v-if="needTagsView" />
</div>
<app-main />
......
......@@ -14,7 +14,7 @@ module.exports = {
/**
* 是否显示顶部导航
*/
topNav: false,
topNav: true,
/**
* 是否显示 tagsView
......@@ -24,7 +24,7 @@ module.exports = {
/**
* 是否固定头部
*/
fixedHeader: false,
fixedHeader: true,
/**
* 是否显示logo
......
This diff is collapsed.
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="经度" prop="longitude">
<el-input
v-model="queryParams.longitude"
placeholder="请输入经度"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input
v-model="queryParams.latitude"
placeholder="请输入纬度"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input
v-model="queryParams.remarks"
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="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['device:inspectionData:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inspectionDataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" align="center" />
<el-table-column label="巡检员" align="center" prop="inspectorId" />
<el-table-column label="经度" align="center" prop="longitude" />
<el-table-column label="纬度" align="center" prop="latitude" />
<el-table-column label="备注" align="center" prop="remarks" />
<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="['device:inspectionData:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:inspectionData: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="巡检员id" prop="inspectorId">
<el-input v-model="form.inspectorId" placeholder="请输入巡检员id" />
</el-form-item>
<el-form-item label="经度" prop="longitude">
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input v-model="form.latitude" placeholder="请输入纬度" />
</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 { listInspectionData, getInspectionData, delInspectionData, addInspectionData, updateInspectionData, exportInspectionData } from "@/api/device/inspectionData";
export default {
name: "InspectionData",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 巡检记录表格数据
inspectionDataList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
inspectorId: null,
longitude: null,
latitude: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询巡检记录列表 */
getList() {
this.loading = true;
listInspectionData(this.queryParams).then(response => {
this.inspectionDataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
dataId: null,
inspectorId: null,
longitude: null,
latitude: null,
createTime: 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.dataId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加巡检记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dataId = row.dataId || this.ids
getInspectionData(dataId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改巡检记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dataId != null) {
updateInspectionData(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInspectionData(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const dataIds = row.dataId || this.ids;
this.$confirm('是否确认删除巡检记录编号为"' + dataIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInspectionData(dataIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有巡检记录数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportInspectionData(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="姓名" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入姓名"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input
v-model="queryParams.phone"
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="['device:inspector: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="['device:inspector: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="['device:inspector: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="['device:inspector:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inspectorList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" align="center" />
<el-table-column label="企业" align="center" prop="enterpriseId" />
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="电话" align="center" prop="phone" />
<el-table-column label="备注" align="center" prop="remarks" />
<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="['device:inspector:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:inspector: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="企业id" prop="enterpriseId">
<el-input v-model="form.enterpriseId" placeholder="请输入企业id" />
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入电话" />
</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 { listInspector, getInspector, delInspector, addInspector, updateInspector, exportInspector } from "@/api/device/inspector";
export default {
name: "Inspector",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 巡检员表格数据
inspectorList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseId: null,
name: null,
phone: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询巡检员列表 */
getList() {
this.loading = true;
listInspector(this.queryParams).then(response => {
this.inspectorList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
inspectorId: null,
enterpriseId: null,
name: null,
phone: 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.inspectorId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加巡检员";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const inspectorId = row.inspectorId || this.ids
getInspector(inspectorId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改巡检员";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.inspectorId != null) {
updateInspector(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInspector(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const inspectorIds = row.inspectorId || this.ids;
this.$confirm('是否确认删除巡检员编号为"' + inspectorIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInspector(inspectorIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有巡检员数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportInspector(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
This diff is collapsed.
......@@ -400,7 +400,7 @@ input, textarea{
background: #121315;
.el-tabs__header{
margin: 0;
border-bottom-color: #121315;
/* border-bottom-color: #121315; */
.el-tabs__nav{
border-color: #121315;
}
......@@ -415,9 +415,9 @@ input, textarea{
user-select: none;
}
.el-tabs__item.is-active{
background: #1e1e1e;
border-bottom-color: #1e1e1e!important;
color: #fff;
background: rgba(0, 0, 0, 0);
/* border-bottom-color: #1e1e1e!important; */
color: #5CD9D4;
}
.el-icon-edit{
color: #f1fa8c;
......
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