Browse Source

修改oa已办条数错误

master
dimengzhe 4 months ago
parent
commit
c68e627808
  1. 1
      anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.java
  2. 29
      anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.xml
  3. 2
      anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java

1
anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.java

@ -31,6 +31,7 @@ public interface FlowTaskMapper extends BaseMapper<FlowTask> {
List<Map<String,Object>> finishedList1(Map<String, Object> map);
int finishedListCount(Map<String, Object> map);
int finishedListCountOA(Map<String, Object> map);
/**
* 根据流程实例的id查询最新的待办环节

29
anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskMapper.xml

@ -200,6 +200,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="finishedListCountOA" parameterType="java.util.Map" resultType="int">
SELECT COUNT(DISTINCT ahpi.PROC_INST_ID_)
FROM ACT_HI_PROCINST ahpi
INNER JOIN ( SELECT PROC_INST_ID_ FROM ACT_HI_TASKINST WHERE ASSIGNEE_ =#{userSid} AND END_TIME_ IS NOT NULL ) temp ON ahpi.PROC_INST_ID_ = temp.PROC_INST_ID_
LEFT JOIN ACT_HI_TASKINST ahti ON ahti.PROC_INST_ID_ = temp.PROC_INST_ID_
INNER JOIN `ACT_HI_VARINST` A0 ON ahpi.PROC_INST_ID_ = A0.PROC_INST_ID_
LEFT JOIN ACT_RE_PROCDEF arpd ON ahpi.PROC_DEF_ID_ = arpd.ID_
<where>
<!-- <if test="proDefName != null and proDefName != ''">
AND arpd.NAME_ LIKE concat('%',#{proDefName},'%')
</if>-->
<if test="startDate != null and startDate != ''">
AND ahpi.START_TIME_ <![CDATA[ >= ]]> #{startDate}
</if>
<if test="endDate != null and endDate != ''">
AND ahpi.START_TIME_ <![CDATA[ <= ]]> #{endDate}
</if>
<if test="names != null and names != ''">
and (A0.NAME_ = 'orderNames' and A0.TEXT_ LIKE concat('%',#{names},'%') or arpd.NAME_ LIKE concat('%',#{proDefName},'%'))
</if>
<if test="startUserSid != null and startUserSid != ''">
and A0.NAME_ = 'INITIATOR' and A0.TEXT_ LIKE concat('%',#{startUserSid},'%')
</if>
<if test="category != null and category != ''">
and arpd.CATEGORY_ LIKE concat('%',#{category},'%')
</if>
</where>
</select>
<select id="getLatestTasks" resultType="com.yxt.anrui.flowable.api.flowtask.LatestTaskVo">
SELECT

2
anrui-flowable/anrui-flowable-biz/src/main/java/com/yxt/anrui/flowable/biz/flowtask/FlowTaskService.java

@ -1017,7 +1017,7 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask
paraMap.put("page", (pageNum - 1) * pageSize);
paraMap.put("size", pageSize);
List<Map<String, Object>> maps = baseMapper.finishedList1(paraMap);
int count = baseMapper.finishedListCount(paraMap);
int count = baseMapper.finishedListCountOA(paraMap);
List<FlowTaskDto> hisTaskList = new ArrayList();
for (Map<String, Object> histTask : maps) {
FlowTaskDto flowTask = new FlowTaskDto();

Loading…
Cancel
Save