Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
niohe·erbao 1 year ago
parent
commit
2b658f7a3a
4 changed files with 12 additions and 14 deletions
  1. +1
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  2. +4
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java
  3. +4
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml
  4. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/impl/StatisticsServiceImpl.java

+ 1
- 3
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -3,8 +3,6 @@ package com.ningdatech.pmapi.todocenter.manage;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.StopWatch;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
@@ -1032,7 +1030,7 @@ public class TodoCenterManage {
Integer pageSize = param.getPageSize();
req.setProcessDefId(param.getProcessDefId());
req.setUserId(String.valueOf(userId));
req.setInstCodes(instCodes);
// req.setInstCodes(instCodes);
BeanUtils.copyProperties(param,req);
List<ProcessInstanceVo> ccMeList = processInstanceService.getCcMeList(req);



+ 4
- 4
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.java View File

@@ -7,11 +7,11 @@ import org.apache.ibatis.annotations.Param;
public interface StatisticsMapper extends BaseMapper {


TodoCenterStatisticsPO getStatistics(@Param("userId") Long userId);
TodoCenterStatisticsPO getStatistics(@Param("userId") String userId);

TodoCenterStatisticsPO getTodoOrIdo(@Param("userId") Long userId);
TodoCenterStatisticsPO getTodoOrIdo(@Param("userId") String userId);

TodoCenterStatisticsPO mysubmitNum(@Param("userId") Long userId);
TodoCenterStatisticsPO mysubmitNum(@Param("userId") String userId);

TodoCenterStatisticsPO ccNums(@Param("userId") Long userId);
TodoCenterStatisticsPO ccNums(@Param("userId") String userId);
}

+ 4
- 4
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml View File

@@ -1,7 +1,7 @@
<?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.ningdatech.pmapi.todocenter.mapper.StatisticsMapper">
<select id="getStatistics" parameterType="java.lang.Long"
<select id="getStatistics" parameterType="java.lang.String"
resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO">
SELECT
sum(CASE WHEN tol.todoNum IS NOT NULL AND tol.todoNum > 0 THEN 1 ELSE 0 end) todoNum,
@@ -24,7 +24,7 @@
) tol
</select>

<select id="getTodoOrIdo" parameterType="java.lang.Long"
<select id="getTodoOrIdo" parameterType="java.lang.String"
resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO">
SELECT
sum(CASE WHEN ht.assignee_ = #{userId} AND ht.end_time_ is NULL THEN 1 end) todoNum,
@@ -33,7 +33,7 @@
act_hi_taskinst ht
</select>

<select id="mysubmitNum" parameterType="java.lang.Long"
<select id="mysubmitNum" parameterType="java.lang.String"
resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO">
SELECT
sum(CASE WHEN tol.mysubmitNum IS NOT NULL AND tol.mysubmitNum > 0 THEN 1 ELSE 0 end) mysubmitNum
@@ -49,7 +49,7 @@
</select>


<select id="ccNums" parameterType="java.lang.Long"
<select id="ccNums" parameterType="java.lang.String"
resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO">
SELECT
count(0) ccmeNum


+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/service/impl/StatisticsServiceImpl.java View File

@@ -24,18 +24,18 @@ public class StatisticsServiceImpl implements StatisticsService {
public TodoCenterStatisticsPO getStatistics(Long userId) {
TodoCenterStatisticsPO res = new TodoCenterStatisticsPO();

TodoCenterStatisticsPO todoOrIdo = mapper.getTodoOrIdo(userId);
TodoCenterStatisticsPO todoOrIdo = mapper.getTodoOrIdo(String.valueOf(userId));
if(Objects.nonNull(todoOrIdo)){
res.setTodoNum(todoOrIdo.getTodoNum());
res.setIdoNum(todoOrIdo.getIdoNum());
}

TodoCenterStatisticsPO submit = mapper.mysubmitNum(userId);
TodoCenterStatisticsPO submit = mapper.mysubmitNum(String.valueOf(userId));
if(Objects.nonNull(submit)){
res.setMysubmitNum(submit.getMysubmitNum());
}

TodoCenterStatisticsPO ccMe = mapper.ccNums(userId);
TodoCenterStatisticsPO ccMe = mapper.ccNums(String.valueOf(userId));
if(Objects.nonNull(ccMe)){
res.setCcmeNum(ccMe.getCcmeNum());
}


Loading…
Cancel
Save