Commit 3e04283b authored by wuqinghua's avatar wuqinghua

2022-2-25

parent 98120c1e
package com.zehong.web.controller.supervise;
import com.zehong.system.domain.*;
import com.zehong.system.service.IPipeInterfaceService;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 管道信息接口控制层
*/
@Controller
@RestController
@RequestMapping("/pipe/pipe")
public class PipeInterfaceController {
@Autowired
IPipeInterfaceService iPipeInterfaceService;
/**
* 查询管道数据列表
*/
@RequestBody
@RequestMapping("/selectPipeData")
public PipeList selectPipeData() {
//获取分组数据
List<PipeDate> pipeDatesGroup = iPipeInterfaceService.selectGroupPipeData();
//查询管道数据列表
List<PipeDate> pipeDates = iPipeInterfaceService.selectPipeData();
int k=1;
//循环根据权属单位名称分组的数据
for (int i=0;i<pipeDatesGroup.size();i++){
//循环全部数据
for (int n=0;n<pipeDates.size();n++){
//判断如果名称一样就一组
if (pipeDatesGroup.get(i).getPowerCompany().equals(pipeDates.get(n).getPowerCompany())){
// //设置分组类型
pipeDates.get(n).setCompanyType(Integer.parseInt(pipeDates.get(n).getPipeId()));
pipeDates.get(n).setIconType(1);
}
}
k++;
}
PipeList pipeList=new PipeList();
pipeList.setData(pipeDates);
return pipeList;
}
/**
* 调压箱数据查询接口
*/
@RequestBody
@RequestMapping("/selectDeviceData")
public DeviceList selectDeviceData(){
//调压箱数据查询方法
List<DeviceData> deviceData = iPipeInterfaceService.selectDeviceData();
DeviceList deviceList=new DeviceList();
for (int i=0;i<deviceData.size();i++){
//查询下级设备数据
List<PressureFlow> pressureFlows = iPipeInterfaceService.selectPressureFlow(deviceData.get(i).getDeviceId());
deviceData.get(i).setPressureFlows(pressureFlows);
deviceData.get(i).setIconType(2);
}
deviceList.setData(deviceData);
return deviceList;
}
/**
* 场站信息查询接口
*/
@RequestBody
@RequestMapping("/selectTSiteStationInfoData")
public TSiteStationInfoDataList selectTSiteStationInfoData(){
//场站信息查询方法
List<TSiteStationInfoData> tSiteStationInfoData = iPipeInterfaceService.selectTSiteStationInfoData();
TSiteStationInfoDataList tSiteStationInfoDataList=new TSiteStationInfoDataList();
for (int i=0;i<tSiteStationInfoData.size();i++){
//查询场站下级设备数据
List<PressureFlow> pressureFlows = iPipeInterfaceService.selecttSiteStationInfoDataList(tSiteStationInfoData.get(i).getSiteStationId());
tSiteStationInfoData.get(i).setPressureFlows(pressureFlows);
tSiteStationInfoData.get(i).setIconType(4);
}
tSiteStationInfoDataList.setData(tSiteStationInfoData);
return tSiteStationInfoDataList;
}
/**
* 监控信息查询
*/
@RequestBody
@RequestMapping("/selectTvideoManagerData")
public List<TvideoManagerData> selectTvideoManagerData(){
//查询监控信息
List<TvideoManagerData> tvideoManagerData = iPipeInterfaceService.selectTvideoManagerData();
for (int i=0;i<tvideoManagerData.size();i++){
tvideoManagerData.get(i).setIconType(5);
}
return tvideoManagerData;
}
/**
* 燃气用户信息查询接口
*/
@RequestBody
@RequestMapping("/selectTdetectorUser")
public List<TdetectorUserData> selectTdetectorUser(){
//燃气用户信息查询方法
List<TdetectorUserData> tdetectorUserData = iPipeInterfaceService.selectTdetectorUser();
for (int i=0;i<tdetectorUserData.size();i++){
tdetectorUserData.get(i).setIconType(6);
}
return tdetectorUserData;
}
/**
* 企业名称id查询接口
*/
@RequestBody
@RequestMapping("/selectTenterpriseInfoData")
public List<TenterpriseInfoData> selectTenterpriseInfoData(){
//查询企业名称id方法
List<TenterpriseInfoData> tenterpriseInfoData = iPipeInterfaceService.selectTenterpriseInfoData();
return tenterpriseInfoData;
}
/**
* 阀门数据查询接口
*/
@RequestBody
@RequestMapping("/selectvalveData")
public List<PipeDate> selectvalveData(){
//查询阀门井数据
List<PipeDate> pipeDates = iPipeInterfaceService.selectvalveData();
for (int i=0;i<pipeDates.size();i++){
pipeDates.get(i).setIconType(3);
}
return pipeDates;
}
}
package com.zehong.system.domain;
import java.util.List;
/**
* 调压箱前端返回接口封装类
*/
public class DeviceData {
private String deviceId;
private String enterpriseId;
private String type;
private String deviceName;
private String deviceCode;
private String deviceAddr;
private String longitude;
private String latitude;
private String companyType;
private List<PressureFlow> pressureFlows;
private String beyondEnterpriseName;
private int iconType;
public int getIconType() {
return iconType;
}
public void setIconType(int iconType) {
this.iconType = iconType;
}
public String getBeyondEnterpriseName() {
return beyondEnterpriseName;
}
public void setBeyondEnterpriseName(String beyondEnterpriseName) {
this.beyondEnterpriseName = beyondEnterpriseName;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getDeviceCode() {
return deviceCode;
}
public void setDeviceCode(String deviceCode) {
this.deviceCode = deviceCode;
}
public String getDeviceAddr() {
return deviceAddr;
}
public void setDeviceAddr(String deviceAddr) {
this.deviceAddr = deviceAddr;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getCompanyType() {
return companyType;
}
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
public List<PressureFlow> getPressureFlows() {
return pressureFlows;
}
public void setPressureFlows(List<PressureFlow> pressureFlows) {
this.pressureFlows = pressureFlows;
}
@Override
public String toString() {
return "DeviceData{" +
"deviceId='" + deviceId + '\'' +
", enterpriseId='" + enterpriseId + '\'' +
", type='" + type + '\'' +
", deviceName='" + deviceName + '\'' +
", deviceCode='" + deviceCode + '\'' +
", deviceAddr='" + deviceAddr + '\'' +
", longitude='" + longitude + '\'' +
", latitude='" + latitude + '\'' +
", companyType='" + companyType + '\'' +
", pressureFlows=" + pressureFlows +
", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
", iconType=" + iconType +
'}';
}
}
package com.zehong.system.domain;
import java.util.List;
public class DeviceList {
private List<DeviceData> data;
public List<DeviceData> getData() {
return data;
}
public void setData(List<DeviceData> data) {
this.data = data;
}
@Override
public String toString() {
return "DeviceList{" +
"data=" + data +
'}';
}
}
package com.zehong.system.domain;
import com.zehong.common.core.domain.BaseEntity;
public class PipeDate extends BaseEntity {
private String pipeId;
private String pipeya;
private String pipeDiameter;
private String pipeMaterial;
private String pipeDepth;
private String pipeTrend;
private String buildyear;
private String buildCompany;
private String powerCompany;
private String type;
private String pipeAddr;
private String path;
private String pipeLength;
private String pipeType;
private int pipePressure;
private String iconUrl;
private String installationTime;
private String inspectionTime;
private int companyType;
private int iconType;
public String getPipeId() {
return pipeId;
}
public void setPipeId(String pipeId) {
this.pipeId = pipeId;
}
public int getIconType() {
return iconType;
}
public void setIconType(int iconType) {
this.iconType = iconType;
}
public int getCompanyType() {
return companyType;
}
public void setCompanyType(int companyType) {
this.companyType = companyType;
}
public String getPipeya() {
return pipeya;
}
public void setPipeya(String pipeya) {
this.pipeya = pipeya;
}
public String getPipeDiameter() {
return pipeDiameter;
}
public void setPipeDiameter(String pipeDiameter) {
this.pipeDiameter = pipeDiameter;
}
public String getPipeMaterial() {
return pipeMaterial;
}
public void setPipeMaterial(String pipeMaterial) {
this.pipeMaterial = pipeMaterial;
}
public String getPipeDepth() {
return pipeDepth;
}
public void setPipeDepth(String pipeDepth) {
this.pipeDepth = pipeDepth;
}
public String getPipeTrend() {
return pipeTrend;
}
public void setPipeTrend(String pipeTrend) {
this.pipeTrend = pipeTrend;
}
public String getBuildyear() {
return buildyear;
}
public void setBuildyear(String buildyear) {
this.buildyear = buildyear;
}
public String getBuildCompany() {
return buildCompany;
}
public void setBuildCompany(String buildCompany) {
this.buildCompany = buildCompany;
}
public String getPowerCompany() {
return powerCompany;
}
public void setPowerCompany(String powerCompany) {
this.powerCompany = powerCompany;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getPipeAddr() {
return pipeAddr;
}
public void setPipeAddr(String pipeAddr) {
this.pipeAddr = pipeAddr;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getPipeLength() {
return pipeLength;
}
public void setPipeLength(String pipeLength) {
this.pipeLength = pipeLength;
}
public String getPipeType() {
return pipeType;
}
public void setPipeType(String pipeType) {
this.pipeType = pipeType;
}
public int getPipePressure() {
return pipePressure;
}
public void setPipePressure(int pipePressure) {
this.pipePressure = pipePressure;
}
public String getIconUrl() {
return iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
public String getInstallationTime() {
return installationTime;
}
public void setInstallationTime(String installationTime) {
this.installationTime = installationTime;
}
public String getInspectionTime() {
return inspectionTime;
}
public void setInspectionTime(String inspectionTime) {
this.inspectionTime = inspectionTime;
}
@Override
public String toString() {
return "PipeDate{" +
"pipeId='" + pipeId + '\'' +
", pipeya='" + pipeya + '\'' +
", pipeDiameter='" + pipeDiameter + '\'' +
", pipeMaterial='" + pipeMaterial + '\'' +
", pipeDepth='" + pipeDepth + '\'' +
", pipeTrend='" + pipeTrend + '\'' +
", buildyear='" + buildyear + '\'' +
", buildCompany='" + buildCompany + '\'' +
", powerCompany='" + powerCompany + '\'' +
", type='" + type + '\'' +
", pipeAddr='" + pipeAddr + '\'' +
", path='" + path + '\'' +
", pipeLength='" + pipeLength + '\'' +
", pipeType='" + pipeType + '\'' +
", pipePressure=" + pipePressure +
", iconUrl='" + iconUrl + '\'' +
", installationTime='" + installationTime + '\'' +
", inspectionTime='" + inspectionTime + '\'' +
", companyType=" + companyType +
", iconType=" + iconType +
'}';
}
}
package com.zehong.system.domain;
import java.util.List;
public class PipeList {
private List<PipeDate> data;
public List<PipeDate> getData() {
return data;
}
public void setData(List<PipeDate> data) {
this.data = data;
}
@Override
public String toString() {
return "PipeList{" +
"data=" + data +
'}';
}
}
package com.zehong.system.domain;
public class PressureFlow {
private String deviceNo;
private String deviceType;
private String deviceState;
private String deviceNum;
private String reportTime;
public String getDeviceNo() {
return deviceNo;
}
public void setDeviceNo(String deviceNo) {
this.deviceNo = deviceNo;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public String getDeviceState() {
return deviceState;
}
public void setDeviceState(String deviceState) {
this.deviceState = deviceState;
}
public String getDeviceNum() {
return deviceNum;
}
public void setDeviceNum(String deviceNum) {
this.deviceNum = deviceNum;
}
public String getReportTime() {
return reportTime;
}
public void setReportTime(String reportTime) {
this.reportTime = reportTime;
}
@Override
public String toString() {
return "PressureFlow{" +
"deviceNo='" + deviceNo + '\'' +
", deviceType='" + deviceType + '\'' +
", deviceState='" + deviceState + '\'' +
", deviceNum='" + deviceNum + '\'' +
", reportTime='" + reportTime + '\'' +
'}';
}
}
...@@ -31,7 +31,7 @@ public class TEmployedPeopleInfo extends BaseEntity ...@@ -31,7 +31,7 @@ public class TEmployedPeopleInfo extends BaseEntity
private String idCard; private String idCard;
/** 证书编号 */ /** 证书编号 */
@Excel(name = "证书编号") @Excel(name = "技能岗位证书编号")
private String certificateNum; private String certificateNum;
/** 受聘企业名称 */ /** 受聘企业名称 */
...@@ -41,12 +41,12 @@ public class TEmployedPeopleInfo extends BaseEntity ...@@ -41,12 +41,12 @@ public class TEmployedPeopleInfo extends BaseEntity
/** 受聘企业id */ /** 受聘企业id */
private Long beyondEnterpriseId; private Long beyondEnterpriseId;
/** 报考类型 */ /** 发证部门 */
@Excel(name = "报考类型") @Excel(name = "发证部门")
private String registerExaminationType; private String registerExaminationType;
/** 人员类型:1.运行维护人员 2.抢修人员 */ /** 任职岗位:1.主要负责人 2.安全管理人员3.运行维护和抢修人员 */
@Excel(name = "人员类型") @Excel(name = "任职岗位")
private String peopleOccupation; private String peopleOccupation;
/** 发证日期 */ /** 发证日期 */
...@@ -54,8 +54,8 @@ public class TEmployedPeopleInfo extends BaseEntity ...@@ -54,8 +54,8 @@ public class TEmployedPeopleInfo extends BaseEntity
@JsonFormat(pattern="yyyy-MM-dd") @JsonFormat(pattern="yyyy-MM-dd")
private String issueDate; private String issueDate;
/** 证书变更情况 */ /** 复检日期 */
@Excel(name = "证书变更情况") @Excel(name = "复检日期")
private String certificateChange; private String certificateChange;
/** 是否删除(0正常,1删除) */ /** 是否删除(0正常,1删除) */
......
package com.zehong.system.domain;
import java.util.List;
public class TSiteStationInfoData {
private String siteStationId;
private String stationName;
private String stationType;
private String type;
private String stationAddr;
private String longitude;
private String latitude;
private String buildyear;
private String buildCompany;
private String powerCompany;
private List<PressureFlow> pressureFlows;
private int iconType;
public int getIconType() {
return iconType;
}
public void setIconType(int iconType) {
this.iconType = iconType;
}
public String getSiteStationId() {
return siteStationId;
}
public void setSiteStationId(String siteStationId) {
this.siteStationId = siteStationId;
}
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public String getStationType() {
return stationType;
}
public void setStationType(String stationType) {
this.stationType = stationType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getStationAddr() {
return stationAddr;
}
public void setStationAddr(String stationAddr) {
this.stationAddr = stationAddr;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getBuildyear() {
return buildyear;
}
public void setBuildyear(String buildyear) {
this.buildyear = buildyear;
}
public String getBuildCompany() {
return buildCompany;
}
public void setBuildCompany(String buildCompany) {
this.buildCompany = buildCompany;
}
public String getPowerCompany() {
return powerCompany;
}
public void setPowerCompany(String powerCompany) {
this.powerCompany = powerCompany;
}
public List<PressureFlow> getPressureFlows() {
return pressureFlows;
}
public void setPressureFlows(List<PressureFlow> pressureFlows) {
this.pressureFlows = pressureFlows;
}
@Override
public String toString() {
return "TSiteStationInfoData{" +
"siteStationId='" + siteStationId + '\'' +
", stationName='" + stationName + '\'' +
", stationType='" + stationType + '\'' +
", type='" + type + '\'' +
", stationAddr='" + stationAddr + '\'' +
", longitude='" + longitude + '\'' +
", latitude='" + latitude + '\'' +
", buildyear='" + buildyear + '\'' +
", buildCompany='" + buildCompany + '\'' +
", powerCompany='" + powerCompany + '\'' +
", pressureFlows=" + pressureFlows +
", iconType=" + iconType +
'}';
}
}
package com.zehong.system.domain;
import java.util.List;
public class TSiteStationInfoDataList {
private List<TSiteStationInfoData> data;
public List<TSiteStationInfoData> getData() {
return data;
}
public void setData(List<TSiteStationInfoData> data) {
this.data = data;
}
@Override
public String toString() {
return "TSiteStationInfoDataList{" +
"data=" + data +
'}';
}
}
package com.zehong.system.domain;
public class TdetectorUserData {
private String usrName;
private String usrType;
private String type;
private String longitude;
private String latitude;
private String phone;
private String address;
private String companyType;
private int iconType;
public int getIconType() {
return iconType;
}
public void setIconType(int iconType) {
this.iconType = iconType;
}
public String getUsrName() {
return usrName;
}
public void setUsrName(String usrName) {
this.usrName = usrName;
}
public String getUsrType() {
return usrType;
}
public void setUsrType(String usrType) {
this.usrType = usrType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getCompanyType() {
return companyType;
}
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
@Override
public String toString() {
return "TdetectorUserData{" +
"usrName='" + usrName + '\'' +
", usrType='" + usrType + '\'' +
", type='" + type + '\'' +
", longitude='" + longitude + '\'' +
", latitude='" + latitude + '\'' +
", phone='" + phone + '\'' +
", address='" + address + '\'' +
", companyType='" + companyType + '\'' +
", iconType=" + iconType +
'}';
}
}
package com.zehong.system.domain;
public class TenterpriseInfoData {
private String enterpriseId;
private String enterpriseName;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
@Override
public String toString() {
return "TenterpriseInfoData{" +
"enterpriseId='" + enterpriseId + '\'' +
", enterpriseName='" + enterpriseName + '\'' +
'}';
}
}
package com.zehong.system.domain;
public class TvideoManagerData {
private String companyType;
private String videoManagerId;
private String videoName;
private String resourceId;
private String usr;
private String longitude;
private String latitude;
private String videoAddress;
private String type;
private int iconType;
public int getIconType() {
return iconType;
}
public void setIconType(int iconType) {
this.iconType = iconType;
}
public String getCompanyType() {
return companyType;
}
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
public String getVideoManagerId() {
return videoManagerId;
}
public void setVideoManagerId(String videoManagerId) {
this.videoManagerId = videoManagerId;
}
public String getVideoName() {
return videoName;
}
public void setVideoName(String videoName) {
this.videoName = videoName;
}
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
public String getUsr() {
return usr;
}
public void setUsr(String usr) {
this.usr = usr;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getVideoAddress() {
return videoAddress;
}
public void setVideoAddress(String videoAddress) {
this.videoAddress = videoAddress;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public String toString() {
return "TvideoManagerData{" +
"companyType='" + companyType + '\'' +
", videoManagerId='" + videoManagerId + '\'' +
", videoName='" + videoName + '\'' +
", resourceId='" + resourceId + '\'' +
", usr='" + usr + '\'' +
", longitude='" + longitude + '\'' +
", latitude='" + latitude + '\'' +
", videoAddress='" + videoAddress + '\'' +
", type='" + type + '\'' +
", iconType=" + iconType +
'}';
}
}
package com.zehong.system.mapper;
import com.zehong.system.domain.*;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 管道信息数据持久层
*/
@Mapper
public interface PipeInterfaceMapper {
/**
* 查询管道数据列表
* @return
*/
List<PipeDate> selectPipeData();
/**
* 获取分组数据
* @return
*/
List<PipeDate> selectGroupPipeData();
/**
* 调压箱数据查询方法
* @return
*/
List<DeviceData> selectDeviceData();
/**
* 查询下级设备数据
* @param deviceId
* @return
*/
List<PressureFlow> selectPressureFlow(String deviceId);
/**
* 场站信息查询方法
* @return
*/
List<TSiteStationInfoData> selectTSiteStationInfoData();
/**
* 查询场站下级数据
* @param siteStationId
* @return
*/
List<PressureFlow> selecttSiteStationInfoDataList(String siteStationId);
/**
* 监控信息查询
* @return
*/
List<TvideoManagerData> selectTvideoManagerData();
/**
* 燃气用户信息查询接口
* @return
*/
List<TdetectorUserData> selectTdetectorUser();
/**
* 查询企业名称id方法
* @return
*/
List<TenterpriseInfoData> selectTenterpriseInfoData();
/**
* 查询阀门井数据
* @return
*/
List<PipeDate> selectvalveData();
}
package com.zehong.system.service;
import com.zehong.system.domain.*;
import java.util.List;
/**
* 管道信息数据实现层
*/
public interface IPipeInterfaceService {
/**
* 查询管道数据列表
* @return
*/
List<PipeDate> selectPipeData();
/**
* 获取分组数据
* @return
*/
List<PipeDate> selectGroupPipeData();
/**
* 调压箱数据查询方法
* @return
*/
List<DeviceData> selectDeviceData();
/**
*查询下级设备数据
* @param deviceId
* @return
*/
List<PressureFlow> selectPressureFlow(String deviceId);
/**
* 场站信息查询方法
* @return
*/
List<TSiteStationInfoData> selectTSiteStationInfoData();
/**
* 查询场站下级设备数据
* @param siteStationId
* @return
*/
List<PressureFlow> selecttSiteStationInfoDataList(String siteStationId);
/**
* 监控信息查询
* @return
*/
List<TvideoManagerData> selectTvideoManagerData();
/**
* 燃气用户信息查询接口
* @return
*/
List<TdetectorUserData> selectTdetectorUser();
/**
* 查询企业名称id方法
* @return
*/
List<TenterpriseInfoData> selectTenterpriseInfoData();
/**
* 查询阀门井数据
* @return
*/
List<PipeDate> selectvalveData();
}
package com.zehong.system.service.impl;
import com.zehong.system.domain.*;
import com.zehong.system.mapper.PipeInterfaceMapper;
import com.zehong.system.service.IPipeInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 管道信息数据实现层
*/
@Service
public class PipeInterfaceServiceImpl implements IPipeInterfaceService {
@Autowired
PipeInterfaceMapper pipeInterfaceMapper;
/**
* 查询管道数据列表
* @return
*/
@Override
public List<PipeDate> selectPipeData() {
List<PipeDate> pipeDates = pipeInterfaceMapper.selectPipeData();
return pipeDates;
}
/**
* 获取分组数据
* @return
*/
@Override
public List<PipeDate> selectGroupPipeData() {
List<PipeDate> pipeDates = pipeInterfaceMapper.selectGroupPipeData();
return pipeDates;
}
/**
* 调压箱数据查询方法
* @return
*/
@Override
public List<DeviceData> selectDeviceData() {
List<DeviceData> deviceData = pipeInterfaceMapper.selectDeviceData();
return deviceData;
}
/**
* 查询下级设备数据
* @param deviceId
* @return
*/
@Override
public List<PressureFlow> selectPressureFlow(String deviceId) {
List<PressureFlow> pressureFlows = pipeInterfaceMapper.selectPressureFlow(deviceId);
return pressureFlows;
}
/**
* 场站信息查询方法
* @return
*/
@Override
public List<TSiteStationInfoData> selectTSiteStationInfoData() {
List<TSiteStationInfoData> tSiteStationInfoData = pipeInterfaceMapper.selectTSiteStationInfoData();
return tSiteStationInfoData;
}
/**
* 查询场站下级数据
* @param siteStationId
* @return
*/
@Override
public List<PressureFlow> selecttSiteStationInfoDataList(String siteStationId) {
List<PressureFlow> pressureFlows = pipeInterfaceMapper.selecttSiteStationInfoDataList(siteStationId);
return pressureFlows;
}
/**
* 监控信息查询
* @return
*/
@Override
public List<TvideoManagerData> selectTvideoManagerData() {
List<TvideoManagerData> tvideoManagerData = pipeInterfaceMapper.selectTvideoManagerData();
return tvideoManagerData;
}
/**
* 燃气用户信息查询接口
* @return
*/
@Override
public List<TdetectorUserData> selectTdetectorUser() {
List<TdetectorUserData> tdetectorUserData = pipeInterfaceMapper.selectTdetectorUser();
return tdetectorUserData;
}
/**
* 查询企业名称id方法
* @return
*/
@Override
public List<TenterpriseInfoData> selectTenterpriseInfoData() {
List<TenterpriseInfoData> tenterpriseInfoData = pipeInterfaceMapper.selectTenterpriseInfoData();
return tenterpriseInfoData;
}
/**
* 查询阀门井数据
* @return
*/
@Override
public List<PipeDate> selectvalveData() {
List<PipeDate> pipeDates = pipeInterfaceMapper.selectvalveData();
return pipeDates;
}
}
<?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.PipeInterfaceMapper">
<!--管道-->
<resultMap type="PipeDate" id="PipeDateResult">
<result property="pipeId" column="pipe_id" />
<result property="pipeDiameter" column="pipe_diameter" />
<result property="pipeMaterial" column="pipe_material" />
<result property="pipeDepth" column="buried_depth" />
<result property="pipeTrend" column="pipe_trend" />
<result property="buildyear" column="build_date" />
<result property="pipeAddr" column="pipe_addr" />
<result property="path" column="coordinates" />
<result property="buildCompany" column="build_unit" />
<result property="powerCompany" column="beyond_enterprise_name" />
</resultMap>
<!--调压箱-->
<resultMap type="DeviceData" id="DeviceDateResult">
<result property="deviceId" column="device_id" />
<result property="type" column="device_type" />
<result property="deviceName" column="device_name" />
<result property="deviceCode" column="device_code" />
<result property="deviceAddr" column="device_addr" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="companyType" column="device_id" />
<result property="beyondEnterpriseName" column="beyond_enterprise_name" />
</resultMap>
<!--下级设备数据-->
<resultMap type="PressureFlow" id="PressureFlowResult">
<result property="deviceId" column="relation_device_id" />
<result property="deviceNo" column="device_model" />
<result property="deviceType" column="device_type" />
<result property="reportTime" column="create_time" />
</resultMap>
<!--场站数据-->
<resultMap type="TSiteStationInfoData" id="TSiteStationInfoDataResult">
<result property="siteStationId" column="site_station_id" />
<result property="stationName" column="site_station_name" />
<result property="stationType" column="site_station_type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="buildyear" column="create_time" />
<result property="buildCompany" column="build_unit" />
<result property="powerCompany" column="beyond_enterprise_name" />
</resultMap>
<!--监控数据-->
<resultMap type="TvideoManagerData" id="TvideoManagerDataResult">
<result property="companyType" column="video_manager_id" />
<result property="videoManagerId" column="video_manager_id" />
<result property="videoName" column="video_name" />
<result property="resourceId" column="resource_id" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="videoAddress" column="video_address" />
<result property="type" column="type" />
</resultMap>
<!--燃气用户数据-->
<resultMap type="TdetectorUserData" id="TdetectorUserDataResult">
<result property="usrName" column="nick_name" />
<result property="usrType" column="user_type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="phone" column="phone" />
<result property="address" column="address" />
<result property="companyType" column="user_id" />
</resultMap>
<!--查询企业名称id-->
<resultMap type="TenterpriseInfoData" id="TenterpriseInfoDataResult">
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
</resultMap>
<!--查询管道数据列表-->
<select id="selectPipeData" parameterType="PipeDate" resultMap="PipeDateResult">
select pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
where is_del='0'
</select>
<!--获取分组数据-->
<select id="selectGroupPipeData" parameterType="PipeDate" resultMap="PipeDateResult">
select pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
where is_del='0'
group by beyond_enterprise_name
</select>
<!--调压箱数据查询方法-->
<select id="selectDeviceData" resultMap="DeviceDateResult">
select device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
where device_type='2' and is_del='0'
</select>
<!--查询下级设备数据-->
<select id="selectPressureFlow" parameterType="DeviceData" resultMap="PressureFlowResult">
select device_model,device_type,create_time from t_relation_device_detail_info
where relation_device_id=#{deviceId} and relation_device_type='1'
</select>
<!--场站信息查询方法-->
<select id="selectTSiteStationInfoData" resultMap="TSiteStationInfoDataResult">
select site_station_id,site_station_name,site_station_type,longitude,latitude,create_time,build_unit,beyond_enterprise_name
from t_site_station_info where is_del='0'
</select>
<!--查询场站下级数据-->
<select id="selecttSiteStationInfoDataList" parameterType="DeviceData" resultMap="PressureFlowResult">
select device_model,device_type,create_time from t_relation_device_detail_info
where relation_device_id=#{deviceId} and relation_device_type='2'
</select>
<!--监控信息查询-->
<select id="selectTvideoManagerData" resultMap="TvideoManagerDataResult">
select video_manager_id,video_name,resource_id,longitude,latitude,video_address,type from t_video_manager
where is_del='0'
</select>
<!--燃气用户信息查询接口-->
<select id="selectTdetectorUser" resultMap="TdetectorUserDataResult">
select nick_name,user_type,longitude,latitude,phone,address,user_id from t_detector_user
where is_del='0'
</select>
<!--查询企业名称id方法-->
<select id="selectTenterpriseInfoData" resultMap="TenterpriseInfoDataResult">
select enterprise_id,enterprise_name from t_enterprise_info where is_del='0'
</select>
<!--查询阀门井数据-->
<select id="selectvalveData" resultMap="DeviceDateResult">
select device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
where device_type='1' and is_del='0'
</select>
</mapper>
...@@ -41,11 +41,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -41,11 +41,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTEmployedPeopleInfoVo"> <sql id="selectTEmployedPeopleInfoVo">
select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, (CASE people_occupation WHEN '1' THEN '运行维护人员' WHEN '2' THEN '抢修人员'end ) as people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type, (CASE people_occupation WHEN '1' THEN '主要负责人' WHEN '2' THEN '安全管理人员' WHEN '3' THEN '运行维护和抢修人员'end ) as people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info
</sql> </sql>
<select id="selectTEmployedPeopleInfoList" parameterType="TEmployedPeopleInfo" resultMap="TEmployedPeopleInfoResult"> <select id="selectTEmployedPeopleInfoList" parameterType="TEmployedPeopleInfo" resultMap="TEmployedPeopleInfoResult">
select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type,(CASE people_occupation WHEN '1' THEN '运行维护人员' WHEN '2' THEN '抢修人员'end ) as people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info select employed_people_id, employed_people_name, id_card, certificate_num, beyond_enterprise_name, beyond_enterprise_id, register_examination_type,(CASE people_occupation WHEN '1' THEN '主要负责人' WHEN '2' THEN '安全管理人员' WHEN '3' THEN '运行维护和抢修人员'end ) as people_occupation, issue_date, certificate_change, create_by, create_time, update_by, update_time, is_del, remarks from t_employed_people_info
<where> <where>
1=1 and is_del='0' 1=1 and is_del='0'
<if test="employedPeopleName != null and employedPeopleName != ''"> and employed_people_name like concat('%', #{employedPeopleName}, '%')</if> <if test="employedPeopleName != null and employedPeopleName != ''"> and employed_people_name like concat('%', #{employedPeopleName}, '%')</if>
......
...@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTPipeInfoList" parameterType="TPipeInfo" resultMap="TPipeInfoResult"> <select id="selectTPipeInfoList" parameterType="TPipeInfo" resultMap="TPipeInfoResult">
<include refid="selectTPipeInfoVo"/> <include refid="selectTPipeInfoVo"/>
<where> <where>
is_del='0'
<if test="pipeLength != null "> and pipe_length = #{pipeLength}</if> <if test="pipeLength != null "> and pipe_length = #{pipeLength}</if>
<if test="pipeDiameter != null "> and pipe_diameter = #{pipeDiameter}</if> <if test="pipeDiameter != null "> and pipe_diameter = #{pipeDiameter}</if>
<if test="pipePressure != null "> and pipe_pressure = #{pipePressure}</if> <if test="pipePressure != null "> and pipe_pressure = #{pipePressure}</if>
...@@ -53,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -53,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTPipeInfoById" parameterType="Long" resultMap="TPipeInfoResult"> <select id="selectTPipeInfoById" parameterType="Long" resultMap="TPipeInfoResult">
<include refid="selectTPipeInfoVo"/> <include refid="selectTPipeInfoVo"/>
where pipe_id = #{pipeId} where pipe_id = #{pipeId} and is_del='0'
</select> </select>
<insert id="insertTPipeInfo" parameterType="TPipeInfo" useGeneratedKeys="true" keyProperty="pipeId"> <insert id="insertTPipeInfo" parameterType="TPipeInfo" useGeneratedKeys="true" keyProperty="pipeId">
...@@ -125,14 +126,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -125,14 +126,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where pipe_id = #{pipeId} where pipe_id = #{pipeId}
</update> </update>
<delete id="deleteTPipeInfoById" parameterType="Long"> <update id="deleteTPipeInfoById" parameterType="Long">
delete from t_pipe_info where pipe_id = #{pipeId} update t_pipe_info set is_del='1' where pipe_id = #{pipeId}
</delete> </update>
<delete id="deleteTPipeInfoByIds" parameterType="String"> <update id="deleteTPipeInfoByIds" parameterType="String">
delete from t_pipe_info where pipe_id in update t_pipe_info set is_del='1' where pipe_id in
<foreach item="pipeId" collection="array" open="(" separator="," close=")"> <foreach item="pipeId" collection="array" open="(" separator="," close=")">
#{pipeId} #{pipeId}
</foreach> </foreach>
</delete> </update>
</mapper> </mapper>
...@@ -119,7 +119,7 @@ export const pipeData = { ...@@ -119,7 +119,7 @@ export const pipeData = {
isDel: "0", isDel: "0",
remarks: null, remarks: null,
companyType: "1", companyType: "1",
path: path:
[ [ 114.236904, 38.239155 ], [ 114.234145, 38.239202 ], [ 114.233368, 38.242778 ], [ 114.233895, 38.249292 ], [ 114.233937, 38.251334 ], [ 114.229746, 38.251479 ], [ 114.226905, 38.25181 ], [ 114.224532, 38.252174 ], [ 114.224474, 38.253066 ], [ 114.224389, 38.254749 ], [ 114.224273, 38.258808 ] ], [ [ 114.236904, 38.239155 ], [ 114.234145, 38.239202 ], [ 114.233368, 38.242778 ], [ 114.233895, 38.249292 ], [ 114.233937, 38.251334 ], [ 114.229746, 38.251479 ], [ 114.226905, 38.25181 ], [ 114.224532, 38.252174 ], [ 114.224474, 38.253066 ], [ 114.224389, 38.254749 ], [ 114.224273, 38.258808 ] ],
}, },
{ {
...@@ -303,7 +303,7 @@ export const pipeData = { ...@@ -303,7 +303,7 @@ export const pipeData = {
[ [ 114.185887, 38.259572 ], [ 114.185973, 38.260098 ], [ 114.18599, 38.260102 ] ] [ [ 114.185887, 38.259572 ], [ 114.185973, 38.260098 ], [ 114.18599, 38.260102 ] ]
], ],
}, },
{ {
pipeya: "20Pa", pipeya: "20Pa",
pipeDiameter: "0.5", pipeDiameter: "0.5",
...@@ -572,7 +572,7 @@ export const pipeData = { ...@@ -572,7 +572,7 @@ export const pipeData = {
isDel: "0", isDel: "0",
remarks: null, remarks: null,
companyType: "2", companyType: "2",
path: path:
[ [ 114.206898, 38.259072 ], [ 114.20675, 38.25672 ], [ 114.20636, 38.256667 ], [ 114.206091, 38.254336 ], [ 114.203348, 38.254645 ], [ 114.206094, 38.254333 ], [ 114.204444, 38.241922 ], [ 114.203839, 38.242023 ], [ 114.203782, 38.240171 ], [ 114.202854, 38.240167 ], [ 114.201458, 38.240228 ], [ 114.200296, 38.239421 ], [ 114.200292, 38.240242 ] ], [ [ 114.206898, 38.259072 ], [ 114.20675, 38.25672 ], [ 114.20636, 38.256667 ], [ 114.206091, 38.254336 ], [ 114.203348, 38.254645 ], [ 114.206094, 38.254333 ], [ 114.204444, 38.241922 ], [ 114.203839, 38.242023 ], [ 114.203782, 38.240171 ], [ 114.202854, 38.240167 ], [ 114.201458, 38.240228 ], [ 114.200296, 38.239421 ], [ 114.200292, 38.240242 ] ],
}, },
{ {
...@@ -660,7 +660,7 @@ export const pipeData = { ...@@ -660,7 +660,7 @@ export const pipeData = {
companyType: "3", companyType: "3",
path: [ [ 114.219113, 38.255163 ], [ 114.21852, 38.254677 ], [ 114.218446, 38.249739 ], [ 114.218477, 38.251096 ] ], path: [ [ 114.219113, 38.255163 ], [ 114.21852, 38.254677 ], [ 114.218446, 38.249739 ], [ 114.218477, 38.251096 ] ],
}, },
{ {
pipeya: "20Pa", pipeya: "20Pa",
pipeDiameter: "0.5", pipeDiameter: "0.5",
...@@ -686,7 +686,7 @@ export const pipeData = { ...@@ -686,7 +686,7 @@ export const pipeData = {
companyType: "3", companyType: "3",
path: [ [ 114.208486, 38.259254 ], [ 114.208521, 38.260195 ], [ 114.208488, 38.261122 ], [ 114.208428, 38.262953 ], [ 114.208522, 38.263256 ], [ 114.208593, 38.263614 ], [ 114.208551, 38.26458 ], [ 114.208647, 38.266885 ] ], path: [ [ 114.208486, 38.259254 ], [ 114.208521, 38.260195 ], [ 114.208488, 38.261122 ], [ 114.208428, 38.262953 ], [ 114.208522, 38.263256 ], [ 114.208593, 38.263614 ], [ 114.208551, 38.26458 ], [ 114.208647, 38.266885 ] ],
}, },
{ {
pipeya: "20Pa", pipeya: "20Pa",
pipeDiameter: "0.5", pipeDiameter: "0.5",
...@@ -2888,6 +2888,7 @@ export const changzhan = { ...@@ -2888,6 +2888,7 @@ export const changzhan = {
deviceNum: "500", deviceNum: "500",
reportTime: "2022-01-13 19:25:34", reportTime: "2022-01-13 19:25:34",
}, },
{ {
deviceNo: "HBS11C0002002", deviceNo: "HBS11C0002002",
deviceState: "1", deviceState: "1",
......
...@@ -85,12 +85,12 @@ ...@@ -85,12 +85,12 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="姓名" align="center" prop="employedPeopleName" /> <el-table-column label="姓名" align="center" prop="employedPeopleName" />
<el-table-column label="身份证号" align="center" prop="idCard" /> <el-table-column label="身份证号" align="center" prop="idCard" />
<el-table-column label="证书编号" align="center" prop="certificateNum" /> <el-table-column label="技能岗位证书编号" align="center" prop="certificateNum" />
<el-table-column label="受聘企业名称" align="center" prop="beyondEnterpriseName" /> <el-table-column label="受聘企业名称" align="center" prop="beyondEnterpriseName" />
<el-table-column label="报考类型" align="center" prop="registerExaminationType" /> <el-table-column label="发证部门" align="center" prop="registerExaminationType" />
<el-table-column label="人员类型" align="center" prop="peopleOccupation" /> <el-table-column label="任职岗位" align="center" prop="peopleOccupation" />
<el-table-column label="发证日期" align="center" prop="issueDate" /> <el-table-column label="发证日期" align="center" prop="issueDate" />
<el-table-column label="证书变更情况" align="center" prop="certificateChange" /> <el-table-column label="复检日期" align="center" prop="certificateChange" />
<el-table-column label="备注" align="center" prop="remarks" /> <el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -163,16 +163,17 @@ ...@@ -163,16 +163,17 @@
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="报考类型" prop="registerExaminationType"> <el-form-item label="发证部门" prop="registerExaminationType">
<el-input v-model="form.registerExaminationType" placeholder="请输入报考类型" /> <el-input v-model="form.registerExaminationType" placeholder="请输入发证部门" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="人员类型" prop="peopleOccupation"> <el-form-item label="任职岗位" prop="peopleOccupation">
<el-select v-model="form.peopleOccupation" placeholder="请选择人员类型"> <el-select v-model="form.peopleOccupation" placeholder="请选择任职岗位">
<el-option label="运行维护人员" value="1" /> <el-option label="主要负责人" value="1" />
<el-option label="抢修人员" value="2" /> <el-option label="安全管理人员" value="2" />
<el-option label="运行维护和抢修人员" value="3" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -180,14 +181,14 @@ ...@@ -180,14 +181,14 @@
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="证书编号" prop="certificateNum"> <el-form-item label="技能岗位证书编号" prop="certificateNum">
<el-input v-model="form.certificateNum" placeholder="请输入证书编号" /> <el-input v-model="form.certificateNum" placeholder="请输入技能岗位证书编号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="证书变更情况" prop="certificateChange"> <el-form-item label="复检日期" prop="certificateChange">
<el-input v-model="form.certificateChange" placeholder="请输入证书变更情况" /> <el-input v-model="form.certificateChange" placeholder="请输入复检日期" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -274,6 +275,7 @@ export default { ...@@ -274,6 +275,7 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
listInfo(this.queryParams).then(response => { listInfo(this.queryParams).then(response => {
console.log(response.rows)
this.infoList = response.rows; this.infoList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
......
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