新增任务管理

This commit is contained in:
qimingjin 2021-08-12 21:38:43 +08:00
parent 00e40fc162
commit 94f0c49839
10 changed files with 882 additions and 0 deletions

View File

@ -0,0 +1,126 @@
package com.snow.web.controller.system;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.snow.common.annotation.Log;
import com.snow.common.enums.BusinessType;
import org.springframework.stereotype.Controller;
import com.snow.system.domain.SysOaTask;
import com.snow.system.service.ISysOaTaskService;
import com.snow.common.core.controller.BaseController;
import com.snow.common.core.domain.AjaxResult;
import com.snow.common.utils.poi.ExcelUtil;
import com.snow.common.core.page.TableDataInfo;
/**
* 系统任务Controller
*
* @author 没用的阿吉
* @date 2021-07-29
*/
@Controller
@RequestMapping("/system/task")
public class SysOaTaskController extends BaseController
{
private String prefix = "system/task";
@Autowired
private ISysOaTaskService sysOaTaskService;
@RequiresPermissions("system:task:view")
@GetMapping()
public String task()
{
return prefix + "/task";
}
/**
* 查询系统任务列表
*/
@RequiresPermissions("system:task:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysOaTask sysOaTask)
{
startPage();
List<SysOaTask> list = sysOaTaskService.selectSysOaTaskList(sysOaTask);
return getDataTable(list);
}
/**
* 导出系统任务列表
*/
@RequiresPermissions("system:task:export")
@Log(title = "系统任务", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysOaTask sysOaTask)
{
List<SysOaTask> list = sysOaTaskService.selectSysOaTaskList(sysOaTask);
ExcelUtil<SysOaTask> util = new ExcelUtil<SysOaTask>(SysOaTask.class);
return util.exportExcel(list, "task");
}
/**
* 新增系统任务
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存系统任务
*/
@RequiresPermissions("system:task:add")
@Log(title = "系统任务", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysOaTask sysOaTask)
{
return toAjax(sysOaTaskService.insertSysOaTask(sysOaTask));
}
/**
* 修改系统任务
*/
@GetMapping("/edit/{taskNo}")
public String edit(@PathVariable("taskNo") String taskNo, ModelMap mmap)
{
SysOaTask sysOaTask = sysOaTaskService.selectSysOaTaskById(taskNo);
mmap.put("sysOaTask", sysOaTask);
return prefix + "/edit";
}
/**
* 修改保存系统任务
*/
@RequiresPermissions("system:task:edit")
@Log(title = "系统任务", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysOaTask sysOaTask)
{
return toAjax(sysOaTaskService.updateSysOaTask(sysOaTask));
}
/**
* 删除系统任务
*/
@RequiresPermissions("system:task:remove")
@Log(title = "系统任务", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysOaTaskService.deleteSysOaTaskByIds(ids));
}
}

View File

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增系统任务')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-task-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">任务名称:</label>
<div class="col-sm-8">
<input name="taskName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务内容:</label>
<div class="col-sm-8">
<input name="taskContent" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务状态:</label>
<div class="col-sm-8">
<select name="taskStatus" class="form-control m-b" th:with="type=${@dict.getType('ding_task_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务类型:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_task_type')}">
<input type="radio" th:id="${'taskType_' + dict.dictCode}" name="taskType" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'taskType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务来源:</label>
<div class="col-sm-8">
<input name="taskSource" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务外部id</label>
<div class="col-sm-8">
<input name="taskOutsideId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务跳转URL</label>
<div class="col-sm-8">
<input name="taskUrl" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">乐观锁:</label>
<div class="col-sm-8">
<input name="revision" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">删除标识:</label>
<div class="col-sm-8">
<input name="isDelete" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/task"
$("#form-task-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-task-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,85 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改系统任务')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-task-edit" th:object="${sysOaTask}">
<input name="taskNo" th:field="*{taskNo}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">任务名称:</label>
<div class="col-sm-8">
<input name="taskName" th:field="*{taskName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务内容:</label>
<div class="col-sm-8">
<input name="taskContent" th:field="*{taskContent}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务状态:</label>
<div class="col-sm-8">
<select name="taskStatus" class="form-control m-b" th:with="type=${@dict.getType('ding_task_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{taskStatus}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务类型:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_task_type')}">
<input type="radio" th:id="${'taskType_' + dict.dictCode}" name="taskType" th:value="${dict.dictValue}" th:field="*{taskType}">
<label th:for="${'taskType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务来源:</label>
<div class="col-sm-8">
<input name="taskSource" th:field="*{taskSource}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务外部id</label>
<div class="col-sm-8">
<input name="taskOutsideId" th:field="*{taskOutsideId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">任务跳转URL</label>
<div class="col-sm-8">
<input name="taskUrl" th:field="*{taskUrl}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">乐观锁:</label>
<div class="col-sm-8">
<input name="revision" th:field="*{revision}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">删除标识:</label>
<div class="col-sm-8">
<input name="isDelete" th:field="*{isDelete}" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/task";
$("#form-task-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-task-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,164 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('系统任务列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>任务名称:</label>
<input type="text" name="taskName"/>
</li>
<li>
<label>任务内容:</label>
<input type="text" name="taskContent"/>
</li>
<li>
<label>任务状态:</label>
<select name="taskStatus" th:with="type=${@dict.getType('ding_task_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>任务类型:</label>
<select name="taskType" th:with="type=${@dict.getType('sys_task_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>任务来源:</label>
<input type="text" name="taskSource"/>
</li>
<li>
<label>任务外部id</label>
<input type="text" name="taskOutsideId"/>
</li>
<li>
<label>任务跳转URL</label>
<input type="text" name="taskUrl"/>
</li>
<li>
<label>乐观锁:</label>
<input type="text" name="revision"/>
</li>
<li>
<label>删除标识:</label>
<input type="text" name="isDelete"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:task:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:task:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:task:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:task:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:task:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:task:remove')}]];
var taskStatusDatas = [[${@dict.getType('ding_task_status')}]];
var taskTypeDatas = [[${@dict.getType('sys_task_type')}]];
var prefix = ctx + "system/task";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "系统任务",
columns: [{
checkbox: true
},
{
field: 'taskNo',
title: '任务编号',
visible: false
},
{
field: 'taskName',
title: '任务名称'
},
{
field: 'taskContent',
title: '任务内容'
},
{
field: 'taskStatus',
title: '任务状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(taskStatusDatas, value);
}
},
{
field: 'taskType',
title: '任务类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(taskTypeDatas, value);
}
},
{
field: 'taskSource',
title: '任务来源'
},
{
field: 'taskOutsideId',
title: '任务外部id'
},
{
field: 'taskUrl',
title: '任务跳转URL'
},
{
field: 'revision',
title: '乐观锁'
},
{
field: 'isDelete',
title: '删除标识'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.taskNo + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.taskNo + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,60 @@
package com.snow.system.domain;
import com.snow.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.snow.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 系统任务对象 sys_oa_task
*
* @author 没用的阿吉
* @date 2021-07-29
*/
@Data
public class SysOaTask extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 任务编号 */
private String taskNo;
/** 任务名称 */
@Excel(name = "任务名称")
private String taskName;
/** 任务内容 */
@Excel(name = "任务内容")
private String taskContent;
/** 任务状态(详见数据字典) */
@Excel(name = "任务状态", readConverterExp = "详=见数据字典")
private String taskStatus;
/** 任务类型(详见数据字典) */
@Excel(name = "任务类型", readConverterExp = "详=见数据字典")
private String taskType;
/** 任务来源 */
@Excel(name = "任务来源")
private String taskSource;
/** 任务外部id */
@Excel(name = "任务外部id")
private String taskOutsideId;
/** 任务跳转URL */
@Excel(name = "任务跳转URL")
private String taskUrl;
/** 乐观锁 */
@Excel(name = "乐观锁")
private Long revision;
/** 删除标识 */
@Excel(name = "删除标识")
private Long isDelete;
}

View File

@ -0,0 +1,61 @@
package com.snow.system.mapper;
import java.util.List;
import com.snow.system.domain.SysOaTask;
/**
* 系统任务Mapper接口
*
* @author 没用的阿吉
* @date 2021-07-29
*/
public interface SysOaTaskMapper
{
/**
* 查询系统任务
*
* @param taskNo 系统任务ID
* @return 系统任务
*/
public SysOaTask selectSysOaTaskById(String taskNo);
/**
* 查询系统任务列表
*
* @param sysOaTask 系统任务
* @return 系统任务集合
*/
public List<SysOaTask> selectSysOaTaskList(SysOaTask sysOaTask);
/**
* 新增系统任务
*
* @param sysOaTask 系统任务
* @return 结果
*/
public int insertSysOaTask(SysOaTask sysOaTask);
/**
* 修改系统任务
*
* @param sysOaTask 系统任务
* @return 结果
*/
public int updateSysOaTask(SysOaTask sysOaTask);
/**
* 删除系统任务
*
* @param taskNo 系统任务ID
* @return 结果
*/
public int deleteSysOaTaskById(String taskNo);
/**
* 批量删除系统任务
*
* @param taskNos 需要删除的数据ID
* @return 结果
*/
public int deleteSysOaTaskByIds(String[] taskNos);
}

View File

@ -0,0 +1,61 @@
package com.snow.system.service;
import java.util.List;
import com.snow.system.domain.SysOaTask;
/**
* 系统任务Service接口
*
* @author 没用的阿吉
* @date 2021-07-29
*/
public interface ISysOaTaskService
{
/**
* 查询系统任务
*
* @param taskNo 系统任务ID
* @return 系统任务
*/
public SysOaTask selectSysOaTaskById(String taskNo);
/**
* 查询系统任务列表
*
* @param sysOaTask 系统任务
* @return 系统任务集合
*/
public List<SysOaTask> selectSysOaTaskList(SysOaTask sysOaTask);
/**
* 新增系统任务
*
* @param sysOaTask 系统任务
* @return 结果
*/
public int insertSysOaTask(SysOaTask sysOaTask);
/**
* 修改系统任务
*
* @param sysOaTask 系统任务
* @return 结果
*/
public int updateSysOaTask(SysOaTask sysOaTask);
/**
* 批量删除系统任务
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysOaTaskByIds(String ids);
/**
* 删除系统任务信息
*
* @param taskNo 系统任务ID
* @return 结果
*/
public int deleteSysOaTaskById(String taskNo);
}

View File

@ -0,0 +1,97 @@
package com.snow.system.service.impl;
import java.util.List;
import com.snow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.snow.system.mapper.SysOaTaskMapper;
import com.snow.system.domain.SysOaTask;
import com.snow.system.service.ISysOaTaskService;
import com.snow.common.core.text.Convert;
/**
* 系统任务Service业务层处理
*
* @author 没用的阿吉
* @date 2021-07-29
*/
@Service
public class SysOaTaskServiceImpl implements ISysOaTaskService
{
@Autowired
private SysOaTaskMapper sysOaTaskMapper;
/**
* 查询系统任务
*
* @param taskNo 系统任务ID
* @return 系统任务
*/
@Override
public SysOaTask selectSysOaTaskById(String taskNo)
{
return sysOaTaskMapper.selectSysOaTaskById(taskNo);
}
/**
* 查询系统任务列表
*
* @param sysOaTask 系统任务
* @return 系统任务
*/
@Override
public List<SysOaTask> selectSysOaTaskList(SysOaTask sysOaTask)
{
return sysOaTaskMapper.selectSysOaTaskList(sysOaTask);
}
/**
* 新增系统任务
*
* @param sysOaTask 系统任务
* @return 结果
*/
@Override
public int insertSysOaTask(SysOaTask sysOaTask)
{
sysOaTask.setCreateTime(DateUtils.getNowDate());
return sysOaTaskMapper.insertSysOaTask(sysOaTask);
}
/**
* 修改系统任务
*
* @param sysOaTask 系统任务
* @return 结果
*/
@Override
public int updateSysOaTask(SysOaTask sysOaTask)
{
sysOaTask.setUpdateTime(DateUtils.getNowDate());
return sysOaTaskMapper.updateSysOaTask(sysOaTask);
}
/**
* 删除系统任务对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysOaTaskByIds(String ids)
{
return sysOaTaskMapper.deleteSysOaTaskByIds(Convert.toStrArray(ids));
}
/**
* 删除系统任务信息
*
* @param taskNo 系统任务ID
* @return 结果
*/
@Override
public int deleteSysOaTaskById(String taskNo)
{
return sysOaTaskMapper.deleteSysOaTaskById(taskNo);
}
}

View File

@ -0,0 +1,115 @@
<?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.snow.system.mapper.SysOaTaskMapper">
<resultMap type="SysOaTask" id="SysOaTaskResult">
<result property="taskNo" column="task_no" />
<result property="taskName" column="task_name" />
<result property="taskContent" column="task_content" />
<result property="taskStatus" column="task_status" />
<result property="taskType" column="task_type" />
<result property="taskSource" column="task_source" />
<result property="taskOutsideId" column="task_outside_id" />
<result property="taskUrl" column="task_url" />
<result property="revision" column="revision" />
<result property="createBy" column="create_by" />
<result property="isDelete" column="is_delete" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectSysOaTaskVo">
select task_no, task_name, task_content, task_status, task_type, task_source, task_outside_id, task_url, revision, create_by, is_delete, create_time, update_by, update_time from sys_oa_task
</sql>
<select id="selectSysOaTaskList" parameterType="SysOaTask" resultMap="SysOaTaskResult">
<include refid="selectSysOaTaskVo"/>
<where>
<if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
<if test="taskContent != null and taskContent != ''"> and task_content = #{taskContent}</if>
<if test="taskStatus != null and taskStatus != ''"> and task_status = #{taskStatus}</if>
<if test="taskType != null and taskType != ''"> and task_type = #{taskType}</if>
<if test="taskSource != null and taskSource != ''"> and task_source = #{taskSource}</if>
<if test="taskOutsideId != null and taskOutsideId != ''"> and task_outside_id = #{taskOutsideId}</if>
<if test="taskUrl != null and taskUrl != ''"> and task_url = #{taskUrl}</if>
<if test="revision != null "> and revision = #{revision}</if>
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectSysOaTaskById" parameterType="String" resultMap="SysOaTaskResult">
<include refid="selectSysOaTaskVo"/>
where task_no = #{taskNo}
</select>
<insert id="insertSysOaTask" parameterType="SysOaTask">
insert into sys_oa_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskNo != null">task_no,</if>
<if test="taskName != null and taskName != ''">task_name,</if>
<if test="taskContent != null">task_content,</if>
<if test="taskStatus != null">task_status,</if>
<if test="taskType != null">task_type,</if>
<if test="taskSource != null">task_source,</if>
<if test="taskOutsideId != null">task_outside_id,</if>
<if test="taskUrl != null">task_url,</if>
<if test="revision != null">revision,</if>
<if test="createBy != null">create_by,</if>
<if test="isDelete != null">is_delete,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskNo != null">#{taskNo},</if>
<if test="taskName != null and taskName != ''">#{taskName},</if>
<if test="taskContent != null">#{taskContent},</if>
<if test="taskStatus != null">#{taskStatus},</if>
<if test="taskType != null">#{taskType},</if>
<if test="taskSource != null">#{taskSource},</if>
<if test="taskOutsideId != null">#{taskOutsideId},</if>
<if test="taskUrl != null">#{taskUrl},</if>
<if test="revision != null">#{revision},</if>
<if test="createBy != null">#{createBy},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSysOaTask" parameterType="SysOaTask">
update sys_oa_task
<trim prefix="SET" suffixOverrides=",">
<if test="taskName != null and taskName != ''">task_name = #{taskName},</if>
<if test="taskContent != null">task_content = #{taskContent},</if>
<if test="taskStatus != null">task_status = #{taskStatus},</if>
<if test="taskType != null">task_type = #{taskType},</if>
<if test="taskSource != null">task_source = #{taskSource},</if>
<if test="taskOutsideId != null">task_outside_id = #{taskOutsideId},</if>
<if test="taskUrl != null">task_url = #{taskUrl},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where task_no = #{taskNo}
</update>
<delete id="deleteSysOaTaskById" parameterType="String">
delete from sys_oa_task where task_no = #{taskNo}
</delete>
<delete id="deleteSysOaTaskByIds" parameterType="String">
delete from sys_oa_task where task_no in
<foreach item="taskNo" collection="array" open="(" separator="," close=")">
#{taskNo}
</foreach>
</delete>
</mapper>

View File

@ -24,7 +24,36 @@ INSERT INTO `sys_message_template`( `template_code`, `template_name`, `template_
INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 3, '取消', '2', 'process_instance_status', NULL, 'warning', 'N', '0', 'admin', NOW(), '', NOW(), '取消');
INSERT INTO `sys_menu`( `menu_name`, `parent_id`, `order_num`, `url`, `target`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `is_refresh`) VALUES ('取消流程', 2043, 3, '#', 'menuItem', 'F', '0', 'cancelProcessInstance', '#', 'admin', NOW(), '', NULL, '', 1);
UPDATE `sys_menu` SET `url` = '/flow/toMyTakePartInTask', `perms` = 'flow:process:getMyTakePartInTask' WHERE `menu_id` = 2044;
INSERT INTO `sys_menu`(`menu_name`, `parent_id`, `order_num`, `url`, `target`, `menu_type`, `visible`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`, `is_refresh`) VALUES (
'我的已办详情', (select temp.* from( select menu_id from sys_menu where perms='flow:process:getMyTakePartInTask' ) as temp), 2, '#', 'menuItem', 'F', '0', 'flow:process:myTaskedDetail', '#', 'admin', NOW(), 'admin', NOW(), '', 1);
#2021-07-29
-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('系统任务', '2145', '1', '/system/task', 'C', '0', 'system:task:view', '#', 'admin', now(), 'ry', now(), '系统任务菜单');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();
-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('系统任务查询', @parentId, '1', '#', 'F', '0', 'system:task:list', '#', 'admin', now(), 'ry', now(), '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('系统任务新增', @parentId, '2', '#', 'F', '0', 'system:task:add', '#', 'admin', now(), 'ry', now(), '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('系统任务修改', @parentId, '3', '#', 'F', '0', 'system:task:edit', '#', 'admin', now(), 'ry', now(), '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('系统任务删除', @parentId, '4', '#', 'F', '0', 'system:task:remove', '#', 'admin', now(), 'ry', now(), '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('系统任务导出', @parentId, '5', '#', 'F', '0', 'system:task:export', '#', 'admin', now(), 'ry', now(), '');
INSERT INTO `snow-dev`.`sys_dict_type`(`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ('任务类型', 'sys_task_type', '0', 'admin', NOW(), '', NULL, '任务类型');
INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 1, '系统任务', '1', 'sys_task_type', NULL, 'primary', 'Y', '0', 'admin', NOW(), '', NULL, '待办任务');