From e5496346bf79ff1c3d430fbf434147d4596707aa Mon Sep 17 00:00:00 2001 From: wulin Date: Fri, 20 Nov 2020 11:34:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A2=AB=E6=8B=92=E5=BE=85?= =?UTF-8?q?=E5=8A=9E=E4=BB=BB=E5=8A=A1=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lz/config/ShiroConfig.java | 1 - .../job/business/DingtalkBusiness.java | 25 ++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/lz/config/ShiroConfig.java b/src/main/java/com/lz/config/ShiroConfig.java index 677f5e88..292daac3 100644 --- a/src/main/java/com/lz/config/ShiroConfig.java +++ b/src/main/java/com/lz/config/ShiroConfig.java @@ -54,7 +54,6 @@ public class ShiroConfig { filterMap.put("/file/**", "anon"); filterMap.put("/test/**", "anon"); filterMap.put("/druid/**", "anon"); - filterMap.put("/user/lzresultrecord/new/resultRecordDetail/**", "anon"); filterMap.put("/app/**", "anon"); filterMap.put("/sys/login", "anon"); filterMap.put("/sys/sendSMS", "anon"); diff --git a/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java b/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java index ce565832..19d7206d 100644 --- a/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java +++ b/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java @@ -241,13 +241,14 @@ public class DingtalkBusiness { StaffSimpleInfo fromStaff = staffService.selectStaffSimpleInfo(resultRecord.getStaffId()); fromStaff.setResultRecord(resultRecord); fromStaff.setFlowStart(flowStart); - List toStaffids; + List toStaffids = new ArrayList<>(); + toStaffids.add(fromStaff); + sendWorkMSGWithAsyn(null, toStaffids, WorkMsgTypeEnum.PROCESS.getType()); if(type == WorkMsgTypeEnum.REJECT.getType()){//被拒 - toStaffids = new ArrayList<>(); - toStaffids.add(fromStaff); - sendWorkMSGWithAsyn(fromStaff, toStaffids, WorkMsgTypeEnum.REJECT.getType()); + + sendWorkMSGWithAsyn(null, toStaffids, WorkMsgTypeEnum.REJECT.getType()); }else{ - List flowRecords = + /*List flowRecords = flowRecordService.selectFlowRecordByRecordIdStatus(resultRecordId, 2); List ids = flowRecords.stream().map(new Function() { @Override @@ -260,8 +261,8 @@ public class DingtalkBusiness { ) { simpleInfo.setResultRecord(resultRecord); simpleInfo.setFlowStart(flowStart); - } - sendWorkMSGWithAsyn(fromStaff, toStaffids, WorkMsgTypeEnum.PROCESS.getType()); + }*/ + sendWorkMSGWithAsyn(null, toStaffids, WorkMsgTypeEnum.PROCESS.getType()); } @@ -547,8 +548,14 @@ public class DingtalkBusiness { if(flowRecords.size() == 0){//任务结束了 flowRecords = flowRecordService.selectLastFlowRecordsById(info.getResultRecord().getId()); }else{ - flowRecords = flowRecordService.selectLastFlowRecordsByIdAndFlowIndex(info.getResultRecord().getId() - , flowRecords.get(0).getFlowIndex().intValue() - 1);//获取上一步的数据 + if(workMsgTypeEnum.getType() == WorkMsgTypeEnum.REJECT.getType()){//被拒 + flowRecords = flowRecordService.selectLastFlowRecordsByIdAndFlowIndex(info.getResultRecord().getId() + , flowRecords.get(0).getFlowIndex().intValue() + 1);//获取下一步的数据 + }else{ + flowRecords = flowRecordService.selectLastFlowRecordsByIdAndFlowIndex(info.getResultRecord().getId() + , flowRecords.get(0).getFlowIndex().intValue() - 1);//获取上一步的数据 + } + } logger.info("查询到可能需要更新的待办任务数量{}", flowRecords.size()); if(flowRecords.size() > 0){