Commit 964e3907 authored by 耿迪迪's avatar 耿迪迪

任务反馈 隐患信息添加 gengdidi

parent 859bfd69
package com.zehong.web.controller.operationMonitor;
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.THiddenTroubleInfo;
import com.zehong.system.service.ITHiddenTroubleInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 燃气隐患Controller
*
* @author zehong
* @date 2022-03-24
*/
@RestController
@RequestMapping("/system/info")
public class THiddenTroubleInfoController extends BaseController
{
@Autowired
private ITHiddenTroubleInfoService tHiddenTroubleInfoService;
/**
* 查询燃气隐患列表
*/
@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(THiddenTroubleInfo tHiddenTroubleInfo)
{
startPage();
List<THiddenTroubleInfo> list = tHiddenTroubleInfoService.selectTHiddenTroubleInfoList(tHiddenTroubleInfo);
return getDataTable(list);
}
@GetMapping("/hiddenTroubleList")
public AjaxResult hiddenTroubleList(THiddenTroubleInfo tHiddenTroubleInfo){
return AjaxResult.success(tHiddenTroubleInfoService.selectTHiddenTroubleInfoList(tHiddenTroubleInfo));
}
/**
* 导出燃气隐患列表
*/
@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "燃气隐患", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(THiddenTroubleInfo tHiddenTroubleInfo)
{
List<THiddenTroubleInfo> list = tHiddenTroubleInfoService.selectTHiddenTroubleInfoList(tHiddenTroubleInfo);
ExcelUtil<THiddenTroubleInfo> util = new ExcelUtil<THiddenTroubleInfo>(THiddenTroubleInfo.class);
return util.exportExcel(list, "燃气隐患数据");
}
/**
* 获取燃气隐患详细信息
*/
@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{hiddenTroubleId}")
public AjaxResult getInfo(@PathVariable("hiddenTroubleId") Long hiddenTroubleId)
{
return AjaxResult.success(tHiddenTroubleInfoService.selectTHiddenTroubleInfoById(hiddenTroubleId));
}
/**
* 新增燃气隐患
*/
@PreAuthorize("@ss.hasPermi('system:info:add')")
@Log(title = "燃气隐患", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo)
{
return toAjax(tHiddenTroubleInfoService.insertTHiddenTroubleInfo(tHiddenTroubleInfo));
}
/**
* 修改燃气隐患
*/
@PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "燃气隐患", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody THiddenTroubleInfo tHiddenTroubleInfo)
{
return toAjax(tHiddenTroubleInfoService.updateTHiddenTroubleInfo(tHiddenTroubleInfo));
}
/**
* 删除燃气隐患
*/
@PreAuthorize("@ss.hasPermi('system:info:remove')")
@Log(title = "燃气隐患", businessType = BusinessType.DELETE)
@DeleteMapping("/{hiddenTroubleIds}")
public AjaxResult remove(@PathVariable Long[] hiddenTroubleIds)
{
return toAjax(tHiddenTroubleInfoService.deleteTHiddenTroubleInfoByIds(hiddenTroubleIds));
}
}
package com.zehong.web.controller.operationMonitor; package com.zehong.web.controller.operationMonitor;
import java.util.List;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.SysPost;
import com.zehong.system.service.ISysPostService;
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.domain.entity.SysUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType; import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.SysPost;
import com.zehong.system.domain.THiddenTroubleInfo;
import com.zehong.system.domain.TWorkOrder; import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.service.ISysPostService;
import com.zehong.system.service.ITHiddenTroubleInfoService;
import com.zehong.system.service.ITWorkOrderService; import com.zehong.system.service.ITWorkOrderService;
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.Collections;
import java.util.List;
/** /**
* 燃气任务Controller * 燃气任务Controller
...@@ -42,6 +37,9 @@ public class TWorkOrderController extends BaseController ...@@ -42,6 +37,9 @@ public class TWorkOrderController extends BaseController
@Autowired @Autowired
private ISysPostService iSysPostService; private ISysPostService iSysPostService;
@Autowired
private ITHiddenTroubleInfoService troubleInfoService;
/** /**
* 查询燃气任务列表 * 查询燃气任务列表
*/ */
...@@ -120,7 +118,13 @@ public class TWorkOrderController extends BaseController ...@@ -120,7 +118,13 @@ public class TWorkOrderController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TWorkOrder tWorkOrder) public AjaxResult edit(@RequestBody TWorkOrder tWorkOrder)
{ {
return toAjax(tWorkOrderService.updateTWorkOrder(tWorkOrder)); int edit = tWorkOrderService.updateTWorkOrder(tWorkOrder);
if(1 == edit && null != tWorkOrder.getHiddenList() && !tWorkOrder.getHiddenList().isEmpty()){
for(THiddenTroubleInfo tHiddenTroubleInfo : tWorkOrder.getHiddenList()){
troubleInfoService.insertTHiddenTroubleInfo(tHiddenTroubleInfo);
}
}
return AjaxResult.success();
} }
/** /**
......
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 燃气隐患对象 t_hidden_trouble_info
*
* @author zehong
* @date 2022-03-24
*/
public class THiddenTroubleInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 隐患id */
private Long hiddenTroubleId;
/** 巡检任务id */
@Excel(name = "巡检任务id")
private Long workId;
/** 隐患名称 */
@Excel(name = "隐患名称")
private String hiddenTroubleName;
/** 隐患等级: 1.I级 2.II级 3.III级 */
@Excel(name = "隐患等级: 1.I级 2.II级 3.III级")
private String hiddenTroubleLevel;
/** 隐患类型: 1.漏气 2.腐蚀 3.裂缝 4.设备故障 5.安全距离不足 6.管道承重 7.其他 */
@Excel(name = "隐患类型: 1.漏气 2.腐蚀 3.裂缝 4.设备故障 5.安全距离不足 6.管道承重 7.其他")
private String hiddenTroubleType;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 图片地址 */
@Excel(name = "图片地址")
private String pictureUrl;
/** 隐患描述 */
@Excel(name = "隐患描述")
private String hiddenTroubleDescribe;
/** 上报时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "上报时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date reportTime;
/** 上报人 */
@Excel(name = "上报人")
private String reportPerson;
/** 隐患处理状态: 1.待处理 2.处理中 3.已完成 */
@Excel(name = "隐患处理状态: 1.待处理 2.处理中 3.已完成")
private String hiddenTroubleDealStatus;
/** 隐患处理情况 */
@Excel(name = "隐患处理情况")
private String hiddenTroubleDealCondition;
/** 隐患处理完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "隐患处理完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date hiddenTroubleDealFinishTime;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setHiddenTroubleId(Long hiddenTroubleId)
{
this.hiddenTroubleId = hiddenTroubleId;
}
public Long getHiddenTroubleId()
{
return hiddenTroubleId;
}
public void setWorkId(Long workId)
{
this.workId = workId;
}
public Long getWorkId()
{
return workId;
}
public void setHiddenTroubleName(String hiddenTroubleName)
{
this.hiddenTroubleName = hiddenTroubleName;
}
public String getHiddenTroubleName()
{
return hiddenTroubleName;
}
public void setHiddenTroubleLevel(String hiddenTroubleLevel)
{
this.hiddenTroubleLevel = hiddenTroubleLevel;
}
public String getHiddenTroubleLevel()
{
return hiddenTroubleLevel;
}
public void setHiddenTroubleType(String hiddenTroubleType)
{
this.hiddenTroubleType = hiddenTroubleType;
}
public String getHiddenTroubleType()
{
return hiddenTroubleType;
}
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 setPictureUrl(String pictureUrl)
{
this.pictureUrl = pictureUrl;
}
public String getPictureUrl()
{
return pictureUrl;
}
public void setHiddenTroubleDescribe(String hiddenTroubleDescribe)
{
this.hiddenTroubleDescribe = hiddenTroubleDescribe;
}
public String getHiddenTroubleDescribe()
{
return hiddenTroubleDescribe;
}
public void setReportTime(Date reportTime)
{
this.reportTime = reportTime;
}
public Date getReportTime()
{
return reportTime;
}
public void setReportPerson(String reportPerson)
{
this.reportPerson = reportPerson;
}
public String getReportPerson()
{
return reportPerson;
}
public void setHiddenTroubleDealStatus(String hiddenTroubleDealStatus)
{
this.hiddenTroubleDealStatus = hiddenTroubleDealStatus;
}
public String getHiddenTroubleDealStatus()
{
return hiddenTroubleDealStatus;
}
public void setHiddenTroubleDealCondition(String hiddenTroubleDealCondition)
{
this.hiddenTroubleDealCondition = hiddenTroubleDealCondition;
}
public String getHiddenTroubleDealCondition()
{
return hiddenTroubleDealCondition;
}
public void setHiddenTroubleDealFinishTime(Date hiddenTroubleDealFinishTime)
{
this.hiddenTroubleDealFinishTime = hiddenTroubleDealFinishTime;
}
public Date getHiddenTroubleDealFinishTime()
{
return hiddenTroubleDealFinishTime;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("hiddenTroubleId", getHiddenTroubleId())
.append("workId", getWorkId())
.append("hiddenTroubleName", getHiddenTroubleName())
.append("hiddenTroubleLevel", getHiddenTroubleLevel())
.append("hiddenTroubleType", getHiddenTroubleType())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("pictureUrl", getPictureUrl())
.append("hiddenTroubleDescribe", getHiddenTroubleDescribe())
.append("reportTime", getReportTime())
.append("reportPerson", getReportPerson())
.append("hiddenTroubleDealStatus", getHiddenTroubleDealStatus())
.append("hiddenTroubleDealCondition", getHiddenTroubleDealCondition())
.append("hiddenTroubleDealFinishTime", getHiddenTroubleDealFinishTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain; package com.zehong.system.domain;
import java.util.Date; import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat; 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;
...@@ -106,7 +108,20 @@ public class TWorkOrder extends BaseEntity ...@@ -106,7 +108,20 @@ public class TWorkOrder extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
public void setWorkId(Long workId) /**
* 隐患信息
*/
private List<THiddenTroubleInfo> hiddenList;
public List<THiddenTroubleInfo> getHiddenList() {
return hiddenList;
}
public void setHiddenList(List<THiddenTroubleInfo> hiddenList) {
this.hiddenList = hiddenList;
}
public void setWorkId(Long workId)
{ {
this.workId = workId; this.workId = workId;
} }
......
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.THiddenTroubleInfo;
/**
* 燃气隐患Mapper接口
*
* @author zehong
* @date 2022-03-24
*/
public interface THiddenTroubleInfoMapper
{
/**
* 查询燃气隐患
*
* @param hiddenTroubleId 燃气隐患ID
* @return 燃气隐患
*/
public THiddenTroubleInfo selectTHiddenTroubleInfoById(Long hiddenTroubleId);
/**
* 查询燃气隐患列表
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 燃气隐患集合
*/
public List<THiddenTroubleInfo> selectTHiddenTroubleInfoList(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 新增燃气隐患
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 结果
*/
public int insertTHiddenTroubleInfo(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 修改燃气隐患
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 结果
*/
public int updateTHiddenTroubleInfo(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 删除燃气隐患
*
* @param hiddenTroubleId 燃气隐患ID
* @return 结果
*/
public int deleteTHiddenTroubleInfoById(Long hiddenTroubleId);
/**
* 批量删除燃气隐患
*
* @param hiddenTroubleIds 需要删除的数据ID
* @return 结果
*/
public int deleteTHiddenTroubleInfoByIds(Long[] hiddenTroubleIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.THiddenTroubleInfo;
/**
* 燃气隐患Service接口
*
* @author zehong
* @date 2022-03-24
*/
public interface ITHiddenTroubleInfoService
{
/**
* 查询燃气隐患
*
* @param hiddenTroubleId 燃气隐患ID
* @return 燃气隐患
*/
public THiddenTroubleInfo selectTHiddenTroubleInfoById(Long hiddenTroubleId);
/**
* 查询燃气隐患列表
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 燃气隐患集合
*/
public List<THiddenTroubleInfo> selectTHiddenTroubleInfoList(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 新增燃气隐患
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 结果
*/
public int insertTHiddenTroubleInfo(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 修改燃气隐患
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 结果
*/
public int updateTHiddenTroubleInfo(THiddenTroubleInfo tHiddenTroubleInfo);
/**
* 批量删除燃气隐患
*
* @param hiddenTroubleIds 需要删除的燃气隐患ID
* @return 结果
*/
public int deleteTHiddenTroubleInfoByIds(Long[] hiddenTroubleIds);
/**
* 删除燃气隐患信息
*
* @param hiddenTroubleId 燃气隐患ID
* @return 结果
*/
public int deleteTHiddenTroubleInfoById(Long hiddenTroubleId);
}
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.THiddenTroubleInfoMapper;
import com.zehong.system.domain.THiddenTroubleInfo;
import com.zehong.system.service.ITHiddenTroubleInfoService;
import org.springframework.transaction.annotation.Transactional;
/**
* 燃气隐患Service业务层处理
*
* @author zehong
* @date 2022-03-24
*/
@Service
public class THiddenTroubleInfoServiceImpl implements ITHiddenTroubleInfoService
{
@Autowired
private THiddenTroubleInfoMapper tHiddenTroubleInfoMapper;
/**
* 查询燃气隐患
*
* @param hiddenTroubleId 燃气隐患ID
* @return 燃气隐患
*/
@Override
public THiddenTroubleInfo selectTHiddenTroubleInfoById(Long hiddenTroubleId)
{
return tHiddenTroubleInfoMapper.selectTHiddenTroubleInfoById(hiddenTroubleId);
}
/**
* 查询燃气隐患列表
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 燃气隐患
*/
@Override
public List<THiddenTroubleInfo> selectTHiddenTroubleInfoList(THiddenTroubleInfo tHiddenTroubleInfo)
{
return tHiddenTroubleInfoMapper.selectTHiddenTroubleInfoList(tHiddenTroubleInfo);
}
/**
* 新增燃气隐患
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 结果
*/
@Override
@Transactional(rollbackFor= Exception.class)
public int insertTHiddenTroubleInfo(THiddenTroubleInfo tHiddenTroubleInfo)
{
return tHiddenTroubleInfoMapper.insertTHiddenTroubleInfo(tHiddenTroubleInfo);
}
/**
* 修改燃气隐患
*
* @param tHiddenTroubleInfo 燃气隐患
* @return 结果
*/
@Override
public int updateTHiddenTroubleInfo(THiddenTroubleInfo tHiddenTroubleInfo)
{
return tHiddenTroubleInfoMapper.updateTHiddenTroubleInfo(tHiddenTroubleInfo);
}
/**
* 批量删除燃气隐患
*
* @param hiddenTroubleIds 需要删除的燃气隐患ID
* @return 结果
*/
@Override
public int deleteTHiddenTroubleInfoByIds(Long[] hiddenTroubleIds)
{
return tHiddenTroubleInfoMapper.deleteTHiddenTroubleInfoByIds(hiddenTroubleIds);
}
/**
* 删除燃气隐患信息
*
* @param hiddenTroubleId 燃气隐患ID
* @return 结果
*/
@Override
public int deleteTHiddenTroubleInfoById(Long hiddenTroubleId)
{
return tHiddenTroubleInfoMapper.deleteTHiddenTroubleInfoById(hiddenTroubleId);
}
}
<?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.THiddenTroubleInfoMapper">
<resultMap type="THiddenTroubleInfo" id="THiddenTroubleInfoResult">
<result property="hiddenTroubleId" column="hidden_trouble_id" />
<result property="workId" column="work_id" />
<result property="hiddenTroubleName" column="hidden_trouble_name" />
<result property="hiddenTroubleLevel" column="hidden_trouble_level" />
<result property="hiddenTroubleType" column="hidden_trouble_type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="pictureUrl" column="picture_url" />
<result property="hiddenTroubleDescribe" column="hidden_trouble_describe" />
<result property="reportTime" column="report_time" />
<result property="reportPerson" column="report_person" />
<result property="hiddenTroubleDealStatus" column="hidden_trouble_deal_status" />
<result property="hiddenTroubleDealCondition" column="hidden_trouble_deal_condition" />
<result property="hiddenTroubleDealFinishTime" column="hidden_trouble_deal_finish_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTHiddenTroubleInfoVo">
select hidden_trouble_id, work_id, hidden_trouble_name, hidden_trouble_level, hidden_trouble_type, longitude, latitude, picture_url, hidden_trouble_describe, report_time, (select u.user_name from sys_user u where u.user_id = report_person) AS report_person, hidden_trouble_deal_status, hidden_trouble_deal_condition, hidden_trouble_deal_finish_time, is_del, remarks from t_hidden_trouble_info
</sql>
<select id="selectTHiddenTroubleInfoList" parameterType="THiddenTroubleInfo" resultMap="THiddenTroubleInfoResult">
<include refid="selectTHiddenTroubleInfoVo"/>
<where>
<if test="workId != null "> and work_id = #{workId}</if>
<if test="hiddenTroubleName != null and hiddenTroubleName != ''"> and hidden_trouble_name like concat('%', #{hiddenTroubleName}, '%')</if>
<if test="hiddenTroubleLevel != null and hiddenTroubleLevel != ''"> and hidden_trouble_level = #{hiddenTroubleLevel}</if>
<if test="hiddenTroubleType != null and hiddenTroubleType != ''"> and hidden_trouble_type = #{hiddenTroubleType}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="hiddenTroubleDescribe != null and hiddenTroubleDescribe != ''"> and hidden_trouble_describe = #{hiddenTroubleDescribe}</if>
<if test="reportTime != null "> and report_time = #{reportTime}</if>
<if test="reportPerson != null and reportPerson != ''"> and report_person = #{reportPerson}</if>
<if test="hiddenTroubleDealStatus != null and hiddenTroubleDealStatus != ''"> and hidden_trouble_deal_status = #{hiddenTroubleDealStatus}</if>
<if test="hiddenTroubleDealCondition != null and hiddenTroubleDealCondition != ''"> and hidden_trouble_deal_condition = #{hiddenTroubleDealCondition}</if>
<if test="hiddenTroubleDealFinishTime != null "> and hidden_trouble_deal_finish_time = #{hiddenTroubleDealFinishTime}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTHiddenTroubleInfoById" parameterType="Long" resultMap="THiddenTroubleInfoResult">
<include refid="selectTHiddenTroubleInfoVo"/>
where hidden_trouble_id = #{hiddenTroubleId}
</select>
<insert id="insertTHiddenTroubleInfo" parameterType="THiddenTroubleInfo" useGeneratedKeys="true" keyProperty="hiddenTroubleId">
insert into t_hidden_trouble_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workId != null">work_id,</if>
<if test="hiddenTroubleName != null">hidden_trouble_name,</if>
<if test="hiddenTroubleLevel != null">hidden_trouble_level,</if>
<if test="hiddenTroubleType != null">hidden_trouble_type,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="pictureUrl != null">picture_url,</if>
<if test="hiddenTroubleDescribe != null">hidden_trouble_describe,</if>
<if test="reportTime != null">report_time,</if>
<if test="reportPerson != null">report_person,</if>
<if test="hiddenTroubleDealStatus != null">hidden_trouble_deal_status,</if>
<if test="hiddenTroubleDealCondition != null">hidden_trouble_deal_condition,</if>
<if test="hiddenTroubleDealFinishTime != null">hidden_trouble_deal_finish_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workId != null">#{workId},</if>
<if test="hiddenTroubleName != null">#{hiddenTroubleName},</if>
<if test="hiddenTroubleLevel != null">#{hiddenTroubleLevel},</if>
<if test="hiddenTroubleType != null">#{hiddenTroubleType},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="pictureUrl != null">#{pictureUrl},</if>
<if test="hiddenTroubleDescribe != null">#{hiddenTroubleDescribe},</if>
<if test="reportTime != null">#{reportTime},</if>
<if test="reportPerson != null">#{reportPerson},</if>
<if test="hiddenTroubleDealStatus != null">#{hiddenTroubleDealStatus},</if>
<if test="hiddenTroubleDealCondition != null">#{hiddenTroubleDealCondition},</if>
<if test="hiddenTroubleDealFinishTime != null">#{hiddenTroubleDealFinishTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTHiddenTroubleInfo" parameterType="THiddenTroubleInfo">
update t_hidden_trouble_info
<trim prefix="SET" suffixOverrides=",">
<if test="workId != null">work_id = #{workId},</if>
<if test="hiddenTroubleName != null">hidden_trouble_name = #{hiddenTroubleName},</if>
<if test="hiddenTroubleLevel != null">hidden_trouble_level = #{hiddenTroubleLevel},</if>
<if test="hiddenTroubleType != null">hidden_trouble_type = #{hiddenTroubleType},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="pictureUrl != null">picture_url = #{pictureUrl},</if>
<if test="hiddenTroubleDescribe != null">hidden_trouble_describe = #{hiddenTroubleDescribe},</if>
<if test="reportTime != null">report_time = #{reportTime},</if>
<if test="reportPerson != null">report_person = #{reportPerson},</if>
<if test="hiddenTroubleDealStatus != null">hidden_trouble_deal_status = #{hiddenTroubleDealStatus},</if>
<if test="hiddenTroubleDealCondition != null">hidden_trouble_deal_condition = #{hiddenTroubleDealCondition},</if>
<if test="hiddenTroubleDealFinishTime != null">hidden_trouble_deal_finish_time = #{hiddenTroubleDealFinishTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where hidden_trouble_id = #{hiddenTroubleId}
</update>
<delete id="deleteTHiddenTroubleInfoById" parameterType="Long">
delete from t_hidden_trouble_info where hidden_trouble_id = #{hiddenTroubleId}
</delete>
<delete id="deleteTHiddenTroubleInfoByIds" parameterType="String">
delete from t_hidden_trouble_info where hidden_trouble_id in
<foreach item="hiddenTroubleId" collection="array" open="(" separator="," close=")">
#{hiddenTroubleId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询燃气隐患列表
export function listInfo(query) {
return request({
url: '/system/info/list',
method: 'get',
params: query
})
}
// 查询燃气隐患
export function hiddenTroubleList(query) {
return request({
url: '/system/info/hiddenTroubleList',
method: 'get',
params: query
})
}
// 查询燃气隐患详细
export function getInfo(hiddenTroubleId) {
return request({
url: '/system/info/' + hiddenTroubleId,
method: 'get'
})
}
// 新增燃气隐患
export function addInfo(data) {
return request({
url: '/system/info',
method: 'post',
data: data
})
}
// 修改燃气隐患
export function updateInfo(data) {
return request({
url: '/system/info',
method: 'put',
data: data
})
}
// 删除燃气隐患
export function delInfo(hiddenTroubleId) {
return request({
url: '/system/info/' + hiddenTroubleId,
method: 'delete'
})
}
// 导出燃气隐患
export function exportInfo(query) {
return request({
url: '/system/info/export',
method: 'get',
params: query
})
}
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="60%" width="60%"
:before-close="handleClose" :before-close="handleClose"
append-to-body
> >
<template v-if="inputVisible"> <template v-if="inputVisible">
<div class="search-wrapper pos"> <div class="search-wrapper pos">
......
...@@ -112,9 +112,7 @@ mounted(){ ...@@ -112,9 +112,7 @@ mounted(){
}else { }else {
params.companyRead=0 params.companyRead=0
} }
console.log(params)
listReceive(params).then(response => { listReceive(params).then(response => {
console.log("total==",response);
if(response.total!=0){ if(response.total!=0){
this.total= response.total; this.total= response.total;
}else{ }else{
......
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
v-model="form.inspectionDate" v-model="form.inspectionDate"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择巡检时间" style="width: 350px" :disabled="isDetail"> placeholder="选择巡检时间" style="width: 350px" :disabled="isDetail">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -271,6 +271,10 @@ ...@@ -271,6 +271,10 @@
<el-form-item label="反馈信息" prop="rectificationResult" v-show="isDetail && (form.workStatus =='2' || form.workStatus =='3')"> <el-form-item label="反馈信息" prop="rectificationResult" v-show="isDetail && (form.workStatus =='2' || form.workStatus =='3')">
<el-input v-model="form.rectificationResult" type="textarea" placeholder="请输入整改结果" :disabled="isDetail"/> <el-input v-model="form.rectificationResult" type="textarea" placeholder="请输入整改结果" :disabled="isDetail"/>
</el-form-item> </el-form-item>
<el-form-item label="隐患信息" prop="rectificationResult" v-show="isDetail && (form.workStatus =='2' || form.workStatus =='3')">
<HiddenTrouble
:hiddenList="hiddenInfoList"/>
</el-form-item>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="责任单位" prop="responsibleUnit"> <el-form-item label="责任单位" prop="responsibleUnit">
...@@ -353,7 +357,7 @@ ...@@ -353,7 +357,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 反馈 --> <!-- 反馈 -->
<el-dialog :title="title" :visible.sync="feedBookOpen" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="feedBookOpen" width="900px" append-to-body @close="cancelFeedBook">
<el-form ref="feedBookForm" :model="feedBookForm" :rules="feedBookRules" label-width="80px"> <el-form ref="feedBookForm" :model="feedBookForm" :rules="feedBookRules" label-width="80px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
...@@ -389,6 +393,12 @@ ...@@ -389,6 +393,12 @@
<el-form-item label="反馈信息" prop="rectificationResult"> <el-form-item label="反馈信息" prop="rectificationResult">
<el-input v-model="feedBookForm.rectificationResult" type="textarea" placeholder="反馈信息" /> <el-input v-model="feedBookForm.rectificationResult" type="textarea" placeholder="反馈信息" />
</el-form-item> </el-form-item>
<el-form-item label="隐患信息" prop="hiddenInfo">
<HiddenTrouble
:hiddenList="feedBookForm.hiddenList"
:workId="feedBookForm.workId"
:isView="false"/>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -401,17 +411,20 @@ ...@@ -401,17 +411,20 @@
<script> <script>
import { listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder } from "@/api/operationMonitor/order"; import { listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder } from "@/api/operationMonitor/order";
import { hiddenTroubleList } from "@/api/operationMonitor/hiddenTrouble"
import Editor from '@/components/Editor'; import Editor from '@/components/Editor';
import MyFileUpload from '@/components/MyFileUpload'; import MyFileUpload from '@/components/MyFileUpload';
import { enterpriseLists } from "@/api/regulation/info"; import { enterpriseLists } from "@/api/regulation/info";
import { getInspectionUsers } from "@/api/system/user"; import { getInspectionUsers } from "@/api/system/user";
import ScrollPane from "../../../layout/components/TagsView/ScrollPane"; import ScrollPane from "../../../layout/components/TagsView/ScrollPane";
import HiddenTrouble from "./components/HiddenTrouble";
export default { export default {
name: "Order", name: "Order",
components: { components: {
ScrollPane, ScrollPane,
Editor, Editor,
MyFileUpload MyFileUpload,
HiddenTrouble
}, },
data() { data() {
return { return {
...@@ -515,9 +528,13 @@ export default { ...@@ -515,9 +528,13 @@ export default {
workForm:{}, workForm:{},
workOpen: false, workOpen: false,
feedBookForm: { feedBookForm: {
iconUrl: "" iconUrl: "",
hiddenList:[]
}, },
feedBookOpen: false feedBookOpen: false,
//详情隐患信息
hiddenInfoList:[]
}; };
}, },
created() { created() {
...@@ -760,6 +777,11 @@ export default { ...@@ -760,6 +777,11 @@ export default {
this.open = true; this.open = true;
this.title = "燃气任务详情"; this.title = "燃气任务详情";
this.form = response.data; this.form = response.data;
if(this.form.workStatus == '2' || this.form.workStatus == '3'){
const param = {};
param.workId = this.form.workId;
this.getHiddenInfos(param);
}
this.getEnterpriseLists(); this.getEnterpriseLists();
this.getInspectionUserList(response.data.workAssignEnterproseId); this.getInspectionUserList(response.data.workAssignEnterproseId);
}); });
...@@ -887,7 +909,17 @@ export default { ...@@ -887,7 +909,17 @@ export default {
cancelFeedBook(){ cancelFeedBook(){
this.feedBookOpen = false; this.feedBookOpen = false;
this.feedBookForm = {}; this.feedBookForm = {};
this.fileList = [];
}, },
//获取隐患信息
getHiddenInfos(param){
hiddenTroubleList(param).then(res =>{
this.hiddenInfoList = res.data;
this.hiddenInfoList.forEach(item=>{
item.reportPersonName = item.reportPerson;
})
});
}
} }
}; };
</script> </script>
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