Commit 9da5eb99 authored by dongjg's avatar dongjg

historydata

parent 419e0924
package com.ruoyi.system.controller;
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.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.ActSuppliesHistorydata;
import com.ruoyi.system.service.IActSuppliesHistorydataService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 历史数据Controller
*
* @author dongjg
* @date 2023-08-01
*/
@RestController
@RequestMapping("/system/historydata")
public class ActSuppliesHistorydataController extends BaseController
{
@Autowired
private IActSuppliesHistorydataService actSuppliesHistorydataService;
/**
* 查询 历史数据列表
*/
@PreAuthorize("@ss.hasPermi('system:historydata:list')")
@GetMapping("/list")
public TableDataInfo list(ActSuppliesHistorydata actSuppliesHistorydata)
{
startPage();
List<ActSuppliesHistorydata> list = actSuppliesHistorydataService.selectActSuppliesHistorydataList(actSuppliesHistorydata);
return getDataTable(list);
}
/**
* 导出 历史数据列表
*/
@PreAuthorize("@ss.hasPermi('system:historydata:export')")
@Log(title = " 历史数据", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ActSuppliesHistorydata actSuppliesHistorydata)
{
List<ActSuppliesHistorydata> list = actSuppliesHistorydataService.selectActSuppliesHistorydataList(actSuppliesHistorydata);
ExcelUtil<ActSuppliesHistorydata> util = new ExcelUtil<ActSuppliesHistorydata>(ActSuppliesHistorydata.class);
return util.exportExcel(list, " 历史数据数据");
}
/**
* 获取 历史数据详细信息
*/
@PreAuthorize("@ss.hasPermi('system:historydata:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(actSuppliesHistorydataService.selectActSuppliesHistorydataById(id));
}
/**
* 新增 历史数据
*/
@PreAuthorize("@ss.hasPermi('system:historydata:add')")
@Log(title = " 历史数据", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ActSuppliesHistorydata actSuppliesHistorydata)
{
return toAjax(actSuppliesHistorydataService.insertActSuppliesHistorydata(actSuppliesHistorydata));
}
/**
* 修改 历史数据
*/
@PreAuthorize("@ss.hasPermi('system:historydata:edit')")
@Log(title = " 历史数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ActSuppliesHistorydata actSuppliesHistorydata)
{
return toAjax(actSuppliesHistorydataService.updateActSuppliesHistorydata(actSuppliesHistorydata));
}
/**
* 删除 历史数据
*/
@PreAuthorize("@ss.hasPermi('system:historydata:remove')")
@Log(title = " 历史数据", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(actSuppliesHistorydataService.deleteActSuppliesHistorydataByIds(ids));
}
}
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 历史数据对象 act_supplies_historydata
*
* @author dongjg
* @date 2023-08-01
*/
public class ActSuppliesHistorydata extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 历史数据 */
private Long id;
/** 模板 */
@Excel(name = "模板")
private Long templateId;
/** 规则 */
@Excel(name = "规则")
private Long roleId;
/** 标题 */
@Excel(name = "标题")
private String historyName;
/** 内容 */
@Excel(name = "内容")
private String historyContent;
/** 导入导出标识 */
@Excel(name = "导入导出标识")
private Long identifyingCode;
/** 状态 */
@Excel(name = "状态")
private Long status;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTemplateId(Long templateId)
{
this.templateId = templateId;
}
public Long getTemplateId()
{
return templateId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
public Long getRoleId()
{
return roleId;
}
public void setHistoryName(String historyName)
{
this.historyName = historyName;
}
public String getHistoryName()
{
return historyName;
}
public void setHistoryContent(String historyContent)
{
this.historyContent = historyContent;
}
public String getHistoryContent()
{
return historyContent;
}
public void setIdentifyingCode(Long identifyingCode)
{
this.identifyingCode = identifyingCode;
}
public Long getIdentifyingCode()
{
return identifyingCode;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("templateId", getTemplateId())
.append("roleId", getRoleId())
.append("historyName", getHistoryName())
.append("historyContent", getHistoryContent())
.append("identifyingCode", getIdentifyingCode())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.ActSuppliesHistorydata;
/**
* 历史数据Mapper接口
*
* @author dongjg
* @date 2023-08-01
*/
public interface ActSuppliesHistorydataMapper
{
/**
* 查询 历史数据
*
* @param id 历史数据ID
* @return 历史数据
*/
public ActSuppliesHistorydata selectActSuppliesHistorydataById(Long id);
/**
* 查询 历史数据列表
*
* @param actSuppliesHistorydata 历史数据
* @return 历史数据集合
*/
public List<ActSuppliesHistorydata> selectActSuppliesHistorydataList(ActSuppliesHistorydata actSuppliesHistorydata);
/**
* 新增 历史数据
*
* @param actSuppliesHistorydata 历史数据
* @return 结果
*/
public int insertActSuppliesHistorydata(ActSuppliesHistorydata actSuppliesHistorydata);
/**
* 修改 历史数据
*
* @param actSuppliesHistorydata 历史数据
* @return 结果
*/
public int updateActSuppliesHistorydata(ActSuppliesHistorydata actSuppliesHistorydata);
/**
* 删除 历史数据
*
* @param id 历史数据ID
* @return 结果
*/
public int deleteActSuppliesHistorydataById(Long id);
/**
* 批量删除 历史数据
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteActSuppliesHistorydataByIds(Long[] ids);
}
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.ActSuppliesHistorydata;
/**
* 历史数据Service接口
*
* @author dongjg
* @date 2023-08-01
*/
public interface IActSuppliesHistorydataService
{
/**
* 查询 历史数据
*
* @param id 历史数据ID
* @return 历史数据
*/
public ActSuppliesHistorydata selectActSuppliesHistorydataById(Long id);
/**
* 查询 历史数据列表
*
* @param actSuppliesHistorydata 历史数据
* @return 历史数据集合
*/
public List<ActSuppliesHistorydata> selectActSuppliesHistorydataList(ActSuppliesHistorydata actSuppliesHistorydata);
/**
* 新增 历史数据
*
* @param actSuppliesHistorydata 历史数据
* @return 结果
*/
public int insertActSuppliesHistorydata(ActSuppliesHistorydata actSuppliesHistorydata);
/**
* 修改 历史数据
*
* @param actSuppliesHistorydata 历史数据
* @return 结果
*/
public int updateActSuppliesHistorydata(ActSuppliesHistorydata actSuppliesHistorydata);
/**
* 批量删除 历史数据
*
* @param ids 需要删除的 历史数据ID
* @return 结果
*/
public int deleteActSuppliesHistorydataByIds(Long[] ids);
/**
* 删除 历史数据信息
*
* @param id 历史数据ID
* @return 结果
*/
public int deleteActSuppliesHistorydataById(Long id);
}
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ActSuppliesHistorydataMapper;
import com.ruoyi.system.domain.ActSuppliesHistorydata;
import com.ruoyi.system.service.IActSuppliesHistorydataService;
/**
* 历史数据Service业务层处理
*
* @author dongjg
* @date 2023-08-01
*/
@Service
public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydataService
{
@Autowired
private ActSuppliesHistorydataMapper actSuppliesHistorydataMapper;
/**
* 查询 历史数据
*
* @param id 历史数据ID
* @return 历史数据
*/
@Override
public ActSuppliesHistorydata selectActSuppliesHistorydataById(Long id)
{
return actSuppliesHistorydataMapper.selectActSuppliesHistorydataById(id);
}
/**
* 查询 历史数据列表
*
* @param actSuppliesHistorydata 历史数据
* @return 历史数据
*/
@Override
public List<ActSuppliesHistorydata> selectActSuppliesHistorydataList(ActSuppliesHistorydata actSuppliesHistorydata)
{
return actSuppliesHistorydataMapper.selectActSuppliesHistorydataList(actSuppliesHistorydata);
}
/**
* 新增 历史数据
*
* @param actSuppliesHistorydata 历史数据
* @return 结果
*/
@Override
public int insertActSuppliesHistorydata(ActSuppliesHistorydata actSuppliesHistorydata)
{
actSuppliesHistorydata.setCreateTime(DateUtils.getNowDate());
return actSuppliesHistorydataMapper.insertActSuppliesHistorydata(actSuppliesHistorydata);
}
/**
* 修改 历史数据
*
* @param actSuppliesHistorydata 历史数据
* @return 结果
*/
@Override
public int updateActSuppliesHistorydata(ActSuppliesHistorydata actSuppliesHistorydata)
{
return actSuppliesHistorydataMapper.updateActSuppliesHistorydata(actSuppliesHistorydata);
}
/**
* 批量删除 历史数据
*
* @param ids 需要删除的 历史数据ID
* @return 结果
*/
@Override
public int deleteActSuppliesHistorydataByIds(Long[] ids)
{
return actSuppliesHistorydataMapper.deleteActSuppliesHistorydataByIds(ids);
}
/**
* 删除 历史数据信息
*
* @param id 历史数据ID
* @return 结果
*/
@Override
public int deleteActSuppliesHistorydataById(Long id)
{
return actSuppliesHistorydataMapper.deleteActSuppliesHistorydataById(id);
}
}
<?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.ruoyi.system.mapper.ActSuppliesHistorydataMapper">
<resultMap type="ActSuppliesHistorydata" id="ActSuppliesHistorydataResult">
<result property="id" column="id" />
<result property="importUuid" column="import_uuid" />
<result property="templateId" column="template_id" />
<result property="exportUuid" column="export_uuid" />
<result property="roleId" column="role_id" />
<result property="historyName" column="history_name" />
<result property="historyContent" column="history_content" />
<result property="identifyingCode" column="identifying_code" />
<result property="status" column="status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectActSuppliesHistorydataVo">
select id, import_uuid, template_id, export_uuid, role_id, history_name, history_content, identifying_code, status, create_by, create_time from act_supplies_historydata
</sql>
<select id="selectActSuppliesHistorydataList" parameterType="ActSuppliesHistorydata" resultMap="ActSuppliesHistorydataResult">
<include refid="selectActSuppliesHistorydataVo"/>
<where>
<if test="importUuid != null and importUuid != ''"> and import_uuid = #{importUuid}</if>
<if test="templateId != null "> and template_id = #{templateId}</if>
<if test="exportUuid != null and exportUuid != ''"> and export_uuid = #{exportUuid}</if>
<if test="roleId != null "> and role_id = #{roleId}</if>
<if test="historyName != null and historyName != ''"> and history_name like concat('%', #{historyName}, '%')</if>
<if test="historyContent != null and historyContent != ''"> and history_content = #{historyContent}</if>
<if test="identifyingCode != null "> and identifying_code = #{identifyingCode}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectActSuppliesHistorydataById" parameterType="Long" resultMap="ActSuppliesHistorydataResult">
<include refid="selectActSuppliesHistorydataVo"/>
where id = #{id}
</select>
<insert id="insertActSuppliesHistorydata" parameterType="ActSuppliesHistorydata" useGeneratedKeys="true" keyProperty="id">
insert into act_supplies_historydata
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="importUuid != null">import_uuid,</if>
<if test="templateId != null">template_id,</if>
<if test="exportUuid != null">export_uuid,</if>
<if test="roleId != null">role_id,</if>
<if test="historyName != null">history_name,</if>
<if test="historyContent != null">history_content,</if>
<if test="identifyingCode != null">identifying_code,</if>
<if test="status != null">status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="importUuid != null">#{importUuid},</if>
<if test="templateId != null">#{templateId},</if>
<if test="exportUuid != null">#{exportUuid},</if>
<if test="roleId != null">#{roleId},</if>
<if test="historyName != null">#{historyName},</if>
<if test="historyContent != null">#{historyContent},</if>
<if test="identifyingCode != null">#{identifyingCode},</if>
<if test="status != null">#{status},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateActSuppliesHistorydata" parameterType="ActSuppliesHistorydata">
update act_supplies_historydata
<trim prefix="SET" suffixOverrides=",">
<if test="importUuid != null">import_uuid = #{importUuid},</if>
<if test="templateId != null">template_id = #{templateId},</if>
<if test="exportUuid != null">export_uuid = #{exportUuid},</if>
<if test="roleId != null">role_id = #{roleId},</if>
<if test="historyName != null">history_name = #{historyName},</if>
<if test="historyContent != null">history_content = #{historyContent},</if>
<if test="identifyingCode != null">identifying_code = #{identifyingCode},</if>
<if test="status != null">status = #{status},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteActSuppliesHistorydataById" parameterType="Long">
delete from act_supplies_historydata where id = #{id}
</delete>
<delete id="deleteActSuppliesHistorydataByIds" parameterType="String">
delete from act_supplies_historydata where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.ActSuppliesRoleDetailMapper"> <mapper namespace="com.ruoyi.system.mapper.ActSuppliesRoleDetailMapper">
<resultMap type="ActSuppliesRoleDetail" id="ActSuppliesRoleDetailResult"> <resultMap type="ActSuppliesRoleDetail" id="ActSuppliesRoleDetailResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="roleId" column="role_id" /> <result property="roleId" column="role_id" />
<result property="detailName" column="detail_name" /> <result property="detailName" column="detail_name" />
<!-- <result property="detailMH" column="detail_m_h" />--> <!-- <result property="detailMH" column="detail_m_h" />-->
<!-- <result property="detailML" column="detail_m_l" />--> <!-- <result property="detailML" column="detail_m_l" />-->
<!-- <result property="detailYH" column="detail_y_h" />--> <!-- <result property="detailYH" column="detail_y_h" />-->
<!-- <result property="detailYL" column="detail_y_l" />--> <!-- <result property="detailYL" column="detail_y_l" />-->
<result property="detailContent" column="detail_content" /> <result property="detailContent" column="detail_content" />
<result property="detailYS" column="detail_y_s"/> <result property="detailYS" column="detail_y_s"/>
<result property="convertStatus" column="convert_status" /> <result property="convertStatus" column="convert_status" />
...@@ -36,11 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -36,11 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
</resultMap> </resultMap>
<!-- <resultMap type="ActOperation" id="ActOperationResult">--> <!-- <resultMap type="ActOperation" id="ActOperationResult">-->
<!-- <result property="id" column="id" />--> <!-- <result property="id" column="id" />-->
<!-- <result property="operationName" column="operation_name" />--> <!-- <result property="operationName" column="operation_name" />-->
<!-- <result property="status" column="status" />--> <!-- <result property="status" column="status" />-->
<!-- </resultMap>--> <!-- </resultMap>-->
<sql id="selectActSuppliesRoleDetailVo"> <sql id="selectActSuppliesRoleDetailVo">
select id, role_id, detail_name, detail_m_h, detail_m_l, detail_y_h, detail_y_l,detail_y_s, detail_content,convert_status, status, create_by, create_time, update_by, update_time from act_supplies_role_detail select id, role_id, detail_name, detail_m_h, detail_m_l, detail_y_h, detail_y_l,detail_y_s, detail_content,convert_status, status, create_by, create_time, update_by, update_time from act_supplies_role_detail
...@@ -50,13 +50,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -50,13 +50,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, temp_id, role_name from act_supplies_role where status = 0 select id, temp_id, role_name from act_supplies_role where status = 0
</select> </select>
<!-- <select id="saveOperation" parameterType="ActOperation" resultMap="ActOperationResult">--> <!-- <select id="saveOperation" parameterType="ActOperation" resultMap="ActOperationResult">-->
<!-- select id, operation_name, status from act_operation_role where status = 0--> <!-- select id, operation_name, status from act_operation_role where status = 0-->
<!-- </select>--> <!-- </select>-->
<select id="selectActSuppliesRoleDetailList" parameterType="ActSuppliesRoleDetail" resultMap="ActSuppliesRoleDetailResult"> <select id="selectActSuppliesRoleDetailList" parameterType="ActSuppliesRoleDetail" resultMap="ActSuppliesRoleDetailResult">
select a.id,a.role_id,a.detail_name,a.detail_content,a.convert_status,a.status,b.role_name,b.id detaId from act_supplies_role_detail a,act_supplies_role b select a.id,a.role_id,a.detail_name,a.detail_content,a.convert_status,a.status,b.role_name,b.id detaId from act_supplies_role_detail a,act_supplies_role b
<where> <where>
<if test="detaId != null "> and b.id = #{detaId}</if> <if test="detaId != null "> and b.id = #{detaId}</if>
<if test="roleId != null"> and a.role_id = #{roleId}</if> <if test="roleId != null"> and a.role_id = #{roleId}</if>
<if test="detailName != null and detailName != ''"> and a.detail_name like concat('%', #{detailName}, '%')</if> <if test="detailName != null and detailName != ''"> and a.detail_name like concat('%', #{detailName}, '%')</if>
...@@ -66,22 +66,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -66,22 +66,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.role_id = b.id and a.role_id = b.id
</where> </where>
</select> </select>
<select id="selectActSuppliesRoleDetailById" parameterType="Integer" resultMap="ActSuppliesRoleDetailResult"> <select id="selectActSuppliesRoleDetailById" parameterType="Integer" resultMap="ActSuppliesRoleDetailResult">
<include refid="selectActSuppliesRoleDetailVo"/> <include refid="selectActSuppliesRoleDetailVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertActSuppliesRoleDetail" parameterType="ActSuppliesRoleDetail" useGeneratedKeys="true" keyProperty="id"> <insert id="insertActSuppliesRoleDetail" parameterType="ActSuppliesRoleDetail" useGeneratedKeys="true" keyProperty="id">
insert into act_supplies_role_detail insert into act_supplies_role_detail
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="roleId != null">role_id,</if> <if test="roleId != null">role_id,</if>
<if test="detailName != null">detail_name,</if> <if test="detailName != null">detail_name,</if>
<!-- <if test="detailMH != null">detail_m_h,</if>--> <!-- <if test="detailMH != null">detail_m_h,</if>-->
<!-- <if test="detailML != null">detail_m_l,</if>--> <!-- <if test="detailML != null">detail_m_l,</if>-->
<!-- <if test="detailYH != null">detail_y_h,</if>--> <!-- <if test="detailYH != null">detail_y_h,</if>-->
<!-- <if test="detailYL != null">detail_y_l,</if>--> <!-- <if test="detailYL != null">detail_y_l,</if>-->
<if test="detailYS != null">detail_y_s,</if> <if test="detailYS != null">detail_y_s,</if>
...@@ -93,15 +93,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -93,15 +93,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="roleId != null">#{roleId},</if> <if test="roleId != null">#{roleId},</if>
<if test="detailName != null">#{detailName},</if> <if test="detailName != null">#{detailName},</if>
<!-- <if test="detailMH != null">#{detailMH},</if>--> <!-- <if test="detailMH != null">#{detailMH},</if>-->
<!-- <if test="detailML != null">#{detailML},</if>--> <!-- <if test="detailML != null">#{detailML},</if>-->
<!-- <if test="detailYH != null">#{detailYH},</if>--> <!-- <if test="detailYH != null">#{detailYH},</if>-->
<!-- <if test="detailYL != null">#{detailYL},</if>--> <!-- <if test="detailYL != null">#{detailYL},</if>-->
<if test="detailYS != null">#{detailYS},</if> <if test="detailYS != null">#{detailYS},</if>
...@@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateActSuppliesRoleDetail" parameterType="ActSuppliesRoleDetail"> <update id="updateActSuppliesRoleDetail" parameterType="ActSuppliesRoleDetail">
...@@ -124,10 +124,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -124,10 +124,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="detailContent != null">detail_content = #{detailContent},</if> <if test="detailContent != null">detail_content = #{detailContent},</if>
<if test="convertStatus != null">convert_status = #{convertStatus},</if> <if test="convertStatus != null">convert_status = #{convertStatus},</if>
<!-- <if test="detailMH != null">detail_m_h = #{detailMH},</if>--> <!-- <if test="detailMH != null">detail_m_h = #{detailMH},</if>-->
<!-- <if test="detailML != null">detail_m_l = #{detailML},</if>--> <!-- <if test="detailML != null">detail_m_l = #{detailML},</if>-->
<!-- <if test="detailYH != null">detail_y_h = #{detailYH},</if>--> <!-- <if test="detailYH != null">detail_y_h = #{detailYH},</if>-->
<!-- <if test="detailYL != null">detail_y_l = #{detailYL},</if>--> <!-- <if test="detailYL != null">detail_y_l = #{detailYL},</if>-->
<if test="detailYS != null">detail_y_s = #{detailYS},</if> <if test="detailYS != null">detail_y_s = #{detailYS},</if>
<if test="status != null">status = #{status},</if> <if test="status != null">status = #{status},</if>
...@@ -144,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -144,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteActSuppliesRoleDetailByIds" parameterType="String"> <delete id="deleteActSuppliesRoleDetailByIds" parameterType="String">
delete from act_supplies_role_detail where id in delete from act_supplies_role_detail where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
......
import request from '@/utils/request'
// 查询 历史数据列表
export function listHistorydata(query) {
return request({
url: '/system/historydata/list',
method: 'get',
params: query
})
}
// 查询 历史数据详细
export function getHistorydata(id) {
return request({
url: '/system/historydata/' + id,
method: 'get'
})
}
// 新增 历史数据
export function addHistorydata(data) {
return request({
url: '/system/historydata',
method: 'post',
data: data
})
}
// 修改 历史数据
export function updateHistorydata(data) {
return request({
url: '/system/historydata',
method: 'put',
data: data
})
}
// 删除 历史数据
export function delHistorydata(id) {
return request({
url: '/system/historydata/' + id,
method: 'delete'
})
}
// 导出 历史数据
export function exportHistorydata(query) {
return request({
url: '/system/historydata/export',
method: 'get',
params: query
})
}
\ No newline at end of file
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="模板" prop="templateId">
<el-input
v-model="queryParams.templateId"
placeholder="请输入模板"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="规则" prop="roleId">
<el-input
v-model="queryParams.roleId"
placeholder="请输入规则"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="标题" prop="historyName">
<el-input
v-model="queryParams.historyName"
placeholder="请输入标题"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="导入导出" prop="identifyingCode">
<el-input
v-model="queryParams.identifyingCode"
placeholder="请输入导入导出标识"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</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="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:historydata:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="historydataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" />
<el-table-column label="模板" align="center" prop="templateId" />
<el-table-column label="规则" align="center" prop="roleId" />
<el-table-column label="标题" align="center" prop="historyName" />
<!--<el-table-column label="内容" align="center" prop="historyContent" />-->
<el-table-column label="导入导出" align="center" prop="identifyingCode" />
<el-table-column label="操作时间" align="center" prop="createTime" />
<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-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:historydata:edit']"
>详情</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:historydata: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"
/>
</div>
</template>
<script>
import { listHistorydata, getHistorydata, delHistorydata, addHistorydata, updateHistorydata, exportHistorydata } from "@/api/system/historydata";
import Editor from '@/components/Editor';
export default {
name: "Historydata",
components: {
Editor,
},
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 历史数据表格数据
historydataList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
importUuid: null,
templateId: null,
exportUuid: null,
roleId: null,
historyName: null,
historyContent: null,
identifyingCode: null,
status: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询 历史数据列表 */
getList() {
this.loading = true;
listHistorydata(this.queryParams).then(response => {
this.historydataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
importUuid: null,
templateId: null,
exportUuid: null,
roleId: null,
historyName: null,
historyContent: null,
identifyingCode: null,
status: 0,
createBy: null,
createTime: 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.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加 历史数据";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getHistorydata(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改 历史数据";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateHistorydata(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addHistorydata(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm('是否确认删除 历史数据编号为"' + ids + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delHistorydata(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有 历史数据数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportHistorydata(queryParams);
}).then(response => {
this.download(response.msg);
})
}
}
};
</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