diff --git a/ruoyi-ui/src/api/benyi/dayflowtask.js b/ruoyi-ui/src/api/benyi/dayflowtask.js new file mode 100644 index 000000000..650b8e5db --- /dev/null +++ b/ruoyi-ui/src/api/benyi/dayflowtask.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询一日流程任务列表 +export function listDayflowtask(query) { + return request({ + url: '/benyi/dayflowtask/list', + method: 'get', + params: query + }) +} + +// 查询一日流程任务详细 +export function getDayflowtask(id) { + return request({ + url: '/benyi/dayflowtask/' + id, + method: 'get' + }) +} + +// 新增一日流程任务 +export function addDayflowtask(data) { + return request({ + url: '/benyi/dayflowtask', + method: 'post', + data: data + }) +} + +// 修改一日流程任务 +export function updateDayflowtask(data) { + return request({ + url: '/benyi/dayflowtask', + method: 'put', + data: data + }) +} + +// 删除一日流程任务 +export function delDayflowtask(id) { + return request({ + url: '/benyi/dayflowtask/' + id, + method: 'delete' + }) +} + +// 导出一日流程任务 +export function exportDayflowtask(query) { + return request({ + url: '/benyi/dayflowtask/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/dayflowtask/index.vue b/ruoyi-ui/src/views/benyi/dayflowtask/index.vue new file mode 100644 index 000000000..9ee4af8cb --- /dev/null +++ b/ruoyi-ui/src/views/benyi/dayflowtask/index.vue @@ -0,0 +1,385 @@ + + + \ No newline at end of file diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayflowTaskController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayflowTaskController.java new file mode 100644 index 000000000..1572cc7b8 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayflowTaskController.java @@ -0,0 +1,110 @@ +package com.ruoyi.project.benyi.controller; + +import java.util.Date; +import java.util.List; + +import com.ruoyi.common.utils.SecurityUtils; +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.framework.aspectj.lang.annotation.Log; +import com.ruoyi.framework.aspectj.lang.enums.BusinessType; +import com.ruoyi.project.benyi.domain.ByDayflowTask; +import com.ruoyi.project.benyi.service.IByDayflowTaskService; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.framework.web.page.TableDataInfo; + +/** + * 一日流程任务Controller + * + * @author tsbz + * @date 2020-05-13 + */ +@RestController +@RequestMapping("/benyi/dayflowtask") +public class ByDayflowTaskController extends BaseController +{ + @Autowired + private IByDayflowTaskService byDayflowTaskService; + + /** + * 查询一日流程任务列表 + */ + @PreAuthorize("@ss.hasPermi('benyi:dayflowtask:list')") + @GetMapping("/list") + public TableDataInfo list(ByDayflowTask byDayflowTask) + { + startPage(); + List list = byDayflowTaskService.selectByDayflowTaskList(byDayflowTask); + return getDataTable(list); + } + + /** + * 导出一日流程任务列表 + */ + @PreAuthorize("@ss.hasPermi('benyi:dayflowtask:export')") + @Log(title = "一日流程任务", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(ByDayflowTask byDayflowTask) + { + List list = byDayflowTaskService.selectByDayflowTaskList(byDayflowTask); + ExcelUtil util = new ExcelUtil(ByDayflowTask.class); + return util.exportExcel(list, "dayflowtask"); + } + + /** + * 获取一日流程任务详细信息 + */ + @PreAuthorize("@ss.hasPermi('benyi:dayflowtask:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return AjaxResult.success(byDayflowTaskService.selectByDayflowTaskById(id)); + } + + /** + * 新增一日流程任务 + */ + @PreAuthorize("@ss.hasPermi('benyi:dayflowtask:add')") + @Log(title = "一日流程任务", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ByDayflowTask byDayflowTask) + { + byDayflowTask.setCreateuser(SecurityUtils.getLoginUser().getUser().getUserId()); + byDayflowTask.setCreatetime(new Date()); + return toAjax(byDayflowTaskService.insertByDayflowTask(byDayflowTask)); + } + + /** + * 修改一日流程任务 + */ + @PreAuthorize("@ss.hasPermi('benyi:dayflowtask:edit')") + @Log(title = "一日流程任务", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ByDayflowTask byDayflowTask) + { + byDayflowTask.setUpdateuser(SecurityUtils.getLoginUser().getUser().getUserId()); + byDayflowTask.setUpdatetime(new Date()); + return toAjax(byDayflowTaskService.updateByDayflowTask(byDayflowTask)); + } + + /** + * 删除一日流程任务 + */ + @PreAuthorize("@ss.hasPermi('benyi:dayflowtask:remove')") + @Log(title = "一日流程任务", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(byDayflowTaskService.deleteByDayflowTaskByIds(ids)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByDayflowTask.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByDayflowTask.java new file mode 100644 index 000000000..808daaf71 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByDayflowTask.java @@ -0,0 +1,194 @@ +package com.ruoyi.project.benyi.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.framework.aspectj.lang.annotation.Excel; +import com.ruoyi.framework.web.domain.BaseEntity; + +import java.util.Date; + +/** + * 一日流程任务对象 by_dayflow_task + * + * @author tsbz + * @date 2020-05-13 + */ +public class ByDayflowTask extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 标识 */ + private Long id; + + /** 流程id */ + @Excel(name = "流程id") + private Long lcId; + + /** 任务名称 */ + @Excel(name = "任务名称") + private String rwmc; + + /** 所属流程 */ + @Excel(name = "所属流程") + private String lcmc; + + /** 任务目的 */ + @Excel(name = "任务目的") + private String rwmd; + + /** 任务解读 */ + @Excel(name = "任务解读") + private String rwjd; + + /** 创建人 */ + @Excel(name = "创建人") + private Long createuser; + + /** 创建时间 */ + @Excel(name = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createtime; + + /** 标准数量 */ + @Excel(name = "标准数量") + private Long standardCount; + + /** 更新者 */ + @Excel(name = "更新者") + private Long updateuser; + + /** 更新时间 */ + @Excel(name = "更新时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updatetime; + + /** 备用字段 */ + @Excel(name = "备用字段") + private String beiyong; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setLcId(Long lcId) + { + this.lcId = lcId; + } + + public Long getLcId() + { + return lcId; + } + public void setRwmc(String rwmc) + { + this.rwmc = rwmc; + } + + public String getRwmc() + { + return rwmc; + } + public void setLcmc(String lcmc) + { + this.lcmc = lcmc; + } + + public String getLcmc() + { + return lcmc; + } + public void setRwmd(String rwmd) + { + this.rwmd = rwmd; + } + + public String getRwmd() + { + return rwmd; + } + public void setRwjd(String rwjd) + { + this.rwjd = rwjd; + } + + public String getRwjd() + { + return rwjd; + } + public void setCreateuser(Long createuser) + { + this.createuser = createuser; + } + + public Long getCreateuser() + { + return createuser; + } + public void setStandardCount(Long standardCount) + { + this.standardCount = standardCount; + } + + public Long getStandardCount() + { + return standardCount; + } + public void setUpdateuser(Long updateuser) + { + this.updateuser = updateuser; + } + + public Long getUpdateuser() + { + return updateuser; + } + public void setBeiyong(String beiyong) + { + this.beiyong = beiyong; + } + + public String getBeiyong() + { + return beiyong; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("lcId", getLcId()) + .append("rwmc", getRwmc()) + .append("lcmc", getLcmc()) + .append("rwmd", getRwmd()) + .append("rwjd", getRwjd()) + .append("createuser", getCreateuser()) + .append("createtime", getCreatetime()) + .append("standardCount", getStandardCount()) + .append("updateuser", getUpdateuser()) + .append("updatetime", getUpdatetime()) + .append("beiyong", getBeiyong()) + .toString(); + } + + public Date getCreatetime() { + return createtime; + } + + public void setCreatetime(Date createtime) { + this.createtime = createtime; + } + + public Date getUpdatetime() { + return updatetime; + } + + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByDayflowTaskMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByDayflowTaskMapper.java new file mode 100644 index 000000000..f2232765e --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByDayflowTaskMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.project.benyi.mapper; + +import java.util.List; +import com.ruoyi.project.benyi.domain.ByDayflowTask; + +/** + * 一日流程任务Mapper接口 + * + * @author tsbz + * @date 2020-05-13 + */ +public interface ByDayflowTaskMapper +{ + /** + * 查询一日流程任务 + * + * @param id 一日流程任务ID + * @return 一日流程任务 + */ + public ByDayflowTask selectByDayflowTaskById(Long id); + + /** + * 查询一日流程任务列表 + * + * @param byDayflowTask 一日流程任务 + * @return 一日流程任务集合 + */ + public List selectByDayflowTaskList(ByDayflowTask byDayflowTask); + + /** + * 新增一日流程任务 + * + * @param byDayflowTask 一日流程任务 + * @return 结果 + */ + public int insertByDayflowTask(ByDayflowTask byDayflowTask); + + /** + * 修改一日流程任务 + * + * @param byDayflowTask 一日流程任务 + * @return 结果 + */ + public int updateByDayflowTask(ByDayflowTask byDayflowTask); + + /** + * 删除一日流程任务 + * + * @param id 一日流程任务ID + * @return 结果 + */ + public int deleteByDayflowTaskById(Long id); + + /** + * 批量删除一日流程任务 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteByDayflowTaskByIds(Long[] ids); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByDayflowTaskService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByDayflowTaskService.java new file mode 100644 index 000000000..bc6c83dc1 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByDayflowTaskService.java @@ -0,0 +1,61 @@ +package com.ruoyi.project.benyi.service; + +import java.util.List; +import com.ruoyi.project.benyi.domain.ByDayflowTask; + +/** + * 一日流程任务Service接口 + * + * @author tsbz + * @date 2020-05-13 + */ +public interface IByDayflowTaskService +{ + /** + * 查询一日流程任务 + * + * @param id 一日流程任务ID + * @return 一日流程任务 + */ + public ByDayflowTask selectByDayflowTaskById(Long id); + + /** + * 查询一日流程任务列表 + * + * @param byDayflowTask 一日流程任务 + * @return 一日流程任务集合 + */ + public List selectByDayflowTaskList(ByDayflowTask byDayflowTask); + + /** + * 新增一日流程任务 + * + * @param byDayflowTask 一日流程任务 + * @return 结果 + */ + public int insertByDayflowTask(ByDayflowTask byDayflowTask); + + /** + * 修改一日流程任务 + * + * @param byDayflowTask 一日流程任务 + * @return 结果 + */ + public int updateByDayflowTask(ByDayflowTask byDayflowTask); + + /** + * 批量删除一日流程任务 + * + * @param ids 需要删除的一日流程任务ID + * @return 结果 + */ + public int deleteByDayflowTaskByIds(Long[] ids); + + /** + * 删除一日流程任务信息 + * + * @param id 一日流程任务ID + * @return 结果 + */ + public int deleteByDayflowTaskById(Long id); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByDayflowTaskServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByDayflowTaskServiceImpl.java new file mode 100644 index 000000000..c6c429381 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByDayflowTaskServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.project.benyi.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.project.benyi.mapper.ByDayflowTaskMapper; +import com.ruoyi.project.benyi.domain.ByDayflowTask; +import com.ruoyi.project.benyi.service.IByDayflowTaskService; + +/** + * 一日流程任务Service业务层处理 + * + * @author tsbz + * @date 2020-05-13 + */ +@Service +public class ByDayflowTaskServiceImpl implements IByDayflowTaskService +{ + @Autowired + private ByDayflowTaskMapper byDayflowTaskMapper; + + /** + * 查询一日流程任务 + * + * @param id 一日流程任务ID + * @return 一日流程任务 + */ + @Override + public ByDayflowTask selectByDayflowTaskById(Long id) + { + return byDayflowTaskMapper.selectByDayflowTaskById(id); + } + + /** + * 查询一日流程任务列表 + * + * @param byDayflowTask 一日流程任务 + * @return 一日流程任务 + */ + @Override + public List selectByDayflowTaskList(ByDayflowTask byDayflowTask) + { + return byDayflowTaskMapper.selectByDayflowTaskList(byDayflowTask); + } + + /** + * 新增一日流程任务 + * + * @param byDayflowTask 一日流程任务 + * @return 结果 + */ + @Override + public int insertByDayflowTask(ByDayflowTask byDayflowTask) + { + return byDayflowTaskMapper.insertByDayflowTask(byDayflowTask); + } + + /** + * 修改一日流程任务 + * + * @param byDayflowTask 一日流程任务 + * @return 结果 + */ + @Override + public int updateByDayflowTask(ByDayflowTask byDayflowTask) + { + return byDayflowTaskMapper.updateByDayflowTask(byDayflowTask); + } + + /** + * 批量删除一日流程任务 + * + * @param ids 需要删除的一日流程任务ID + * @return 结果 + */ + @Override + public int deleteByDayflowTaskByIds(Long[] ids) + { + return byDayflowTaskMapper.deleteByDayflowTaskByIds(ids); + } + + /** + * 删除一日流程任务信息 + * + * @param id 一日流程任务ID + * @return 结果 + */ + @Override + public int deleteByDayflowTaskById(Long id) + { + return byDayflowTaskMapper.deleteByDayflowTaskById(id); + } +} diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByDayflowTaskMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByDayflowTaskMapper.xml new file mode 100644 index 000000000..664cf0c89 --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/benyi/ByDayflowTaskMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + select id, lc_id, rwmc, lcmc, rwmd, rwjd, createuser, createtime, standard_count, updateuser, updatetime, beiyong from by_dayflow_task + + + + + + + + insert into by_dayflow_task + + lc_id, + rwmc, + lcmc, + rwmd, + rwjd, + createuser, + createtime, + standard_count, + updateuser, + updatetime, + beiyong, + + + #{lcId}, + #{rwmc}, + #{lcmc}, + #{rwmd}, + #{rwjd}, + #{createuser}, + #{createtime}, + #{standardCount}, + #{updateuser}, + #{updatetime}, + #{beiyong}, + + + + + update by_dayflow_task + + lc_id = #{lcId}, + rwmc = #{rwmc}, + lcmc = #{lcmc}, + rwmd = #{rwmd}, + rwjd = #{rwjd}, + createuser = #{createuser}, + createtime = #{createtime}, + standard_count = #{standardCount}, + updateuser = #{updateuser}, + updatetime = #{updatetime}, + beiyong = #{beiyong}, + + where id = #{id} + + + + delete from by_dayflow_task where id = #{id} + + + + delete from by_dayflow_task where id in + + #{id} + + + + \ No newline at end of file