lau572
11 months ago
12 changed files with 574 additions and 20 deletions
@ -0,0 +1,106 @@ |
|||
package com.zc.business.controller; |
|||
|
|||
import java.util.List; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
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.zc.business.domain.DcEventProcess; |
|||
import com.zc.business.service.IDcEventProcessService; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 事件处理流程Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-03 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/system/process") |
|||
public class DcEventProcessController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private IDcEventProcessService dcEventProcessService; |
|||
|
|||
/** |
|||
* 查询事件处理流程列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('system:process:list')") |
|||
@GetMapping("/list") |
|||
public TableDataInfo list(DcEventProcess dcEventProcess) |
|||
{ |
|||
startPage(); |
|||
List<DcEventProcess> list = dcEventProcessService.selectDcEventProcessList(dcEventProcess); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
|
|||
|
|||
/** |
|||
* 导出事件处理流程列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('system:process:export')") |
|||
@Log(title = "事件处理流程", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(HttpServletResponse response, DcEventProcess dcEventProcess) |
|||
{ |
|||
List<DcEventProcess> list = dcEventProcessService.selectDcEventProcessList(dcEventProcess); |
|||
ExcelUtil<DcEventProcess> util = new ExcelUtil<>(DcEventProcess.class); |
|||
util.exportExcel(response, list, "事件处理流程数据"); |
|||
} |
|||
|
|||
/** |
|||
* 获取事件处理流程详细信息 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('system:process:query')") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") Long id) |
|||
{ |
|||
return AjaxResult.success(dcEventProcessService.selectDcEventProcessById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增事件处理流程 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('system:process:add')") |
|||
@Log(title = "事件处理流程", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
public AjaxResult add(@RequestBody DcEventProcess dcEventProcess) |
|||
{ |
|||
return toAjax(dcEventProcessService.insertDcEventProcess(dcEventProcess)); |
|||
} |
|||
|
|||
/** |
|||
* 修改事件处理流程 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('system:process:edit')") |
|||
@Log(title = "事件处理流程", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody DcEventProcess dcEventProcess) |
|||
{ |
|||
return toAjax(dcEventProcessService.updateDcEventProcess(dcEventProcess)); |
|||
} |
|||
|
|||
/** |
|||
* 删除事件处理流程 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('system:process:remove')") |
|||
@Log(title = "事件处理流程", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable Long[] ids) |
|||
{ |
|||
return toAjax(dcEventProcessService.deleteDcEventProcessByIds(ids)); |
|||
} |
|||
} |
@ -1,4 +0,0 @@ |
|||
package com.zc.business.controller; |
|||
|
|||
public class temp { |
|||
} |
@ -0,0 +1,154 @@ |
|||
package com.zc.business.domain; |
|||
|
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 事件处理流程对象 dc_event_process |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-03 |
|||
*/ |
|||
public class DcEventProcess extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** $column.columnComment */ |
|||
private Long id; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
|||
private String eventId; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
|||
private Date operationTime; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
|||
private String operator; |
|||
|
|||
/** 1-pc端 |
|||
2-手机端 */ |
|||
@Excel(name = "1-pc端 2-手机端") |
|||
private Integer source; |
|||
|
|||
/** 1-节点 |
|||
2-信息发布 |
|||
*/ |
|||
@Excel(name = "1-节点 2-信息发布 ") |
|||
private Integer processType; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
|||
private String context; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
|||
private Long processId; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
|||
private String processName; |
|||
|
|||
public void setId(Long id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setEventId(String eventId) |
|||
{ |
|||
this.eventId = eventId; |
|||
} |
|||
|
|||
public String getEventId() |
|||
{ |
|||
return eventId; |
|||
} |
|||
public void setOperationTime(Date operationTime) |
|||
{ |
|||
this.operationTime = operationTime; |
|||
} |
|||
|
|||
public Date getOperationTime() |
|||
{ |
|||
return operationTime; |
|||
} |
|||
public void setOperator(String operator) |
|||
{ |
|||
this.operator = operator; |
|||
} |
|||
|
|||
public String getOperator() |
|||
{ |
|||
return operator; |
|||
} |
|||
public void setSource(Integer source) |
|||
{ |
|||
this.source = source; |
|||
} |
|||
|
|||
public Integer getSource() |
|||
{ |
|||
return source; |
|||
} |
|||
public void setProcessType(Integer processType) |
|||
{ |
|||
this.processType = processType; |
|||
} |
|||
|
|||
public Integer getProcessType() |
|||
{ |
|||
return processType; |
|||
} |
|||
public void setContext(String context) |
|||
{ |
|||
this.context = context; |
|||
} |
|||
|
|||
public String getContext() |
|||
{ |
|||
return context; |
|||
} |
|||
public void setProcessId(Long processId) |
|||
{ |
|||
this.processId = processId; |
|||
} |
|||
|
|||
public Long getProcessId() |
|||
{ |
|||
return processId; |
|||
} |
|||
public void setProcessName(String processName) |
|||
{ |
|||
this.processName = processName; |
|||
} |
|||
|
|||
public String getProcessName() |
|||
{ |
|||
return processName; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("eventId", getEventId()) |
|||
.append("operationTime", getOperationTime()) |
|||
.append("operator", getOperator()) |
|||
.append("source", getSource()) |
|||
.append("processType", getProcessType()) |
|||
.append("context", getContext()) |
|||
.append("processId", getProcessId()) |
|||
.append("processName", getProcessName()) |
|||
.toString(); |
|||
} |
|||
} |
@ -1,4 +0,0 @@ |
|||
package com.zc.business.domain; |
|||
|
|||
public class temp { |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.zc.business.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.zc.business.domain.DcEventProcess; |
|||
|
|||
/** |
|||
* 事件处理流程Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-03 |
|||
*/ |
|||
public interface DcEventProcessMapper |
|||
{ |
|||
/** |
|||
* 查询事件处理流程 |
|||
* |
|||
* @param id 事件处理流程主键 |
|||
* @return 事件处理流程 |
|||
*/ |
|||
public DcEventProcess selectDcEventProcessById(Long id); |
|||
|
|||
/** |
|||
* 查询事件处理流程列表 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 事件处理流程集合 |
|||
*/ |
|||
List<DcEventProcess> selectDcEventProcessList(DcEventProcess dcEventProcess); |
|||
|
|||
/** |
|||
* 新增事件处理流程 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 结果 |
|||
*/ |
|||
int insertDcEventProcess(DcEventProcess dcEventProcess); |
|||
|
|||
/** |
|||
* 修改事件处理流程 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 结果 |
|||
*/ |
|||
int updateDcEventProcess(DcEventProcess dcEventProcess); |
|||
|
|||
/** |
|||
* 删除事件处理流程 |
|||
* |
|||
* @param id 事件处理流程主键 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcEventProcessById(Long id); |
|||
|
|||
/** |
|||
* 批量删除事件处理流程 |
|||
* |
|||
* @param ids 需要删除的数据主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcEventProcessByIds(Long[] ids); |
|||
} |
@ -1,4 +0,0 @@ |
|||
package com.zc.business.mapper; |
|||
|
|||
public class temp { |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.zc.business.service; |
|||
|
|||
import java.util.List; |
|||
import com.zc.business.domain.DcEventProcess; |
|||
|
|||
/** |
|||
* 事件处理流程Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-03 |
|||
*/ |
|||
public interface IDcEventProcessService |
|||
{ |
|||
/** |
|||
* 查询事件处理流程 |
|||
* |
|||
* @param id 事件处理流程主键 |
|||
* @return 事件处理流程 |
|||
*/ |
|||
public DcEventProcess selectDcEventProcessById(Long id); |
|||
|
|||
/** |
|||
* 查询事件处理流程列表 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 事件处理流程集合 |
|||
*/ |
|||
List<DcEventProcess> selectDcEventProcessList(DcEventProcess dcEventProcess); |
|||
|
|||
/** |
|||
* 新增事件处理流程 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 结果 |
|||
*/ |
|||
int insertDcEventProcess(DcEventProcess dcEventProcess); |
|||
|
|||
/** |
|||
* 修改事件处理流程 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 结果 |
|||
*/ |
|||
int updateDcEventProcess(DcEventProcess dcEventProcess); |
|||
|
|||
/** |
|||
* 批量删除事件处理流程 |
|||
* |
|||
* @param ids 需要删除的事件处理流程主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcEventProcessByIds(Long[] ids); |
|||
|
|||
/** |
|||
* 删除事件处理流程信息 |
|||
* |
|||
* @param id 事件处理流程主键 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcEventProcessById(Long id); |
|||
} |
@ -0,0 +1,93 @@ |
|||
package com.zc.business.service.impl; |
|||
|
|||
import java.util.List; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.zc.business.mapper.DcEventProcessMapper; |
|||
import com.zc.business.domain.DcEventProcess; |
|||
import com.zc.business.service.IDcEventProcessService; |
|||
|
|||
/** |
|||
* 事件处理流程Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-03 |
|||
*/ |
|||
@Service |
|||
public class DcEventProcessServiceImpl implements IDcEventProcessService |
|||
{ |
|||
@Autowired |
|||
private DcEventProcessMapper dcEventProcessMapper; |
|||
|
|||
/** |
|||
* 查询事件处理流程 |
|||
* |
|||
* @param id 事件处理流程主键 |
|||
* @return 事件处理流程 |
|||
*/ |
|||
@Override |
|||
public DcEventProcess selectDcEventProcessById(Long id) |
|||
{ |
|||
return dcEventProcessMapper.selectDcEventProcessById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询事件处理流程列表 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 事件处理流程 |
|||
*/ |
|||
@Override |
|||
public List<DcEventProcess> selectDcEventProcessList(DcEventProcess dcEventProcess) |
|||
{ |
|||
return dcEventProcessMapper.selectDcEventProcessList(dcEventProcess); |
|||
} |
|||
|
|||
/** |
|||
* 新增事件处理流程 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertDcEventProcess(DcEventProcess dcEventProcess) |
|||
{ |
|||
return dcEventProcessMapper.insertDcEventProcess(dcEventProcess); |
|||
} |
|||
|
|||
/** |
|||
* 修改事件处理流程 |
|||
* |
|||
* @param dcEventProcess 事件处理流程 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateDcEventProcess(DcEventProcess dcEventProcess) |
|||
{ |
|||
return dcEventProcessMapper.updateDcEventProcess(dcEventProcess); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除事件处理流程 |
|||
* |
|||
* @param ids 需要删除的事件处理流程主键 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteDcEventProcessByIds(Long[] ids) |
|||
{ |
|||
return dcEventProcessMapper.deleteDcEventProcessByIds(ids); |
|||
} |
|||
|
|||
/** |
|||
* 删除事件处理流程信息 |
|||
* |
|||
* @param id 事件处理流程主键 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteDcEventProcessById(Long id) |
|||
{ |
|||
return dcEventProcessMapper.deleteDcEventProcessById(id); |
|||
} |
|||
} |
@ -1,4 +0,0 @@ |
|||
package com.zc.business.service.impl; |
|||
|
|||
public class temp { |
|||
} |
@ -0,0 +1,93 @@ |
|||
<?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.zc.business.mapper.DcEventProcessMapper"> |
|||
|
|||
<resultMap type="DcEventProcess" id="DcEventProcessResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="eventId" column="event_id" /> |
|||
<result property="operationTime" column="operation_time" /> |
|||
<result property="operator" column="operator" /> |
|||
<result property="source" column="source" /> |
|||
<result property="processType" column="process_type" /> |
|||
<result property="context" column="context" /> |
|||
<result property="processId" column="process_id" /> |
|||
<result property="processName" column="process_name" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectDcEventProcessVo"> |
|||
select id, event_id, operation_time, operator, source, process_type, context, process_id, process_name from dc_event_process |
|||
</sql> |
|||
|
|||
<select id="selectDcEventProcessList" parameterType="DcEventProcess" resultMap="DcEventProcessResult"> |
|||
<include refid="selectDcEventProcessVo"/> |
|||
<where> |
|||
<if test="eventId != null and eventId != ''"> and event_id = #{eventId}</if> |
|||
<if test="operationTime != null "> and operation_time = #{operationTime}</if> |
|||
<if test="operator != null and operator != ''"> and operator = #{operator}</if> |
|||
<if test="source != null "> and source = #{source}</if> |
|||
<if test="processType != null "> and process_type = #{processType}</if> |
|||
<if test="context != null and context != ''"> and context = #{context}</if> |
|||
<if test="processId != null "> and process_id = #{processId}</if> |
|||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectDcEventProcessById" parameterType="Long" resultMap="DcEventProcessResult"> |
|||
<include refid="selectDcEventProcessVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertDcEventProcess" parameterType="DcEventProcess"> |
|||
insert into dc_event_process |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null">id,</if> |
|||
<if test="eventId != null and eventId != ''">event_id,</if> |
|||
<if test="operationTime != null">operation_time,</if> |
|||
<if test="operator != null and operator != ''">operator,</if> |
|||
<if test="source != null">source,</if> |
|||
<if test="processType != null">process_type,</if> |
|||
<if test="context != null">context,</if> |
|||
<if test="processId != null">process_id,</if> |
|||
<if test="processName != null">process_name,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null">#{id},</if> |
|||
<if test="eventId != null and eventId != ''">#{eventId},</if> |
|||
<if test="operationTime != null">#{operationTime},</if> |
|||
<if test="operator != null and operator != ''">#{operator},</if> |
|||
<if test="source != null">#{source},</if> |
|||
<if test="processType != null">#{processType},</if> |
|||
<if test="context != null">#{context},</if> |
|||
<if test="processId != null">#{processId},</if> |
|||
<if test="processName != null">#{processName},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateDcEventProcess" parameterType="DcEventProcess"> |
|||
update dc_event_process |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="eventId != null and eventId != ''">event_id = #{eventId},</if> |
|||
<if test="operationTime != null">operation_time = #{operationTime},</if> |
|||
<if test="operator != null and operator != ''">operator = #{operator},</if> |
|||
<if test="source != null">source = #{source},</if> |
|||
<if test="processType != null">process_type = #{processType},</if> |
|||
<if test="context != null">context = #{context},</if> |
|||
<if test="processId != null">process_id = #{processId},</if> |
|||
<if test="processName != null">process_name = #{processName},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteDcEventProcessById" parameterType="Long"> |
|||
delete from dc_event_process where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteDcEventProcessByIds" parameterType="String"> |
|||
delete from dc_event_process where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
@ -1,4 +0,0 @@ |
|||
package com.zc.business.controller; |
|||
|
|||
public class temp { |
|||
} |
Loading…
Reference in new issue