待办当前用户信息查询

This commit is contained in:
黎润豪 2026-03-04 17:39:52 +08:00
parent 12dd783147
commit 7491080bc9
3 changed files with 96 additions and 62 deletions

View File

@ -102,6 +102,13 @@ public interface TSTaskListMapper extends BaseMapper<TSTaskList> {
*/
IPage<TaskListUnionDto> selectFinishUnionTaskPage(IPage<TaskListUnionDto> page, @Param("taskList") TaskListUnionDto taskListUnionParam, @Param("customParamMap") Map<String, Object> customParamMap);
/**
* 查询执行中的用户id
* @param workFlowId 工作流id
* @return 执行中的用户
*/
TaskListUnionDto selectCurrentExecUserInfo(@Param("workFlowId") String workFlowId);
List<TaskListUnionDto> searchUnionTaskList(@Param("bustype") String yclrStr, @Param("userId") String userId);
List<TaskListUnionDto> searchUnionTaskToday(@Param("userId") String userId);

View File

@ -39,17 +39,19 @@ import com.chinaweal.aiccs.door.service.ITUserportalService;
import com.chinaweal.aiccs.org.entity.OrgUnits;
import com.chinaweal.aiccs.org.mapper.AicorgMapper;
import com.chinaweal.aiccs.org.mapper.TUsersMapper;
import com.chinaweal.aiccs.org.service.AicorgService;
import com.chinaweal.aicorg.model.AICUser;
import com.chinaweal.youfool.framework.springboot.mybatis.plus.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.stream.Collectors;
/**
@ -103,6 +105,8 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
private TSBizRemListService tsBizRemListService;
@Resource
private TSBizRemListMapper tsBizRemListMapper;
@Autowired
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
/**
@ -241,7 +245,24 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
@Override
public IPage<TaskListUnionDto> searchFinishTaskUnionPage(IPage<TaskListUnionDto> page, TaskListUnionDto taskListUnionParam, Map<String, Object> customParamMap) {
return baseMapper.selectFinishUnionTaskPage(page, taskListUnionParam, customParamMap);
IPage<TaskListUnionDto> taskListUnionDtoIPage = baseMapper.selectFinishUnionTaskPage(page, taskListUnionParam, customParamMap);
List<Future<?>> futureList = new ArrayList<>();
for (TaskListUnionDto each : taskListUnionDtoIPage.getRecords()) {
futureList.add(threadPoolTaskExecutor.submit(() -> {
TaskListUnionDto taskListUnionDto = baseMapper.selectCurrentExecUserInfo(each.getWorkflowid());
each.setCurruserid(taskListUnionDto.getCurruserid());
each.setCurrusername(taskListUnionDto.getCurrusername());
each.setOrgunitid(taskListUnionDto.getOrgunitid());
each.setOrgunitname(taskListUnionDto.getOrgunitname());
}));
}
for (Future<?> each : futureList) {
try {
each.get();
} catch (InterruptedException | ExecutionException e) {
}
}
return taskListUnionDtoIPage;
}
@Override
@ -385,16 +406,16 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
}
List<EBaseinfo> eBaseinfoList = eBaseinfoService.list(wrapper);
if (eBaseinfoList != null && eBaseinfoList.size() > 0) {
for(EBaseinfo eBaseinfo : eBaseinfoList){
for (EBaseinfo eBaseinfo : eBaseinfoList) {
List<String> busQueryConditionByPripid = baseMapper.getBusQueryConditionByPripid(eBaseinfo.getPripid());
if(busQueryConditionByPripid != null){
if (busQueryConditionByPripid != null) {
bizSeqList.addAll(busQueryConditionByPripid);
}
}
paramMap.put("pripid", "pripid");
paramMap.remove("searchName");
if (bizSeqList == null || bizSeqList.size() == 0 ) {
if (bizSeqList == null || bizSeqList.size() == 0) {
return null;
}
} else {
@ -448,7 +469,7 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
@Override
public IPage<TSAbnList> queryAbnList(Page<TSAbnList> page, Map<String, Object> paramMap) {
String searchUscc=StringUtils.tranObject(paramMap.get("searchUscc"));
String searchUscc = StringUtils.tranObject(paramMap.get("searchUscc"));
if (StringUtils.isNotBlank(searchUscc)) {
if (StringUtils.isUscc(searchUscc)) {
paramMap.put("uniscid", searchUscc);
@ -472,7 +493,7 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
if (StringUtils.isNotBlank(StringUtils.tranObject(paramMap.get("regulatory")))) {
List<String> regulatory = (List<String>) paramMap.get("regulatory");
if(regulatory.size()>0) {
if (regulatory.size() > 0) {
String suporg = regulatory.get(regulatory.size() - 1);
List<String> idsByParentId = areaSliceService.getIdsByParentId(suporg); //获取所有子片区id
idsByParentId.add(suporg); //加上父id
@ -480,12 +501,12 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
}
}
IPage<TSAbnList> data=null;
IPage<TSAbnList> data = null;
data = baseMapper.queryAbnList(page, paramMap);
//封装主体类型名称
data.getRecords().forEach(each -> {
TREntPriseType type = entPriseTypeService.getEntPriseTypeFromCache(each.getEnttype());
if(type != null){
if (type != null) {
each.setEnttypeCN(type.getDisplayvalue());
}
});
@ -493,8 +514,8 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
}
@Override
public List<AbnListExcel> exportAbnList( Map<String, Object> paramMap) {
String searchUscc=StringUtils.tranObject(paramMap.get("searchUscc"));
public List<AbnListExcel> exportAbnList(Map<String, Object> paramMap) {
String searchUscc = StringUtils.tranObject(paramMap.get("searchUscc"));
if (StringUtils.isNotBlank(searchUscc)) {
if (StringUtils.isUscc(searchUscc)) {
paramMap.put("uniscid", searchUscc);
@ -518,7 +539,7 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
if (StringUtils.isNotBlank(StringUtils.tranObject(paramMap.get("regulatory")))) {
List<String> regulatory = (List<String>) paramMap.get("regulatory");
if(regulatory.size()>0) {
if (regulatory.size() > 0) {
String suporg = regulatory.get(regulatory.size() - 1);
List<String> idsByParentId = areaSliceService.getIdsByParentId(suporg); //获取所有子片区id
idsByParentId.add(suporg); //加上父id
@ -526,7 +547,7 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
}
}
List<AbnListExcel> data=null;
List<AbnListExcel> data = null;
data = baseMapper.exportAbnList(paramMap);
return data;
}
@ -565,14 +586,14 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
if (StringUtils.isNotBlank(busStatus)) {
if (!"4".equals(busStatus)) return null;
}
IPage<TaskListUnionDto> data=null;
IPage<TaskListUnionDto> data = null;
data = baseMapper.queryOldeBusness(page, paramMap);
return data;
}
@Override
public IPage<RepairTaskListDto> repairTaskQuery(Page<RepairTaskListDto> page, Map<String, Object> paramMap) {
boolean isGzrNum = paramMap.containsKey("gzrNumSwitch") && (boolean)paramMap.get("gzrNumSwitch");
boolean isGzrNum = paramMap.containsKey("gzrNumSwitch") && (boolean) paramMap.get("gzrNumSwitch");
if (isGzrNum) {
int gzrNum = (int) paramMap.get("gzrNum");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
@ -592,7 +613,7 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
for (RepairTaskListDto repairTaskListDto : data.getRecords()) {
params.put("orgNumber", repairTaskListDto.getAreaCode());
OrgUnits orgUnits = aicorgMapper.queryByOrgNumberMap(params);
repairTaskListDto.setOrgName(orgUnits==null?"":orgUnits.getOrgUnitName());
repairTaskListDto.setOrgName(orgUnits == null ? "" : orgUnits.getOrgUnitName());
if (BaseDataConstant.CREDIT_REPAIR_ILLEGAL_BIZ.equals(repairTaskListDto.getBustype())) {
List<TSBizSerIllegalRem> tsBizSerIllegalRemList = tsBizSerIllegalRemService.selectbizRembizseq(repairTaskListDto.getBizseqid());
@ -621,7 +642,7 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
@Override
public IPage<XyxfCqDto> queryxyxfCqList(Page<XyxfCqDto> page, Map<String, Object> paramMap) {
String entType=StringUtils.tranObject(paramMap.get("entType"));
String entType = StringUtils.tranObject(paramMap.get("entType"));
Object intoObj = paramMap.get("searchIntoDate");
@ -631,10 +652,10 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
paramMap.put("endIntoDate", list.get(1));
}
IPage<XyxfCqDto> data=null;
IPage<XyxfCqDto> data = null;
if ("0".equals(entType)) {
data = tsBizRemListMapper.queryxyxfCqList(page, paramMap);
}else {
} else {
data = tsBizRemListMapper.queryxyxfCqYzfwList(page, paramMap);
}
if (data != null) {
@ -646,13 +667,13 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
// 处理每条数据
if ("12".equals(item.getBustype())) {
item.setBustype("个体工商户恢复");
}else if ("7".equals(item.getBustype())) {
} else if ("7".equals(item.getBustype())) {
item.setBustype("移除企业异常名录");
}else if ("14".equals(item.getBustype())) {
} else if ("14".equals(item.getBustype())) {
item.setBustype("农民专业合作社移除");
}else if ("33".equals(item.getBustype())) {
} else if ("33".equals(item.getBustype())) {
item.setBustype("移出严重违法失信");
}else {
} else {
item.setBustype(null);
}
}
@ -663,7 +684,7 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
@Override
public List<XyxfCqDto> exportxyxfCqList(Map<String, Object> paramMap) {
String entType=StringUtils.tranObject(paramMap.get("entType"));
String entType = StringUtils.tranObject(paramMap.get("entType"));
Object intoObj = paramMap.get("searchIntoDate");
@ -673,10 +694,10 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
paramMap.put("endIntoDate", list.get(1));
}
List<XyxfCqDto> data=null;
List<XyxfCqDto> data = null;
if ("0".equals(entType)) {
data = tsBizRemListMapper.exportqueryxyxfCqList(paramMap);
}else {
} else {
data = tsBizRemListMapper.exportqueryxyxfCqYzfwList(paramMap);
}
@ -686,13 +707,13 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
// 处理每条数据
if ("12".equals(item.getBustype())) {
item.setBustype("个体工商户恢复");
}else if ("7".equals(item.getBustype())) {
} else if ("7".equals(item.getBustype())) {
item.setBustype("移除企业异常名录");
}else if ("14".equals(item.getBustype())) {
} else if ("14".equals(item.getBustype())) {
item.setBustype("农民专业合作社移除");
}else if ("33".equals(item.getBustype())) {
} else if ("33".equals(item.getBustype())) {
item.setBustype("移出严重违法失信");
}else {
} else {
item.setBustype(null);
}
}
@ -706,29 +727,29 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
}
@Override
public List<RepairTaskStatisticDto> repairTaskStatistic(Map<String, Object> paramMap,AICUser aicUser) {
public List<RepairTaskStatisticDto> repairTaskStatistic(Map<String, Object> paramMap, AICUser aicUser) {
//判断有没有受理机关的条件
String orgNumber = (String) paramMap.get("orgNumber");
Map<String, String> params = new HashMap<>();
params.put("deleted", "0");
params.put("unittype", "1");
if(StringUtils.isEmpty(orgNumber)){
if (StringUtils.isEmpty(orgNumber)) {
params.put("orgNumber", aicUser.getRegionID());
OrgUnits org = aicorgMapper.queryByOrgNumberMap(params);
Integer orgLevel = org.getOrgLevel();
//根据机构等级判断
if (orgLevel == 1) { //省局
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 2)+"%");
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 2) + "%");
} else if (orgLevel == 2) { //市局
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 4)+"%");
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 4) + "%");
} else if (orgLevel == 3) { //区局
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 6)+"%");
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 6) + "%");
} else if (orgLevel >= 4) { //所
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 6)+"%");
paramMap.put("areaCode", StringUtils.substring(aicUser.getRegionID(), 0, 6) + "%");
}
}
boolean isGzrNum = paramMap.containsKey("gzrNumSwitch") && (boolean)paramMap.get("gzrNumSwitch");
boolean isGzrNum = paramMap.containsKey("gzrNumSwitch") && (boolean) paramMap.get("gzrNumSwitch");
if (isGzrNum) {
int gzrNum = (int) paramMap.get("gzrNum");
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
@ -743,25 +764,25 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
}
List<RepairTaskStatisticDto> repairTaskStatisticDtos = baseMapper.repairTaskStatistic(paramMap);
for(RepairTaskStatisticDto dto : repairTaskStatisticDtos){
for (RepairTaskStatisticDto dto : repairTaskStatisticDtos) {
params.put("orgNumber", dto.getOrgNumber());
OrgUnits orgUnits = aicorgMapper.queryByOrgNumberMap(params);
dto.setOrgName(orgUnits==null?"":orgUnits.getOrgUnitName());
dto.setOrgName(orgUnits == null ? "" : orgUnits.getOrgUnitName());
}
return repairTaskStatisticDtos;
}
@Override
public Map<String, Object> indexPageStatistic(Map<String, Object> customParamMap,AICUser aicUser) {
Map<String,Object> map = new HashMap<>();
public Map<String, Object> indexPageStatistic(Map<String, Object> customParamMap, AICUser aicUser) {
Map<String, Object> map = new HashMap<>();
customParamMap.put("areaCode", aicUser.getRegionID());
//统计信用修复正常、即将超期、超期的数量
Map<String, Object> repairStatistic = baseMapper.indexPageRepairStatistic(customParamMap);
map.put("repairStatistic",repairStatistic);
map.put("repairStatistic", repairStatistic);
//统计经营异常主体类型分布
Map<String, Object> entTypeStatistic = baseMapper.tsAbnEntTypeStatistic();
map.put("entTypeStatistic",entTypeStatistic);
map.put("entTypeStatistic", entTypeStatistic);
//统计各地区经营异常主体数量
List<OrgUnits> orgList = aicorgMapper.selectList(new LambdaQueryWrapper<OrgUnits>()
@ -781,12 +802,12 @@ public class TSTaskListServiceImpl extends BaseServiceImpl<TSTaskListMapper, TST
params.put("deleted", "0");
params.put("unittype", "1");
params.put("parentID", aicUser.getOrgID());
for (AbnEntLocStatistic item : abnEntLocStatistic){
for (AbnEntLocStatistic item : abnEntLocStatistic) {
params.put("orgNumber", item.getOrgNumber());
OrgUnits orgUnits = aicorgMapper.queryByOrgNumberMap(params);
item.setOrgName(orgUnits==null?"":orgUnits.getOrgUnitName());
item.setOrgName(orgUnits == null ? "" : orgUnits.getOrgUnitName());
}
map.put("abnEntLocStatistic",abnEntLocStatistic);
map.put("abnEntLocStatistic", abnEntLocStatistic);
return map;
}

View File

@ -564,17 +564,31 @@
</if>
AND n.status = '0'
</select>
<select id="selectCurrentExecUserInfo" resultMap="TaskListUnionMap">
SELECT
tu.USERID CURRUSERID,
tu.REALNAME CURRUSERNAME,
torg.ORGUNITID ORGUNITID,
torg.ORGUNITNAME ORGUNITNAME
FROM CXAICORG.T_USERS tu LEFT JOIN CXAICORG.T_ORGUNITS torg ON tu.ORGUNITID = torg.ORGUNITID
WHERE
tu.USERID = (
SELECT
n.HANDLERID
FROM
TSOPINION n
WHERE
tu.USERID = n.HANDLERID AND n.WORKFLOWID = #{workFlowId}
ORDER BY n.OPINIONTYPE DESC LIMIT 1)
</select>
<select id="selectFinishUnionTaskPage" resultMap="TaskListUnionMap">
SELECT *
from(
<choose>
<when test="customParamMap.finished != null and customParamMap.finished != '' ">
(select DISTINCT ta.TASKLISTID, ta.WORKFLOWID, ta.BIZSEQID, ta.SIGNUSERID, ta.SENDERORGID, ta.SENDERUSERID, ta.SENDTOORGID, ta.ACCEPTNO, ta.BUSNAME, ta.SIGNTIME,ta.BUSTYPE, ta.BUSSTATUS, ta.LINKNAME, ta.AUDITDEPTTYPE, ta.ISSIGNON,ta.SIGNLOGINNAME, ta.SENDERTIME, ta.SENDERNAME, ta.ACCEPTGROUPID, ta.AREA_CODE, ta.LAUPTIME , n.currentNode as currentNodeOrBizStatus,SUBSTR(n.NODEFLOW, 1, INSTR(n.NODEFLOW, '_') - 1) as lastNode, ta.CREATETIME,
n.CURRUSERID CURRUSERID, tu1.REALNAME CURRUSERNAME, torg1.ORGUNITID ORGUNITID, torg1.ORGUNITNAME ORGUNITNAME
(select DISTINCT ta.TASKLISTID, ta.WORKFLOWID, ta.BIZSEQID, ta.SIGNUSERID, ta.SENDERORGID, ta.SENDERUSERID, ta.SENDTOORGID, ta.ACCEPTNO, ta.BUSNAME, ta.SIGNTIME,ta.BUSTYPE, ta.BUSSTATUS, ta.LINKNAME, ta.AUDITDEPTTYPE, ta.ISSIGNON,ta.SIGNLOGINNAME, ta.SENDERTIME, ta.SENDERNAME, ta.ACCEPTGROUPID, ta.AREA_CODE, ta.LAUPTIME , n.currentNode as currentNodeOrBizStatus,SUBSTR(n.NODEFLOW, 1, INSTR(n.NODEFLOW, '_') - 1) as lastNode, ta.CREATETIME
from TSTaskList ta
LEFT JOIN TShwfProcessNode n on ta.WorkflowID = n.processid
LEFT JOIN CXAICORG.T_USERS tu1 on n.CURRUSERID = tu1.USERID
LEFT JOIN CXAICORG.T_ORGUNITS torg1 on tu1.ORGUNITID = torg1.ORGUNITID
where ta.BUSSTATUS = 2 AND ta.WORKFLOWID IN (
SELECT
DISTINCT WORKFLOWID
@ -598,12 +612,9 @@
</if>
</where>) and REGEXP_LIKE(n.currentNode, '^end|over', 'i') = 1)
union all
(select DISTINCT t.TASKLISTID, t.WORKFLOWID, t.BIZSEQID, t.SIGNUSERID, t.SENDERORGID, t.SENDERUSERID, t.SENDTOORGID, t.ACCEPTNO, t.BUSNAME, t.SIGNTIME, t.BUSTYPE, t.BUSSTATUS, t.LINKNAME, t.AUDITDEPTTYPE, t.ISSIGNON, t.SIGNLOGINNAME, t.SENDERTIME, t.SENDERNAME, t.ACCEPTGROUPID, t.AREA_CODE, t.LAUPTIME , n.currentNode as currentNodeOrBizStatus ,SUBSTR(n.NODEFLOW, 1, INSTR(n.NODEFLOW, '_') - 1) as lastNode, t.CREATETIME,
n.CURRUSERID CURRUSERID, tu1.REALNAME CURRUSERNAME, torg1.ORGUNITID ORGUNITID, torg1.ORGUNITNAME ORGUNITNAME
(select DISTINCT t.TASKLISTID, t.WORKFLOWID, t.BIZSEQID, t.SIGNUSERID, t.SENDERORGID, t.SENDERUSERID, t.SENDTOORGID, t.ACCEPTNO, t.BUSNAME, t.SIGNTIME, t.BUSTYPE, t.BUSSTATUS, t.LINKNAME, t.AUDITDEPTTYPE, t.ISSIGNON, t.SIGNLOGINNAME, t.SENDERTIME, t.SENDERNAME, t.ACCEPTGROUPID, t.AREA_CODE, t.LAUPTIME , n.currentNode as currentNodeOrBizStatus ,SUBSTR(n.NODEFLOW, 1, INSTR(n.NODEFLOW, '_') - 1) as lastNode, t.CREATETIME
from tsrevtasklist t
LEFT JOIN TShwfProcessNode n on t.WorkflowID = n.processid
LEFT JOIN CXAICORG.T_USERS tu1 on n.CURRUSERID = tu1.USERID
LEFT JOIN CXAICORG.T_ORGUNITS torg1 on tu1.ORGUNITID = torg1.ORGUNITID
where t.BUSSTATUS = 2 AND t.WORKFLOWID IN (
SELECT
DISTINCT WORKFLOWID
@ -630,11 +641,9 @@
union all
</when>
</choose>
(select DISTINCT t.TASKLISTID, t.WORKFLOWID, t.BIZSEQID, t.SIGNUSERID, t.SENDERORGID, t.SENDERUSERID, t.SENDTOORGID, t.ACCEPTNO, t.BUSNAME, t.SIGNTIME, t.BUSTYPE, t.BUSSTATUS, t.LINKNAME, t.AUDITDEPTTYPE, t.ISSIGNON, t.SIGNLOGINNAME, t.SENDERTIME, t.SENDERNAME, t.ACCEPTGROUPID, t.AREA_CODE, t.LAUPTIME , b.STATUS as currentNodeOrBizStatus, null as lastNode, t.CREATETIME,
n.CURRUSERID CURRUSERID, tu1.REALNAME CURRUSERNAME, torg1.ORGUNITID ORGUNITID, torg1.ORGUNITNAME ORGUNITNAME
from tsrevtasklist t, tsbizrevlist b,TShwfProcessNode n, CXAICORG.T_USERS tu1, CXAICORG.T_ORGUNITS torg1
(select DISTINCT t.TASKLISTID, t.WORKFLOWID, t.BIZSEQID, t.SIGNUSERID, t.SENDERORGID, t.SENDERUSERID, t.SENDTOORGID, t.ACCEPTNO, t.BUSNAME, t.SIGNTIME, t.BUSTYPE, t.BUSSTATUS, t.LINKNAME, t.AUDITDEPTTYPE, t.ISSIGNON, t.SIGNLOGINNAME, t.SENDERTIME, t.SENDERNAME, t.ACCEPTGROUPID, t.AREA_CODE, t.LAUPTIME , b.STATUS as currentNodeOrBizStatus, null as lastNode, t.CREATETIME
from tsrevtasklist t, tsbizrevlist b,TShwfProcessNode n
where t.bizseqid = b.bizseq and t.busstatus = '0' and b.ISREMOVE = '0'
and n.CURRUSERID = tu1.USERID and tu1.ORGUNITID = torg1.ORGUNITID
and t.WorkflowID = n.processid and t.WORKFLOWID in (SELECT DISTINCT WORKFLOWID FROM tsopinion tso
<where>
<if test="customParamMap.childUnitSwitch != null and customParamMap.childUnitSwitch != ''">
@ -654,12 +663,9 @@
</if>
</where>))
union all
(select DISTINCT ta.TASKLISTID, ta.WORKFLOWID, ta.BIZSEQID, ta.SIGNUSERID, ta.SENDERORGID, ta.SENDERUSERID, ta.SENDTOORGID, ta.ACCEPTNO, ta.BUSNAME, ta.SIGNTIME, ta.BUSTYPE, ta.BUSSTATUS, ta.LINKNAME, ta.AUDITDEPTTYPE, ta.ISSIGNON,ta.SIGNLOGINNAME, ta.SENDERTIME, ta.SENDERNAME, ta.ACCEPTGROUPID, ta.AREA_CODE, ta.LAUPTIME, n.currentNode as currentNodeOrBizStatus,SUBSTR(n.NODEFLOW, 1, INSTR(n.NODEFLOW, '_') - 1) as lastNode, ta.CREATETIME,
n.CURRUSERID CURRUSERID, tu1.REALNAME CURRUSERNAME, torg1.ORGUNITID ORGUNITID, torg1.ORGUNITNAME ORGUNITNAME
(select DISTINCT ta.TASKLISTID, ta.WORKFLOWID, ta.BIZSEQID, ta.SIGNUSERID, ta.SENDERORGID, ta.SENDERUSERID, ta.SENDTOORGID, ta.ACCEPTNO, ta.BUSNAME, ta.SIGNTIME, ta.BUSTYPE, ta.BUSSTATUS, ta.LINKNAME, ta.AUDITDEPTTYPE, ta.ISSIGNON,ta.SIGNLOGINNAME, ta.SENDERTIME, ta.SENDERNAME, ta.ACCEPTGROUPID, ta.AREA_CODE, ta.LAUPTIME, n.currentNode as currentNodeOrBizStatus,SUBSTR(n.NODEFLOW, 1, INSTR(n.NODEFLOW, '_') - 1) as lastNode, ta.CREATETIME
from TSTaskList ta
LEFT JOIN TSTwfProcessNode n on ta.WorkflowID = n.processid
LEFT JOIN CXAICORG.T_USERS tu1 on n.CURRUSERID = tu1.USERID
LEFT JOIN CXAICORG.T_ORGUNITS torg1 on tu1.ORGUNITID = torg1.ORGUNITID
where ta.BUSSTATUS in ('-1', '0', '1', '3', '5')
<if test="customParamMap.childUnitSwitch != null and customParamMap.childUnitSwitch != ''">
<choose>