@@ -3,8 +3,6 @@ package com.ningdatech.pmapi.todocenter.manage; | |||||
import cn.hutool.core.bean.BeanUtil; | import cn.hutool.core.bean.BeanUtil; | ||||
import cn.hutool.core.codec.Base64; | import cn.hutool.core.codec.Base64; | ||||
import cn.hutool.core.collection.CollUtil; | 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 cn.hutool.core.util.StrUtil; | ||||
import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
@@ -1032,7 +1030,7 @@ public class TodoCenterManage { | |||||
Integer pageSize = param.getPageSize(); | Integer pageSize = param.getPageSize(); | ||||
req.setProcessDefId(param.getProcessDefId()); | req.setProcessDefId(param.getProcessDefId()); | ||||
req.setUserId(String.valueOf(userId)); | req.setUserId(String.valueOf(userId)); | ||||
req.setInstCodes(instCodes); | |||||
// req.setInstCodes(instCodes); | |||||
BeanUtils.copyProperties(param,req); | BeanUtils.copyProperties(param,req); | ||||
List<ProcessInstanceVo> ccMeList = processInstanceService.getCcMeList(req); | List<ProcessInstanceVo> ccMeList = processInstanceService.getCcMeList(req); | ||||
@@ -7,11 +7,11 @@ import org.apache.ibatis.annotations.Param; | |||||
public interface StatisticsMapper extends BaseMapper { | 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); | |||||
} | } |
@@ -1,7 +1,7 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | <?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"> | <!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"> | <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"> | resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO"> | ||||
SELECT | SELECT | ||||
sum(CASE WHEN tol.todoNum IS NOT NULL AND tol.todoNum > 0 THEN 1 ELSE 0 end) todoNum, | sum(CASE WHEN tol.todoNum IS NOT NULL AND tol.todoNum > 0 THEN 1 ELSE 0 end) todoNum, | ||||
@@ -24,7 +24,7 @@ | |||||
) tol | ) tol | ||||
</select> | </select> | ||||
<select id="getTodoOrIdo" parameterType="java.lang.Long" | |||||
<select id="getTodoOrIdo" parameterType="java.lang.String" | |||||
resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO"> | resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO"> | ||||
SELECT | SELECT | ||||
sum(CASE WHEN ht.assignee_ = #{userId} AND ht.end_time_ is NULL THEN 1 end) todoNum, | sum(CASE WHEN ht.assignee_ = #{userId} AND ht.end_time_ is NULL THEN 1 end) todoNum, | ||||
@@ -33,7 +33,7 @@ | |||||
act_hi_taskinst ht | act_hi_taskinst ht | ||||
</select> | </select> | ||||
<select id="mysubmitNum" parameterType="java.lang.Long" | |||||
<select id="mysubmitNum" parameterType="java.lang.String" | |||||
resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO"> | resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO"> | ||||
SELECT | SELECT | ||||
sum(CASE WHEN tol.mysubmitNum IS NOT NULL AND tol.mysubmitNum > 0 THEN 1 ELSE 0 end) mysubmitNum | sum(CASE WHEN tol.mysubmitNum IS NOT NULL AND tol.mysubmitNum > 0 THEN 1 ELSE 0 end) mysubmitNum | ||||
@@ -49,7 +49,7 @@ | |||||
</select> | </select> | ||||
<select id="ccNums" parameterType="java.lang.Long" | |||||
<select id="ccNums" parameterType="java.lang.String" | |||||
resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO"> | resultType="com.ningdatech.pmapi.todocenter.model.po.TodoCenterStatisticsPO"> | ||||
SELECT | SELECT | ||||
count(0) ccmeNum | count(0) ccmeNum | ||||
@@ -24,18 +24,18 @@ public class StatisticsServiceImpl implements StatisticsService { | |||||
public TodoCenterStatisticsPO getStatistics(Long userId) { | public TodoCenterStatisticsPO getStatistics(Long userId) { | ||||
TodoCenterStatisticsPO res = new TodoCenterStatisticsPO(); | TodoCenterStatisticsPO res = new TodoCenterStatisticsPO(); | ||||
TodoCenterStatisticsPO todoOrIdo = mapper.getTodoOrIdo(userId); | |||||
TodoCenterStatisticsPO todoOrIdo = mapper.getTodoOrIdo(String.valueOf(userId)); | |||||
if(Objects.nonNull(todoOrIdo)){ | if(Objects.nonNull(todoOrIdo)){ | ||||
res.setTodoNum(todoOrIdo.getTodoNum()); | res.setTodoNum(todoOrIdo.getTodoNum()); | ||||
res.setIdoNum(todoOrIdo.getIdoNum()); | res.setIdoNum(todoOrIdo.getIdoNum()); | ||||
} | } | ||||
TodoCenterStatisticsPO submit = mapper.mysubmitNum(userId); | |||||
TodoCenterStatisticsPO submit = mapper.mysubmitNum(String.valueOf(userId)); | |||||
if(Objects.nonNull(submit)){ | if(Objects.nonNull(submit)){ | ||||
res.setMysubmitNum(submit.getMysubmitNum()); | res.setMysubmitNum(submit.getMysubmitNum()); | ||||
} | } | ||||
TodoCenterStatisticsPO ccMe = mapper.ccNums(userId); | |||||
TodoCenterStatisticsPO ccMe = mapper.ccNums(String.valueOf(userId)); | |||||
if(Objects.nonNull(ccMe)){ | if(Objects.nonNull(ccMe)){ | ||||
res.setCcmeNum(ccMe.getCcmeNum()); | res.setCcmeNum(ccMe.getCcmeNum()); | ||||
} | } | ||||