Bläddra i källkod

Merge branch 'V0.0.5' of http://10.87.21.221:8000/jzyd_yyds/soc into V0.0.5

zhulu 1 år sedan
förälder
incheckning
b6224ef946
15 ändrade filer med 530 tillägg och 8 borttagningar
  1. 51 0
      project_data/sql/0.0.5/soc/soc.sql
  2. 9 2
      project_data/sql/0.0.5/升级说明.txt
  3. 13 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java
  4. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/service/impl/CoreSafetyIndexCalculateRuleServiceImpl.java
  5. 148 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/controller/OperatingManualController.java
  6. 51 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/domain/OperatingManual.java
  7. 29 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/domain/OperatingType.java
  8. 21 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/mapper/IOperatingManualMapper.java
  9. 10 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/mapper/IOperatingTypeMapper.java
  10. 28 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/service/IOperatingManualService.java
  11. 16 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/service/IOperatingTypeService.java
  12. 67 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/service/OperatingManualServiceImpl.java
  13. 40 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/service/OperatingTypeServiceImpl.java
  14. 18 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/vo/OperatingVo.java
  15. 28 0
      soc-modules/soc-modules-system/src/main/resources/mapper/system/IOperatingManualMapper.xml

+ 51 - 0
project_data/sql/0.0.5/soc/soc.sql

@@ -155,3 +155,54 @@ DELETE FROM `sys_role` WHERE `role_name`='超级管理员';
 INSERT INTO `sys_role` (`org_type`, `role_name`, `role_key`, `role_sort`, `data_scope`, `menu_check_strictly`, `dept_check_strictly`, `status`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ('1', '超级管理员', 'default', 0, 1, 1, 1, '0', 2, '超级管理员', '2023-12-07 17:14:07', '', NULL, '仅仅给超级管理员用,标记为删除状态,通过脚本维护了一条管理员与角色的关联数据,防止首页等依赖于登录用户角色信息的页面查询报错');
 DELETE FROM `sys_user_role` WHERE `role_id` = (SELECT id FROM `sys_role` WHERE `role_name`='超级管理员');
 INSERT INTO `sys_user_role` (`user_id`, `role_id`, `create_by`, `create_time`, `update_by`, `update_time`) SELECT 1 as `user_id`, id as `role_id`, '超级管理员' as `create_by`, '2023-09-17 19:57:06' as `create_time`, NULL, NULL  FROM `sys_role` WHERE `role_name`='超级管理员';
+-- 修改演练周期字典排序
+update sys_dict_data set dict_sort=dict_value where dict_type='drill_plan_cycle';
+-- 演练新增每周每月的计划周期
+delete  from sys_dict_data where dict_type='drill_plan_cycle' and dict_value in ('2','3');
+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 (2, '每周', '2', 'drill_plan_cycle', NULL, 'default', 'N', '0', NULL, NOW(), NULL, 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 (3, '每月', '3', 'drill_plan_cycle', NULL, 'default', 'N', '0', NULL, NOW(), NULL, NOW(), NULL);
+
+
+
+
+DROP TABLE IF EXISTS `sys_operating_type`;
+CREATE TABLE `sys_operating_type`  (
+  `id` bigint NOT NULL COMMENT '主键',
+  `source_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料类型',
+  `sort` int NULL DEFAULT NULL COMMENT '排序字段',
+  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
+  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Table structure for sys_operating
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_operating`;
+CREATE TABLE `sys_operating`  (
+  `id` bigint NOT NULL COMMENT '主键',
+  `source_id` bigint NULL DEFAULT NULL COMMENT '资料类型',
+  `file_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件地址',
+  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
+  `sort` int NULL DEFAULT NULL COMMENT '排序字段',
+  `file_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件类型',
+  `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
+  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
+  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
+
+
+delete from sys_menu where menu_name = '手册类型';
+delete from sys_menu where menu_name = '操作手册';
+delete from sys_menu where menu_name = '操作手册配置';
+INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01738858108249956353, '手册类型', 1739111245879676930, 12, 'operating', 'system/operating/type/index', NULL, 1, 0, 'C', '0', '0', '', '1', 'documentation', NULL, '超级管理员', '2023-12-24 17:44:14', '超级管理员', '2023-12-25 10:35:22', '');
+INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01738865249262231553, '操作手册', 1739111245879676930, 13, 'operatingData', 'system/operating/data/index', NULL, 1, 0, 'C', '0', '0', '', '1', 'documentation', NULL, '超级管理员', '2023-12-24 18:12:36', '超级管理员', '2023-12-25 10:35:03', '');
+INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01739111245879676930, '操作手册配置', 1, 15, 'opertion', NULL, NULL, 1, 0, 'M', '0', '0', NULL, '1', 'dict', NULL, '超级管理员', '2023-12-25 10:30:06', '', NULL, '');
+
+
+delete from sys_config where config_key = 'CUSTOMER_SERVICE';
+INSERT INTO `sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (202, '客服服务', 'CUSTOMER_SERVICE', '', 'Y', '超级管理员', '2023-12-25 10:16:37', '', NULL, NULL);

+ 9 - 2
project_data/sql/0.0.5/升级说明.txt

@@ -1,10 +1,17 @@
 
 
-nacos配置中心file模块增加配置说明:
-在spring模块下增加配置
+nacos配置中心file模块增加配置说明,
+用以处理前端上传文件未超过页面文件大小限制,但超过了Spring默认文件上传大小限制导致报错的问题;
+在spring模块下增加配置:
+servlet:
+  multipart:
+    max-file-size: 20MB
+    max-request-size: 20MB
+
 示例:
 spring
   servlet:
     multipart:
       max-file-size: 20MB
       max-request-size: 20MB
+------------------------------------------------------ 分 割 线 ---------------------------------------------------------

+ 13 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/access/service/impl/TMonitoringRetrievalPlanServiceImpl.java

@@ -862,8 +862,8 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                 LocalDate currentDate = LocalDate.now();
                 //为了删除PDF查询要删除的任务id
                 List<Long> longs = coreMonitoringRetrievalTaskBuilderService.selectTaskByToday(id, currentDate.toString());
-                if (CollectionUtils.isNotEmpty(longs)){
-                    longs.forEach(l->{
+                if (CollectionUtils.isNotEmpty(longs)) {
+                    longs.forEach(l -> {
                         iCoreRegisterBookPdfService.deleteWithFile(l);
                     });
                 }
@@ -874,8 +874,8 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
                 String format = simpleDateFormat.format(new Date());
                 //为了删除PDF查询要删除的任务id
                 List<Long> longs = coreMonitoringRetrievalTaskBuilderService.selectTaskByStartTime(id, format);
-                if (CollectionUtils.isNotEmpty(longs)){
-                    longs.forEach(l->{
+                if (CollectionUtils.isNotEmpty(longs)) {
+                    longs.forEach(l -> {
                         iCoreRegisterBookPdfService.deleteWithFile(l);
                     });
                 }
@@ -952,7 +952,15 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
         accessPdf.setTaskTitle("标题");
         final SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH时mm分");
         Calendar calendar = Calendar.getInstance();
-        String dateStr = format.format(accessPdfVO.getTaskStartTime()) + "-" + calendar.get(Calendar.HOUR_OF_DAY) + "时" + calendar.get(Calendar.MINUTE) + "分";
+        String m = String.valueOf(calendar.get(Calendar.MINUTE));
+        if (m.length() == 1) {
+            m = "0" + calendar.get(Calendar.MINUTE);
+        }
+        String h = String.valueOf(calendar.get(Calendar.HOUR_OF_DAY));
+        if (h.length() == 1) {
+            h = "0" + calendar.get(Calendar.HOUR_OF_DAY);
+        }
+        String dateStr = format.format(accessPdfVO.getTaskStartTime()) + "-" + h + "时" + m + "分";
         accessPdf.setTaskStartTime(dateStr);
         accessPdf.setCheckUser(accessPdfVO.getCheckUser());
         accessPdf.setOrgId(accessPdfVO.getOrgId());

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyindex/service/impl/CoreSafetyIndexCalculateRuleServiceImpl.java

@@ -169,7 +169,7 @@ public class CoreSafetyIndexCalculateRuleServiceImpl extends ServiceImpl<CoreSaf
         List<CoreSafetyIndexCalculateRuleItemUpdateDto> itemList = request.getItemList();
         List<CoreSafetyIndexCalculateRuleItem> properties = BeanHelper.copyProperties(itemList, CoreSafetyIndexCalculateRuleItem.class);
         properties.forEach(r -> {
-            if (ObjectUtil.isNull(r.getIndicatorDays()) || r.getIndicatorDays() < 0) {
+            if (ObjectUtil.isNotEmpty(r.getIndicatorDays()) && r.getIndicatorDays() <= 0) {
                 throw new RuntimeException("连续数不能小于0!");
             }
             if (ObjectUtil.isNull(r.getItemValue()) || r.getItemValue() < 0) {

+ 148 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/controller/OperatingManualController.java

@@ -0,0 +1,148 @@
+package com.xunmei.system.operating.controller;
+
+import com.xunmei.common.core.utils.file.FileTypeUtils;
+import com.xunmei.common.core.web.controller.BaseController;
+import com.xunmei.common.core.web.domain.AjaxResult;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.log.annotation.Log;
+import com.xunmei.common.log.enums.BusinessType;
+import com.xunmei.common.security.utils.SecurityUtils;
+import com.xunmei.system.operating.domain.OperatingManual;
+import com.xunmei.system.operating.domain.OperatingType;
+import com.xunmei.system.operating.service.IOperatingManualService;
+import com.xunmei.system.operating.service.IOperatingTypeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+
+@Api(tags = {"Operating"})
+@RestController
+@RequestMapping("/operating")
+public class OperatingManualController extends BaseController {
+
+    @Autowired
+    private IOperatingManualService operatingManualService;
+
+    @Autowired
+    private IOperatingTypeService operatingTypeService;
+
+    @ApiOperation(value = "查询操作手册列表")
+    @GetMapping("/list")
+    public TableDataInfo<OperatingManual> list(OperatingManual entity) {
+        return operatingManualService.selectPage(entity);
+    }
+
+
+    @ApiOperation(value = "查询操作手册列表")
+    @GetMapping("/listType")
+    public TableDataInfo<OperatingType> listType(OperatingType entity) {
+        return operatingTypeService.selectPage(entity);
+    }
+
+    @ApiOperation(value = "获取分类详细信息")
+    @GetMapping(value = "/type/{id}")
+    public AjaxResult getTypeInfo(@PathVariable("id") Long id) {
+        return success(operatingTypeService.getById(id));
+    }
+
+
+    /**
+     * 新增/编辑【新增、编辑操作手册类型】
+     */
+    @ApiOperation(value = "新增、编辑操作手册类型")
+    @Log(title = "【新增、编辑操作手册类型】", businessType = BusinessType.INSERT)
+    @PostMapping("/addType")
+    public AjaxResult addType(@RequestBody OperatingType operatingType) {
+        Long id = operatingType.getId();
+        if(id == null){
+            operatingType.setCreateBy(SecurityUtils.getUsername());
+            operatingType.setCreateTime(new Date());
+        }else{
+            operatingType.setUpdateBy(SecurityUtils.getUsername());
+            operatingType.setUpdateTime(new Date());
+        }
+        boolean b = operatingTypeService.saveOrUpdate(operatingType);
+        return toAjax(b);
+    }
+
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @ApiOperation(value = "删除操作手册类型")
+    @Log(title = "【删除操作手册类型】", businessType = BusinessType.DELETE)
+    @DeleteMapping("/type/{id}")
+    public AjaxResult removeType(@PathVariable Long id) {
+        List<OperatingManual> list = operatingManualService.selectBySourceId(id);
+        if(!list.isEmpty()){
+            return AjaxResult.error("改分类下存在文件信息,请先删除文件信息!");
+        }
+        return toAjax(operatingTypeService.removeById(id));
+    }
+
+
+    @ApiOperation(value = "获取分类详细信息")
+    @GetMapping(value = "/data/{id}")
+    public AjaxResult getDataInfo(@PathVariable("id") Long id) {
+        return success(operatingManualService.getById(id));
+    }
+
+
+    /**
+     * 新增/编辑【新增、编辑操作手册类型】
+     */
+    @ApiOperation(value = "新增、编辑操作手册类型")
+    @Log(title = "【新增、编辑操作手册类型】", businessType = BusinessType.INSERT)
+    @PostMapping("/addData")
+    public AjaxResult addData(@RequestBody OperatingManual operatingManual) {
+        Long id = operatingManual.getId();
+        if(id == null){
+            operatingManual.setCreateBy(SecurityUtils.getUsername());
+            operatingManual.setCreateTime(new Date());
+        }else{
+            operatingManual.setUpdateBy(SecurityUtils.getUsername());
+            operatingManual.setUpdateTime(new Date());
+        }
+        String fileName = operatingManual.getFileName();
+        String fileType = FileTypeUtils.getFileType(fileName);
+        operatingManual.setFileType(fileType);
+
+        boolean b = operatingManualService.saveOrUpdate(operatingManual);
+        return toAjax(b);
+    }
+
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @ApiOperation(value = "删除操作手册类型")
+    @Log(title = "【删除操作手册类型】", businessType = BusinessType.DELETE)
+    @DeleteMapping("/data/{id}")
+    public AjaxResult removeData(@PathVariable Long id) {
+        return toAjax(operatingManualService.removeById(id));
+    }
+
+
+    @ApiOperation(value = "获取所有的操作手册类型")
+    @Log(title = "【获取所有的操作手册类型】", businessType = BusinessType.DELETE)
+    @GetMapping("/type/list")
+    public AjaxResult getTypeAll(){
+        return  AjaxResult.success(operatingTypeService.list());
+    }
+
+
+    @ApiOperation(value = "获取操作手册")
+    @Log(title = "【获取操作手册】", businessType = BusinessType.DELETE)
+    @GetMapping("/operatingData")
+    public AjaxResult getOperatings(){
+        return  AjaxResult.success(operatingManualService.selectOperating());
+    }
+
+}
+
+

+ 51 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/domain/OperatingManual.java

@@ -0,0 +1,51 @@
+package com.xunmei.system.operating.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * 资料类型
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("sys_operating")
+@ApiModel(value = "OperatingManual对象", description = "资料对象")
+public class OperatingManual extends BaseEntity {
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    /**
+     * 资料分类,可配合字典管理管理各类资料
+     */
+    @ApiModelProperty(value = "资料分类")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long sourceId;
+
+    @TableField(exist = false)
+    private String sourceName;
+
+    @ApiModelProperty(value = "文件地址")
+    private String fileUrl;
+
+    @ApiModelProperty(value = "文件名称")
+    private String fileName;
+
+    @ApiModelProperty(value = "文件类型")
+    private String fileType;
+
+    @ApiModelProperty(value = "排序字段")
+    private Integer sort;
+
+
+
+}

+ 29 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/domain/OperatingType.java

@@ -0,0 +1,29 @@
+package com.xunmei.system.operating.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.xunmei.common.core.web.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("sys_operating_type")
+@ApiModel(value = "OperatingType对象", description = "资料类型")
+public class OperatingType extends BaseEntity {
+
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    @ApiModelProperty(value = "资料分类")
+    private String sourceName;
+
+    @ApiModelProperty(value = "排序字段")
+    private Integer sort;
+}

+ 21 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/mapper/IOperatingManualMapper.java

@@ -0,0 +1,21 @@
+package com.xunmei.system.operating.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xunmei.system.operating.domain.OperatingManual;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface IOperatingManualMapper extends BaseMapper<OperatingManual> {
+
+    /**
+     * 自定义分页查询
+     * @param pageRequest
+     * @param request
+     * @return
+     */
+    Page<OperatingManual> selectPageData(Page<OperatingManual> pageRequest, @Param("request") OperatingManual request);
+
+}
+

+ 10 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/mapper/IOperatingTypeMapper.java

@@ -0,0 +1,10 @@
+package com.xunmei.system.operating.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.xunmei.system.operating.domain.OperatingType;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface IOperatingTypeMapper extends BaseMapper<OperatingType> {
+}
+

+ 28 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/service/IOperatingManualService.java

@@ -0,0 +1,28 @@
+package com.xunmei.system.operating.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.system.api.domain.SysArea;
+import com.xunmei.system.operating.domain.OperatingManual;
+import com.xunmei.system.operating.vo.OperatingVo;
+
+import java.util.List;
+
+public interface IOperatingManualService extends IService<OperatingManual> {
+
+    /**
+     * 操作手册分页查询
+     * @param operatingManual
+     * @return
+     */
+    TableDataInfo<OperatingManual> selectPage(OperatingManual operatingManual);
+
+    /**
+     * 根据资料类型获取所有的文件信息
+     * @param sourceId
+     * @return
+     */
+    List<OperatingManual> selectBySourceId(Long sourceId);
+
+    List<OperatingVo> selectOperating();
+}

+ 16 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/service/IOperatingTypeService.java

@@ -0,0 +1,16 @@
+package com.xunmei.system.operating.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.system.operating.domain.OperatingManual;
+import com.xunmei.system.operating.domain.OperatingType;
+
+public interface IOperatingTypeService extends IService<OperatingType> {
+
+    /**
+     * 操作手册分页查询
+     * @param operatingType
+     * @return
+     */
+    TableDataInfo<OperatingType> selectPage(OperatingType operatingType);
+}

+ 67 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/service/OperatingManualServiceImpl.java

@@ -0,0 +1,67 @@
+package com.xunmei.system.operating.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.system.operating.domain.OperatingManual;
+import com.xunmei.system.operating.domain.OperatingType;
+import com.xunmei.system.operating.mapper.IOperatingManualMapper;
+import com.xunmei.system.operating.mapper.IOperatingTypeMapper;
+import com.xunmei.system.operating.vo.OperatingVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class OperatingManualServiceImpl extends ServiceImpl<IOperatingManualMapper, OperatingManual> implements IOperatingManualService {
+
+    @Autowired
+    private IOperatingTypeService operatingTypeService;
+
+
+    @Override
+    public TableDataInfo<OperatingManual> selectPage(OperatingManual operatingManual) {
+        //未删除
+        Page<OperatingManual> page;
+        //分页
+        if (operatingManual.getPageNum() != null && operatingManual.getPageSize() != null) {
+            page = new Page<>(operatingManual.getPageNum(), operatingManual.getPageSize());
+        } else {
+            page = new Page<>();
+        }
+
+        page = baseMapper.selectPageData(page, operatingManual);
+
+        return TableDataInfo.build(page);
+
+    }
+
+    @Override
+    public List<OperatingManual> selectBySourceId(Long sourceId) {
+        QueryWrapper<OperatingManual> query = new QueryWrapper<>();
+        query.lambda().eq(OperatingManual::getSourceId, sourceId);
+        query.lambda().orderByAsc(OperatingManual::getSort);
+        return baseMapper.selectList(query);
+    }
+
+    @Override
+    public List<OperatingVo> selectOperating() {
+        List<OperatingVo> list = new ArrayList<>();
+        QueryWrapper<OperatingType> qw = new QueryWrapper<>();
+        qw.lambda().orderByAsc(OperatingType::getSort);
+        List<OperatingType> operatingTypes = operatingTypeService.list(qw);
+        OperatingVo vo = null;
+        for (OperatingType operatingType : operatingTypes) {
+            vo = new OperatingVo();
+            vo.setSourceName(operatingType.getSourceName());
+            List<OperatingManual> data = selectBySourceId(operatingType.getId());
+            vo.setList(data);
+            list.add(vo);
+        }
+        return list;
+
+    }
+}

+ 40 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/service/OperatingTypeServiceImpl.java

@@ -0,0 +1,40 @@
+package com.xunmei.system.operating.service;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.log.enums.OperatorType;
+import com.xunmei.system.operating.domain.OperatingType;
+import com.xunmei.system.operating.mapper.IOperatingTypeMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+@Service
+public class OperatingTypeServiceImpl extends ServiceImpl<IOperatingTypeMapper, OperatingType> implements IOperatingTypeService {
+
+
+    @Override
+    public TableDataInfo<OperatingType> selectPage(OperatingType operatingType) {
+        //未删除
+        Page<OperatingType> page;
+        //分页
+        if (operatingType.getPageNum() != null && operatingType.getPageSize() != null) {
+            page = new Page<>(operatingType.getPageNum(), operatingType.getPageSize());
+        } else {
+            page = new Page<>();
+        }
+        //查询条件
+        QueryWrapper<OperatingType> query = new QueryWrapper<>(operatingType);
+        if(StringUtils.isNotEmpty(operatingType.getSourceName())){
+            query.lambda().like(OperatingType::getSourceName,operatingType.getSourceName());
+        }
+        //获取数据
+        page = baseMapper.selectPage(page, query);
+
+        return TableDataInfo.build(page);
+
+    }
+
+
+}

+ 18 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/operating/vo/OperatingVo.java

@@ -0,0 +1,18 @@
+package com.xunmei.system.operating.vo;
+
+import com.xunmei.system.operating.domain.OperatingManual;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class OperatingVo {
+
+    private String sourceName;
+
+    private List<OperatingManual> list;
+}

+ 28 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/IOperatingManualMapper.xml

@@ -0,0 +1,28 @@
+<?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.xunmei.system.operating.mapper.IOperatingManualMapper">
+
+    <select id="selectPageData" resultType="com.xunmei.system.operating.domain.OperatingManual">
+        select
+            a.id,
+            a.source_id,
+            b.source_name,
+            a.file_url,
+            a.file_name,
+            a.file_type,
+            a.sort,
+            a.create_by,
+            a.create_time,
+            a.update_by,
+            a.update_time
+        from sys_operating a
+        LEFT JOIN sys_operating_type b on a.source_id = b.id
+        where 1=1
+        <if test="request.sourceId">
+            and a.source_id = ${request.sourceId}
+        </if>
+        ORDER BY b.sort,a.sort
+    </select>
+</mapper>