Commit 32050b4e authored by 耿迪迪's avatar 耿迪迪

检查项

parent 64e242fa
package com.zehong.web.controller.supervision;
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.TInsInsListInfor;
import com.zehong.system.service.ITInsInsListInforService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 监督检查-获取检查项Controller
*
* @author zehong
* @date 2024-05-17
*/
@RestController
@RequestMapping("/supervision/inspect")
public class TInsInsListInforController extends BaseController
{
@Autowired
private ITInsInsListInforService tInsInsListInforService;
/**
* 查询监督检查-获取检查项列表
*/
@PreAuthorize("@ss.hasPermi('supervision:inspect:list')")
@GetMapping("/list")
public TableDataInfo list(TInsInsListInfor tInsInsListInfor)
{
startPage();
List<TInsInsListInfor> list = tInsInsListInforService.selectTInsInsListInforList(tInsInsListInfor);
return getDataTable(list);
}
/**
* 导出监督检查-获取检查项列表
*/
@PreAuthorize("@ss.hasPermi('supervision:inspect:export')")
@Log(title = "监督检查-获取检查项", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInsInsListInfor tInsInsListInfor)
{
List<TInsInsListInfor> list = tInsInsListInforService.selectTInsInsListInforList(tInsInsListInfor);
ExcelUtil<TInsInsListInfor> util = new ExcelUtil<TInsInsListInfor>(TInsInsListInfor.class);
return util.exportExcel(list, "监督检查-获取检查项数据");
}
/**
* 获取监督检查-获取检查项详细信息
*/
@PreAuthorize("@ss.hasPermi('supervision:inspect:query')")
@GetMapping(value = "/{fInsInsListInforId}")
public AjaxResult getInfo(@PathVariable("fInsInsListInforId") Long fInsInsListInforId)
{
return AjaxResult.success(tInsInsListInforService.selectTInsInsListInforById(fInsInsListInforId));
}
/**
* 新增监督检查-获取检查项
*/
@PreAuthorize("@ss.hasPermi('supervision:inspect:add')")
@Log(title = "监督检查-获取检查项", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInsInsListInfor tInsInsListInfor)
{
return toAjax(tInsInsListInforService.insertTInsInsListInfor(tInsInsListInfor));
}
/**
* 修改监督检查-获取检查项
*/
@PreAuthorize("@ss.hasPermi('supervision:inspect:edit')")
@Log(title = "监督检查-获取检查项", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInsInsListInfor tInsInsListInfor)
{
return toAjax(tInsInsListInforService.updateTInsInsListInfor(tInsInsListInfor));
}
/**
* 删除监督检查-获取检查项
*/
@PreAuthorize("@ss.hasPermi('supervision:inspect:remove')")
@Log(title = "监督检查-获取检查项", businessType = BusinessType.DELETE)
@DeleteMapping("/{fInsInsListInforIds}")
public AjaxResult remove(@PathVariable Long[] fInsInsListInforIds)
{
return toAjax(tInsInsListInforService.deleteTInsInsListInforByIds(fInsInsListInforIds));
}
}
...@@ -45,6 +45,12 @@ public class TInsStaInforController extends BaseController ...@@ -45,6 +45,12 @@ public class TInsStaInforController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/hiddenList")
public AjaxResult hiddenList(TInsStaInfor tInsStaInfor){
List<TInsStaInfor> list = tInsStaInforService.selectTInsStaInforList(tInsStaInfor);
return AjaxResult.success(list);
}
/** /**
* 导出监督检查-隐患分类分级标准列表 * 导出监督检查-隐患分类分级标准列表
*/ */
......
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_ins_ins_list_infor
*
* @author zehong
* @date 2024-05-17
*/
public class TInsInsListInfor extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fInsInsListInforId;
/** 检查项任务编码 */
@Excel(name = "检查项任务编码")
private String fCheckTaskCode;
/** j检查项唯一编码 */
@Excel(name = "j检查项唯一编码")
private String fUniqueCode;
/** 检查项名称 */
@Excel(name = "检查项名称")
private String fCheckTimeName;
/** 检查对象分类 */
@Excel(name = "检查对象分类")
private String fCheckClassification;
/** 检查方法 */
@Excel(name = "检查方法")
private String fCheckMethod;
/** 检查内容 */
@Excel(name = "检查内容")
private String fCheckCount;
/** 隐患级别 */
@Excel(name = "隐患级别")
private String fHazardLevel;
/** 启用状态,0-启用,1-禁用 */
@Excel(name = "启用状态",dictType = "t_enable_state")
private Long fEnableState;
/** 检查依据 */
@Excel(name = "检查依据")
private String fCheckBasis;
/** 隐患分类分级标准id */
private Long fHazardTypeLevelId;
@Excel(name = "隐患分类分级标准")
private String hazardName;
/** 系统默认 createBy */
@Excel(name = "创建人")
private String fCreateBy;
/** 系统默认 createTime */
@Excel(name = "创建时间")
private String fCreateTime;
/** 系统默认 updateBy */
@Excel(name = "更新人")
private String fUpdateBy;
/** 系统默认updateTime */
@Excel(name = "更新时间")
private String fUpdateTime;
/** 删除标记,0-可用,1-已删除 */
@Excel(name = "删除标记",dictType = "t_delete_flag")
private Long fDeleteFlag;
public void setfInsInsListInforId(Long fInsInsListInforId)
{
this.fInsInsListInforId = fInsInsListInforId;
}
public Long getfInsInsListInforId()
{
return fInsInsListInforId;
}
public void setfCheckTaskCode(String fCheckTaskCode)
{
this.fCheckTaskCode = fCheckTaskCode;
}
public String getfCheckTaskCode()
{
return fCheckTaskCode;
}
public void setfUniqueCode(String fUniqueCode)
{
this.fUniqueCode = fUniqueCode;
}
public String getfUniqueCode()
{
return fUniqueCode;
}
public void setfCheckTimeName(String fCheckTimeName)
{
this.fCheckTimeName = fCheckTimeName;
}
public String getfCheckTimeName()
{
return fCheckTimeName;
}
public void setfCheckClassification(String fCheckClassification)
{
this.fCheckClassification = fCheckClassification;
}
public String getfCheckClassification()
{
return fCheckClassification;
}
public void setfCheckMethod(String fCheckMethod)
{
this.fCheckMethod = fCheckMethod;
}
public String getfCheckMethod()
{
return fCheckMethod;
}
public void setfCheckCount(String fCheckCount)
{
this.fCheckCount = fCheckCount;
}
public String getfCheckCount()
{
return fCheckCount;
}
public void setfHazardLevel(String fHazardLevel)
{
this.fHazardLevel = fHazardLevel;
}
public String getfHazardLevel()
{
return fHazardLevel;
}
public void setfEnableState(Long fEnableState)
{
this.fEnableState = fEnableState;
}
public Long getfEnableState()
{
return fEnableState;
}
public void setfCheckBasis(String fCheckBasis)
{
this.fCheckBasis = fCheckBasis;
}
public String getfCheckBasis()
{
return fCheckBasis;
}
public void setfHazardTypeLevelId(Long fHazardTypeLevelId)
{
this.fHazardTypeLevelId = fHazardTypeLevelId;
}
public Long getfHazardTypeLevelId()
{
return fHazardTypeLevelId;
}
public String getHazardName() {
return hazardName;
}
public void setHazardName(String hazardName) {
this.hazardName = hazardName;
}
public void setfCreateBy(String fCreateBy)
{
this.fCreateBy = fCreateBy;
}
public String getfCreateBy()
{
return fCreateBy;
}
public void setfCreateTime(String fCreateTime)
{
this.fCreateTime = fCreateTime;
}
public String getfCreateTime()
{
return fCreateTime;
}
public void setfUpdateBy(String fUpdateBy)
{
this.fUpdateBy = fUpdateBy;
}
public String getfUpdateBy()
{
return fUpdateBy;
}
public void setfUpdateTime(String fUpdateTime)
{
this.fUpdateTime = fUpdateTime;
}
public String getfUpdateTime()
{
return fUpdateTime;
}
public void setfDeleteFlag(Long fDeleteFlag)
{
this.fDeleteFlag = fDeleteFlag;
}
public Long getfDeleteFlag()
{
return fDeleteFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fInsInsListInforId", getfInsInsListInforId())
.append("fCheckTaskCode", getfCheckTaskCode())
.append("fUniqueCode", getfUniqueCode())
.append("fCheckTimeName", getfCheckTimeName())
.append("fCheckClassification", getfCheckClassification())
.append("fCheckMethod", getfCheckMethod())
.append("fCheckCount", getfCheckCount())
.append("fHazardLevel", getfHazardLevel())
.append("fEnableState", getfEnableState())
.append("fCheckBasis", getfCheckBasis())
.append("fHazardTypeLevelId", getfHazardTypeLevelId())
.append("fCreateBy", getfCreateBy())
.append("fCreateTime", getfCreateTime())
.append("fUpdateBy", getfUpdateBy())
.append("fUpdateTime", getfUpdateTime())
.append("fDeleteFlag", getfDeleteFlag())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInsInsListInfor;
/**
* 监督检查-获取检查项Mapper接口
*
* @author zehong
* @date 2024-05-17
*/
public interface TInsInsListInforMapper
{
/**
* 查询监督检查-获取检查项
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 监督检查-获取检查项
*/
public TInsInsListInfor selectTInsInsListInforById(Long fInsInsListInforId);
/**
* 查询监督检查-获取检查项列表
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 监督检查-获取检查项集合
*/
public List<TInsInsListInfor> selectTInsInsListInforList(TInsInsListInfor tInsInsListInfor);
/**
* 新增监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
public int insertTInsInsListInfor(TInsInsListInfor tInsInsListInfor);
/**
* 修改监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
public int updateTInsInsListInfor(TInsInsListInfor tInsInsListInfor);
/**
* 删除监督检查-获取检查项
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 结果
*/
public int deleteTInsInsListInforById(Long fInsInsListInforId);
/**
* 批量删除监督检查-获取检查项
*
* @param fInsInsListInforIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInsInsListInforByIds(Long[] fInsInsListInforIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInsInsListInfor;
/**
* 监督检查-获取检查项Service接口
*
* @author zehong
* @date 2024-05-17
*/
public interface ITInsInsListInforService
{
/**
* 查询监督检查-获取检查项
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 监督检查-获取检查项
*/
public TInsInsListInfor selectTInsInsListInforById(Long fInsInsListInforId);
/**
* 查询监督检查-获取检查项列表
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 监督检查-获取检查项集合
*/
public List<TInsInsListInfor> selectTInsInsListInforList(TInsInsListInfor tInsInsListInfor);
/**
* 新增监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
public int insertTInsInsListInfor(TInsInsListInfor tInsInsListInfor);
/**
* 修改监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
public int updateTInsInsListInfor(TInsInsListInfor tInsInsListInfor);
/**
* 批量删除监督检查-获取检查项
*
* @param fInsInsListInforIds 需要删除的监督检查-获取检查项ID
* @return 结果
*/
public int deleteTInsInsListInforByIds(Long[] fInsInsListInforIds);
/**
* 删除监督检查-获取检查项信息
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 结果
*/
public int deleteTInsInsListInforById(Long fInsInsListInforId);
}
package com.zehong.system.service.impl;
import java.sql.SQLIntegrityConstraintViolationException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInsInsListInforMapper;
import com.zehong.system.domain.TInsInsListInfor;
import com.zehong.system.service.ITInsInsListInforService;
/**
* 监督检查-获取检查项Service业务层处理
*
* @author zehong
* @date 2024-05-17
*/
@Service
public class TInsInsListInforServiceImpl implements ITInsInsListInforService
{
@Autowired
private TInsInsListInforMapper tInsInsListInforMapper;
/**
* 查询监督检查-获取检查项
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 监督检查-获取检查项
*/
@Override
public TInsInsListInfor selectTInsInsListInforById(Long fInsInsListInforId)
{
return tInsInsListInforMapper.selectTInsInsListInforById(fInsInsListInforId);
}
/**
* 查询监督检查-获取检查项列表
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 监督检查-获取检查项
*/
@Override
public List<TInsInsListInfor> selectTInsInsListInforList(TInsInsListInfor tInsInsListInfor)
{
return tInsInsListInforMapper.selectTInsInsListInforList(tInsInsListInfor);
}
/**
* 新增监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
@Override
public int insertTInsInsListInfor(TInsInsListInfor tInsInsListInfor){
try{
tInsInsListInfor.setfCreateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
tInsInsListInfor.setfCreateBy(SecurityUtils.getUsername());
return tInsInsListInforMapper.insertTInsInsListInfor(tInsInsListInfor);
}catch (Exception e){
Throwable cause = e.getCause();
if (cause instanceof SQLIntegrityConstraintViolationException){
String errMsg = cause.getMessage();
if (StringUtils.isNotEmpty(errMsg) && errMsg.contains("index_unique_code")){
throw new CustomException("检查项唯一编码不唯一");
}
}
return 0;
}
}
/**
* 修改监督检查-获取检查项
*
* @param tInsInsListInfor 监督检查-获取检查项
* @return 结果
*/
@Override
public int updateTInsInsListInfor(TInsInsListInfor tInsInsListInfor)
{
try{
tInsInsListInfor.setfUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
tInsInsListInfor.setfUpdateBy(SecurityUtils.getUsername());
return tInsInsListInforMapper.updateTInsInsListInfor(tInsInsListInfor);
}catch (Exception e){
Throwable cause = e.getCause();
if (cause instanceof SQLIntegrityConstraintViolationException){
String errMsg = cause.getMessage();
if (StringUtils.isNotEmpty(errMsg) && errMsg.contains("index_unique_code")){
throw new CustomException("检查项唯一编码不唯一");
}
}
return 0;
}
}
/**
* 批量删除监督检查-获取检查项
*
* @param fInsInsListInforIds 需要删除的监督检查-获取检查项ID
* @return 结果
*/
@Override
public int deleteTInsInsListInforByIds(Long[] fInsInsListInforIds)
{
return tInsInsListInforMapper.deleteTInsInsListInforByIds(fInsInsListInforIds);
}
/**
* 删除监督检查-获取检查项信息
*
* @param fInsInsListInforId 监督检查-获取检查项ID
* @return 结果
*/
@Override
public int deleteTInsInsListInforById(Long fInsInsListInforId)
{
return tInsInsListInforMapper.deleteTInsInsListInforById(fInsInsListInforId);
}
}
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.sql.SQLIntegrityConstraintViolationException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.common.exception.CustomException;
import com.zehong.common.utils.SecurityUtils; import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
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.TInsTaskInforMapper; import com.zehong.system.mapper.TInsTaskInforMapper;
...@@ -56,9 +59,21 @@ public class TInsTaskInforServiceImpl implements ITInsTaskInforService ...@@ -56,9 +59,21 @@ public class TInsTaskInforServiceImpl implements ITInsTaskInforService
@Override @Override
public int insertTInsTaskInfor(TInsTaskInfor tInsTaskInfor) public int insertTInsTaskInfor(TInsTaskInfor tInsTaskInfor)
{ {
tInsTaskInfor.setfCreateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); try {
tInsTaskInfor.setfCreateBy(SecurityUtils.getUsername()); tInsTaskInfor.setfCreateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
return tInsTaskInforMapper.insertTInsTaskInfor(tInsTaskInfor); tInsTaskInfor.setfCreateBy(SecurityUtils.getUsername());
return tInsTaskInforMapper.insertTInsTaskInfor(tInsTaskInfor);
}catch (Exception e){
Throwable cause = e.getCause();
if (cause instanceof SQLIntegrityConstraintViolationException){
String errMsg = cause.getMessage();
if (StringUtils.isNotEmpty(errMsg) && errMsg.contains("index_unique_code")){
throw new CustomException("任务唯一编码不唯一");
}
}
return 0;
}
} }
/** /**
...@@ -70,9 +85,20 @@ public class TInsTaskInforServiceImpl implements ITInsTaskInforService ...@@ -70,9 +85,20 @@ public class TInsTaskInforServiceImpl implements ITInsTaskInforService
@Override @Override
public int updateTInsTaskInfor(TInsTaskInfor tInsTaskInfor) public int updateTInsTaskInfor(TInsTaskInfor tInsTaskInfor)
{ {
tInsTaskInfor.setfUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); try{
tInsTaskInfor.setfModifyBy(SecurityUtils.getUsername()); tInsTaskInfor.setfUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
return tInsTaskInforMapper.updateTInsTaskInfor(tInsTaskInfor); tInsTaskInfor.setfModifyBy(SecurityUtils.getUsername());
return tInsTaskInforMapper.updateTInsTaskInfor(tInsTaskInfor);
}catch (Exception e){
Throwable cause = e.getCause();
if (cause instanceof SQLIntegrityConstraintViolationException){
String errMsg = cause.getMessage();
if (StringUtils.isNotEmpty(errMsg) && errMsg.contains("index_unique_code")){
throw new CustomException("任务唯一编码不唯一");
}
}
return 0;
}
} }
/** /**
......
<?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.TInsInsListInforMapper">
<resultMap type="TInsInsListInfor" id="TInsInsListInforResult">
<result property="fInsInsListInforId" column="f_ins_ins_list_infor_id" />
<result property="fCheckTaskCode" column="f_check_task_code" />
<result property="fUniqueCode" column="f_unique_code" />
<result property="fCheckTimeName" column="f_check_time_name" />
<result property="fCheckClassification" column="f_check_classification" />
<result property="fCheckMethod" column="f_check_method" />
<result property="fCheckCount" column="f_check_count" />
<result property="fHazardLevel" column="f_hazard_level" />
<result property="fEnableState" column="f_enable_state" />
<result property="fCheckBasis" column="f_check_basis" />
<result property="fHazardTypeLevelId" column="f_hazard_type_level_id" />
<result property="fCreateBy" column="f_create_by" />
<result property="fCreateTime" column="f_create_time" />
<result property="fUpdateBy" column="f_update_by" />
<result property="fUpdateTime" column="f_update_time" />
<result property="fDeleteFlag" column="f_delete_flag" />
</resultMap>
<sql id="selectTInsInsListInforVo">
SELECT
inspect.f_ins_ins_list_infor_id,
inspect.f_check_task_code,
inspect.f_unique_code,
inspect.f_check_time_name,
inspect.f_check_classification,
inspect.f_check_method,
inspect.f_check_count,
inspect.f_hazard_level,
inspect.f_enable_state,
inspect.f_check_basis,
inspect.f_hazard_type_level_id,
inspect.f_create_by,
inspect.f_create_time,
inspect.f_update_by,
inspect.f_update_time,
inspect.f_delete_flag,
hidden.f_hazard_name AS hazardName
FROM
t_ins_ins_list_infor inspect
LEFT JOIN t_ins_task_infor task ON task.f_unique_code = inspect.f_check_task_code
LEFT JOIN t_ins_sta_infor hidden ON hidden.f_ins_sta_infor_id = inspect.f_hazard_type_level_id
</sql>
<select id="selectTInsInsListInforList" parameterType="TInsInsListInfor" resultMap="TInsInsListInforResult">
<include refid="selectTInsInsListInforVo"/>
<where>
<if test="fCheckTimeName != null and fCheckTimeName != ''"> and inspect.f_check_time_name like concat('%', #{fCheckTimeName}, '%')</if>
</where>
ORDER BY inspect.f_create_time DESC
</select>
<select id="selectTInsInsListInforById" parameterType="Long" resultMap="TInsInsListInforResult">
<include refid="selectTInsInsListInforVo"/>
where inspect.f_ins_ins_list_infor_id = #{fInsInsListInforId}
</select>
<insert id="insertTInsInsListInfor" parameterType="TInsInsListInfor" useGeneratedKeys="true" keyProperty="fInsInsListInforId">
insert into t_ins_ins_list_infor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fCheckTaskCode != null">f_check_task_code,</if>
<if test="fUniqueCode != null">f_unique_code,</if>
<if test="fCheckTimeName != null">f_check_time_name,</if>
<if test="fCheckClassification != null">f_check_classification,</if>
<if test="fCheckMethod != null">f_check_method,</if>
<if test="fCheckCount != null">f_check_count,</if>
<if test="fHazardLevel != null">f_hazard_level,</if>
<if test="fEnableState != null">f_enable_state,</if>
<if test="fCheckBasis != null">f_check_basis,</if>
<if test="fHazardTypeLevelId != null">f_hazard_type_level_id,</if>
<if test="fCreateBy != null">f_create_by,</if>
<if test="fCreateTime != null">f_create_time,</if>
<if test="fUpdateBy != null">f_update_by,</if>
<if test="fUpdateTime != null">f_update_time,</if>
<if test="fDeleteFlag != null">f_delete_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fCheckTaskCode != null">#{fCheckTaskCode},</if>
<if test="fUniqueCode != null">#{fUniqueCode},</if>
<if test="fCheckTimeName != null">#{fCheckTimeName},</if>
<if test="fCheckClassification != null">#{fCheckClassification},</if>
<if test="fCheckMethod != null">#{fCheckMethod},</if>
<if test="fCheckCount != null">#{fCheckCount},</if>
<if test="fHazardLevel != null">#{fHazardLevel},</if>
<if test="fEnableState != null">#{fEnableState},</if>
<if test="fCheckBasis != null">#{fCheckBasis},</if>
<if test="fHazardTypeLevelId != null">#{fHazardTypeLevelId},</if>
<if test="fCreateBy != null">#{fCreateBy},</if>
<if test="fCreateTime != null">#{fCreateTime},</if>
<if test="fUpdateBy != null">#{fUpdateBy},</if>
<if test="fUpdateTime != null">#{fUpdateTime},</if>
<if test="fDeleteFlag != null">#{fDeleteFlag},</if>
</trim>
</insert>
<update id="updateTInsInsListInfor" parameterType="TInsInsListInfor">
update t_ins_ins_list_infor
<trim prefix="SET" suffixOverrides=",">
<if test="fCheckTaskCode != null">f_check_task_code = #{fCheckTaskCode},</if>
<if test="fUniqueCode != null">f_unique_code = #{fUniqueCode},</if>
<if test="fCheckTimeName != null">f_check_time_name = #{fCheckTimeName},</if>
<if test="fCheckClassification != null">f_check_classification = #{fCheckClassification},</if>
<if test="fCheckMethod != null">f_check_method = #{fCheckMethod},</if>
<if test="fCheckCount != null">f_check_count = #{fCheckCount},</if>
<if test="fHazardLevel != null">f_hazard_level = #{fHazardLevel},</if>
<if test="fEnableState != null">f_enable_state = #{fEnableState},</if>
<if test="fCheckBasis != null">f_check_basis = #{fCheckBasis},</if>
<if test="fHazardTypeLevelId != null">f_hazard_type_level_id = #{fHazardTypeLevelId},</if>
<if test="fCreateBy != null">f_create_by = #{fCreateBy},</if>
<if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
<if test="fUpdateBy != null">f_update_by = #{fUpdateBy},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
<if test="fDeleteFlag != null">f_delete_flag = #{fDeleteFlag},</if>
</trim>
where f_ins_ins_list_infor_id = #{fInsInsListInforId}
</update>
<delete id="deleteTInsInsListInforById" parameterType="Long">
delete from t_ins_ins_list_infor where f_ins_ins_list_infor_id = #{fInsInsListInforId}
</delete>
<delete id="deleteTInsInsListInforByIds" parameterType="String">
delete from t_ins_ins_list_infor where f_ins_ins_list_infor_id in
<foreach item="fInsInsListInforId" collection="array" open="(" separator="," close=")">
#{fInsInsListInforId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -51,3 +51,12 @@ export function exportInfor(query) { ...@@ -51,3 +51,12 @@ export function exportInfor(query) {
params: query params: query
}) })
} }
//所有隐患分类
export function hiddenList(query) {
return request({
url: '/supervision/hideType/hiddenList',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询监督检查-获取检查项列表
export function listInfor(query) {
return request({
url: '/supervision/inspect/list',
method: 'get',
params: query
})
}
// 查询监督检查-获取检查项详细
export function getInfor(fInsInsListInforId) {
return request({
url: '/supervision/inspect/' + fInsInsListInforId,
method: 'get'
})
}
// 新增监督检查-获取检查项
export function addInfor(data) {
return request({
url: '/supervision/inspect',
method: 'post',
data: data
})
}
// 修改监督检查-获取检查项
export function updateInfor(data) {
return request({
url: '/supervision/inspect',
method: 'put',
data: data
})
}
// 删除监督检查-获取检查项
export function delInfor(fInsInsListInforId) {
return request({
url: '/supervision/inspect/' + fInsInsListInforId,
method: 'delete'
})
}
// 导出监督检查-获取检查项
export function exportInfor(query) {
return request({
url: '/supervision/inspect/export',
method: 'get',
params: query
})
}
...@@ -212,7 +212,9 @@ ...@@ -212,7 +212,9 @@
name: "detail-info", name: "detail-info",
data(){ data(){
return{ return{
detailInfo: {}, detailInfo: {
fDeleteFlag: 0
},
detailOpen: false detailOpen: false
} }
}, },
......
This diff is collapsed.
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="1000px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="140px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="检查项任务编码">
<span v-if="detailInfo.fCheckTaskCode">{{ detailInfo.fCheckTaskCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查项唯一编码">
<span v-if="detailInfo.fUniqueCode">{{ detailInfo.fUniqueCode }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查项名称">
<span v-if="detailInfo.fCheckTimeName">{{ detailInfo.fCheckTimeName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查对象分类">
<span v-if="detailInfo.fCheckClassification">{{ detailInfo.fCheckClassification }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查方法">
<span v-if="detailInfo.fCheckMethod">{{ detailInfo.fCheckMethod }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查内容">
<span v-if="detailInfo.fCheckCount">{{ detailInfo.fCheckCount }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患级别">
<span v-if="detailInfo.fHazardLevel">{{ detailInfo.fHazardLevel }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="启用状态">
<span v-if="detailInfo.fEnableState.toString()">{{ $parent.fEnableStateFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检查依据">
<span v-if="detailInfo.fCheckBasis">{{ detailInfo.fCheckBasis }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患分类分级标准">
<span v-if="detailInfo.hazardName">{{ detailInfo.hazardName }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="删除标记" prop="fDeleteFlag">
<span v-if="detailInfo.fDeleteFlag.toString()">{{ $parent.fDeleteFlagFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建时间">
<span v-if="detailInfo.fCreateTime">{{ detailInfo.fCreateTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建人">
<span v-if="detailInfo.fCreateBy">{{ detailInfo.fCreateBy }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="修改时间">
<span v-if="detailInfo.fUpdateTime">{{ detailInfo.fUpdateTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="修改人">
<span v-if="detailInfo.fUpdateBy">{{ detailInfo.fUpdateBy }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script>
import { getInfor } from "@/api/supervision/inspect";
export default {
name: "detail-info",
data(){
return{
detailInfo: {
fEnableState: 0,
fDeleteFlag: 0
},
detailOpen: false
}
},
methods:{
getDetailInfo(id){
getInfor(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.detailOpen = true;
}
})
}
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
...@@ -115,7 +115,9 @@ ...@@ -115,7 +115,9 @@
name: "detail-info", name: "detail-info",
data(){ data(){
return{ return{
detailInfo: {}, detailInfo: {
fDeleteFlag: 0
},
detailOpen: false detailOpen: false
} }
}, },
......
...@@ -88,10 +88,30 @@ ...@@ -88,10 +88,30 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务名称" align="center" prop="fName" :show-overflow-tooltip="true"/> <el-table-column label="任务名称" align="center" prop="fName" :show-overflow-tooltip="true"/>
<el-table-column label="对象分类" align="center" prop="fObjectType" :formatter="fObjectTypeFormat" :show-overflow-tooltip="true"/> <el-table-column label="对象分类" align="center" prop="fObjectType" :formatter="fObjectTypeFormat" :show-overflow-tooltip="true"/>
<el-table-column label="检查表实例关联Id" align="center" prop="fHazardCheckTableRecordId" :show-overflow-tooltip="true"/> <el-table-column label="检查表实例关联Id" align="center" prop="fHazardCheckTableRecordId" :show-overflow-tooltip="true">
<el-table-column label="抽查要求" align="center" prop="fSpotCheckType" :formatter="fSpotCheckTypeFormat" /> <template slot-scope="scope">
<el-table-column label="城区标识" align="center" prop="fSpecialFlag" :formatter="fSpecialFlagFormat" /> <span v-if="scope.row.fHazardCheckTableRecordId">{{ scope.row.fHazardCheckTableRecordId }}</span>
<el-table-column label="此对象应检数据" align="center" prop="fLotCount" /> <span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="抽查要求" align="center" prop="fSpotCheckType">
<template slot-scope="scope">
<span v-if="scope.row.fSpotCheckType">{{ fSpotCheckTypeFormat(scope.row) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="城区标识" align="center" prop="fSpecialFlag" :formatter="fSpecialFlagFormat">
<template slot-scope="scope">
<span v-if="scope.row.fSpecialFlag">{{ fSpecialFlagFormat(scope.row) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="此对象应检数据" align="center" prop="fLotCount">
<template slot-scope="scope">
<span v-if="scope.row.fLotCount">{{ scope.row.fLotCount }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="fCreateTime" /> <el-table-column label="创建时间" align="center" prop="fCreateTime" />
<el-table-column label="创建人" align="center" prop="fCreateBy" /> <el-table-column label="创建人" align="center" prop="fCreateBy" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......
...@@ -122,7 +122,9 @@ ...@@ -122,7 +122,9 @@
name: "detail-info", name: "detail-info",
data(){ data(){
return{ return{
detailInfo: {}, detailInfo: {
fDeleteFlag: 0
},
detailOpen: false detailOpen: false
} }
}, },
......
...@@ -118,10 +118,25 @@ ...@@ -118,10 +118,25 @@
<el-table-column label="任务名称" align="center" prop="fName" :show-overflow-tooltip="true"/> <el-table-column label="任务名称" align="center" prop="fName" :show-overflow-tooltip="true"/>
<el-table-column label="任务唯一编码" align="center" prop="fUniqueCode" :show-overflow-tooltip="true"/> <el-table-column label="任务唯一编码" align="center" prop="fUniqueCode" :show-overflow-tooltip="true"/>
<el-table-column label="任务归属" align="center" prop="fTaskBelong" :show-overflow-tooltip="true"/> <el-table-column label="任务归属" align="center" prop="fTaskBelong" :show-overflow-tooltip="true"/>
<el-table-column label="任务类型" align="center" prop="fTaskType" :formatter="fTaskTypeFormat" /> <el-table-column label="任务类型" align="center" prop="fTaskType">
<template slot-scope="scope">
<span v-if="scope.row.fTaskType">{{ fTaskTypeFormat(scope.row) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="是否下发" align="center" prop="fDistributeFlag" :formatter="fDistributeFlagFormat" /> <el-table-column label="是否下发" align="center" prop="fDistributeFlag" :formatter="fDistributeFlagFormat" />
<el-table-column label="任务开始时间" align="center" prop="fStartTime" /> <el-table-column label="任务开始时间" align="center" prop="fStartTime">
<el-table-column label="任务截至时间" align="center" prop="fEndTime" /> <template slot-scope="scope">
<span v-if="scope.row.fStartTime">{{ scope.row.fStartTime }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="任务截至时间" align="center" prop="fEndTime">
<template slot-scope="scope">
<span v-if="scope.row.fEndTime">{{ scope.row.fEndTime }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="任务状态" align="center" prop="fStatus" :formatter="fStatusFormat" /> <el-table-column label="任务状态" align="center" prop="fStatus" :formatter="fStatusFormat" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
......
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