Selaa lähdekoodia

Merge remote-tracking branch 'origin/master_179_20250814' into master_179_20250814

xgb 6 päivää sitten
vanhempi
commit
073c0067c7

+ 3 - 0
fs-admin/src/main/java/com/fs/his/controller/FsTodoItemsController.java

@@ -8,6 +8,7 @@ import com.fs.common.utils.ServletUtils;
 import com.fs.company.domain.CompanyUser;
 import com.fs.company.service.ICompanyUserService;
 import com.fs.todo.domain.FsTodoItems;
+import com.fs.todo.dto.TodoCategoryStatisticsDTO;
 import com.fs.todo.param.AssignExecutorParam;
 import com.fs.todo.param.GetUserListParam;
 import com.fs.todo.param.QueryTodoItemsParam;
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
 
 import java.time.LocalDateTime;
 import java.util.List;
+import java.util.Map;
 
 @Api("待办")
 @RestController
@@ -54,6 +56,7 @@ public class FsTodoItemsController extends BaseController {
         return R.ok().put("data",byId);
     }
 
+
     @ApiOperation("更新待办事项状态")
     @PostMapping("/updateStatusById")
     public R updateStatusById(@RequestBody QueryTodoItemsParam param)

+ 8 - 0
fs-service/src/main/java/com/fs/his/domain/FsAttachment.java

@@ -2,6 +2,7 @@ package com.fs.his.domain;
 
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.fs.common.annotation.Excel;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import com.fs.common.core.domain.BaseEntity;
 import lombok.EqualsAndHashCode;
@@ -17,30 +18,37 @@ import lombok.EqualsAndHashCode;
 public class FsAttachment extends BaseEntity{
 
     @TableId
+    @ApiModelProperty(value = "附件id")
     private Long attachmentId;
 
     /** 父id */
     @Excel(name = "父id")
+    @ApiModelProperty(value = "父id")
     private Long parentId;
 
     /** 用户id */
     @Excel(name = "用户id")
+    @ApiModelProperty(value = "用户id")
     private Long userId;
 
     /** 文件类型 0:文件夹 1图片 */
     @Excel(name = "文件类型 0:文件夹 1图片 2体检报告")
+    @ApiModelProperty(value = "文件类型 0:文件夹 1图片 2体检报告")
     private Integer type;
 
     /** 文件大小(kb) */
     @Excel(name = "文件大小(kb)")
+    @ApiModelProperty(value = "文件大小(kb)")
     private Long size;
 
     /** 文件名 */
     @Excel(name = "文件名")
+    @ApiModelProperty(value = "文件名")
     private String fileName;
 
     /** oss路径 */
     @Excel(name = "oss路径")
+    @ApiModelProperty(value = "文件:oss地址 体检报告:报告id")
     private String url;
 
 

+ 1 - 1
fs-service/src/main/java/com/fs/his/service/IFsAttachmentService.java

@@ -46,7 +46,7 @@ public interface IFsAttachmentService extends IService<FsAttachment>{
      * @param fsAttachment 附件管理
      * @return 结果
      */
-    int updateFsAttachment(FsAttachment fsAttachment);
+    R updateFsAttachment(FsAttachment fsAttachment);
 
     /**
      * 批量删除附件管理

+ 162 - 5
fs-service/src/main/java/com/fs/his/service/impl/FsAttachmentServiceImpl.java

@@ -1,5 +1,6 @@
 package com.fs.his.service.impl;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
@@ -18,6 +19,7 @@ import org.springframework.stereotype.Service;
 import com.fs.his.mapper.FsAttachmentMapper;
 import com.fs.his.domain.FsAttachment;
 import com.fs.his.service.IFsAttachmentService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 附件管理Service业务层处理
@@ -52,7 +54,20 @@ public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsA
 
     @Override
     public List<FsAttachment> selectFsAttachmentList(FsAttachmentPageParam fsAttachment) {
-        return baseMapper.selectFsAttachmentListPage(fsAttachment);
+        List<FsAttachment> list = baseMapper.selectFsAttachmentListPage(fsAttachment);
+        //查询文件夹大小
+        for (FsAttachment attachment : list) {
+            long size = 0;
+            if (attachment.getType() == 0){
+                FsAttachment queryParam = new FsAttachment();
+                queryParam.setParentId(attachment.getAttachmentId());
+                queryParam.setUserId(attachment.getUserId());
+                List<FsAttachment> list1 = baseMapper.selectFsAttachmentList(queryParam);
+            } else {
+                size = size + attachment.getSize();
+            }
+        }
+        return list;
     }
 
     /**
@@ -62,6 +77,7 @@ public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsA
      * @return 结果
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public R insertFsAttachment(FsAttachment fsAttachment) {
         if (fsAttachment.getUserId() == null) {
             return R.error("未获取到创建人!");
@@ -86,6 +102,7 @@ public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsA
             //上传类型为文件时可获取为文件名称
             if (StringUtils.isBlank(fileName)) {
                 fileName = FileNameExtractor.getFileNameFromUrl(fsAttachment.getUrl());
+                list = selectFsAttachmentList(queryParam);
             }
             if (list != null && !list.isEmpty()) {
                 if (fileName.contains(".")) {
@@ -125,9 +142,10 @@ public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsA
         if (fsAttachment.getParentId() == null) {
             fsAttachment.setParentId(0L);
         }
+        FsAttachment parentItem = new FsAttachment();
         if (fsAttachment.getParentId() != 0) {
             //查询父文件是否是文件夹
-            FsAttachment parentItem = selectFsAttachmentByAttachmentId(fsAttachment.getParentId());
+            parentItem = selectFsAttachmentByAttachmentId(fsAttachment.getParentId());
             if (parentItem == null) {
                 return R.error("上级文件夹不存在");
             } else {
@@ -137,7 +155,15 @@ public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsA
             }
         }
         fsAttachment.setCreateTime(DateUtils.getNowDate());
-        return baseMapper.insertFsAttachment(fsAttachment) > 0 ? R.ok() : R.error();
+        int i = baseMapper.insertFsAttachment(fsAttachment);
+        //修改文件夹大小
+        if (i>0 && fsAttachment.getType() == 1 && fsAttachment.getParentId() != 0) {
+            Long size = parentItem.getSize();
+            parentItem.setSize(size + fsAttachment.getSize());
+            parentItem.setUpdateTime(fsAttachment.getCreateTime());
+            baseMapper.updateFsAttachment(parentItem);
+        }
+        return i>0 ? R.ok() : R.error();
     }
 
     /**
@@ -147,9 +173,115 @@ public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsA
      * @return 结果
      */
     @Override
-    public int updateFsAttachment(FsAttachment fsAttachment) {
+    @Transactional(rollbackFor = Exception.class)
+    public R updateFsAttachment(FsAttachment fsAttachment) {
+        if (fsAttachment.getUserId() == null) {
+            return R.error("未获取到修改人!");
+        }
+        FsAttachment oldAttachment = baseMapper.selectFsAttachmentByAttachmentId(fsAttachment.getAttachmentId());
+        if (oldAttachment == null) {
+            return R.error("未查到该文件!");
+        }
+        Integer type = fsAttachment.getType();
+        if (type == null) {
+            type = oldAttachment.getType();
+            fsAttachment.setType(type);
+        }
+        if (!Objects.equals(oldAttachment.getUserId(), fsAttachment.getUserId()) || !Objects.equals(oldAttachment.getType(), type)) {
+            return R.error("非本人修改/不支持修改文件类型");
+        }
+
+        //获取文件名
+        String fileName = fsAttachment.getFileName();
+        //查询文件名是否存在
+        FsAttachment queryParam = new FsAttachment();
+        if (StringUtils.isNotBlank(fileName) && !oldAttachment.getFileName().equals(fileName)) {
+            queryParam.setUserId(fsAttachment.getUserId());
+            queryParam.setParentId(fsAttachment.getParentId());
+            queryParam.setType(fsAttachment.getType());
+            queryParam.setFileName(fsAttachment.getFileName());
+        }
+
+
+        if (type == 1) {
+            //文件
+            if (StringUtils.isBlank(fsAttachment.getUrl()) && StringUtils.isBlank(oldAttachment.getUrl())) {
+                return R.error("文件不存在");
+            }
+            //上传类型为文件时可获取为文件名称
+            if (StringUtils.isBlank(fileName) && StringUtils.isBlank(oldAttachment.getFileName())) {
+                fileName = FileNameExtractor.getFileNameFromUrl(fsAttachment.getUrl());
+                queryParam.setFileName(fsAttachment.getFileName());
+                List<FsAttachment> list = selectFsAttachmentList(queryParam);
+                if (list != null && !list.isEmpty()) {
+                    if (fileName.contains(".")) {
+                        int index = fileName.lastIndexOf(".");
+                        String name = fileName.substring(0, index);
+                        fileName = name + "(" + (list.size() + 1) + ")" + "." + fileName.substring(index + 1);
+                    }
+
+                }
+                long size = Objects.requireNonNull(ImageUtils.getImage(fsAttachment.getUrl())).length / 1024; // 单位为 KB
+                fsAttachment.setSize(size);
+            } else {
+                fsAttachment.setSize(oldAttachment.getSize());
+            }
+
+        } else if (type == 0) {
+            //文件夹
+            if (StringUtils.isBlank(fsAttachment.getFileName()) && StringUtils.isBlank(oldAttachment.getFileName())) {
+                return R.error("文件夹名称不能为空");
+            }
+            queryParam.setFileName(fsAttachment.getFileName());
+            List<FsAttachment> list = selectFsAttachmentList(queryParam);
+            if (list != null && !list.isEmpty()) {
+                fileName = fileName + "(" + (list.size() + 1) + ")";
+
+            }
+        } else if (type == 2) {
+            //体检报告
+            if (StringUtils.isBlank(fsAttachment.getUrl()) && StringUtils.isBlank(oldAttachment.getUrl())) {
+                return R.error("体检报告不存在");
+            }
+            if (StringUtils.isBlank(fsAttachment.getFileName()) && StringUtils.isBlank(oldAttachment.getFileName())) {
+                return R.error("名称不能为空");
+            }
+            List<FsAttachment> list = selectFsAttachmentList(queryParam);
+            if (list != null && !list.isEmpty()) {
+                fileName = fileName + "(" + (list.size() + 1) + ")";
+
+            }
+        }
+
+
+        fsAttachment.setFileName(fileName);
+        if (fsAttachment.getParentId() == null) {
+            fsAttachment.setParentId(oldAttachment.getParentId());
+        }
+        FsAttachment parentItem = selectFsAttachmentByAttachmentId(fsAttachment.getParentId());
+        if (fsAttachment.getParentId() != null && !fsAttachment.getParentId().equals(oldAttachment.getParentId())) {
+            if (fsAttachment.getParentId() != 0) {
+                //查询父文件是否是文件夹
+                if (parentItem == null) {
+                    return R.error("上级文件夹不存在");
+                } else {
+                    if (parentItem.getType() != 0) {
+                        return R.error("上级文件夹不存在!");
+                    }
+                }
+            }
+        }
+
         fsAttachment.setUpdateTime(DateUtils.getNowDate());
-        return baseMapper.updateFsAttachment(fsAttachment);
+        int i = baseMapper.updateFsAttachment(fsAttachment);
+        //修改文件夹大小
+        if (i>0 && fsAttachment.getType() == 1 && fsAttachment.getParentId() != 0) {
+            Long size = parentItem.getSize();
+            parentItem.setSize(size - oldAttachment.getSize() + fsAttachment.getSize());
+            parentItem.setUpdateTime(fsAttachment.getUpdateTime());
+            baseMapper.updateFsAttachment(parentItem);
+        }
+        return i > 0 ? R.ok() : R.error();
     }
 
     /**
@@ -160,6 +292,22 @@ public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsA
      */
     @Override
     public int deleteFsAttachmentByAttachmentIds(Long[] attachmentIds) {
+        if(attachmentIds != null && attachmentIds.length > 0) {
+            for (Long attachmentId : attachmentIds) {
+                FsAttachment fsAttachment = baseMapper.selectFsAttachmentByAttachmentId(attachmentId);
+                if (fsAttachment != null && fsAttachment.getType() == 1 && fsAttachment.getParentId() != 0) {
+                    FsAttachment folder = baseMapper.selectFsAttachmentByAttachmentId(fsAttachment.getParentId());
+                    if (folder != null) {
+                        //修改文件夹大小
+                        Long size = folder.getSize();
+                        folder.setSize(size - fsAttachment.getSize());
+                        folder.setUpdateTime(DateUtils.getNowDate());
+                        baseMapper.updateFsAttachment(folder);
+                    }
+                }
+            }
+        }
+
         return baseMapper.deleteFsAttachmentByAttachmentIds(attachmentIds);
     }
 
@@ -171,6 +319,15 @@ public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsA
      */
     @Override
     public int deleteFsAttachmentByAttachmentId(Long attachmentId) {
+        FsAttachment fsAttachment = baseMapper.selectFsAttachmentByAttachmentId(attachmentId);
+        if (fsAttachment != null && fsAttachment.getType() == 1) {
+            FsAttachment folder = baseMapper.selectFsAttachmentByAttachmentId(fsAttachment.getParentId());
+            //修改文件夹大小
+            Long size = folder.getSize();
+            folder.setSize(size - fsAttachment.getSize());
+            folder.setUpdateTime(DateUtils.getNowDate());
+            baseMapper.updateFsAttachment(folder);
+        }
         return baseMapper.deleteFsAttachmentByAttachmentId(attachmentId);
     }
 

+ 1 - 1
fs-service/src/main/java/com/fs/medical/mapper/ReportIndicatorResultMapper.java

@@ -41,7 +41,7 @@ public interface ReportIndicatorResultMapper {
     /**
      * 新增检查结果
      */
-    @Insert("INSERT INTO fs_report_indicator_result(report_id, indicator_id, test_value, test_result, is_abnormal, abnormal_type, remarks,indicator_cate_id) " +
+    @Insert("INSERT IGNORE INTO fs_report_indicator_result(report_id, indicator_id, test_value, test_result, is_abnormal, abnormal_type, remarks,indicator_cate_id) " +
             "VALUES(#{reportId}, #{indicatorId}, #{testValue}, #{testResult}, #{isAbnormal}, #{abnormalType}, #{remarks},#{indicatorCateId})")
     @Options(useGeneratedKeys = true, keyProperty = "resultId")
     int insert(ReportIndicatorResult result);

+ 30 - 0
fs-service/src/main/java/com/fs/todo/dto/TodoCategoryStatisticsDTO.java

@@ -0,0 +1,30 @@
+package com.fs.todo.dto;
+
+import lombok.Data;
+
+/**
+ * 待办事项分类统计DTO
+ */
+@Data
+public class TodoCategoryStatisticsDTO {
+
+    /**
+     * 分类ID
+     */
+    private Long cateId;
+
+    /**
+     * 总条目数
+     */
+    private Long totalCount;
+
+    /**
+     * 已完成条目数
+     */
+    private Long completedCount;
+
+    /**
+     * 完成率(百分比)
+     */
+    private Double completionRate;
+}

+ 16 - 0
fs-service/src/main/java/com/fs/todo/mapper/FsTodoItemsMapper.java

@@ -1,10 +1,12 @@
 package com.fs.todo.mapper;
 
 import com.fs.todo.domain.FsTodoItems;
+import com.fs.todo.dto.TodoCategoryStatisticsDTO;
 import com.fs.todo.param.AssignExecutorParam;
 import com.fs.todo.param.QueryTodoItemsParam;
 import org.apache.ibatis.annotations.*;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 待办事项表 Mapper接口
@@ -19,6 +21,20 @@ public interface FsTodoItemsMapper {
     FsTodoItems selectById(@Param("id") Long id);
 
 
+    @Select("SELECT \n" +
+            "   \n" +
+            "    cate_id,\n" +
+            "    COUNT(*) AS total_count,\n" +
+            "    SUM(CASE WHEN status = 2 THEN 1 ELSE 0 END) AS completed_count,\n" +
+            "    CASE \n" +
+            "        WHEN COUNT(*) = 0 THEN 0.00\n" +
+            "        ELSE ROUND((SUM(CASE WHEN status = 2 THEN 1 ELSE 0 END) / COUNT(*)) * 100, 2)\n" +
+            "    END AS completion_rate\n" +
+            "FROM fs_todo_items\n" +
+            "GROUP BY cate_id\n" +
+            "ORDER BY cate_id;")
+    @MapKey("cateId")
+    Map<Long,TodoCategoryStatisticsDTO> queryCateStatis();
 
     /**
      * 查询所有待办事项

+ 5 - 0
fs-service/src/main/java/com/fs/todo/service/FsTodoItemsService.java

@@ -1,10 +1,12 @@
 package com.fs.todo.service;
 
 import com.fs.todo.domain.FsTodoItems;
+import com.fs.todo.dto.TodoCategoryStatisticsDTO;
 import com.fs.todo.param.AssignExecutorParam;
 import com.fs.todo.param.QueryTodoItemsParam;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 待办事项表 服务类
@@ -58,4 +60,7 @@ public interface FsTodoItemsService {
     boolean removeById(Long id);
 
     void assignExecutor(AssignExecutorParam param);
+
+    Map<Long, TodoCategoryStatisticsDTO> queryCateStatis();
+
 }

+ 25 - 0
fs-service/src/main/java/com/fs/todo/service/impl/FsTodoItemsServiceImpl.java

@@ -9,6 +9,7 @@ import com.fs.hisStore.service.cache.IFsUserCacheService;
 import com.fs.system.mapper.SysUserMapper;
 import com.fs.system.service.ISysUserService;
 import com.fs.todo.domain.FsTodoItems;
+import com.fs.todo.dto.TodoCategoryStatisticsDTO;
 import com.fs.todo.mapper.FsTodoItemsMapper;
 import com.fs.todo.param.AssignExecutorParam;
 import com.fs.todo.param.QueryTodoItemsParam;
@@ -17,7 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import java.time.LocalDateTime;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 待办事项表 服务实现类
@@ -208,4 +211,26 @@ public class FsTodoItemsServiceImpl implements FsTodoItemsService {
         }
         fsTodoItemsMapper.assignExecutor(param);
     }
+
+    @Override
+    public Map<Long, TodoCategoryStatisticsDTO> queryCateStatis() {
+        Map<Long, TodoCategoryStatisticsDTO> cateStatis = fsTodoItemsMapper.queryCateStatis();
+
+        if(cateStatis == null) {
+            cateStatis = new HashMap<>();
+        }
+        // 固定任务0
+        TodoCategoryStatisticsDTO fixedTask = cateStatis.get(0L);
+        if(fixedTask == null) {
+            fixedTask = new TodoCategoryStatisticsDTO();
+            cateStatis.put(0L,fixedTask);
+        }
+        // 工作计划1
+        TodoCategoryStatisticsDTO workSchedule = cateStatis.get(1L);
+        if(workSchedule == null) {
+            workSchedule = new TodoCategoryStatisticsDTO();
+            cateStatis.put(1L,workSchedule);
+        }
+        return cateStatis;
+    }
 }

+ 1 - 1
fs-service/src/main/resources/mapper/his/FsAttachmentMapper.xml

@@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFsAttachmentVo">
-        select attachment_id, parent_id, user_id, type, `size`, file_name, url,create_time, update_time from fs_attachment
+        select attachment_id, parent_id, user_id, type,IFNULL(`size`,0)  `size`, file_name, url,create_time, update_time from fs_attachment
     </sql>
 
     <select id="selectFsAttachmentList" parameterType="FsAttachment" resultMap="FsAttachmentResult">

+ 15 - 3
fs-user-app/src/main/java/com/fs/app/controller/AttachmentController.java

@@ -7,6 +7,8 @@ import com.fs.common.core.domain.R;
 import com.fs.his.param.FsAttachmentPageParam;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import com.fs.common.core.domain.AjaxResult;
@@ -21,6 +23,7 @@ import com.fs.his.service.IFsAttachmentService;
  */
 @RestController
 @RequestMapping("/app/attachment")
+@Api("附件管理")
 public class AttachmentController extends AppBaseController
 {
     @Autowired
@@ -31,6 +34,7 @@ public class AttachmentController extends AppBaseController
      */
     @Login
     @GetMapping("/list")
+    @ApiOperation("查询附件管理列表")
     public R list(FsAttachmentPageParam param)
     {
         PageHelper.startPage(param.getPageNum(), param.getPageSize());
@@ -49,6 +53,7 @@ public class AttachmentController extends AppBaseController
      */
     @Login
     @GetMapping(value = "/{attachmentId}")
+    @ApiOperation("获取附件管理详细信息")
     public AjaxResult getInfo(@PathVariable("attachmentId") Long attachmentId)
     {
         return AjaxResult.success(fsAttachmentService.selectFsAttachmentByAttachmentId(attachmentId));
@@ -59,6 +64,7 @@ public class AttachmentController extends AppBaseController
      */
     @PostMapping
     @Login
+    @ApiOperation("新增附件管理")
     public R add(@RequestBody FsAttachment fsAttachment)
     {
         if (fsAttachment.getUserId() == null){
@@ -73,15 +79,21 @@ public class AttachmentController extends AppBaseController
      */
     @PutMapping
     @Login
-    public AjaxResult edit(@RequestBody FsAttachment fsAttachment)
+    @ApiOperation("修改附件")
+    public R edit(@RequestBody FsAttachment fsAttachment)
     {
-        return toAjax(fsAttachmentService.updateFsAttachment(fsAttachment));
+        if (fsAttachment.getUserId() == null){
+            String userId = getUserId();
+            fsAttachment.setUserId(Long.parseLong(userId));
+        }
+        return fsAttachmentService.updateFsAttachment(fsAttachment);
     }
 
     /**
-     * 删除附件管理
+     * 删除附件
      */
 	@DeleteMapping("/{attachmentIds}")
+    @ApiOperation("删除附件")
     public AjaxResult remove(@PathVariable Long[] attachmentIds)
     {
         return toAjax(fsAttachmentService.deleteFsAttachmentByAttachmentIds(attachmentIds));

+ 8 - 0
fs-user-app/src/main/java/com/fs/app/controller/FsTodoItemsController.java

@@ -6,6 +6,7 @@ import com.fs.common.core.domain.R;
 import com.fs.his.param.FsFollowListUParam;
 import com.fs.his.vo.FsFollowListUVO;
 import com.fs.todo.domain.FsTodoItems;
+import com.fs.todo.dto.TodoCategoryStatisticsDTO;
 import com.fs.todo.param.QueryTodoItemsParam;
 import com.fs.todo.service.FsTodoItemsService;
 import com.github.pagehelper.PageHelper;
@@ -17,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 @Slf4j
 @Api("待办")
@@ -26,7 +28,13 @@ public class FsTodoItemsController extends BaseController {
 
     @Autowired
     private FsTodoItemsService fsTodoItemsService;
+    @ApiOperation("获取类型统计(各个类型的百分比)")
+    @GetMapping("/queryCateStatis")
+    public R queryCateStatis(){
+        Map<Long, TodoCategoryStatisticsDTO> cateStatis = fsTodoItemsService.queryCateStatis();
 
+        return R.ok().put("data",cateStatis);
+    }
 
     @ApiOperation("查看待办列表")
     @PostMapping("/listPage")