Commit fb6fdeb2 authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of http://111.61.77.35:9999/gengdidi/gassafety into master

parents 10b74a55 ce3b9d97
...@@ -77,7 +77,8 @@ public class CommonController ...@@ -77,7 +77,8 @@ public class CommonController
// String fileName = FileUploadUtils.upload(filePath, file); // String fileName = FileUploadUtils.upload(filePath, file);
// String url = serverConfig.getUrl() + fileName; // String url = serverConfig.getUrl() + fileName;
String fileName = file.getOriginalFilename(); String fileName = file.getOriginalFilename();
String url = serverConfig.getUrl() + FileUploadUtils.upload(filePath, file); String fileServer = serverConfig.getUrl().contains("127") && serverConfig.getUrl().contains("8093") && !filePath.contains("/data")? serverConfig.getUrl() : serverConfig.getUrl().replace("127.0.0.1:8903","36.148.23.59:8901");
String url = fileServer + FileUploadUtils.upload(filePath, file);
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName); ajax.put("fileName", fileName);
ajax.put("url", url); ajax.put("url", url);
......
package com.zehong.web.controller.dataMonitoring;
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.TDeviceAlarm;
import com.zehong.system.service.ITDeviceAlarmService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 报警信息Controller
*
* @author zehong
* @date 2021-07-21
*/
@RestController
@RequestMapping("/dataMonitoring/deviceAlarm")
public class TDeviceAlarmController extends BaseController
{
@Autowired
private ITDeviceAlarmService tDeviceAlarmService;
/**
* 查询报警信息列表
*/
@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:list')")
@GetMapping("/list")
public TableDataInfo list(TDeviceAlarm tDeviceAlarm)
{
startPage();
List<TDeviceAlarm> list = tDeviceAlarmService.selectTDeviceAlarmList(tDeviceAlarm);
return getDataTable(list);
}
/**
* 导出报警信息列表
*/
@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:export')")
@Log(title = "报警信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDeviceAlarm tDeviceAlarm)
{
List<TDeviceAlarm> list = tDeviceAlarmService.selectTDeviceAlarmList(tDeviceAlarm);
ExcelUtil<TDeviceAlarm> util = new ExcelUtil<TDeviceAlarm>(TDeviceAlarm.class);
return util.exportExcel(list, "报警信息数据");
}
/**
* 获取报警信息详细信息
*/
@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:query')")
@GetMapping(value = "/{alarmId}")
public AjaxResult getInfo(@PathVariable("alarmId") Long alarmId)
{
return AjaxResult.success(tDeviceAlarmService.selectTDeviceAlarmById(alarmId));
}
/**
* 新增报警信息
*/
@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:add')")
@Log(title = "报警信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDeviceAlarm tDeviceAlarm)
{
return toAjax(tDeviceAlarmService.insertTDeviceAlarm(tDeviceAlarm));
}
/**
* 修改报警信息
*/
@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:edit')")
@Log(title = "报警信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDeviceAlarm tDeviceAlarm)
{
return toAjax(tDeviceAlarmService.updateTDeviceAlarm(tDeviceAlarm));
}
/**
* 删除报警信息
*/
@PreAuthorize("@ss.hasPermi('dataMonitoring:deviceAlarm:remove')")
@Log(title = "报警信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{alarmIds}")
public AjaxResult remove(@PathVariable Long[] alarmIds)
{
return toAjax(tDeviceAlarmService.deleteTDeviceAlarmByIds(alarmIds));
}
}
package com.zehong.web.controller.device; package com.zehong.web.controller.device;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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.annotation.Log;
import com.zehong.common.core.controller.BaseController; import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult; import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType; import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TDeviceInfo; import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService; import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.common.utils.poi.ExcelUtil; import org.springframework.beans.factory.annotation.Autowired;
import com.zehong.common.core.page.TableDataInfo; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/** /**
* 设备信息Controller * 设备信息Controller
...@@ -48,6 +40,16 @@ public class TDeviceInfoController extends BaseController ...@@ -48,6 +40,16 @@ public class TDeviceInfoController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 获取所有设备信息
* @param tDeviceInfo
* @return
*/
@GetMapping("/deviceListInfo")
public AjaxResult deviceListInfo(TDeviceInfo tDeviceInfo){
return AjaxResult.success(tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo));
}
/** /**
* 导出设备信息列表 * 导出设备信息列表
*/ */
...@@ -79,7 +81,11 @@ public class TDeviceInfoController extends BaseController ...@@ -79,7 +81,11 @@ public class TDeviceInfoController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TDeviceInfo tDeviceInfo) public AjaxResult add(@RequestBody TDeviceInfo tDeviceInfo)
{ {
return toAjax(tDeviceInfoService.insertTDeviceInfo(tDeviceInfo)); int result = tDeviceInfoService.insertTDeviceInfo(tDeviceInfo);
if(result<=0){
new Exception("设备信息插入失败");
}
return AjaxResult.success(tDeviceInfo.getDeviceId());
} }
/** /**
......
package com.zehong.web.controller.deviceInspection;
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.TInspectionPlan;
import com.zehong.system.service.ITInspectionPlanService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 巡检计划Controller
*
* @author zehong
* @date 2021-07-21
*/
@RestController
@RequestMapping("/deviceInspection/inspectionPlan")
public class TInspectionPlanController extends BaseController
{
@Autowired
private ITInspectionPlanService tInspectionPlanService;
/**
* 查询巡检计划列表
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspectionPlan:list')")
@GetMapping("/list")
public TableDataInfo list(TInspectionPlan tInspectionPlan)
{
startPage();
List<TInspectionPlan> list = tInspectionPlanService.selectTInspectionPlanList(tInspectionPlan);
return getDataTable(list);
}
/**
* 导出巡检计划列表
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspectionPlan:export')")
@Log(title = "巡检计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInspectionPlan tInspectionPlan)
{
List<TInspectionPlan> list = tInspectionPlanService.selectTInspectionPlanList(tInspectionPlan);
ExcelUtil<TInspectionPlan> util = new ExcelUtil<TInspectionPlan>(TInspectionPlan.class);
return util.exportExcel(list, "巡检计划数据");
}
/**
* 获取巡检计划详细信息
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspectionPlan:query')")
@GetMapping(value = "/{planId}")
public AjaxResult getInfo(@PathVariable("planId") Long planId)
{
return AjaxResult.success(tInspectionPlanService.selectTInspectionPlanById(planId));
}
/**
* 新增巡检计划
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspectionPlan:add')")
@Log(title = "巡检计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInspectionPlan tInspectionPlan)
{
return toAjax(tInspectionPlanService.insertTInspectionPlan(tInspectionPlan));
}
/**
* 修改巡检计划
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspectionPlan:edit')")
@Log(title = "巡检计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInspectionPlan tInspectionPlan)
{
return toAjax(tInspectionPlanService.updateTInspectionPlan(tInspectionPlan));
}
/**
* 删除巡检计划
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspectionPlan:remove')")
@Log(title = "巡检计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{planIds}")
public AjaxResult remove(@PathVariable Long[] planIds)
{
return toAjax(tInspectionPlanService.deleteTInspectionPlanByIds(planIds));
}
}
package com.zehong.web.controller.deviceInspection;
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("/deviceInspection/inspector")
public class TInspectorController extends BaseController
{
@Autowired
private ITInspectorService tInspectorService;
/**
* 查询巡检员列表
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspector:list')")
@GetMapping("/list")
public TableDataInfo list(TInspector tInspector)
{
startPage();
List<TInspector> list = tInspectorService.selectTInspectorList(tInspector);
return getDataTable(list);
}
/**
* 导出巡检员列表
*/
@PreAuthorize("@ss.hasPermi('deviceInspection: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('deviceInspection:inspector:query')")
@GetMapping(value = "/{inspectorId}")
public AjaxResult getInfo(@PathVariable("inspectorId") Long inspectorId)
{
return AjaxResult.success(tInspectorService.selectTInspectorById(inspectorId));
}
/**
* 新增巡检员
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspector:add')")
@Log(title = "巡检员", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInspector tInspector)
{
return toAjax(tInspectorService.insertTInspector(tInspector));
}
/**
* 修改巡检员
*/
@PreAuthorize("@ss.hasPermi('deviceInspection:inspector:edit')")
@Log(title = "巡检员", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInspector tInspector)
{
return toAjax(tInspectorService.updateTInspector(tInspector));
}
/**
* 删除巡检员
*/
@PreAuthorize("@ss.hasPermi('deviceInspection: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.riskManagement;
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.THiddenTrouble;
import com.zehong.system.service.ITHiddenTroubleService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 隐患信息Controller
*
* @author zehong
* @date 2021-07-21
*/
@RestController
@RequestMapping("/riskManagement/hiddenTrouble")
public class THiddenTroubleController extends BaseController
{
@Autowired
private ITHiddenTroubleService tHiddenTroubleService;
/**
* 查询隐患信息列表
*/
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:list')")
@GetMapping("/list")
public TableDataInfo list(THiddenTrouble tHiddenTrouble)
{
startPage();
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
return getDataTable(list);
}
/**
* 导出隐患信息列表
*/
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:export')")
@Log(title = "隐患信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(THiddenTrouble tHiddenTrouble)
{
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
ExcelUtil<THiddenTrouble> util = new ExcelUtil<THiddenTrouble>(THiddenTrouble.class);
return util.exportExcel(list, "隐患信息数据");
}
/**
* 获取隐患信息详细信息
*/
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:query')")
@GetMapping(value = "/{troubleId}")
public AjaxResult getInfo(@PathVariable("troubleId") Long troubleId)
{
return AjaxResult.success(tHiddenTroubleService.selectTHiddenTroubleById(troubleId));
}
/**
* 新增隐患信息
*/
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:add')")
@Log(title = "隐患信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody THiddenTrouble tHiddenTrouble)
{
return toAjax(tHiddenTroubleService.insertTHiddenTrouble(tHiddenTrouble));
}
/**
* 修改隐患信息
*/
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:edit')")
@Log(title = "隐患信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody THiddenTrouble tHiddenTrouble)
{
return toAjax(tHiddenTroubleService.updateTHiddenTrouble(tHiddenTrouble));
}
/**
* 删除隐患信息
*/
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:remove')")
@Log(title = "隐患信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{troubleIds}")
public AjaxResult remove(@PathVariable Long[] troubleIds)
{
return toAjax(tHiddenTroubleService.deleteTHiddenTroubleByIds(troubleIds));
}
}
...@@ -3,6 +3,7 @@ package com.zehong.web.controller.workOrder; ...@@ -3,6 +3,7 @@ package com.zehong.web.controller.workOrder;
import java.util.List; import java.util.List;
import com.zehong.common.utils.StringUtils; import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.vo.WorkOrderVo;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -43,7 +44,7 @@ public class TWorkOrderController extends BaseController ...@@ -43,7 +44,7 @@ public class TWorkOrderController extends BaseController
public TableDataInfo list(TWorkOrder tWorkOrder) public TableDataInfo list(TWorkOrder tWorkOrder)
{ {
startPage(); startPage();
List<TWorkOrder> list = tWorkOrderService.selectTWorkOrderList(tWorkOrder); List<WorkOrderVo> list = tWorkOrderService.selectTWorkOrderList(tWorkOrder);
return getDataTable(list); return getDataTable(list);
} }
...@@ -55,8 +56,8 @@ public class TWorkOrderController extends BaseController ...@@ -55,8 +56,8 @@ public class TWorkOrderController extends BaseController
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TWorkOrder tWorkOrder) public AjaxResult export(TWorkOrder tWorkOrder)
{ {
List<TWorkOrder> list = tWorkOrderService.selectTWorkOrderList(tWorkOrder); List<WorkOrderVo> list = tWorkOrderService.selectTWorkOrderList(tWorkOrder);
ExcelUtil<TWorkOrder> util = new ExcelUtil<TWorkOrder>(TWorkOrder.class); ExcelUtil<WorkOrderVo> util = new ExcelUtil<WorkOrderVo>(WorkOrderVo.class);
return util.exportExcel(list, "工单基础信息数据"); return util.exportExcel(list, "工单基础信息数据");
} }
......
...@@ -8,8 +8,8 @@ zehong: ...@@ -8,8 +8,8 @@ zehong:
copyrightYear: 2021 copyrightYear: 2021
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /home/zehong/uploadPath) # 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath)
profile: D:/zehong/uploadPath profile: /data/zehong/uploadPath
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
......
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_device_alarm
*
* @author zehong
* @date 2021-07-21
*/
public class TDeviceAlarm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long alarmId;
/** 设备id */
@Excel(name = "设备id")
private Long deviceId;
/** 工单id */
@Excel(name = "工单id")
private String orderId;
/** 报警类型 */
@Excel(name = "报警类型")
private String alarmType;
/** 报警值(报警信息) */
@Excel(name = "报警值", readConverterExp = "报警信息")
private String alarmValue;
/** 报警开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报警开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 报警结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报警结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/**
处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel(name = "处理状态", readConverterExp = "1不需处理,2已处理完成,3未处理完成")
private String dealStatus;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setAlarmId(Long alarmId)
{
this.alarmId = alarmId;
}
public Long getAlarmId()
{
return alarmId;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public void setAlarmType(String alarmType)
{
this.alarmType = alarmType;
}
public String getAlarmType()
{
return alarmType;
}
public void setAlarmValue(String alarmValue)
{
this.alarmValue = alarmValue;
}
public String getAlarmValue()
{
return alarmValue;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
public Date getEndTime()
{
return endTime;
}
public void setDealStatus(String dealStatus)
{
this.dealStatus = dealStatus;
}
public String getDealStatus()
{
return dealStatus;
}
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("alarmId", getAlarmId())
.append("deviceId", getDeviceId())
.append("orderId", getOrderId())
.append("alarmType", getAlarmType())
.append("alarmValue", getAlarmValue())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("dealStatus", getDealStatus())
.append("updateTime", getUpdateTime())
.append("createTime", getCreateTime())
.append("remarks", getRemarks())
.toString();
}
}
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_hidden_trouble
*
* @author zehong
* @date 2021-07-21
*/
public class THiddenTrouble extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 隐患信息id */
private Long troubleId;
/** 设备id */
@Excel(name = "设备id")
private Long deviceId;
/** 工单id */
@Excel(name = "工单id")
private String orderId;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel(name = "处理状态", readConverterExp = "1=不需处理,2已处理完成,3未处理完成")
private String dealStatus;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setTroubleId(Long troubleId)
{
this.troubleId = troubleId;
}
public Long getTroubleId()
{
return troubleId;
}
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
{
return deviceId;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
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 setDealStatus(String dealStatus)
{
this.dealStatus = dealStatus;
}
public String getDealStatus()
{
return dealStatus;
}
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("troubleId", getTroubleId())
.append("deviceId", getDeviceId())
.append("orderId", getOrderId())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("dealStatus", getDealStatus())
.append("updateTime", getUpdateTime())
.append("createTime", getCreateTime())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain; 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.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel; import com.zehong.common.annotation.Excel;
...@@ -13,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity; ...@@ -13,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity;
* 巡检记录对象 t_inspection_data * 巡检记录对象 t_inspection_data
* *
* @author zehong * @author zehong
* @date 2021-07-09 * @date 2021-07-21
*/ */
public class TInspectionData extends BaseEntity public class TInspectionData extends BaseEntity
{ {
...@@ -22,22 +18,17 @@ public class TInspectionData extends BaseEntity ...@@ -22,22 +18,17 @@ public class TInspectionData extends BaseEntity
/** 巡检记录id */ /** 巡检记录id */
private Long dataId; private Long dataId;
/** 巡检员id */ /** 巡检计划id */
@Excel(name = "巡检员id") @Excel(name = "巡检计划id")
private Long inspectorId; private Long planId;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */ /** 设备id */
@Excel(name = "纬度") @Excel(name = "设备id")
private BigDecimal latitude; private Long deviceId;
/** 创建时间 */ /** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss") @Excel(name = "处理状态", readConverterExp = "1=不需处理,2已处理完成,3未处理完成")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss") private String dealStatus;
private Date createTime;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
...@@ -52,32 +43,32 @@ public class TInspectionData extends BaseEntity ...@@ -52,32 +43,32 @@ public class TInspectionData extends BaseEntity
{ {
return dataId; return dataId;
} }
public void setInspectorId(Long inspectorId) public void setPlanId(Long planId)
{ {
this.inspectorId = inspectorId; this.planId = planId;
} }
public Long getInspectorId() public Long getPlanId()
{ {
return inspectorId; return planId;
} }
public void setLongitude(BigDecimal longitude) public void setDeviceId(Long deviceId)
{ {
this.longitude = longitude; this.deviceId = deviceId;
} }
public BigDecimal getLongitude() public Long getDeviceId()
{ {
return longitude; return deviceId;
} }
public void setLatitude(BigDecimal latitude) public void setDealStatus(String dealStatus)
{ {
this.latitude = latitude; this.dealStatus = dealStatus;
} }
public BigDecimal getLatitude() public String getDealStatus()
{ {
return latitude; return dealStatus;
} }
public void setRemarks(String remarks) public void setRemarks(String remarks)
{ {
...@@ -89,21 +80,14 @@ public class TInspectionData extends BaseEntity ...@@ -89,21 +80,14 @@ public class TInspectionData extends BaseEntity
return remarks; return remarks;
} }
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("dataId", getDataId()) .append("dataId", getDataId())
.append("inspectorId", getInspectorId()) .append("planId", getPlanId())
.append("longitude", getLongitude()) .append("deviceId", getDeviceId())
.append("latitude", getLatitude()) .append("dealStatus", getDealStatus())
.append("updateTime", getUpdateTime())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("remarks", getRemarks()) .append("remarks", getRemarks())
.toString(); .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_inspection_plan
*
* @author zehong
* @date 2021-07-21
*/
public class TInspectionPlan extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 巡检计划id */
private Long planId;
/** 巡检计划名称 */
@Excel(name = "巡检计划名称")
private String planName;
/** 工单id */
@Excel(name = "工单id")
private String orderId;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;
/** 状态 */
@Excel(name = "状态")
private String planStatus;
/** 计划描述 */
@Excel(name = "计划描述")
private String remarks;
public void setPlanId(Long planId)
{
this.planId = planId;
}
public Long getPlanId()
{
return planId;
}
public void setPlanName(String planName)
{
this.planName = planName;
}
public String getPlanName()
{
return planName;
}
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
public Date getEndTime()
{
return endTime;
}
public void setPlanStatus(String planStatus)
{
this.planStatus = planStatus;
}
public String getPlanStatus()
{
return planStatus;
}
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("planId", getPlanId())
.append("planName", getPlanName())
.append("orderId", getOrderId())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("planStatus", getPlanStatus())
.append("updateTime", getUpdateTime())
.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();
}
}
...@@ -33,8 +33,8 @@ public class TOrderFeedback extends BaseEntity ...@@ -33,8 +33,8 @@ public class TOrderFeedback extends BaseEntity
private String contents; private String contents;
/** 反馈时间 */ /** 反馈时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "反馈时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "反馈时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date feedbackTime; private Date feedbackTime;
/** 是否存在隐患(0正常,1存在隐患) */ /** 是否存在隐患(0正常,1存在隐患) */
......
...@@ -50,7 +50,7 @@ public class TWorkOrder extends BaseEntity ...@@ -50,7 +50,7 @@ public class TWorkOrder extends BaseEntity
private Long actualInspector; private Long actualInspector;
/** 实际接收时间 */ /** 实际接收时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "实际接收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "实际接收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actualTime; private Date actualTime;
......
package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 工单基础信息对象 t_work_order
*
* @author zehong
* @date 2021-07-19
*/
public class WorkOrderVo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 工单id */
private String orderId;
/** 工单类型(1巡检信息,2隐患信息,3报警信息) */
@Excel(name = "工单类型", readConverterExp = "1=巡检信息,2隐患信息,3报警信息")
private String orderType;
/** 源id */
@Excel(name = "源id")
private Long resourceId;
/** 工单名称 */
@Excel(name = "工单名称")
private String orderName;
/** 工单状态(0未下发,1已下发,2已接受,3进行中,4已反馈,5已归档) */
@Excel(name = "工单状态", readConverterExp = "0未下发,1已下发,2已接受,3进行中,4已反馈,5已归档")
private String orderStatus;
/** 指定执行人员(巡检员id) */
private Long appointInspector;
/** 指定执行人员姓名 */
@Excel(name = "指定执行人员")
private String appointInspectorName;
/** 下发时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "下发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date allotTime;
/** 实际接收人员(巡检员id) */
private Long actualInspector;
/** 实际接收人员姓名 */
@Excel(name = "实际接收人员")
private String actualInspectorName;
/** 实际接收时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "实际接收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date actualTime;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
{
return orderId;
}
public void setOrderType(String orderType)
{
this.orderType = orderType;
}
public String getOrderType()
{
return orderType;
}
public Long getResourceId() {
return resourceId;
}
public void setResourceId(Long resourceId) {
this.resourceId = resourceId;
}
public void setOrderName(String orderName)
{
this.orderName = orderName;
}
public String getOrderName()
{
return orderName;
}
public void setOrderStatus(String orderStatus)
{
this.orderStatus = orderStatus;
}
public String getOrderStatus()
{
return orderStatus;
}
public void setAppointInspector(Long appointInspector)
{
this.appointInspector = appointInspector;
}
public Long getAppointInspector()
{
return appointInspector;
}
public void setAllotTime(Date allotTime)
{
this.allotTime = allotTime;
}
public Date getAllotTime()
{
return allotTime;
}
public void setActualInspector(Long actualInspector)
{
this.actualInspector = actualInspector;
}
public Long getActualInspector()
{
return actualInspector;
}
public void setActualTime(Date actualTime)
{
this.actualTime = actualTime;
}
public Date getActualTime()
{
return actualTime;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
public String getAppointInspectorName() {
return appointInspectorName;
}
public void setAppointInspectorName(String appointInspectorName) {
this.appointInspectorName = appointInspectorName;
}
public String getActualInspectorName() {
return actualInspectorName;
}
public void setActualInspectorName(String actualInspectorName) {
this.actualInspectorName = actualInspectorName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("orderId", getOrderId())
.append("orderType", getOrderType())
.append("orderName", getOrderName())
.append("orderStatus", getOrderStatus())
.append("createTime", getCreateTime())
.append("appointInspector", getAppointInspector())
.append("appointInspectorName", getAppointInspectorName())
.append("allotTime", getAllotTime())
.append("actualInspector", getActualInspector())
.append("actualInspectorName", getActualInspectorName())
.append("actualTime", getActualTime())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TDeviceAlarm;
/**
* 报警信息Mapper接口
*
* @author zehong
* @date 2021-07-21
*/
public interface TDeviceAlarmMapper
{
/**
* 查询报警信息
*
* @param alarmId 报警信息ID
* @return 报警信息
*/
public TDeviceAlarm selectTDeviceAlarmById(Long alarmId);
/**
* 查询报警信息列表
*
* @param tDeviceAlarm 报警信息
* @return 报警信息集合
*/
public List<TDeviceAlarm> selectTDeviceAlarmList(TDeviceAlarm tDeviceAlarm);
/**
* 新增报警信息
*
* @param tDeviceAlarm 报警信息
* @return 结果
*/
public int insertTDeviceAlarm(TDeviceAlarm tDeviceAlarm);
/**
* 修改报警信息
*
* @param tDeviceAlarm 报警信息
* @return 结果
*/
public int updateTDeviceAlarm(TDeviceAlarm tDeviceAlarm);
/**
* 删除报警信息
*
* @param alarmId 报警信息ID
* @return 结果
*/
public int deleteTDeviceAlarmById(Long alarmId);
/**
* 批量删除报警信息
*
* @param alarmIds 需要删除的数据ID
* @return 结果
*/
public int deleteTDeviceAlarmByIds(Long[] alarmIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.THiddenTrouble;
/**
* 隐患信息Mapper接口
*
* @author zehong
* @date 2021-07-21
*/
public interface THiddenTroubleMapper
{
/**
* 查询隐患信息
*
* @param troubleId 隐患信息ID
* @return 隐患信息
*/
public THiddenTrouble selectTHiddenTroubleById(Long troubleId);
/**
* 查询隐患信息列表
*
* @param tHiddenTrouble 隐患信息
* @return 隐患信息集合
*/
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble);
/**
* 新增隐患信息
*
* @param tHiddenTrouble 隐患信息
* @return 结果
*/
public int insertTHiddenTrouble(THiddenTrouble tHiddenTrouble);
/**
* 修改隐患信息
*
* @param tHiddenTrouble 隐患信息
* @return 结果
*/
public int updateTHiddenTrouble(THiddenTrouble tHiddenTrouble);
/**
* 删除隐患信息
*
* @param troubleId 隐患信息ID
* @return 结果
*/
public int deleteTHiddenTroubleById(Long troubleId);
/**
* 批量删除隐患信息
*
* @param troubleIds 需要删除的数据ID
* @return 结果
*/
public int deleteTHiddenTroubleByIds(Long[] troubleIds);
}
...@@ -7,7 +7,7 @@ import com.zehong.system.domain.TInspectionData; ...@@ -7,7 +7,7 @@ import com.zehong.system.domain.TInspectionData;
* 巡检记录Mapper接口 * 巡检记录Mapper接口
* *
* @author zehong * @author zehong
* @date 2021-07-09 * @date 2021-07-21
*/ */
public interface TInspectionDataMapper public interface TInspectionDataMapper
{ {
......
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInspectionPlan;
/**
* 巡检计划Mapper接口
*
* @author zehong
* @date 2021-07-21
*/
public interface TInspectionPlanMapper
{
/**
* 查询巡检计划
*
* @param planId 巡检计划ID
* @return 巡检计划
*/
public TInspectionPlan selectTInspectionPlanById(Long planId);
/**
* 查询巡检计划列表
*
* @param tInspectionPlan 巡检计划
* @return 巡检计划集合
*/
public List<TInspectionPlan> selectTInspectionPlanList(TInspectionPlan tInspectionPlan);
/**
* 新增巡检计划
*
* @param tInspectionPlan 巡检计划
* @return 结果
*/
public int insertTInspectionPlan(TInspectionPlan tInspectionPlan);
/**
* 修改巡检计划
*
* @param tInspectionPlan 巡检计划
* @return 结果
*/
public int updateTInspectionPlan(TInspectionPlan tInspectionPlan);
/**
* 删除巡检计划
*
* @param planId 巡检计划ID
* @return 结果
*/
public int deleteTInspectionPlanById(Long planId);
/**
* 批量删除巡检计划
*
* @param planIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInspectionPlanByIds(Long[] planIds);
}
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.service;
import java.util.List;
import com.zehong.system.domain.TDeviceAlarm;
/**
* 报警信息Service接口
*
* @author zehong
* @date 2021-07-21
*/
public interface ITDeviceAlarmService
{
/**
* 查询报警信息
*
* @param alarmId 报警信息ID
* @return 报警信息
*/
public TDeviceAlarm selectTDeviceAlarmById(Long alarmId);
/**
* 查询报警信息列表
*
* @param tDeviceAlarm 报警信息
* @return 报警信息集合
*/
public List<TDeviceAlarm> selectTDeviceAlarmList(TDeviceAlarm tDeviceAlarm);
/**
* 新增报警信息
*
* @param tDeviceAlarm 报警信息
* @return 结果
*/
public int insertTDeviceAlarm(TDeviceAlarm tDeviceAlarm);
/**
* 修改报警信息
*
* @param tDeviceAlarm 报警信息
* @return 结果
*/
public int updateTDeviceAlarm(TDeviceAlarm tDeviceAlarm);
/**
* 批量删除报警信息
*
* @param alarmIds 需要删除的报警信息ID
* @return 结果
*/
public int deleteTDeviceAlarmByIds(Long[] alarmIds);
/**
* 删除报警信息信息
*
* @param alarmId 报警信息ID
* @return 结果
*/
public int deleteTDeviceAlarmById(Long alarmId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.THiddenTrouble;
/**
* 隐患信息Service接口
*
* @author zehong
* @date 2021-07-21
*/
public interface ITHiddenTroubleService
{
/**
* 查询隐患信息
*
* @param troubleId 隐患信息ID
* @return 隐患信息
*/
public THiddenTrouble selectTHiddenTroubleById(Long troubleId);
/**
* 查询隐患信息列表
*
* @param tHiddenTrouble 隐患信息
* @return 隐患信息集合
*/
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble);
/**
* 新增隐患信息
*
* @param tHiddenTrouble 隐患信息
* @return 结果
*/
public int insertTHiddenTrouble(THiddenTrouble tHiddenTrouble);
/**
* 修改隐患信息
*
* @param tHiddenTrouble 隐患信息
* @return 结果
*/
public int updateTHiddenTrouble(THiddenTrouble tHiddenTrouble);
/**
* 批量删除隐患信息
*
* @param troubleIds 需要删除的隐患信息ID
* @return 结果
*/
public int deleteTHiddenTroubleByIds(Long[] troubleIds);
/**
* 删除隐患信息信息
*
* @param troubleId 隐患信息ID
* @return 结果
*/
public int deleteTHiddenTroubleById(Long troubleId);
}
...@@ -7,7 +7,7 @@ import com.zehong.system.domain.TInspectionData; ...@@ -7,7 +7,7 @@ import com.zehong.system.domain.TInspectionData;
* 巡检记录Service接口 * 巡检记录Service接口
* *
* @author zehong * @author zehong
* @date 2021-07-09 * @date 2021-07-21
*/ */
public interface ITInspectionDataService public interface ITInspectionDataService
{ {
......
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInspectionPlan;
/**
* 巡检计划Service接口
*
* @author zehong
* @date 2021-07-21
*/
public interface ITInspectionPlanService
{
/**
* 查询巡检计划
*
* @param planId 巡检计划ID
* @return 巡检计划
*/
public TInspectionPlan selectTInspectionPlanById(Long planId);
/**
* 查询巡检计划列表
*
* @param tInspectionPlan 巡检计划
* @return 巡检计划集合
*/
public List<TInspectionPlan> selectTInspectionPlanList(TInspectionPlan tInspectionPlan);
/**
* 新增巡检计划
*
* @param tInspectionPlan 巡检计划
* @return 结果
*/
public int insertTInspectionPlan(TInspectionPlan tInspectionPlan);
/**
* 修改巡检计划
*
* @param tInspectionPlan 巡检计划
* @return 结果
*/
public int updateTInspectionPlan(TInspectionPlan tInspectionPlan);
/**
* 批量删除巡检计划
*
* @param planIds 需要删除的巡检计划ID
* @return 结果
*/
public int deleteTInspectionPlanByIds(Long[] planIds);
/**
* 删除巡检计划信息
*
* @param planId 巡检计划ID
* @return 结果
*/
public int deleteTInspectionPlanById(Long planId);
}
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);
}
...@@ -2,6 +2,7 @@ package com.zehong.system.service; ...@@ -2,6 +2,7 @@ package com.zehong.system.service;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TWorkOrder; import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.vo.WorkOrderVo;
/** /**
* 工单基础信息Service接口 * 工单基础信息Service接口
...@@ -24,7 +25,7 @@ public interface ITWorkOrderService ...@@ -24,7 +25,7 @@ public interface ITWorkOrderService
* @param orderId 工单基础信息ID * @param orderId 工单基础信息ID
* @return 工单基础信息 * @return 工单基础信息
*/ */
public TWorkOrder selectTWorkOrderById(String orderId); public WorkOrderVo selectTWorkOrderById(String orderId);
/** /**
* 查询工单基础信息列表 * 查询工单基础信息列表
...@@ -32,7 +33,7 @@ public interface ITWorkOrderService ...@@ -32,7 +33,7 @@ public interface ITWorkOrderService
* @param tWorkOrder 工单基础信息 * @param tWorkOrder 工单基础信息
* @return 工单基础信息集合 * @return 工单基础信息集合
*/ */
public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder); public List<WorkOrderVo> selectTWorkOrderList(TWorkOrder tWorkOrder);
/** /**
* 新增工单基础信息 * 新增工单基础信息
......
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.TDeviceAlarmMapper;
import com.zehong.system.domain.TDeviceAlarm;
import com.zehong.system.service.ITDeviceAlarmService;
/**
* 报警信息Service业务层处理
*
* @author zehong
* @date 2021-07-21
*/
@Service
public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
{
@Autowired
private TDeviceAlarmMapper tDeviceAlarmMapper;
/**
* 查询报警信息
*
* @param alarmId 报警信息ID
* @return 报警信息
*/
@Override
public TDeviceAlarm selectTDeviceAlarmById(Long alarmId)
{
return tDeviceAlarmMapper.selectTDeviceAlarmById(alarmId);
}
/**
* 查询报警信息列表
*
* @param tDeviceAlarm 报警信息
* @return 报警信息
*/
@Override
public List<TDeviceAlarm> selectTDeviceAlarmList(TDeviceAlarm tDeviceAlarm)
{
return tDeviceAlarmMapper.selectTDeviceAlarmList(tDeviceAlarm);
}
/**
* 新增报警信息
*
* @param tDeviceAlarm 报警信息
* @return 结果
*/
@Override
public int insertTDeviceAlarm(TDeviceAlarm tDeviceAlarm)
{
tDeviceAlarm.setCreateTime(DateUtils.getNowDate());
return tDeviceAlarmMapper.insertTDeviceAlarm(tDeviceAlarm);
}
/**
* 修改报警信息
*
* @param tDeviceAlarm 报警信息
* @return 结果
*/
@Override
public int updateTDeviceAlarm(TDeviceAlarm tDeviceAlarm)
{
tDeviceAlarm.setUpdateTime(DateUtils.getNowDate());
return tDeviceAlarmMapper.updateTDeviceAlarm(tDeviceAlarm);
}
/**
* 批量删除报警信息
*
* @param alarmIds 需要删除的报警信息ID
* @return 结果
*/
@Override
public int deleteTDeviceAlarmByIds(Long[] alarmIds)
{
return tDeviceAlarmMapper.deleteTDeviceAlarmByIds(alarmIds);
}
/**
* 删除报警信息信息
*
* @param alarmId 报警信息ID
* @return 结果
*/
@Override
public int deleteTDeviceAlarmById(Long alarmId)
{
return tDeviceAlarmMapper.deleteTDeviceAlarmById(alarmId);
}
}
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.THiddenTroubleMapper;
import com.zehong.system.domain.THiddenTrouble;
import com.zehong.system.service.ITHiddenTroubleService;
/**
* 隐患信息Service业务层处理
*
* @author zehong
* @date 2021-07-21
*/
@Service
public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
{
@Autowired
private THiddenTroubleMapper tHiddenTroubleMapper;
/**
* 查询隐患信息
*
* @param troubleId 隐患信息ID
* @return 隐患信息
*/
@Override
public THiddenTrouble selectTHiddenTroubleById(Long troubleId)
{
return tHiddenTroubleMapper.selectTHiddenTroubleById(troubleId);
}
/**
* 查询隐患信息列表
*
* @param tHiddenTrouble 隐患信息
* @return 隐患信息
*/
@Override
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble)
{
return tHiddenTroubleMapper.selectTHiddenTroubleList(tHiddenTrouble);
}
/**
* 新增隐患信息
*
* @param tHiddenTrouble 隐患信息
* @return 结果
*/
@Override
public int insertTHiddenTrouble(THiddenTrouble tHiddenTrouble)
{
tHiddenTrouble.setCreateTime(DateUtils.getNowDate());
return tHiddenTroubleMapper.insertTHiddenTrouble(tHiddenTrouble);
}
/**
* 修改隐患信息
*
* @param tHiddenTrouble 隐患信息
* @return 结果
*/
@Override
public int updateTHiddenTrouble(THiddenTrouble tHiddenTrouble)
{
tHiddenTrouble.setUpdateTime(DateUtils.getNowDate());
return tHiddenTroubleMapper.updateTHiddenTrouble(tHiddenTrouble);
}
/**
* 批量删除隐患信息
*
* @param troubleIds 需要删除的隐患信息ID
* @return 结果
*/
@Override
public int deleteTHiddenTroubleByIds(Long[] troubleIds)
{
return tHiddenTroubleMapper.deleteTHiddenTroubleByIds(troubleIds);
}
/**
* 删除隐患信息信息
*
* @param troubleId 隐患信息ID
* @return 结果
*/
@Override
public int deleteTHiddenTroubleById(Long troubleId)
{
return tHiddenTroubleMapper.deleteTHiddenTroubleById(troubleId);
}
}
...@@ -12,7 +12,7 @@ import com.zehong.system.service.ITInspectionDataService; ...@@ -12,7 +12,7 @@ import com.zehong.system.service.ITInspectionDataService;
* 巡检记录Service业务层处理 * 巡检记录Service业务层处理
* *
* @author zehong * @author zehong
* @date 2021-07-09 * @date 2021-07-21
*/ */
@Service @Service
public class TInspectionDataServiceImpl implements ITInspectionDataService public class TInspectionDataServiceImpl implements ITInspectionDataService
...@@ -66,6 +66,7 @@ public class TInspectionDataServiceImpl implements ITInspectionDataService ...@@ -66,6 +66,7 @@ public class TInspectionDataServiceImpl implements ITInspectionDataService
@Override @Override
public int updateTInspectionData(TInspectionData tInspectionData) public int updateTInspectionData(TInspectionData tInspectionData)
{ {
tInspectionData.setUpdateTime(DateUtils.getNowDate());
return tInspectionDataMapper.updateTInspectionData(tInspectionData); return tInspectionDataMapper.updateTInspectionData(tInspectionData);
} }
......
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.TInspectionPlanMapper;
import com.zehong.system.domain.TInspectionPlan;
import com.zehong.system.service.ITInspectionPlanService;
/**
* 巡检计划Service业务层处理
*
* @author zehong
* @date 2021-07-21
*/
@Service
public class TInspectionPlanServiceImpl implements ITInspectionPlanService
{
@Autowired
private TInspectionPlanMapper tInspectionPlanMapper;
/**
* 查询巡检计划
*
* @param planId 巡检计划ID
* @return 巡检计划
*/
@Override
public TInspectionPlan selectTInspectionPlanById(Long planId)
{
return tInspectionPlanMapper.selectTInspectionPlanById(planId);
}
/**
* 查询巡检计划列表
*
* @param tInspectionPlan 巡检计划
* @return 巡检计划
*/
@Override
public List<TInspectionPlan> selectTInspectionPlanList(TInspectionPlan tInspectionPlan)
{
return tInspectionPlanMapper.selectTInspectionPlanList(tInspectionPlan);
}
/**
* 新增巡检计划
*
* @param tInspectionPlan 巡检计划
* @return 结果
*/
@Override
public int insertTInspectionPlan(TInspectionPlan tInspectionPlan)
{
tInspectionPlan.setCreateTime(DateUtils.getNowDate());
return tInspectionPlanMapper.insertTInspectionPlan(tInspectionPlan);
}
/**
* 修改巡检计划
*
* @param tInspectionPlan 巡检计划
* @return 结果
*/
@Override
public int updateTInspectionPlan(TInspectionPlan tInspectionPlan)
{
tInspectionPlan.setUpdateTime(DateUtils.getNowDate());
return tInspectionPlanMapper.updateTInspectionPlan(tInspectionPlan);
}
/**
* 批量删除巡检计划
*
* @param planIds 需要删除的巡检计划ID
* @return 结果
*/
@Override
public int deleteTInspectionPlanByIds(Long[] planIds)
{
return tInspectionPlanMapper.deleteTInspectionPlanByIds(planIds);
}
/**
* 删除巡检计划信息
*
* @param planId 巡检计划ID
* @return 结果
*/
@Override
public int deleteTInspectionPlanById(Long planId)
{
return tInspectionPlanMapper.deleteTInspectionPlanById(planId);
}
}
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);
}
}
...@@ -52,6 +52,13 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService ...@@ -52,6 +52,13 @@ public class TOrderFeedbackServiceImpl implements ITOrderFeedbackService
@Override @Override
public int insertTOrderFeedback(TOrderFeedback tOrderFeedback) public int insertTOrderFeedback(TOrderFeedback tOrderFeedback)
{ {
Long deviceId = tOrderFeedback.getDeviceId();
// 更改巡检记录状态
if(deviceId != 0L){
String dealStatus = tOrderFeedback.getDealStatus();
}
return tOrderFeedbackMapper.insertTOrderFeedback(tOrderFeedback); return tOrderFeedbackMapper.insertTOrderFeedback(tOrderFeedback);
} }
......
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.ExceptionUtil; import com.zehong.common.utils.ExceptionUtil;
import com.zehong.common.utils.StringUtils; import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.vo.WorkOrderVo;
import com.zehong.system.mapper.SysUserMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TWorkOrderMapper; import com.zehong.system.mapper.TWorkOrderMapper;
...@@ -21,6 +27,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -21,6 +27,8 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{ {
@Autowired @Autowired
private TWorkOrderMapper tWorkOrderMapper; private TWorkOrderMapper tWorkOrderMapper;
@Autowired
private SysUserMapper sysUserMapper;
/** /**
* 获取工单基础信息id * 获取工单基础信息id
...@@ -40,9 +48,35 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -40,9 +48,35 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return 工单基础信息 * @return 工单基础信息
*/ */
@Override @Override
public TWorkOrder selectTWorkOrderById(String orderId) public WorkOrderVo selectTWorkOrderById(String orderId)
{ {
return tWorkOrderMapper.selectTWorkOrderById(orderId); WorkOrderVo workOrderVo = new WorkOrderVo();
TWorkOrder tWorkOrder = tWorkOrderMapper.selectTWorkOrderById(orderId);
BeanUtils.copyProperties(tWorkOrder, workOrderVo);
// 获取巡检员姓名
SysUser appointInspector = sysUserMapper.selectUserById(tWorkOrder.getAppointInspector());
workOrderVo.setAppointInspectorName(appointInspector.getNickName());
if(tWorkOrder.getActualInspector() != tWorkOrder.getAppointInspector() && tWorkOrder.getActualInspector() != null){
SysUser actualInspector = sysUserMapper.selectUserById(tWorkOrder.getActualInspector());
workOrderVo.setActualInspectorName(actualInspector.getNickName());
} else {
workOrderVo.setActualInspectorName(appointInspector.getNickName());
}
// 获取源数据(1巡检信息,2隐患信息,3报警信息)
String orderType = tWorkOrder.getOrderType();
if("1".equals(orderType)){
} else if("2".equals(orderType)) {
} else {
}
return workOrderVo;
} }
/** /**
...@@ -52,9 +86,32 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -52,9 +86,32 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
* @return 工单基础信息 * @return 工单基础信息
*/ */
@Override @Override
public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder) public List<WorkOrderVo> selectTWorkOrderList(TWorkOrder tWorkOrder)
{ {
return tWorkOrderMapper.selectTWorkOrderList(tWorkOrder); List<WorkOrderVo> workOrderVoList = new ArrayList<WorkOrderVo>();
List<TWorkOrder> workOrderList = tWorkOrderMapper.selectTWorkOrderList(tWorkOrder);
if(workOrderList.size() != 0){
for(TWorkOrder workOrder : workOrderList){
WorkOrderVo workOrderVo = new WorkOrderVo();
BeanUtils.copyProperties(workOrder, workOrderVo);
// 获取巡检员姓名
SysUser appointInspector = sysUserMapper.selectUserById(workOrder.getAppointInspector());
workOrderVo.setAppointInspectorName(appointInspector.getNickName());
if(workOrder.getActualInspector() != workOrder.getAppointInspector() && workOrder.getActualInspector() != null){
SysUser actualInspector = sysUserMapper.selectUserById(tWorkOrder.getActualInspector());
workOrderVo.setActualInspectorName(actualInspector.getNickName());
} else {
workOrderVo.setActualInspectorName(appointInspector.getNickName());
}
workOrderVoList.add(workOrderVo);
}
}
return workOrderVoList;
} }
/** /**
......
<?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.TDeviceAlarmMapper">
<resultMap type="TDeviceAlarm" id="TDeviceAlarmResult">
<result property="alarmId" column="alarm_id" />
<result property="deviceId" column="device_id" />
<result property="orderId" column="order_id" />
<result property="alarmType" column="alarm_type" />
<result property="alarmValue" column="alarm_value" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="dealStatus" column="deal_status" />
<result property="updateTime" column="update_time" />
<result property="createTime" column="create_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTDeviceAlarmVo">
select alarm_id, device_id, order_id, alarm_type, alarm_value, start_time, end_time, deal_status, update_time, create_time, remarks from t_device_alarm
</sql>
<select id="selectTDeviceAlarmList" parameterType="TDeviceAlarm" resultMap="TDeviceAlarmResult">
<include refid="selectTDeviceAlarmVo"/>
<where>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="alarmType != null and alarmType != ''"> and alarm_type = #{alarmType}</if>
<if test="alarmValue != null and alarmValue != ''"> and alarm_value = #{alarmValue}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<if test="dealStatus != null and dealStatus != ''"> and deal_status = #{dealStatus}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTDeviceAlarmById" parameterType="Long" resultMap="TDeviceAlarmResult">
<include refid="selectTDeviceAlarmVo"/>
where alarm_id = #{alarmId}
</select>
<insert id="insertTDeviceAlarm" parameterType="TDeviceAlarm" useGeneratedKeys="true" keyProperty="alarmId">
insert into t_device_alarm
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceId != null">device_id,</if>
<if test="orderId != null">order_id,</if>
<if test="alarmType != null">alarm_type,</if>
<if test="alarmValue != null">alarm_value,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="dealStatus != null">deal_status,</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="deviceId != null">#{deviceId},</if>
<if test="orderId != null">#{orderId},</if>
<if test="alarmType != null">#{alarmType},</if>
<if test="alarmValue != null">#{alarmValue},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="dealStatus != null">#{dealStatus},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTDeviceAlarm" parameterType="TDeviceAlarm">
update t_device_alarm
<trim prefix="SET" suffixOverrides=",">
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="alarmType != null">alarm_type = #{alarmType},</if>
<if test="alarmValue != null">alarm_value = #{alarmValue},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="dealStatus != null">deal_status = #{dealStatus},</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 alarm_id = #{alarmId}
</update>
<delete id="deleteTDeviceAlarmById" parameterType="Long">
delete from t_device_alarm where alarm_id = #{alarmId}
</delete>
<delete id="deleteTDeviceAlarmByIds" parameterType="String">
delete from t_device_alarm where alarm_id in
<foreach item="alarmId" collection="array" open="(" separator="," close=")">
#{alarmId}
</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.THiddenTroubleMapper">
<resultMap type="THiddenTrouble" id="THiddenTroubleResult">
<result property="troubleId" column="trouble_id" />
<result property="deviceId" column="device_id" />
<result property="orderId" column="order_id" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="dealStatus" column="deal_status" />
<result property="updateTime" column="update_time" />
<result property="createTime" column="create_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTHiddenTroubleVo">
select trouble_id, device_id, order_id, longitude, latitude, deal_status, update_time, create_time, remarks from t_hidden_trouble
</sql>
<select id="selectTHiddenTroubleList" parameterType="THiddenTrouble" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/>
<where>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="dealStatus != null and dealStatus != ''"> and deal_status = #{dealStatus}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTHiddenTroubleById" parameterType="Long" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/>
where trouble_id = #{troubleId}
</select>
<insert id="insertTHiddenTrouble" parameterType="THiddenTrouble" useGeneratedKeys="true" keyProperty="troubleId">
insert into t_hidden_trouble
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceId != null">device_id,</if>
<if test="orderId != null">order_id,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="dealStatus != null">deal_status,</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="deviceId != null">#{deviceId},</if>
<if test="orderId != null">#{orderId},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="dealStatus != null">#{dealStatus},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTHiddenTrouble" parameterType="THiddenTrouble">
update t_hidden_trouble
<trim prefix="SET" suffixOverrides=",">
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="dealStatus != null">deal_status = #{dealStatus},</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 trouble_id = #{troubleId}
</update>
<delete id="deleteTHiddenTroubleById" parameterType="Long">
delete from t_hidden_trouble where trouble_id = #{troubleId}
</delete>
<delete id="deleteTHiddenTroubleByIds" parameterType="String">
delete from t_hidden_trouble where trouble_id in
<foreach item="troubleId" collection="array" open="(" separator="," close=")">
#{troubleId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -6,23 +6,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -6,23 +6,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TInspectionData" id="TInspectionDataResult"> <resultMap type="TInspectionData" id="TInspectionDataResult">
<result property="dataId" column="data_id" /> <result property="dataId" column="data_id" />
<result property="inspectorId" column="inspector_id" /> <result property="planId" column="plan_id" />
<result property="longitude" column="longitude" /> <result property="deviceId" column="device_id" />
<result property="latitude" column="latitude" /> <result property="dealStatus" column="deal_status" />
<result property="updateTime" column="update_time" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
</resultMap> </resultMap>
<sql id="selectTInspectionDataVo"> <sql id="selectTInspectionDataVo">
select data_id, inspector_id, longitude, latitude, create_time, remarks from t_inspection_data select data_id, plan_id, device_id, deal_status, update_time, create_time, remarks from t_inspection_data
</sql> </sql>
<select id="selectTInspectionDataList" parameterType="TInspectionData" resultMap="TInspectionDataResult"> <select id="selectTInspectionDataList" parameterType="TInspectionData" resultMap="TInspectionDataResult">
<include refid="selectTInspectionDataVo"/> <include refid="selectTInspectionDataVo"/>
<where> <where>
<if test="inspectorId != null "> and inspector_id = #{inspectorId}</if> <if test="planId != null "> and plan_id = #{planId}</if>
<if test="longitude != null "> and longitude = #{longitude}</if> <if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="latitude != null "> and latitude = #{latitude}</if> <if test="dealStatus != null and dealStatus != ''"> and deal_status = #{dealStatus}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where> </where>
</select> </select>
...@@ -36,17 +37,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -36,17 +37,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_inspection_data insert into t_inspection_data
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dataId != null">data_id,</if> <if test="dataId != null">data_id,</if>
<if test="inspectorId != null">inspector_id,</if> <if test="planId != null">plan_id,</if>
<if test="longitude != null">longitude,</if> <if test="deviceId != null">device_id,</if>
<if test="latitude != null">latitude,</if> <if test="dealStatus != null">deal_status,</if>
<if test="updateTime != null">update_time,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dataId != null">#{dataId},</if> <if test="dataId != null">#{dataId},</if>
<if test="inspectorId != null">#{inspectorId},</if> <if test="planId != null">#{planId},</if>
<if test="longitude != null">#{longitude},</if> <if test="deviceId != null">#{deviceId},</if>
<if test="latitude != null">#{latitude},</if> <if test="dealStatus != null">#{dealStatus},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if> <if test="remarks != null">#{remarks},</if>
</trim> </trim>
...@@ -55,9 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -55,9 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateTInspectionData" parameterType="TInspectionData"> <update id="updateTInspectionData" parameterType="TInspectionData">
update t_inspection_data update t_inspection_data
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="inspectorId != null">inspector_id = #{inspectorId},</if> <if test="planId != null">plan_id = #{planId},</if>
<if test="longitude != null">longitude = #{longitude},</if> <if test="deviceId != null">device_id = #{deviceId},</if>
<if test="latitude != null">latitude = #{latitude},</if> <if test="dealStatus != null">deal_status = #{dealStatus},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
</trim> </trim>
......
<?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.TInspectionPlanMapper">
<resultMap type="TInspectionPlan" id="TInspectionPlanResult">
<result property="planId" column="plan_id" />
<result property="planName" column="plan_name" />
<result property="orderId" column="order_id" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="planStatus" column="plan_status" />
<result property="updateTime" column="update_time" />
<result property="createTime" column="create_time" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTInspectionPlanVo">
select plan_id, plan_name, order_id, start_time, end_time, plan_status, update_time, create_time, remarks from t_inspection_plan
</sql>
<select id="selectTInspectionPlanList" parameterType="TInspectionPlan" resultMap="TInspectionPlanResult">
<include refid="selectTInspectionPlanVo"/>
<where>
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<if test="planStatus != null and planStatus != ''"> and plan_status = #{planStatus}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTInspectionPlanById" parameterType="Long" resultMap="TInspectionPlanResult">
<include refid="selectTInspectionPlanVo"/>
where plan_id = #{planId}
</select>
<insert id="insertTInspectionPlan" parameterType="TInspectionPlan" useGeneratedKeys="true" keyProperty="planId">
insert into t_inspection_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="planName != null">plan_name,</if>
<if test="orderId != null">order_id,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="planStatus != null">plan_status,</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="planName != null">#{planName},</if>
<if test="orderId != null">#{orderId},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="planStatus != null">#{planStatus},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTInspectionPlan" parameterType="TInspectionPlan">
update t_inspection_plan
<trim prefix="SET" suffixOverrides=",">
<if test="planName != null">plan_name = #{planName},</if>
<if test="orderId != null">order_id = #{orderId},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="planStatus != null">plan_status = #{planStatus},</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 plan_id = #{planId}
</update>
<delete id="deleteTInspectionPlanById" parameterType="Long">
delete from t_inspection_plan where plan_id = #{planId}
</delete>
<delete id="deleteTInspectionPlanByIds" parameterType="String">
delete from t_inspection_plan where plan_id in
<foreach item="planId" collection="array" open="(" separator="," close=")">
#{planId}
</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
import request from '@/utils/request' import request from '@/utils/request'
// 查询巡检员列表 // 查询报警信息列表
export function listInspector(query) { export function listDeviceAlarm(query) {
return request({ return request({
url: '/deviceInspection/inspector/list', url: '/dataMonitoring/deviceAlarm/list',
method: 'get', method: 'get',
params: query params: query
}) })
} }
// 查询巡检员详细 // 查询报警信息详细
export function getInspector(inspectorId) { export function getDeviceAlarm(alarmId) {
return request({ return request({
url: '/deviceInspection/inspector/' + inspectorId, url: '/dataMonitoring/deviceAlarm/' + alarmId,
method: 'get' method: 'get'
}) })
} }
// 新增巡检员 // 新增报警信息
export function addInspector(data) { export function addDeviceAlarm(data) {
return request({ return request({
url: '/deviceInspection/inspector', url: '/dataMonitoring/deviceAlarm',
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 修改巡检员 // 修改报警信息
export function updateInspector(data) { export function updateDeviceAlarm(data) {
return request({ return request({
url: '/deviceInspection/inspector', url: '/dataMonitoring/deviceAlarm',
method: 'put', method: 'put',
data: data data: data
}) })
} }
// 删除巡检员 // 删除报警信息
export function delInspector(inspectorId) { export function delDeviceAlarm(alarmId) {
return request({ return request({
url: '/deviceInspection/inspector/' + inspectorId, url: '/dataMonitoring/deviceAlarm/' + alarmId,
method: 'delete' method: 'delete'
}) })
} }
// 导出巡检员 // 导出报警信息
export function exportInspector(query) { export function exportDeviceAlarm(query) {
return request({ return request({
url: '/deviceInspection/inspector/export', url: '/dataMonitoring/deviceAlarm/export',
method: 'get', method: 'get',
params: query params: query
}) })
......
...@@ -9,6 +9,15 @@ export function listDeviceInfo(query) { ...@@ -9,6 +9,15 @@ export function listDeviceInfo(query) {
}) })
} }
// 查询设备信息列表
export function getAllDeviceInfo(query) {
return request({
url: '/device/deviceInfo/deviceListInfo',
method: 'get',
params: query
})
}
// 查询设备信息详细 // 查询设备信息详细
export function getDeviceInfo(deviceId) { export function getDeviceInfo(deviceId) {
return request({ return request({
......
import request from '@/utils/request'
// 查询巡检计划列表
export function listInspectionPlan(query) {
return request({
url: '/deviceInspection/inspectionPlan/list',
method: 'get',
params: query
})
}
// 查询巡检计划详细
export function getInspectionPlan(planId) {
return request({
url: '/deviceInspection/inspectionPlan/' + planId,
method: 'get'
})
}
// 新增巡检计划
export function addInspectionPlan(data) {
return request({
url: '/deviceInspection/inspectionPlan',
method: 'post',
data: data
})
}
// 修改巡检计划
export function updateInspectionPlan(data) {
return request({
url: '/deviceInspection/inspectionPlan',
method: 'put',
data: data
})
}
// 删除巡检计划
export function delInspectionPlan(planId) {
return request({
url: '/deviceInspection/inspectionPlan/' + planId,
method: 'delete'
})
}
// 导出巡检计划
export function exportInspectionPlan(query) {
return request({
url: '/deviceInspection/inspectionPlan/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询隐患信息列表
export function listHiddenTrouble(query) {
return request({
url: '/riskManagement/hiddenTrouble/list',
method: 'get',
params: query
})
}
// 查询隐患信息详细
export function getHiddenTrouble(troubleId) {
return request({
url: '/riskManagement/hiddenTrouble/' + troubleId,
method: 'get'
})
}
// 新增隐患信息
export function addHiddenTrouble(data) {
return request({
url: '/riskManagement/hiddenTrouble',
method: 'post',
data: data
})
}
// 修改隐患信息
export function updateHiddenTrouble(data) {
return request({
url: '/riskManagement/hiddenTrouble',
method: 'put',
data: data
})
}
// 删除隐患信息
export function delHiddenTrouble(troubleId) {
return request({
url: '/riskManagement/hiddenTrouble/' + troubleId,
method: 'delete'
})
}
// 导出隐患信息
export function exportHiddenTrouble(query) {
return request({
url: '/riskManagement/hiddenTrouble/export',
method: 'get',
params: query
})
}
\ No newline at end of file
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="80%"
:before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="a">
<el-input></el-input>
</el-form-item>
<el-form-item label="姓名" prop="d">
<el-input></el-input>
</el-form-item>
<el-form-item label="电话" prop="e">
<el-input></el-input>
</el-form-item>
<el-form-item label="备注信息" prop="l">
<el-input type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
title: { type: String }
},
data () {
return {
// isShow: false,
editForm : {},
dialogVisible : false
}
},
methods: {
show () {
this.dialogVisible = true;
},
hide () {
this.remove()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.remove();
//done();
})
.catch(_ => {});
}
}
}
</script>
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="80%"
:before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="enterpriseId">
<el-input v-model="editForm.enterpriseId"></el-input>
</el-form-item>
<el-form-item label="名称" prop="deviceName">
<el-input v-model="editForm.deviceName"></el-input>
</el-form-item>
<el-form-item label="地址" prop="deviceAddr">
<el-input v-model="editForm.deviceAddr"></el-input>
</el-form-item>
<el-form-item label="所属管道" prop="pipeId">
<el-input v-model="editForm.pipeId"></el-input>
</el-form-item>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="editForm.linkman"></el-input>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="editForm.phone"></el-input>
</el-form-item>
<el-form-item label="型号" prop="deviceModel">
<el-input v-model="editForm.deviceModel"></el-input>
</el-form-item>
<el-form-item label="经纬度" prop="deviceModel">
<el-row>
<el-col :span="6" style="margin-right: 10px">
<el-input v-model="editForm.longitude"></el-input>
</el-col>
<el-col :span="6">
<el-input v-model="editForm.latitude"></el-input>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="安装日期" prop="installationTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.installationTime" style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="最后巡检日期" prop="inspectionTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.inspectionTime" style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
title: { type: String }
},
data () {
return {
// isShow: false,
editForm : {},
dialogVisible : false
}
},
methods: {
show () {
this.dialogVisible = true;
},
hide () {
this.remove()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.remove();
//done();
})
.catch(_ => {});
}
}
}
</script>
<template>
<div class="wrapper">
<div class="top display-default">
<div class="left text">裕华路地埋管线</div>
<div class="right text">
<img src="../../assets/images/closeBtn.png" alt="" />
</div>
</div>
<!-- 设备信息 -->
<div class="eq-content display-default">
<div class="text-wrapper">
<div class="eq-text">设备编号:<span>aa</span></div>
<div class="eq-text">设备名称:<span>裕华路地埋管线</span></div>
<div class="eq-text">监测介质:<span>甲烷</span></div>
<div class="eq-text">设备状态:<span>报警</span></div>
<div class="eq-text">用户信息:<span>中厨燃气</span></div>
</div>
<div class="pic">
<img src="" alt="" />
</div>
</div>
<!-- 维修人员 -->
<div class="maintain-content">
<div>姓名: <span>高雄</span></div>
<div>电话: <span>13512451234</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div>
<!-- 报警状态 -->
<div class="warn-content">
<div>报警状态 <span>报警</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div>
<div class="btn">
<el-button class="elbtn" type="primary">生成工单</el-button>
</div>
</div>
</template>
<script>
//line移入时的的infowindow
export default {
props: {
obj: { typs: Object },
},
};
</script>
<style lang="scss" scoped>
.wrapper {
width: 406px;
height: 488px;
background: #fff;
border-radius: 4px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
overflow: hidden;
.top {
width: 100%;
height: 51px;
background-color: #ff5a67;
.text {
font-weight: 600;
font-size: 16px;
color: #ffffff;
line-height: 51px;
}
.left {
padding-left: 22px;
}
.right {
padding-right: 16px;
}
}
.eq-content {
height: 156px;
box-sizing: border-box;
padding: 13px 16px 13px 22px;
border-bottom: 1px solid #e2e2e2;
.text-wrapper {
padding-top: 1px;
& > div {
margin-bottom: 6px;
}
.eq-text {
font-size: 14px;
font-weight: 400;
color: #1d1d1d;
opacity: 1;
}
}
.pic {
width: 177px;
height: 129px;
background-color: black;
img {
width: 100%;
}
}
}
.maintain-content {
width: 100%;
height: 109px;
padding-left: 22px;
padding-top: 16px;
box-sizing: border-box;
border-bottom: 1px solid #e2e2e2;
& > div {
margin-bottom: 8px;
font-size: 14px;
font-weight: 400;
}
}
.warn-content {
height: 82px;
box-sizing: border-box;
padding: 8px 0 0 22px;
border-bottom: 1px solid #e2e2e2;
& > div {
font-size: 14px;
font-weight: 400;
margin-bottom: 8px;
}
}
.btn {
padding-top: 32px;
text-align: center;
.elbtn {
background-color: #053b6a;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
width: 95px;
height: 33px;
}
}
}
.display-default {
display: flex;
justify-content: space-between;
}
</style>
\ No newline at end of file
<template>
<div class="wrapper">
<div class="top display-default">
<div class="left text">裕华路地埋管线1111</div>
<div class="right text">
<img src="../../assets/images/closeBtn.png" alt="" />
</div>
</div>
<!-- 设备信息 -->
<div class="eq-content display-default">
<div class="text-wrapper">
<div class="eq-text">设备编号:<span>aa</span></div>
<div class="eq-text">设备名称:<span>裕华路地埋管线</span></div>
<div class="eq-text">监测介质:<span>甲烷</span></div>
<div class="eq-text">设备状态:<span>报警</span></div>
<div class="eq-text">用户信息:<span>中厨燃气</span></div>
</div>
<div class="pic">
<img src="" alt="" />
</div>
</div>
<!-- 维修人员 -->
<div class="maintain-content">
<div>姓名: <span>高雄</span></div>
<div>电话: <span>13512451234</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div>
<!-- 报警状态 -->
<div class="warn-content">
<div>报警状态 <span>报警</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div>
<div class="btn">
<el-button class="elbtn" type="primary">生成工单</el-button>
</div>
</div>
</template>
<script>
//line移入时的的infowindow
export default {
props: {
obj: { typs: Object },
},
};
</script>
<style lang="scss" scoped>
.wrapper {
width: 406px;
height: 488px;
background: #fff;
border-radius: 4px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
overflow: hidden;
.top {
width: 100%;
height: 51px;
background-color: #ff5a67;
.text {
font-weight: 600;
font-size: 16px;
color: #ffffff;
line-height: 51px;
}
.left {
padding-left: 22px;
}
.right {
padding-right: 16px;
}
}
.eq-content {
height: 156px;
box-sizing: border-box;
padding: 13px 16px 13px 22px;
border-bottom: 1px solid #e2e2e2;
.text-wrapper {
padding-top: 1px;
& > div {
margin-bottom: 6px;
}
.eq-text {
font-size: 14px;
font-weight: 400;
color: #1d1d1d;
opacity: 1;
}
}
.pic {
width: 177px;
height: 129px;
background-color: black;
img {
width: 100%;
}
}
}
.maintain-content {
width: 100%;
height: 109px;
padding-left: 22px;
padding-top: 16px;
box-sizing: border-box;
border-bottom: 1px solid #e2e2e2;
& > div {
margin-bottom: 8px;
font-size: 14px;
font-weight: 400;
}
}
.warn-content {
height: 82px;
box-sizing: border-box;
padding: 8px 0 0 22px;
border-bottom: 1px solid #e2e2e2;
& > div {
font-size: 14px;
font-weight: 400;
margin-bottom: 8px;
}
}
.btn {
padding-top: 32px;
text-align: center;
.elbtn {
background-color: #053b6a;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
width: 95px;
height: 33px;
}
}
}
.display-default {
display: flex;
justify-content: space-between;
}
</style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:before-close="handleClose"> :before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini"> <el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="a"> <el-form-item label="所属燃气公司" prop="a">
<el-input></el-input> <el-input v-model="editForm.title"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="名称" prop="b"> <el-form-item label="名称" prop="b">
<el-input ></el-input> <el-input ></el-input>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button> <el-button type="primary" @click="ok">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
export default { export default {
props: { props: {
title: { type: String }, title: { type: String },
lineOkCallBack:{ type:Function},
gaodeMap:{type:Object},
target:{type:Object},
//message: { type: String }, //message: { type: String },
//duration: { type: Number, default: 2000 } //duration: { type: Number, default: 2000 }
}, },
...@@ -56,10 +60,14 @@ ...@@ -56,10 +60,14 @@
return { return {
// isShow: false, // isShow: false,
editForm : {}, editForm : {},
dialogVisible : false dialogVisible : false,
} }
}, },
methods: { methods: {
ok(){
this.dialogVisible =false;
this.lineOkCallBack.call(this.gaodeMap,this.target);
},
show () { show () {
//this.isShow = true; //this.isShow = true;
this.dialogVisible = true; this.dialogVisible = true;
...@@ -78,6 +86,7 @@ ...@@ -78,6 +86,7 @@
}) })
.catch(_ => {}); .catch(_ => {});
} }
} }
} }
</script> </script>
......
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="80%"
:before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="enterpriseId">
<el-input v-model="editForm.enterpriseId"></el-input>
</el-form-item>
<el-form-item label="名称" prop="deviceName">
<el-input v-model="editForm.deviceName"></el-input>
</el-form-item>
<el-form-item label="地址" prop="deviceAddr">
<el-input v-model="editForm.deviceAddr"></el-input>
</el-form-item>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="editForm.linkman"></el-input>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="editForm.phone"></el-input>
</el-form-item>
<el-form-item label="型号" prop="deviceModel">
<el-input v-model="editForm.deviceModel"></el-input>
</el-form-item>
<el-form-item label="经纬度" prop="deviceModel">
<el-row>
<el-col :span="6" style="margin-right: 10px">
<el-input v-model="editForm.longitude"></el-input>
</el-col>
<el-col :span="6">
<el-input v-model="editForm.latitude"></el-input>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="安装日期" prop="installationTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.installationTime" style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="最后巡检日期" prop="inspectionTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.inspectionTime" style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
title: { type: String }
},
data () {
return {
// isShow: false,
editForm : {},
dialogVisible : false
}
},
methods: {
show () {
this.dialogVisible = true;
},
hide () {
this.remove()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.remove();
//done();
})
.catch(_ => {});
}
}
}
</script>
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="80%"
:before-close="handleClose">
<el-form ref="editForm" :model="editForm" label-width="120px" size="mini">
<el-form-item label="所属燃气公司" prop="enterpriseId">
<el-input v-model="editForm.enterpriseId"></el-input>
</el-form-item>
<el-form-item label="名称" prop="deviceName">
<el-input v-model="editForm.deviceName"></el-input>
</el-form-item>
<el-form-item label="地址" prop="deviceAddr">
<el-input v-model="editForm.deviceAddr"></el-input>
</el-form-item>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="editForm.linkman"></el-input>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="editForm.phone"></el-input>
</el-form-item>
<el-form-item label="型号" prop="deviceModel">
<el-input v-model="editForm.deviceModel"></el-input>
</el-form-item>
<el-form-item label="经纬度" prop="deviceModel">
<el-row>
<el-col :span="6" style="margin-right: 10px">
<el-input v-model="editForm.longitude"></el-input>
</el-col>
<el-col :span="6">
<el-input v-model="editForm.latitude"></el-input>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="安装日期" prop="installationTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.installationTime" style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="最后巡检日期" prop="inspectionTime">
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="editForm.inspectionTime" style="width: 100%;"></el-date-picker>
</el-col>
</el-form-item>
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="editForm.remarks"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
props: {
title: { type: String }
},
data () {
return {
// isShow: false,
editForm : {},
dialogVisible : false
}
},
methods: {
show () {
this.dialogVisible = true;
},
hide () {
this.remove()
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
this.remove();
//done();
})
.catch(_ => {});
}
}
}
</script>
...@@ -65,9 +65,10 @@ Vue.use(Element, { ...@@ -65,9 +65,10 @@ Vue.use(Element, {
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ let vue =new Vue({
el: '#app', el: '#app',
router, router,
store, store,
render: h => h(App) render: h => h(App)
}) })
export default vue
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment