Commit 7094c8c4 authored by 耿迪迪's avatar 耿迪迪

监督检查-检查任务

parent 2f948119
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.TInsTaskInfor;
import com.zehong.system.service.ITInsTaskInforService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 监督检查-检查任务Controller
*
* @author zehong
* @date 2024-05-16
*/
@RestController
@RequestMapping("/supervision/task")
public class TInsTaskInforController extends BaseController
{
@Autowired
private ITInsTaskInforService tInsTaskInforService;
/**
* 查询监督检查-检查任务列表
*/
@PreAuthorize("@ss.hasPermi('supervision:task:list')")
@GetMapping("/list")
public TableDataInfo list(TInsTaskInfor tInsTaskInfor)
{
startPage();
List<TInsTaskInfor> list = tInsTaskInforService.selectTInsTaskInforList(tInsTaskInfor);
return getDataTable(list);
}
/**
* 导出监督检查-检查任务列表
*/
@PreAuthorize("@ss.hasPermi('supervision:task:export')")
@Log(title = "监督检查-检查任务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInsTaskInfor tInsTaskInfor)
{
List<TInsTaskInfor> list = tInsTaskInforService.selectTInsTaskInforList(tInsTaskInfor);
ExcelUtil<TInsTaskInfor> util = new ExcelUtil<TInsTaskInfor>(TInsTaskInfor.class);
return util.exportExcel(list, "监督检查-检查任务数据");
}
/**
* 获取监督检查-检查任务详细信息
*/
@PreAuthorize("@ss.hasPermi('supervision:task:query')")
@GetMapping(value = "/{fInsTaskInforId}")
public AjaxResult getInfo(@PathVariable("fInsTaskInforId") Long fInsTaskInforId)
{
return AjaxResult.success(tInsTaskInforService.selectTInsTaskInforById(fInsTaskInforId));
}
/**
* 新增监督检查-检查任务
*/
@PreAuthorize("@ss.hasPermi('supervision:task:add')")
@Log(title = "监督检查-检查任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInsTaskInfor tInsTaskInfor)
{
return toAjax(tInsTaskInforService.insertTInsTaskInfor(tInsTaskInfor));
}
/**
* 修改监督检查-检查任务
*/
@PreAuthorize("@ss.hasPermi('supervision:task:edit')")
@Log(title = "监督检查-检查任务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInsTaskInfor tInsTaskInfor)
{
return toAjax(tInsTaskInforService.updateTInsTaskInfor(tInsTaskInfor));
}
/**
* 删除监督检查-检查任务
*/
@PreAuthorize("@ss.hasPermi('supervision:task:remove')")
@Log(title = "监督检查-检查任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{fInsTaskInforIds}")
public AjaxResult remove(@PathVariable Long[] fInsTaskInforIds)
{
return toAjax(tInsTaskInforService.deleteTInsTaskInforByIds(fInsTaskInforIds));
}
}
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_task_infor
*
* @author zehong
* @date 2024-05-16
*/
public class TInsTaskInfor extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fInsTaskInforId;
/** 任务唯一编码 */
@Excel(name = "任务唯一编码")
private String fUniqueCode;
/** 任务归属:组织检查的燃气主管部门对应6位行政区划编码 */
@Excel(name = "任务归属:组织检查的燃气主管部门对应6位行政区划编码")
private String fTaskBelong;
/** 任务类型 0-专项 1-日常 2-第三方评估抽查 3-随机抽
查 */
@Excel(name = "任务类型",dictType = "t_supervision_task_type")
private String fTaskType;
/** 是否下发 0-不下发 1 - 下发 */
@Excel(name = "是否下发",dictType = "t_distribute_flag")
private Long fDistributeFlag;
/** 任务名称 */
@Excel(name = "任务名称")
private String fName;
/** 任务说明 */
@Excel(name = "任务说明")
private String fDesc;
/** 任务开始时间 yyyy-mm-dd */
@Excel(name = "任务开始时间")
private String fStartTime;
/** 任务截至时间 yyyy-mm-dd */
@Excel(name = "任务截至时间")
private String fEndTime;
/** 任务状态,NEW-未开始,ING-进行中,DON-已完结,OVD-超期未完成 */
@Excel(name = "任务状态",dictType = "t_supervision_task_status")
private String fStatus;
/** 删除标记,0-可用,1-已删除 */
@Excel(name = "删除标记",dictType = "t_delete_flag")
private Long fDeleteFlag;
/** 描述 */
@Excel(name = "描述")
private String fRemark;
/** 创建时间精确到秒 */
@Excel(name = "创建时间")
private String fCreateTime;
/** 创建人,当前操作人登录名称 */
@Excel(name = "创建人")
private String fCreateBy;
/** 修改时间 精确到秒 */
@Excel(name = "修改时间")
private String fUpdateTime;
/** 修改人,当前操作人登录名称 */
@Excel(name = "修改人")
private String fModifyBy;
public void setfInsTaskInforId(Long fInsTaskInforId)
{
this.fInsTaskInforId = fInsTaskInforId;
}
public Long getfInsTaskInforId()
{
return fInsTaskInforId;
}
public void setfUniqueCode(String fUniqueCode)
{
this.fUniqueCode = fUniqueCode;
}
public String getfUniqueCode()
{
return fUniqueCode;
}
public void setfTaskBelong(String fTaskBelong)
{
this.fTaskBelong = fTaskBelong;
}
public String getfTaskBelong()
{
return fTaskBelong;
}
public void setfTaskType(String fTaskType)
{
this.fTaskType = fTaskType;
}
public String getfTaskType()
{
return fTaskType;
}
public void setfDistributeFlag(Long fDistributeFlag)
{
this.fDistributeFlag = fDistributeFlag;
}
public Long getfDistributeFlag()
{
return fDistributeFlag;
}
public void setfName(String fName)
{
this.fName = fName;
}
public String getfName()
{
return fName;
}
public void setfDesc(String fDesc)
{
this.fDesc = fDesc;
}
public String getfDesc()
{
return fDesc;
}
public void setfStartTime(String fStartTime)
{
this.fStartTime = fStartTime;
}
public String getfStartTime()
{
return fStartTime;
}
public void setfEndTime(String fEndTime)
{
this.fEndTime = fEndTime;
}
public String getfEndTime()
{
return fEndTime;
}
public void setfStatus(String fStatus)
{
this.fStatus = fStatus;
}
public String getfStatus()
{
return fStatus;
}
public void setfDeleteFlag(Long fDeleteFlag)
{
this.fDeleteFlag = fDeleteFlag;
}
public Long getfDeleteFlag()
{
return fDeleteFlag;
}
public void setfRemark(String fRemark)
{
this.fRemark = fRemark;
}
public String getfRemark()
{
return fRemark;
}
public void setfCreateTime(String fCreateTime)
{
this.fCreateTime = fCreateTime;
}
public String getfCreateTime()
{
return fCreateTime;
}
public void setfCreateBy(String fCreateBy)
{
this.fCreateBy = fCreateBy;
}
public String getfCreateBy()
{
return fCreateBy;
}
public void setfUpdateTime(String fUpdateTime)
{
this.fUpdateTime = fUpdateTime;
}
public String getfUpdateTime()
{
return fUpdateTime;
}
public void setfModifyBy(String fModifyBy)
{
this.fModifyBy = fModifyBy;
}
public String getfModifyBy()
{
return fModifyBy;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fInsTaskInforId", getfInsTaskInforId())
.append("fUniqueCode", getfUniqueCode())
.append("fTaskBelong", getfTaskBelong())
.append("fTaskType", getfTaskType())
.append("fDistributeFlag", getfDistributeFlag())
.append("fName", getfName())
.append("fDesc", getfDesc())
.append("fStartTime", getfStartTime())
.append("fEndTime", getfEndTime())
.append("fStatus", getfStatus())
.append("fDeleteFlag", getfDeleteFlag())
.append("fRemark", getfRemark())
.append("fCreateTime", getfCreateTime())
.append("fCreateBy", getfCreateBy())
.append("fUpdateTime", getfUpdateTime())
.append("fModifyBy", getfModifyBy())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TInsTaskInfor;
/**
* 监督检查-检查任务Mapper接口
*
* @author zehong
* @date 2024-05-16
*/
public interface TInsTaskInforMapper
{
/**
* 查询监督检查-检查任务
*
* @param fInsTaskInforId 监督检查-检查任务ID
* @return 监督检查-检查任务
*/
public TInsTaskInfor selectTInsTaskInforById(Long fInsTaskInforId);
/**
* 查询监督检查-检查任务列表
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 监督检查-检查任务集合
*/
public List<TInsTaskInfor> selectTInsTaskInforList(TInsTaskInfor tInsTaskInfor);
/**
* 新增监督检查-检查任务
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 结果
*/
public int insertTInsTaskInfor(TInsTaskInfor tInsTaskInfor);
/**
* 修改监督检查-检查任务
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 结果
*/
public int updateTInsTaskInfor(TInsTaskInfor tInsTaskInfor);
/**
* 删除监督检查-检查任务
*
* @param fInsTaskInforId 监督检查-检查任务ID
* @return 结果
*/
public int deleteTInsTaskInforById(Long fInsTaskInforId);
/**
* 批量删除监督检查-检查任务
*
* @param fInsTaskInforIds 需要删除的数据ID
* @return 结果
*/
public int deleteTInsTaskInforByIds(Long[] fInsTaskInforIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TInsTaskInfor;
/**
* 监督检查-检查任务Service接口
*
* @author zehong
* @date 2024-05-16
*/
public interface ITInsTaskInforService
{
/**
* 查询监督检查-检查任务
*
* @param fInsTaskInforId 监督检查-检查任务ID
* @return 监督检查-检查任务
*/
public TInsTaskInfor selectTInsTaskInforById(Long fInsTaskInforId);
/**
* 查询监督检查-检查任务列表
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 监督检查-检查任务集合
*/
public List<TInsTaskInfor> selectTInsTaskInforList(TInsTaskInfor tInsTaskInfor);
/**
* 新增监督检查-检查任务
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 结果
*/
public int insertTInsTaskInfor(TInsTaskInfor tInsTaskInfor);
/**
* 修改监督检查-检查任务
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 结果
*/
public int updateTInsTaskInfor(TInsTaskInfor tInsTaskInfor);
/**
* 批量删除监督检查-检查任务
*
* @param fInsTaskInforIds 需要删除的监督检查-检查任务ID
* @return 结果
*/
public int deleteTInsTaskInforByIds(Long[] fInsTaskInforIds);
/**
* 删除监督检查-检查任务信息
*
* @param fInsTaskInforId 监督检查-检查任务ID
* @return 结果
*/
public int deleteTInsTaskInforById(Long fInsTaskInforId);
}
package com.zehong.system.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import com.zehong.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInsTaskInforMapper;
import com.zehong.system.domain.TInsTaskInfor;
import com.zehong.system.service.ITInsTaskInforService;
/**
* 监督检查-检查任务Service业务层处理
*
* @author zehong
* @date 2024-05-16
*/
@Service
public class TInsTaskInforServiceImpl implements ITInsTaskInforService
{
@Autowired
private TInsTaskInforMapper tInsTaskInforMapper;
/**
* 查询监督检查-检查任务
*
* @param fInsTaskInforId 监督检查-检查任务ID
* @return 监督检查-检查任务
*/
@Override
public TInsTaskInfor selectTInsTaskInforById(Long fInsTaskInforId)
{
return tInsTaskInforMapper.selectTInsTaskInforById(fInsTaskInforId);
}
/**
* 查询监督检查-检查任务列表
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 监督检查-检查任务
*/
@Override
public List<TInsTaskInfor> selectTInsTaskInforList(TInsTaskInfor tInsTaskInfor)
{
return tInsTaskInforMapper.selectTInsTaskInforList(tInsTaskInfor);
}
/**
* 新增监督检查-检查任务
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 结果
*/
@Override
public int insertTInsTaskInfor(TInsTaskInfor tInsTaskInfor)
{
tInsTaskInfor.setfCreateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
tInsTaskInfor.setfCreateBy(SecurityUtils.getUsername());
return tInsTaskInforMapper.insertTInsTaskInfor(tInsTaskInfor);
}
/**
* 修改监督检查-检查任务
*
* @param tInsTaskInfor 监督检查-检查任务
* @return 结果
*/
@Override
public int updateTInsTaskInfor(TInsTaskInfor tInsTaskInfor)
{
tInsTaskInfor.setfUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
tInsTaskInfor.setfModifyBy(SecurityUtils.getUsername());
return tInsTaskInforMapper.updateTInsTaskInfor(tInsTaskInfor);
}
/**
* 批量删除监督检查-检查任务
*
* @param fInsTaskInforIds 需要删除的监督检查-检查任务ID
* @return 结果
*/
@Override
public int deleteTInsTaskInforByIds(Long[] fInsTaskInforIds)
{
return tInsTaskInforMapper.deleteTInsTaskInforByIds(fInsTaskInforIds);
}
/**
* 删除监督检查-检查任务信息
*
* @param fInsTaskInforId 监督检查-检查任务ID
* @return 结果
*/
@Override
public int deleteTInsTaskInforById(Long fInsTaskInforId)
{
return tInsTaskInforMapper.deleteTInsTaskInforById(fInsTaskInforId);
}
}
......@@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="fIdNo != null and fIdNo != ''"> and f_id_no like concat('%', #{fIdNo}, '%')</if>
</where>
ORDER BY f_update_time DESC
</select>
<select id="selectFProBehInforBrowseById" parameterType="Long" resultMap="FProBehInforBrowseResult">
......
......@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fIdNo != null and fIdNo != ''"> and f_id_no like concat('%', #{fIdNo}, '%')</if>
<if test="fRepStatus != null "> and f_rep_status = #{fRepStatus}</if>
</where>
ORDER BY f_update_time DESC
</select>
<select id="selectFProBehInforById" parameterType="Long" resultMap="FProBehInforResult">
......
<?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.TInsTaskInforMapper">
<resultMap type="TInsTaskInfor" id="TInsTaskInforResult">
<result property="fInsTaskInforId" column="f_ins_task_infor_id" />
<result property="fUniqueCode" column="f_unique_code" />
<result property="fTaskBelong" column="f_task_belong" />
<result property="fTaskType" column="f_task_type" />
<result property="fDistributeFlag" column="f_distribute_flag" />
<result property="fName" column="f_name" />
<result property="fDesc" column="f_desc" />
<result property="fStartTime" column="f_start_time" />
<result property="fEndTime" column="f_end_time" />
<result property="fStatus" column="f_status" />
<result property="fDeleteFlag" column="f_delete_flag" />
<result property="fRemark" column="f_remark" />
<result property="fCreateTime" column="f_create_time" />
<result property="fCreateBy" column="f_create_by" />
<result property="fUpdateTime" column="f_update_time" />
<result property="fModifyBy" column="f_modify_by" />
</resultMap>
<sql id="selectTInsTaskInforVo">
select f_ins_task_infor_id, f_unique_code, f_task_belong, f_task_type, f_distribute_flag, f_name, f_desc, f_start_time, f_end_time, f_status, f_delete_flag, f_remark, f_create_time, f_create_by, f_update_time, f_modify_by from t_ins_task_infor
</sql>
<select id="selectTInsTaskInforList" parameterType="TInsTaskInfor" resultMap="TInsTaskInforResult">
<include refid="selectTInsTaskInforVo"/>
<where>
<if test="fUniqueCode != null and fUniqueCode != ''"> and f_unique_code like concat('%', #{fUniqueCode}, '%')</if>
<if test="fTaskBelong != null and fTaskBelong != ''"> and f_task_belong like concat('%', #{fTaskBelong}, '%')</if>
<if test="fTaskType != null and fTaskType != ''"> and f_task_type = #{fTaskType}</if>
<if test="fDistributeFlag != null "> and f_distribute_flag = #{fDistributeFlag}</if>
<if test="fName != null and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
<if test="fDesc != null and fDesc != ''"> and f_desc = #{fDesc}</if>
<if test="fStartTime != null and fStartTime != ''"> and f_start_time = #{fStartTime}</if>
<if test="fEndTime != null and fEndTime != ''"> and f_end_time = #{fEndTime}</if>
<if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if>
<if test="fDeleteFlag != null "> and f_delete_flag = #{fDeleteFlag}</if>
<if test="fRemark != null and fRemark != ''"> and f_remark = #{fRemark}</if>
<if test="fCreateTime != null and fCreateTime != ''"> and f_create_time = #{fCreateTime}</if>
<if test="fCreateBy != null and fCreateBy != ''"> and f_create_by = #{fCreateBy}</if>
<if test="fUpdateTime != null and fUpdateTime != ''"> and f_update_time = #{fUpdateTime}</if>
<if test="fModifyBy != null and fModifyBy != ''"> and f_modify_by = #{fModifyBy}</if>
</where>
ORDER BY f_create_time DESC
</select>
<select id="selectTInsTaskInforById" parameterType="Long" resultMap="TInsTaskInforResult">
<include refid="selectTInsTaskInforVo"/>
where f_ins_task_infor_id = #{fInsTaskInforId}
</select>
<insert id="insertTInsTaskInfor" parameterType="TInsTaskInfor" useGeneratedKeys="true" keyProperty="fInsTaskInforId">
insert into t_ins_task_infor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fUniqueCode != null and fUniqueCode != ''">f_unique_code,</if>
<if test="fTaskBelong != null and fTaskBelong != ''">f_task_belong,</if>
<if test="fTaskType != null">f_task_type,</if>
<if test="fDistributeFlag != null">f_distribute_flag,</if>
<if test="fName != null">f_name,</if>
<if test="fDesc != null">f_desc,</if>
<if test="fStartTime != null">f_start_time,</if>
<if test="fEndTime != null">f_end_time,</if>
<if test="fStatus != null">f_status,</if>
<if test="fDeleteFlag != null">f_delete_flag,</if>
<if test="fRemark != null">f_remark,</if>
<if test="fCreateTime != null">f_create_time,</if>
<if test="fCreateBy != null">f_create_by,</if>
<if test="fUpdateTime != null">f_update_time,</if>
<if test="fModifyBy != null">f_modify_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fUniqueCode != null and fUniqueCode != ''">#{fUniqueCode},</if>
<if test="fTaskBelong != null and fTaskBelong != ''">#{fTaskBelong},</if>
<if test="fTaskType != null">#{fTaskType},</if>
<if test="fDistributeFlag != null">#{fDistributeFlag},</if>
<if test="fName != null">#{fName},</if>
<if test="fDesc != null">#{fDesc},</if>
<if test="fStartTime != null">#{fStartTime},</if>
<if test="fEndTime != null">#{fEndTime},</if>
<if test="fStatus != null">#{fStatus},</if>
<if test="fDeleteFlag != null">#{fDeleteFlag},</if>
<if test="fRemark != null">#{fRemark},</if>
<if test="fCreateTime != null">#{fCreateTime},</if>
<if test="fCreateBy != null">#{fCreateBy},</if>
<if test="fUpdateTime != null">#{fUpdateTime},</if>
<if test="fModifyBy != null">#{fModifyBy},</if>
</trim>
</insert>
<update id="updateTInsTaskInfor" parameterType="TInsTaskInfor">
update t_ins_task_infor
<trim prefix="SET" suffixOverrides=",">
<if test="fUniqueCode != null and fUniqueCode != ''">f_unique_code = #{fUniqueCode},</if>
<if test="fTaskBelong != null and fTaskBelong != ''">f_task_belong = #{fTaskBelong},</if>
<if test="fTaskType != null">f_task_type = #{fTaskType},</if>
<if test="fDistributeFlag != null">f_distribute_flag = #{fDistributeFlag},</if>
<if test="fName != null">f_name = #{fName},</if>
<if test="fDesc != null">f_desc = #{fDesc},</if>
<if test="fStartTime != null">f_start_time = #{fStartTime},</if>
<if test="fEndTime != null">f_end_time = #{fEndTime},</if>
<if test="fStatus != null">f_status = #{fStatus},</if>
<if test="fDeleteFlag != null">f_delete_flag = #{fDeleteFlag},</if>
<if test="fRemark != null">f_remark = #{fRemark},</if>
<if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
<if test="fCreateBy != null">f_create_by = #{fCreateBy},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
<if test="fModifyBy != null">f_modify_by = #{fModifyBy},</if>
</trim>
where f_ins_task_infor_id = #{fInsTaskInforId}
</update>
<delete id="deleteTInsTaskInforById" parameterType="Long">
delete from t_ins_task_infor where f_ins_task_infor_id = #{fInsTaskInforId}
</delete>
<delete id="deleteTInsTaskInforByIds" parameterType="String">
delete from t_ins_task_infor where f_ins_task_infor_id in
<foreach item="fInsTaskInforId" collection="array" open="(" separator="," close=")">
#{fInsTaskInforId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -53,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fThisProvinceFlag != null and fThisProvinceFlag != ''"> and f_this_province_flag = #{fThisProvinceFlag}</if>
<if test="fValidType != null "> and f_valid_type = #{fValidType}</if>
</where>
ORDER BY f_update_time DESC
</select>
<select id="selectTProAppInforBrowseById" parameterType="Long" resultMap="TProAppInforBrowseResult">
......
import request from '@/utils/request'
// 查询监督检查-检查任务列表
export function listInfor(query) {
return request({
url: '/supervision/task/list',
method: 'get',
params: query
})
}
// 查询监督检查-检查任务详细
export function getInfor(fInsTaskInforId) {
return request({
url: '/supervision/task/' + fInsTaskInforId,
method: 'get'
})
}
// 新增监督检查-检查任务
export function addInfor(data) {
return request({
url: '/supervision/task',
method: 'post',
data: data
})
}
// 修改监督检查-检查任务
export function updateInfor(data) {
return request({
url: '/supervision/task',
method: 'put',
data: data
})
}
// 删除监督检查-检查任务
export function delInfor(fInsTaskInforId) {
return request({
url: '/supervision/task/' + fInsTaskInforId,
method: 'delete'
})
}
// 导出监督检查-检查任务
export function exportInfor(query) {
return request({
url: '/supervision/task/export',
method: 'get',
params: query
})
}
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="1000px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="110px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="任务名称">
<span v-if="detailInfo.fName">{{ detailInfo.fName }}</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.fTaskBelong">{{ detailInfo.fTaskBelong }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务类型">
<span v-if="detailInfo.fTaskType">{{ $parent.fTaskTypeFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否下发">
<span v-if="detailInfo.fDistributeFlag">{{ $parent.fDistributeFlagFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="任务说明">
<span v-if="detailInfo.fDesc">{{ detailInfo.fDesc }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务开始时间">
<span v-if="detailInfo.fStartTime">{{ detailInfo.fStartTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务截至时间">
<span v-if="detailInfo.fEndTime">{{ detailInfo.fEndTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务状态">
<span v-if="detailInfo.fStatus">{{ $parent.fStatusFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="删除标记">
<span v-if="detailInfo.fEndTime">{{ $parent.fDeleteFlagFormat(detailInfo) }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述">
<span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</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.fModifyBy">{{ detailInfo.fModifyBy }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script>
import { getInfor } from "@/api/supervision/task";
export default {
name: "detail-info",
data(){
return{
detailInfo: {},
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>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="任务唯一编码" prop="fUniqueCode">
<el-input
v-model="queryParams.fUniqueCode"
placeholder="请输入任务唯一编码"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务归属" prop="fTaskBelong">
<el-input
v-model="queryParams.fTaskBelong"
placeholder="请输入任务归属"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务类型" prop="fTaskType">
<el-select v-model="queryParams.fTaskType" placeholder="请选择任务类型" clearable size="small">
<el-option
v-for="dict in fTaskTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="是否下发" prop="fDistributeFlag">
<el-select v-model="queryParams.fDistributeFlag" placeholder="请选择是否下发" clearable size="small">
<el-option
v-for="dict in fDistributeFlagOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="任务名称" prop="fName">
<el-input
v-model="queryParams.fName"
placeholder="请输入任务名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务状态" prop="fStatus">
<el-select v-model="queryParams.fStatus" placeholder="请选择任务状态" clearable size="small">
<el-option
v-for="dict in fStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['supervision:task:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['supervision:task:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['supervision:task:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['supervision:task:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inforList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务名称" align="center" prop="fName" />
<el-table-column label="任务唯一编码" align="center" prop="fUniqueCode" />
<el-table-column label="任务归属" align="center" prop="fTaskBelong" />
<el-table-column label="任务类型" align="center" prop="fTaskType" :formatter="fTaskTypeFormat" />
<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="fEndTime" />
<el-table-column label="任务状态" align="center" prop="fStatus" :formatter="fStatusFormat" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-document"
@click="handleDetail(scope.row)"
v-hasPermi="['supervision:task:query']"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['supervision:task:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['supervision:task:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改检查任务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-row class="el-row-table">
<el-col :span="12">
<el-form-item label="任务名称" prop="fName">
<el-input v-model="form.fName" placeholder="请输入任务名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务唯一编码" prop="fUniqueCode">
<el-input v-model="form.fUniqueCode" placeholder="请输入任务唯一编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务归属" prop="fTaskBelong">
<el-input v-model="form.fTaskBelong" placeholder="请输入任务归属" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务类型" prop="fTaskType">
<el-select v-model="form.fTaskType" placeholder="请选择任务类型" style="width: 100%">
<el-option
v-for="dict in fTaskTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否下发" prop="fDistributeFlag">
<el-select v-model="form.fDistributeFlag" placeholder="请选择是否下发" style="width: 100%">
<el-option
v-for="dict in fDistributeFlagOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="parseInt(dict.dictValue)"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="任务说明" prop="fDesc">
<el-input type="textarea" v-model="form.fDesc" placeholder="请输入任务说明" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务开始时间" prop="fStartTime">
<el-date-picker
style="width: 100%"
v-model="form.fStartTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择任务开始时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务截至时间" prop="fEndTime">
<el-date-picker
style="width: 100%"
v-model="form.fEndTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择任务截至时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务状态" prop="fStatus">
<el-select v-model="form.fStatus" placeholder="请选择任务状态" style="width: 100%">
<el-option
v-for="dict in fStatusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="删除标记" prop="fDeleteFlag">
<el-select v-model="form.fDeleteFlag" placeholder="请选择删除标记" style="width: 100%">
<el-option
v-for="dict in fDeleteFlagOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="parseInt(dict.dictValue)"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="fRemark">
<el-input type="textarea" v-model="form.fRemark" placeholder="请输入描述" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 详情 -->
<DetailInfo ref="detail"/>
</div>
</template>
<script>
import { listInfor, getInfor, delInfor, addInfor, updateInfor, exportInfor } from "@/api/supervision/task";
import DetailInfo from "./components/DetailInfo";
export default {
name: "Infor",
components: {
DetailInfo
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
fUniqueCodes: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 检查任务表格数据
inforList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 任务类型 0-专项 1-日常 2-第三方评估抽查 3-随机抽查字典
fTaskTypeOptions: [],
// 是否下发 0-不下发 1 - 下发字典
fDistributeFlagOptions: [],
// 任务状态,NEW-未开始,ING-进行中,DON-已完结,OVD-超期未完成字典
fStatusOptions: [],
// 删除标记,0-可用,1-已删除字典
fDeleteFlagOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fUniqueCode: null,
fTaskBelong: null,
fTaskType: null,
fDistributeFlag: null,
fName: null,
fStatus: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
fUniqueCode: [
{ required: true, message: "任务唯一编码不能为空", trigger: "blur" }
],
fTaskBelong: [
{ required: true, message: "任务归属不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
this.getDicts("t_supervision_task_type").then(response => {
this.fTaskTypeOptions = response.data;
});
this.getDicts("t_distribute_flag").then(response => {
this.fDistributeFlagOptions = response.data;
});
this.getDicts("t_supervision_task_status").then(response => {
this.fStatusOptions = response.data;
});
this.getDicts("t_delete_flag").then(response => {
this.fDeleteFlagOptions = response.data;
});
},
methods: {
/** 查询检查任务列表 */
getList() {
this.loading = true;
listInfor(this.queryParams).then(response => {
this.inforList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 任务类型 0-专项 1-日常 2-第三方评估抽查 3-随机抽查字典翻译
fTaskTypeFormat(row, column) {
return this.selectDictLabel(this.fTaskTypeOptions, row.fTaskType);
},
// 是否下发 0-不下发 1 - 下发字典翻译
fDistributeFlagFormat(row, column) {
return this.selectDictLabel(this.fDistributeFlagOptions, row.fDistributeFlag);
},
// 任务状态,NEW-未开始,ING-进行中,DON-已完结,OVD-超期未完成字典翻译
fStatusFormat(row, column) {
return this.selectDictLabel(this.fStatusOptions, row.fStatus);
},
// 删除标记,0-可用,1-已删除字典翻译
fDeleteFlagFormat(row, column) {
return this.selectDictLabel(this.fDeleteFlagOptions, row.fDeleteFlag);
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
fInsTaskInforId: null,
fUniqueCode: null,
fTaskBelong: null,
fTaskType: null,
fDistributeFlag: null,
fName: null,
fDesc: null,
fStartTime: null,
fEndTime: null,
fStatus: null,
fDeleteFlag: null,
fRemark: null,
fCreateTime: null,
fCreateBy: null,
fUpdateTime: null,
fModifyBy: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fInsTaskInforId);
this.fUniqueCodes = selection.map(item => item.fUniqueCode);
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加检查任务";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const fInsTaskInforId = row.fInsTaskInforId || this.ids
getInfor(fInsTaskInforId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改检查任务";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.fInsTaskInforId != null) {
updateInfor(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInfor(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const fInsTaskInforIds = row.fInsTaskInforId || this.ids;
const fUniqueCodes = row.fUniqueCode || this.fUniqueCodes;
this.$confirm('是否确认删除任务唯一编码为"' + fUniqueCodes + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInfor(fInsTaskInforIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有检查任务数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportInfor(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
//详情
handleDetail(row){
this.$refs.detail.getDetailInfo(row.fInsTaskInforId);
},
}
};
</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