From 14fc936df708b4f40587418f73c1e290dbceb3f8 Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Fri, 8 Dec 2023 09:09:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E6=96=87=E6=B5=81=E8=BD=AC=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ehs/EhsDocTransferController.java | 99 +++++ .../controller/ehs/EhsDocumentController.java | 128 ++++++ .../ehsDocTransfer/domain/EhsDocTransfer.java | 73 ++++ .../mapper/EhsDocTransferMapper.java | 36 ++ .../service/IEhsDocTransferService.java | 36 ++ .../impl/EhsDocTransferServiceImpl.java | 71 +++ .../ruoyi/ehsDocument/domain/EhsDocument.java | 74 ++++ .../ehsDocument/mapper/EhsDocumentMapper.java | 36 ++ .../service/IEhsDocumentService.java | 37 ++ .../service/impl/EhsDocumentServiceImpl.java | 70 +++ .../mapper/ehs/EhsDocTransferMapper.xml | 53 +++ .../mapper/ehs/EhsDocumentMapper.xml | 48 ++ ruoyi-ui/src/api/ehs/ehsDocTransfer.js | 44 ++ ruoyi-ui/src/api/ehs/ehsDocument.js | 60 +++ ruoyi-ui/src/views/ehs/ehsDocument/index.vue | 410 ++++++++++++++++++ 15 files changed, 1275 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsDocTransferController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsDocumentController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/domain/EhsDocTransfer.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/mapper/EhsDocTransferMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/service/IEhsDocTransferService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/service/impl/EhsDocTransferServiceImpl.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsDocument/domain/EhsDocument.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsDocument/mapper/EhsDocumentMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsDocument/service/IEhsDocumentService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsDocument/service/impl/EhsDocumentServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/ehs/EhsDocTransferMapper.xml create mode 100644 ruoyi-system/src/main/resources/mapper/ehs/EhsDocumentMapper.xml create mode 100644 ruoyi-ui/src/api/ehs/ehsDocTransfer.js create mode 100644 ruoyi-ui/src/api/ehs/ehsDocument.js create mode 100644 ruoyi-ui/src/views/ehs/ehsDocument/index.vue diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsDocTransferController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsDocTransferController.java new file mode 100644 index 0000000..8fcd450 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsDocTransferController.java @@ -0,0 +1,99 @@ +package com.ruoyi.web.controller.ehs; + +import java.util.List; +import java.util.Arrays; +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 io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.ehsDocTransfer.domain.EhsDocTransfer; +import com.ruoyi.ehsDocTransfer.service.IEhsDocTransferService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 公文流转Controller + * + * @author ruoyi + * @date 2023-12-07 + */ +@Api(tags = "公文流转管理") +@RestController +@RequestMapping("/ehs/ehsDocTransfer") +public class EhsDocTransferController extends BaseController { + @Autowired + private IEhsDocTransferService ehsDocTransferService; + + /** + * 查询公文流转列表 + */ + @GetMapping("/list") + public TableDataInfo list(EhsDocTransfer ehsDocTransfer) { + startPage(); + List list = ehsDocTransferService.selectEhsDocTransferList(ehsDocTransfer); + return getDataTable(list); + } + + /** + * 导出公文流转列表 + */ + @Log(title = "公文流转", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EhsDocTransfer ehsDocTransfer) { + List list = ehsDocTransferService.selectEhsDocTransferList(ehsDocTransfer); + ExcelUtil util = new ExcelUtil(EhsDocTransfer.class); + util.exportExcel(response, list, "公文流转数据"); + } + + /** + * 获取公文流转详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(ehsDocTransferService.selectEhsDocTransferById(id)); + } + + /** + * 新增公文流转 + */ + @ApiOperation("新增公文流转") + @Log(title = "公文流转", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EhsDocTransfer ehsDocTransfer) { + return toAjax(ehsDocTransferService.save(ehsDocTransfer)); + } + + /** + * 修改公文流转 + */ + @ApiOperation("修改公文流转") + @Log(title = "公文流转", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EhsDocTransfer ehsDocTransfer) { + return toAjax(ehsDocTransferService.updateById(ehsDocTransfer)); + } + + /** + * 删除公文流转 + */ + @ApiOperation("删除公文流转") + @Log(title = "公文流转", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(ehsDocTransferService.removeByIds(Arrays.asList(ids))); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsDocumentController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsDocumentController.java new file mode 100644 index 0000000..c850ad3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsDocumentController.java @@ -0,0 +1,128 @@ +package com.ruoyi.web.controller.ehs; + +import java.util.List; +import java.util.Arrays; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.ehsDocTransfer.domain.EhsDocTransfer; +import com.ruoyi.ehsDocTransfer.service.IEhsDocTransferService; +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 io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.ehsDocument.domain.EhsDocument; +import com.ruoyi.ehsDocument.service.IEhsDocumentService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 公文管理Controller + * + * @author ruoyi + * @date 2023-12-07 + */ +@Api(tags = "公文管理管理") +@RestController +@RequestMapping("/ehs/ehsDocument") +public class EhsDocumentController extends BaseController { + @Autowired + private IEhsDocumentService ehsDocumentService; + + @Autowired + private IEhsDocTransferService transferService; + + /** + * 查询公文管理列表 + */ + @PreAuthorize("@ss.hasPermi('ehs:ehsDocument:list')") + @GetMapping("/list") + public TableDataInfo list(EhsDocument ehsDocument) { + startPage(); + List list = ehsDocumentService.selectEhsDocumentList(ehsDocument); + return getDataTable(list); + } + + /** + * 获取拟稿部门下拉列表 + */ + @GetMapping(value = "/getAllDraftDept") + public AjaxResult getAllDraftDept() { + return AjaxResult.success(ehsDocumentService.getAllDraftDept()); + } + + /** + * 导出公文管理列表 + */ + @PreAuthorize("@ss.hasPermi('ehs:ehsDocument:export')") + @Log(title = "公文管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EhsDocument ehsDocument) { + List list = ehsDocumentService.selectEhsDocumentList(ehsDocument); + ExcelUtil util = new ExcelUtil(EhsDocument.class); + util.exportExcel(response, list, "公文管理数据"); + } + + /** + * 获取公文管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('ehs:ehsDocument:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(ehsDocumentService.selectEhsDocumentById(id)); + } + + /** + * 根据公文id获取公文流转信息 + */ + @GetMapping(value = "transfer/{id}") + public TableDataInfo getTransferInfoByDocId(@PathVariable("id") Long id) { + startPage(); + List list = transferService.getTransferInfoByDocId(id); + return getDataTable(list); + } + + /** + * 新增公文管理 + */ + @ApiOperation("新增公文管理") + @PreAuthorize("@ss.hasPermi('ehs:ehsDocument:add')") + @Log(title = "公文管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EhsDocument ehsDocument) { + return toAjax(ehsDocumentService.save(ehsDocument)); + } + + /** + * 修改公文管理 + */ + @ApiOperation("修改公文管理") + @PreAuthorize("@ss.hasPermi('ehs:ehsDocument:edit')") + @Log(title = "公文管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EhsDocument ehsDocument) { + return toAjax(ehsDocumentService.updateById(ehsDocument)); + } + + /** + * 删除公文管理 + */ + @ApiOperation("删除公文管理") + @PreAuthorize("@ss.hasPermi('ehs:ehsDocument:remove')") + @Log(title = "公文管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(ehsDocumentService.removeByIds(Arrays.asList(ids))); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/domain/EhsDocTransfer.java b/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/domain/EhsDocTransfer.java new file mode 100644 index 0000000..a95084e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/domain/EhsDocTransfer.java @@ -0,0 +1,73 @@ +package com.ruoyi.ehsDocTransfer.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 公文流转对象 ehs_doc_transfer + * + * @author ruoyi + * @date 2023-12-07 + */ +@Data +@ToString +@NoArgsConstructor +@Accessors(chain = true) +@TableName("ehs_doc_transfer") +public class EhsDocTransfer extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 流转人id + */ + private Long transferUserId; + + /** + * 流转人 + */ + @Excel(name = "流转人") + private String transferName; + + /** + * 流转时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "流转时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date transferTime; + + /** + * 公文流转状态 + */ + @Excel(name = "公文流转状态") + private Integer docTransferStatus; + + /** + * 公文id + */ + @Excel(name = "公文id") + private Long documentId; + + /** + * 公文名称 + */ + @Excel(name = "公文名称") + private String documentName; + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/mapper/EhsDocTransferMapper.java b/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/mapper/EhsDocTransferMapper.java new file mode 100644 index 0000000..e8de08c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/mapper/EhsDocTransferMapper.java @@ -0,0 +1,36 @@ +package com.ruoyi.ehsDocTransfer.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.ehsDocTransfer.domain.EhsDocTransfer; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 公文流转Mapper接口 + * + * @author ruoyi + * @date 2023-12-07 + */ +public interface EhsDocTransferMapper extends BaseMapper { + /** + * 查询公文流转 + * + * @param id 公文流转主键 + * @return 公文流转 + */ + public EhsDocTransfer selectEhsDocTransferById(Long id); + + /** + * 查询公文流转列表 + * + * @param ehsDocTransfer 公文流转 + * @return 公文流转集合 + */ + public List selectEhsDocTransferList(EhsDocTransfer ehsDocTransfer); + + /** + * 根据公文id获取公文流转信息 + */ + List getTransferInfoByDocId(@Param("id") Long id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/service/IEhsDocTransferService.java b/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/service/IEhsDocTransferService.java new file mode 100644 index 0000000..4e6dc4a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/service/IEhsDocTransferService.java @@ -0,0 +1,36 @@ +package com.ruoyi.ehsDocTransfer.service; + +import java.util.List; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.ehsDocTransfer.domain.EhsDocTransfer; + +/** + * 公文流转Service接口 + * + * @author ruoyi + * @date 2023-12-07 + */ +public interface IEhsDocTransferService extends IService { + + /** + * 查询公文流转 + * + * @param id 公文流转主键 + * @return 公文流转 + */ + public EhsDocTransfer selectEhsDocTransferById(Long id); + + /** + * 查询公文流转列表 + * + * @param ehsDocTransfer 公文流转 + * @return 公文流转集合 + */ + public List selectEhsDocTransferList(EhsDocTransfer ehsDocTransfer); + + /** + * 根据公文id获取公文流转信息 + */ + List getTransferInfoByDocId(Long id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/service/impl/EhsDocTransferServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/service/impl/EhsDocTransferServiceImpl.java new file mode 100644 index 0000000..229f417 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsDocTransfer/service/impl/EhsDocTransferServiceImpl.java @@ -0,0 +1,71 @@ +package com.ruoyi.ehsDocTransfer.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; +import com.ruoyi.common.utils.StringUtils; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.ehsDocTransfer.mapper.EhsDocTransferMapper; +import com.ruoyi.ehsDocTransfer.domain.EhsDocTransfer; +import com.ruoyi.ehsDocTransfer.service.IEhsDocTransferService; + +/** + * 公文流转Service业务层处理 + * + * @author ruoyi + * @date 2023-12-07 + */ +@Service +public class EhsDocTransferServiceImpl extends ServiceImpl implements IEhsDocTransferService { + + @Autowired + private EhsDocTransferMapper ehsDocTransferMapper; + + /** + * 查询公文流转 + * + * @param id 公文流转主键 + * @return 公文流转 + */ + @Override + public EhsDocTransfer selectEhsDocTransferById(Long id) { + return ehsDocTransferMapper.selectEhsDocTransferById(id); + } + + /** + * 查询公文流转列表 + * + * @param ehsDocTransfer 公文流转 + * @return 公文流转 + */ + @Override + public List selectEhsDocTransferList(EhsDocTransfer ehsDocTransfer) { + return ehsDocTransferMapper.selectEhsDocTransferList(ehsDocTransfer); + } + + /** + * 根据公文id获取公文流转信息 + */ + @Override + public List getTransferInfoByDocId(Long id) { + return ehsDocTransferMapper.getTransferInfoByDocId(id); + } + + + private LambdaQueryWrapper buildQueryWrapper(EhsDocTransfer query) { + Map params = query.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.like(StringUtils.isNotBlank(query.getTransferName()), EhsDocTransfer::getTransferName, query.getTransferName()); + lqw.eq(query.getTransferTime() != null, EhsDocTransfer::getTransferTime, query.getTransferTime()); + lqw.eq(query.getDocTransferStatus() != null, EhsDocTransfer::getDocTransferStatus, query.getDocTransferStatus()); + lqw.eq(query.getDocumentId() != null, EhsDocTransfer::getDocumentId, query.getDocumentId()); + lqw.orderByDesc(EhsDocTransfer::getCreateTime); + return lqw; + } + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/domain/EhsDocument.java b/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/domain/EhsDocument.java new file mode 100644 index 0000000..e6cf349 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/domain/EhsDocument.java @@ -0,0 +1,74 @@ +package com.ruoyi.ehsDocument.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 公文管理对象 ehs_document + * + * @author ruoyi + * @date 2023-12-07 + */ +@Data +@ToString +@NoArgsConstructor +@Accessors(chain = true) +@TableName("ehs_document") +public class EhsDocument extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 公文名称 + */ + @Excel(name = "公文名称") + private String docName; + + /** + * 公文字号 + */ + @Excel(name = "公文字号") + private String docFont; + + /** + * 拟稿部门 + */ + @Excel(name = "拟稿部门") + private String draftDept; + + /** + * 公文类型 + */ + @Excel(name = "公文类型") + private Integer docType; + + /** + * 公文编号 + */ + @Excel(name = "公文编号") + private String docNumber; + + /** + * 收文日期 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "收文日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date receiveTime; + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/mapper/EhsDocumentMapper.java b/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/mapper/EhsDocumentMapper.java new file mode 100644 index 0000000..195bdc3 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/mapper/EhsDocumentMapper.java @@ -0,0 +1,36 @@ +package com.ruoyi.ehsDocument.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.ehsDocument.domain.EhsDocument; + +import java.util.List; + +/** + * 公文管理Mapper接口 + * + * @author ruoyi + * @date 2023-12-07 + */ +public interface EhsDocumentMapper extends BaseMapper { + /** + * 查询公文管理 + * + * @param id 公文管理主键 + * @return 公文管理 + */ + public EhsDocument selectEhsDocumentById(Long id); + + /** + * 查询公文管理列表 + * + * @param ehsDocument 公文管理 + * @return 公文管理集合 + */ + public List selectEhsDocumentList(EhsDocument ehsDocument); + + /** + * 获取拟稿部门下拉列表 + * @return + */ + List getAllDraftDept(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/service/IEhsDocumentService.java b/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/service/IEhsDocumentService.java new file mode 100644 index 0000000..15d3a1d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/service/IEhsDocumentService.java @@ -0,0 +1,37 @@ +package com.ruoyi.ehsDocument.service; + +import java.util.List; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.ehsDocument.domain.EhsDocument; + +/** + * 公文管理Service接口 + * + * @author ruoyi + * @date 2023-12-07 + */ +public interface IEhsDocumentService extends IService { + + /** + * 查询公文管理 + * + * @param id 公文管理主键 + * @return 公文管理 + */ + public EhsDocument selectEhsDocumentById(Long id); + + /** + * 查询公文管理列表 + * + * @param ehsDocument 公文管理 + * @return 公文管理集合 + */ + public List selectEhsDocumentList(EhsDocument ehsDocument); + + /** + * 获取拟稿部门下拉列表 + * @return + */ + List getAllDraftDept(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/service/impl/EhsDocumentServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/service/impl/EhsDocumentServiceImpl.java new file mode 100644 index 0000000..35f1271 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsDocument/service/impl/EhsDocumentServiceImpl.java @@ -0,0 +1,70 @@ +package com.ruoyi.ehsDocument.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; +import com.ruoyi.common.utils.StringUtils; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.ehsDocument.mapper.EhsDocumentMapper; +import com.ruoyi.ehsDocument.domain.EhsDocument; +import com.ruoyi.ehsDocument.service.IEhsDocumentService; + +/** + * 公文管理Service业务层处理 + * + * @author ruoyi + * @date 2023-12-07 + */ +@Service +public class EhsDocumentServiceImpl extends ServiceImpl implements IEhsDocumentService { + + @Autowired + private EhsDocumentMapper ehsDocumentMapper; + + /** + * 查询公文管理 + * + * @param id 公文管理主键 + * @return 公文管理 + */ + @Override + public EhsDocument selectEhsDocumentById(Long id) { + return ehsDocumentMapper.selectEhsDocumentById(id); + } + + /** + * 查询公文管理列表 + * + * @param ehsDocument 公文管理 + * @return 公文管理 + */ + @Override + public List selectEhsDocumentList(EhsDocument ehsDocument) { + return ehsDocumentMapper.selectEhsDocumentList(ehsDocument); + } + + /** + * 获取拟稿部门下拉列表 + * @return + */ + @Override + public List getAllDraftDept() { + return ehsDocumentMapper.getAllDraftDept(); + } + + + private LambdaQueryWrapper buildQueryWrapper(EhsDocument query) { + Map params = query.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.like(StringUtils.isNotBlank(query.getDocName()), EhsDocument::getDocName, query.getDocName()); + lqw.eq(query.getDocType() != null, EhsDocument::getDocType, query.getDocType()); + lqw.orderByDesc(EhsDocument::getCreateTime); + return lqw; + } + +} diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsDocTransferMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsDocTransferMapper.xml new file mode 100644 index 0000000..bc72147 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsDocTransferMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, transfer_user_id, transfer_name, transfer_time, doc_transfer_status, document_id, document_name, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_doc_transfer + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsDocumentMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsDocumentMapper.xml new file mode 100644 index 0000000..df7c3f4 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsDocumentMapper.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + select id, doc_name, doc_font, draft_dept, doc_type, doc_number, receive_time, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_document + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/ehs/ehsDocTransfer.js b/ruoyi-ui/src/api/ehs/ehsDocTransfer.js new file mode 100644 index 0000000..ac3ceb6 --- /dev/null +++ b/ruoyi-ui/src/api/ehs/ehsDocTransfer.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询公文流转列表 +export function listEhsDocTransfer(query) { + return request({ + url: '/ehs/ehsDocTransfer/list', + method: 'get', + params: query + }) +} + +// 查询公文流转详细 +export function getEhsDocTransfer(id) { + return request({ + url: '/ehs/ehsDocTransfer/' + id, + method: 'get' + }) +} + +// 新增公文流转 +export function addEhsDocTransfer(data) { + return request({ + url: '/ehs/ehsDocTransfer', + method: 'post', + data: data + }) +} + +// 修改公文流转 +export function updateEhsDocTransfer(data) { + return request({ + url: '/ehs/ehsDocTransfer', + method: 'put', + data: data + }) +} + +// 删除公文流转 +export function delEhsDocTransfer(id) { + return request({ + url: '/ehs/ehsDocTransfer/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/api/ehs/ehsDocument.js b/ruoyi-ui/src/api/ehs/ehsDocument.js new file mode 100644 index 0000000..4442442 --- /dev/null +++ b/ruoyi-ui/src/api/ehs/ehsDocument.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +// 查询公文管理列表 +export function listEhsDocument(query) { + return request({ + url: '/ehs/ehsDocument/list', + method: 'get', + params: query + }) +} + +// 查询公文管理详细 +export function getEhsDocument(id) { + return request({ + url: '/ehs/ehsDocument/' + id, + method: 'get' + }) +} + +// 获取拟稿部门下拉列表 +export function getAllDraftDept() { + return request({ + url: '/ehs/ehsDocument/getAllDraftDept', + method: 'get' + }) +} + +// 根据公文id获取公文流转信息 +export function getDocTransferById(id) { + return request({ + url: '/ehs/ehsDocument/transfer/' + id, + method: 'get' + }) +} + +// 新增公文管理 +export function addEhsDocument(data) { + return request({ + url: '/ehs/ehsDocument', + method: 'post', + data: data + }) +} + +// 修改公文管理 +export function updateEhsDocument(data) { + return request({ + url: '/ehs/ehsDocument', + method: 'put', + data: data + }) +} + +// 删除公文管理 +export function delEhsDocument(id) { + return request({ + url: '/ehs/ehsDocument/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/ehs/ehsDocument/index.vue b/ruoyi-ui/src/views/ehs/ehsDocument/index.vue new file mode 100644 index 0000000..e0a2fd5 --- /dev/null +++ b/ruoyi-ui/src/views/ehs/ehsDocument/index.vue @@ -0,0 +1,410 @@ + + +