Commit b1e2d4b3 authored by 王晓倩's avatar 王晓倩

隐患信息

parent 9b52062d
package com.zehong.web.controller.riskManagement; package com.zehong.web.controller.riskManagement;
import java.util.List; import java.util.List;
import com.zehong.system.domain.vo.HiddenTroubleVo;
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;
...@@ -41,7 +43,7 @@ public class THiddenTroubleController extends BaseController ...@@ -41,7 +43,7 @@ public class THiddenTroubleController extends BaseController
public TableDataInfo list(THiddenTrouble tHiddenTrouble) public TableDataInfo list(THiddenTrouble tHiddenTrouble)
{ {
startPage(); startPage();
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble); List<HiddenTroubleVo> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
return getDataTable(list); return getDataTable(list);
} }
...@@ -53,7 +55,7 @@ public class THiddenTroubleController extends BaseController ...@@ -53,7 +55,7 @@ public class THiddenTroubleController extends BaseController
@GetMapping("/getMapHiddenTroublelist") @GetMapping("/getMapHiddenTroublelist")
public AjaxResult getMapHiddenTroublelist(THiddenTrouble tHiddenTrouble) public AjaxResult getMapHiddenTroublelist(THiddenTrouble tHiddenTrouble)
{ {
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble); List<HiddenTroubleVo> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
...@@ -66,8 +68,8 @@ public class THiddenTroubleController extends BaseController ...@@ -66,8 +68,8 @@ public class THiddenTroubleController extends BaseController
public AjaxResult export(THiddenTrouble tHiddenTrouble) public AjaxResult export(THiddenTrouble tHiddenTrouble)
{ {
tHiddenTrouble.setDealStatus("3"); tHiddenTrouble.setDealStatus("3");
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble); List<HiddenTroubleVo> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
ExcelUtil<THiddenTrouble> util = new ExcelUtil<THiddenTrouble>(THiddenTrouble.class); ExcelUtil<HiddenTroubleVo> util = new ExcelUtil<HiddenTroubleVo>(HiddenTroubleVo.class);
return util.exportExcel(list, "隐患信息数据"); return util.exportExcel(list, "隐患信息数据");
} }
...@@ -76,9 +78,16 @@ public class THiddenTroubleController extends BaseController ...@@ -76,9 +78,16 @@ public class THiddenTroubleController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:query')") @PreAuthorize("@ss.hasPermi('riskManagement:hiddenTrouble:query')")
@GetMapping(value = "/{troubleId}") @GetMapping(value = "/{troubleId}")
public AjaxResult getInfo(@PathVariable("troubleId") int troubleId) public AjaxResult getInfo(@PathVariable("troubleId") int troubleId) throws Exception
{ {
return AjaxResult.success(tHiddenTroubleService.selectTHiddenTroubleById(troubleId)); HiddenTroubleVo hiddenTroubleVo = null;
try {
hiddenTroubleVo = tHiddenTroubleService.selectTHiddenTroubleById(troubleId);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("获取隐患信息详情失败");
}
return AjaxResult.success(hiddenTroubleVo);
} }
/** /**
......
...@@ -67,6 +67,18 @@ public class SysUserController extends BaseController ...@@ -67,6 +67,18 @@ public class SysUserController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 获取用户列表不分页
*/
@PreAuthorize("@ss.hasPermi('system:user:allList')")
@GetMapping("/allList")
public AjaxResult allList()
{
SysUser user = new SysUser();
List<SysUser> list = userService.selectUserList(user);
return AjaxResult.success(list);
}
/** /**
* 获取巡检员列表 * 获取巡检员列表
*/ */
......
...@@ -10,7 +10,7 @@ import com.zehong.common.core.domain.BaseEntity; ...@@ -10,7 +10,7 @@ import com.zehong.common.core.domain.BaseEntity;
* 隐患信息对象 t_hidden_trouble * 隐患信息对象 t_hidden_trouble
* *
* @author zehong * @author zehong
* @date 2021-07-21 * @date 2021-08-20
*/ */
public class THiddenTrouble extends BaseEntity public class THiddenTrouble extends BaseEntity
{ {
...@@ -19,20 +19,29 @@ public class THiddenTrouble extends BaseEntity ...@@ -19,20 +19,29 @@ public class THiddenTrouble extends BaseEntity
/** 隐患信息id */ /** 隐患信息id */
private Integer troubleId; private Integer troubleId;
/** 设备id */ /** 隐患类型 */
@Excel(name = "设备id") @Excel(name = "隐患类型")
private Integer deviceId; private String troubleType;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */ /** 隐患名称 */
private String deviceType; @Excel(name = "隐患名称")
private String troubleName;
/** 隐患级别 */
@Excel(name = "隐患级别")
private String troubleLevel;
/** 工单id */ /** 工单id */
@Excel(name = "工单id") @Excel(name = "工单id")
private String orderId; private String orderId;
/** 地址 */ /** 设备id */
@Excel(name = "地址") @Excel(name = "设备id")
private String address; private Integer deviceId;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
@Excel(name = "设备类型", readConverterExp = "0=管道,1调压阀,2阀门井,3流量计,4压力表")
private String deviceType;
/** 经度 */ /** 经度 */
@Excel(name = "经度") @Excel(name = "经度")
...@@ -42,14 +51,30 @@ public class THiddenTrouble extends BaseEntity ...@@ -42,14 +51,30 @@ public class THiddenTrouble extends BaseEntity
@Excel(name = "纬度") @Excel(name = "纬度")
private BigDecimal latitude; private BigDecimal latitude;
/** 是否作废(0正常,1作废) */
@Excel(name = "是否作废(0正常,1作废)")
private String isDel;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */ /** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel(name = "处理状态", readConverterExp = "1不需处理,2已处理完成,3未处理完成") @Excel(name = "处理状态", readConverterExp = "1不需处理,2已处理完成,3未处理完成")
private String dealStatus; private String dealStatus;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
/** 图片地址 */
@Excel(name = "图片地址")
private String pictureUrl;
/** 上报人(用户id) */
@Excel(name = "上报人", readConverterExp = "用户id")
private Long reportMan;
public void setTroubleId(Integer troubleId) public void setTroubleId(Integer troubleId)
{ {
this.troubleId = troubleId; this.troubleId = troubleId;
...@@ -59,6 +84,24 @@ public class THiddenTrouble extends BaseEntity ...@@ -59,6 +84,24 @@ public class THiddenTrouble extends BaseEntity
{ {
return troubleId; return troubleId;
} }
public String getTroubleName() {
return troubleName;
}
public void setTroubleName(String troubleName) {
this.troubleName = troubleName;
}
public void setTroubleType(String troubleType)
{
this.troubleType = troubleType;
}
public String getTroubleType()
{
return troubleType;
}
public void setDeviceId(Integer deviceId) public void setDeviceId(Integer deviceId)
{ {
this.deviceId = deviceId; this.deviceId = deviceId;
...@@ -68,15 +111,15 @@ public class THiddenTrouble extends BaseEntity ...@@ -68,15 +111,15 @@ public class THiddenTrouble extends BaseEntity
{ {
return deviceId; return deviceId;
} }
public void setTroubleLevel(String troubleLevel)
public String getDeviceType() { {
return deviceType; this.troubleLevel = troubleLevel;
} }
public void setDeviceType(String deviceType) { public String getTroubleLevel()
this.deviceType = deviceType; {
return troubleLevel;
} }
public void setOrderId(String orderId) public void setOrderId(String orderId)
{ {
this.orderId = orderId; this.orderId = orderId;
...@@ -86,15 +129,6 @@ public class THiddenTrouble extends BaseEntity ...@@ -86,15 +129,6 @@ public class THiddenTrouble extends BaseEntity
{ {
return orderId; return orderId;
} }
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public void setLongitude(BigDecimal longitude) public void setLongitude(BigDecimal longitude)
{ {
this.longitude = longitude; this.longitude = longitude;
...@@ -104,6 +138,15 @@ public class THiddenTrouble extends BaseEntity ...@@ -104,6 +138,15 @@ public class THiddenTrouble extends BaseEntity
{ {
return longitude; return longitude;
} }
public void setDeviceType(String deviceType)
{
this.deviceType = deviceType;
}
public String getDeviceType()
{
return deviceType;
}
public void setLatitude(BigDecimal latitude) public void setLatitude(BigDecimal latitude)
{ {
this.latitude = latitude; this.latitude = latitude;
...@@ -114,6 +157,14 @@ public class THiddenTrouble extends BaseEntity ...@@ -114,6 +157,14 @@ public class THiddenTrouble extends BaseEntity
return latitude; return latitude;
} }
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setDealStatus(String dealStatus) public void setDealStatus(String dealStatus)
{ {
this.dealStatus = dealStatus; this.dealStatus = dealStatus;
...@@ -123,6 +174,15 @@ public class THiddenTrouble extends BaseEntity ...@@ -123,6 +174,15 @@ public class THiddenTrouble extends BaseEntity
{ {
return dealStatus; return dealStatus;
} }
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setRemarks(String remarks) public void setRemarks(String remarks)
{ {
this.remarks = remarks; this.remarks = remarks;
...@@ -132,21 +192,43 @@ public class THiddenTrouble extends BaseEntity ...@@ -132,21 +192,43 @@ public class THiddenTrouble extends BaseEntity
{ {
return remarks; return remarks;
} }
public void setPictureUrl(String pictureUrl)
{
this.pictureUrl = pictureUrl;
}
public String getPictureUrl()
{
return pictureUrl;
}
public void setReportMan(Long reportMan)
{
this.reportMan = reportMan;
}
public Long getReportMan()
{
return reportMan;
}
@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("troubleId", getTroubleId()) .append("troubleId", getTroubleId())
.append("troubleType", getTroubleType())
.append("deviceId", getDeviceId()) .append("deviceId", getDeviceId())
.append("deviceType", getDeviceType()) .append("troubleLevel", getTroubleLevel())
.append("orderId", getOrderId()) .append("orderId", getOrderId())
.append("address", getAddress())
.append("longitude", getLongitude()) .append("longitude", getLongitude())
.append("deviceType", getDeviceType())
.append("latitude", getLatitude()) .append("latitude", getLatitude())
.append("dealStatus", getDealStatus()) .append("dealStatus", getDealStatus())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("address", getAddress())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("remarks", getRemarks()) .append("remarks", getRemarks())
.append("pictureUrl", getPictureUrl())
.append("reportMan", getReportMan())
.toString(); .toString();
} }
} }
package com.zehong.system.domain.vo;
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.math.BigDecimal;
/**
* 隐患信息对象 t_hidden_trouble
*
* @author zehong
* @date 2021-08-20
*/
public class HiddenTroubleVo extends BaseEntity
{
/** 隐患信息id */
private Integer troubleId;
/** 隐患类型 */
@Excel(name = "隐患类型")
private String troubleType;
/** 隐患名称 */
@Excel(name = "隐患名称")
private String troubleName;
/** 隐患级别 */
@Excel(name = "隐患级别")
private String troubleLevel;
/** 工单id */
@Excel(name = "工单id")
private String orderId;
/** 设备id */
@Excel(name = "设备id")
private Integer deviceId;
/** 设备类型(0管道,1调压阀,2阀门井,3流量计,4压力表) */
@Excel(name = "设备类型", readConverterExp = "0=管道,1调压阀,2阀门井,3流量计,4压力表")
private String deviceType;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 是否作废(0正常,1作废) */
@Excel(name = "是否作废(0正常,1作废)")
private String isDel;
/** 处理状态(1不需处理,2已处理完成,3未处理完成) */
@Excel(name = "处理状态", readConverterExp = "1不需处理,2已处理完成,3未处理完成")
private String dealStatus;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 备注 */
@Excel(name = "备注")
private String remarks;
/** 图片地址 */
@Excel(name = "图片地址")
private String pictureUrl;
/** 上报人(用户id) */
private Long reportMan;
/** 上报人姓名 */
@Excel(name = "上报人姓名", readConverterExp = "上报人姓名")
private String reportManName;
public void setTroubleId(Integer troubleId)
{
this.troubleId = troubleId;
}
public Integer getTroubleId()
{
return troubleId;
}
public String getTroubleName() {
return troubleName;
}
public void setTroubleName(String troubleName) {
this.troubleName = troubleName;
}
public void setTroubleType(String troubleType)
{
this.troubleType = troubleType;
}
public String getTroubleType()
{
return troubleType;
}
public void setDeviceId(Integer deviceId)
{
this.deviceId = deviceId;
}
public Integer getDeviceId()
{
return deviceId;
}
public void setTroubleLevel(String troubleLevel)
{
this.troubleLevel = troubleLevel;
}
public String getTroubleLevel()
{
return troubleLevel;
}
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 setDeviceType(String deviceType)
{
this.deviceType = deviceType;
}
public String getDeviceType()
{
return deviceType;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setDealStatus(String dealStatus)
{
this.dealStatus = dealStatus;
}
public String getDealStatus()
{
return dealStatus;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
public void setPictureUrl(String pictureUrl)
{
this.pictureUrl = pictureUrl;
}
public String getPictureUrl()
{
return pictureUrl;
}
public void setReportMan(Long reportMan)
{
this.reportMan = reportMan;
}
public Long getReportMan()
{
return reportMan;
}
public String getReportManName() {
return reportManName;
}
public void setReportManName(String reportManName) {
this.reportManName = reportManName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("troubleId", getTroubleId())
.append("troubleType", getTroubleType())
.append("deviceId", getDeviceId())
.append("troubleLevel", getTroubleLevel())
.append("orderId", getOrderId())
.append("longitude", getLongitude())
.append("deviceType", getDeviceType())
.append("latitude", getLatitude())
.append("dealStatus", getDealStatus())
.append("updateTime", getUpdateTime())
.append("address", getAddress())
.append("createTime", getCreateTime())
.append("remarks", getRemarks())
.append("pictureUrl", getPictureUrl())
.append("reportMan", getReportMan())
.toString();
}
}
...@@ -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.THiddenTrouble; import com.zehong.system.domain.THiddenTrouble;
import com.zehong.system.domain.vo.HiddenTroubleVo;
/** /**
* 隐患信息Service接口 * 隐患信息Service接口
...@@ -17,7 +18,7 @@ public interface ITHiddenTroubleService ...@@ -17,7 +18,7 @@ public interface ITHiddenTroubleService
* @param troubleId 隐患信息ID * @param troubleId 隐患信息ID
* @return 隐患信息 * @return 隐患信息
*/ */
public THiddenTrouble selectTHiddenTroubleById(int troubleId); public HiddenTroubleVo selectTHiddenTroubleById(int troubleId) throws Exception;
/** /**
* 查询隐患信息列表 * 查询隐患信息列表
...@@ -25,7 +26,7 @@ public interface ITHiddenTroubleService ...@@ -25,7 +26,7 @@ public interface ITHiddenTroubleService
* @param tHiddenTrouble 隐患信息 * @param tHiddenTrouble 隐患信息
* @return 隐患信息集合 * @return 隐患信息集合
*/ */
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble); public List<HiddenTroubleVo> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble);
/** /**
* 新增隐患信息 * 新增隐患信息
......
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.system.domain.TDeviceInfo;
import com.zehong.system.domain.TPipe;
import com.zehong.system.domain.vo.HiddenTroubleVo;
import com.zehong.system.mapper.SysUserMapper;
import com.zehong.system.mapper.TDeviceInfoMapper;
import com.zehong.system.mapper.TPipeMapper;
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.THiddenTroubleMapper; import com.zehong.system.mapper.THiddenTroubleMapper;
...@@ -19,6 +29,12 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService ...@@ -19,6 +29,12 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
{ {
@Autowired @Autowired
private THiddenTroubleMapper tHiddenTroubleMapper; private THiddenTroubleMapper tHiddenTroubleMapper;
@Autowired
private TDeviceInfoMapper tDeviceInfoMapper;
@Autowired
private TPipeMapper tPipeMapper;
@Autowired
private SysUserMapper sysUserMapper;
/** /**
* 查询隐患信息 * 查询隐患信息
...@@ -27,9 +43,22 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService ...@@ -27,9 +43,22 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息 * @return 隐患信息
*/ */
@Override @Override
public THiddenTrouble selectTHiddenTroubleById(int troubleId) public HiddenTroubleVo selectTHiddenTroubleById(int troubleId)
{ {
return tHiddenTroubleMapper.selectTHiddenTroubleById(troubleId); HiddenTroubleVo hiddenTroubleVo = new HiddenTroubleVo();
THiddenTrouble tHiddenTrouble = tHiddenTroubleMapper.selectTHiddenTroubleById(troubleId);
BeanUtils.copyProperties(tHiddenTrouble, hiddenTroubleVo);
if(tHiddenTrouble.getDeviceId() != null){
if("0".equals(tHiddenTrouble.getDeviceType())){
TPipe pipe = tPipeMapper.selectTPipeById(tHiddenTrouble.getDeviceId());
hiddenTroubleVo.setDeviceName(pipe.getPipeName());
} else {
TDeviceInfo device = tDeviceInfoMapper.selectTDeviceInfoById(tHiddenTrouble.getDeviceId());
hiddenTroubleVo.setDeviceName(device.getDeviceName());
}
}
return hiddenTroubleVo;
} }
/** /**
...@@ -39,9 +68,23 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService ...@@ -39,9 +68,23 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
* @return 隐患信息 * @return 隐患信息
*/ */
@Override @Override
public List<THiddenTrouble> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble) public List<HiddenTroubleVo> selectTHiddenTroubleList(THiddenTrouble tHiddenTrouble)
{ {
return tHiddenTroubleMapper.selectTHiddenTroubleList(tHiddenTrouble); List<HiddenTroubleVo> list = new ArrayList<>();
List<THiddenTrouble> tHiddenTroubleList = tHiddenTroubleMapper.selectTHiddenTroubleList(tHiddenTrouble);
if(tHiddenTroubleList.size() != 0) {
for (THiddenTrouble trouble : tHiddenTroubleList) {
HiddenTroubleVo hiddenTroubleVo = new HiddenTroubleVo();
BeanUtils.copyProperties(trouble, hiddenTroubleVo);
SysUser sysUser = sysUserMapper.selectUserById(trouble.getReportMan());
hiddenTroubleVo.setReportManName(sysUser.getNickName());
list.add(hiddenTroubleVo);
}
}
return list;
} }
/** /**
......
...@@ -6,32 +6,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -6,32 +6,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="THiddenTrouble" id="THiddenTroubleResult"> <resultMap type="THiddenTrouble" id="THiddenTroubleResult">
<result property="troubleId" column="trouble_id" /> <result property="troubleId" column="trouble_id" />
<result property="troubleName" column="trouble_name" />
<result property="troubleType" column="trouble_type" />
<result property="deviceId" column="device_id" /> <result property="deviceId" column="device_id" />
<result property="deviceType" column="device_type" /> <result property="troubleLevel" column="trouble_level" />
<result property="orderId" column="order_id" /> <result property="orderId" column="order_id" />
<result property="address" column="address" />
<result property="longitude" column="longitude" /> <result property="longitude" column="longitude" />
<result property="deviceType" column="device_type" />
<result property="latitude" column="latitude" /> <result property="latitude" column="latitude" />
<result property="isDel" column="is_del" />
<result property="dealStatus" column="deal_status" /> <result property="dealStatus" column="deal_status" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="address" column="address" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="pictureUrl" column="picture_url" />
<result property="reportMan" column="report_man" />
</resultMap> </resultMap>
<sql id="selectTHiddenTroubleVo"> <sql id="selectTHiddenTroubleVo">
select trouble_id, device_id, device_type, order_id, address, longitude, latitude, deal_status, update_time, create_time, remarks from t_hidden_trouble select trouble_id, trouble_name, trouble_type, device_id, trouble_level, order_id, longitude, device_type, latitude, is_del, deal_status, update_time, address, create_time, remarks, picture_url, report_man from t_hidden_trouble
</sql> </sql>
<select id="selectTHiddenTroubleList" parameterType="THiddenTrouble" resultMap="THiddenTroubleResult"> <select id="selectTHiddenTroubleList" parameterType="THiddenTrouble" resultMap="THiddenTroubleResult">
<include refid="selectTHiddenTroubleVo"/> <include refid="selectTHiddenTroubleVo"/>
<where> <where>
and is_del = '0'
<if test="troubleName != null and troubleName != ''"> and trouble_name like concat('%', #{troubleName}, '%')</if>
<if test="troubleType != null and troubleType != ''"> and trouble_type = #{troubleType}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if> <if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="deviceType != null "> and device_type = #{deviceType}</if> <if test="troubleLevel != null and troubleLevel != ''"> and trouble_level = #{troubleLevel}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if> <if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="longitude != null "> and longitude = #{longitude}</if> <if test="longitude != null "> and longitude = #{longitude}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="latitude != null "> and latitude = #{latitude}</if> <if test="latitude != null "> and latitude = #{latitude}</if>
<if test="dealStatus != null and dealStatus != ''"> and deal_status = #{dealStatus}</if> <if test="dealStatus != null and dealStatus != ''"> and deal_status = #{dealStatus}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="reportMan != null "> and report_man = #{reportMan}</if>
</where> </where>
</select> </select>
...@@ -43,44 +56,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -43,44 +56,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertTHiddenTrouble" parameterType="THiddenTrouble" useGeneratedKeys="true" keyProperty="troubleId"> <insert id="insertTHiddenTrouble" parameterType="THiddenTrouble" useGeneratedKeys="true" keyProperty="troubleId">
insert into t_hidden_trouble insert into t_hidden_trouble
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="troubleName != null">trouble_name,</if>
<if test="troubleType != null">trouble_type,</if>
<if test="deviceId != null">device_id,</if> <if test="deviceId != null">device_id,</if>
<if test="deviceType != null">device_type,</if> <if test="troubleLevel != null">trouble_level,</if>
<if test="orderId != null">order_id,</if> <if test="orderId != null">order_id,</if>
<if test="address != null">address,</if>
<if test="longitude != null">longitude,</if> <if test="longitude != null">longitude,</if>
<if test="deviceType != null">device_type,</if>
<if test="latitude != null">latitude,</if> <if test="latitude != null">latitude,</if>
<if test="dealStatus != null">deal_status,</if> <if test="dealStatus != null">deal_status,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="address != null">address,</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>
<if test="pictureUrl != null">picture_url,</if>
<if test="reportMan != null">report_man,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="troubleName != null">#{troubleName},</if>
<if test="troubleType != null">#{troubleType},</if>
<if test="deviceId != null">#{deviceId},</if> <if test="deviceId != null">#{deviceId},</if>
<if test="deviceType != null">#{deviceType},</if> <if test="troubleLevel != null">#{troubleLevel},</if>
<if test="orderId != null">#{orderId},</if> <if test="orderId != null">#{orderId},</if>
<if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if> <if test="longitude != null">#{longitude},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="latitude != null">#{latitude},</if> <if test="latitude != null">#{latitude},</if>
<if test="dealStatus != null">#{dealStatus},</if> <if test="dealStatus != null">#{dealStatus},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="address != null">#{address},</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>
<if test="pictureUrl != null">#{pictureUrl},</if>
<if test="reportMan != null">#{reportMan},</if>
</trim> </trim>
</insert> </insert>
<update id="updateTHiddenTrouble" parameterType="THiddenTrouble"> <update id="updateTHiddenTrouble" parameterType="THiddenTrouble">
update t_hidden_trouble update t_hidden_trouble
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="troubleName != null">trouble_name = #{troubleName},</if>
<if test="troubleType != null">trouble_type = #{troubleType},</if>
<if test="deviceId != null">device_id = #{deviceId},</if> <if test="deviceId != null">device_id = #{deviceId},</if>
<if test="deviceType != null">device_id = #{deviceType},</if> <if test="troubleLevel != null">trouble_level = #{troubleLevel},</if>
<if test="orderId != null">order_id = #{orderId},</if> <if test="orderId != null">order_id = #{orderId},</if>
<if test="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</if> <if test="longitude != null">longitude = #{longitude},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="latitude != null">latitude = #{latitude},</if> <if test="latitude != null">latitude = #{latitude},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="dealStatus != null">deal_status = #{dealStatus},</if> <if test="dealStatus != null">deal_status = #{dealStatus},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="address != null">address = #{address},</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>
<if test="pictureUrl != null">picture_url = #{pictureUrl},</if>
<if test="reportMan != null">report_man = #{reportMan},</if>
</trim> </trim>
where trouble_id = #{troubleId} where trouble_id = #{troubleId}
</update> </update>
......
...@@ -10,6 +10,14 @@ export function listUser(query) { ...@@ -10,6 +10,14 @@ export function listUser(query) {
}) })
} }
// 查询用户列表
export function allListUser() {
return request({
url: '/system/user/allList',
method: 'get',
})
}
// 查询巡检员列表 // 查询巡检员列表
export function inspectorList(query) { export function inspectorList(query) {
return request({ return request({
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<span v-if="scope.row.planStatus == 3">已完成</span> <span v-if="scope.row.planStatus == 3">已完成</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="normal" size="normal"
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
<el-input v-model="form2.orderName" placeholder="请输入工单名称" /> <el-input v-model="form2.orderName" placeholder="请输入工单名称" />
</el-form-item> </el-form-item>
<el-form-item label="指定执行人员" prop="appointInspector"> <el-form-item label="指定执行人员" prop="appointInspector">
<el-select v-model="form2.appointInspector" placeholder="请选择执行人员" clearable size="small" @change="setUserId"> <el-select v-model="form2.appointInspector" placeholder="请选择执行人员" clearable size="small" >
<el-option <el-option
v-for="item in inspector" v-for="item in inspector"
:key="item.userId" :key="item.userId"
...@@ -230,7 +230,6 @@ ...@@ -230,7 +230,6 @@
level: "level", level: "level",
children: "childList", children: "childList",
}, },
devices: null,
// 巡检员列表 // 巡检员列表
inspector: [], inspector: [],
// 弹出层标题 // 弹出层标题
...@@ -259,10 +258,10 @@ ...@@ -259,10 +258,10 @@
// 表单校验 // 表单校验
rules: { rules: {
planName: [ planName: [
{ required: true, message: " 计划名称不能为空", trigger: "blur" } { required: true, message: "请输入计划名称", trigger: "blur" }
], ],
orderName: [ orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" } { required: true, message: "请输入工单名称", trigger: "blur" }
], ],
devices: [ devices: [
{ required: true, message: "请选择巡检设备", trigger: "blur" } { required: true, message: "请选择巡检设备", trigger: "blur" }
...@@ -287,8 +286,7 @@ ...@@ -287,8 +286,7 @@
}, },
methods: { methods: {
handleChange(value) { handleChange(value) {
// this.devices = value; console.log(this.form1.devices);
console.log(this.form.devices);
}, },
/** 查询巡检计划列表 */ /** 查询巡检计划列表 */
getList() { getList() {
...@@ -315,9 +313,6 @@ ...@@ -315,9 +313,6 @@
this.loading = false; this.loading = false;
}); });
}, },
setUserId(val){
this.form.appointInspector = val;
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open1 = false; this.open1 = false;
...@@ -337,7 +332,6 @@ ...@@ -337,7 +332,6 @@
createTime: null, createTime: null,
remarks: null remarks: null
}; };
this.devices = null;
this.resetForm("form1"); this.resetForm("form1");
this.form2 = { this.form2 = {
planId: null, planId: null,
...@@ -376,7 +370,7 @@ ...@@ -376,7 +370,7 @@
deviceNodeTree().then(response => { deviceNodeTree().then(response => {
this.options = response.data; this.options = response.data;
this.open1 = true; this.open1 = true;
this.title1 = "添加巡检计划"; this.title1 = "新增巡检计划";
}); });
}, },
/** 下发按钮操作 */ /** 下发按钮操作 */
...@@ -386,8 +380,6 @@ ...@@ -386,8 +380,6 @@
const planId = row.planId || this.ids const planId = row.planId || this.ids
getInspectionPlan(planId).then(response => { getInspectionPlan(planId).then(response => {
this.form2 = response.data; this.form2 = response.data;
this.plansName = this.form2.planName;
this.form2.remarks = "";
this.open2 = true; this.open2 = true;
this.title2 = "填写工单信息"; this.title2 = "填写工单信息";
}); });
......
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