From 00104e3cfbb39916fa6d6f24a33186bf99ac2e10 Mon Sep 17 00:00:00 2001 From: wulin Date: Thu, 3 Dec 2020 10:37:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=82=AC=E5=8A=9E=E6=94=BE=E5=88=B0DingTalkbus?= =?UTF-8?q?iness?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResultRecordController.java | 2 +- .../job/business/DingtalkBusiness.java | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java index 1471fcc5..451de94f 100644 --- a/src/main/java/com/lz/modules/app/controller/ResultRecordController.java +++ b/src/main/java/com/lz/modules/app/controller/ResultRecordController.java @@ -342,7 +342,7 @@ public class ResultRecordController extends AbstractController { @ApiOperation("绩效催办-吴林") @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "绩效id")}) @ApiResponses({@ApiResponse(code = 200, message = "成功", response = R.class)}) - public R getDetail(@RequestParam Long id) { + public R urging(@RequestParam Long id) { ResultRecord lzResultRecord = lzResultRecordService.selectResultRecordById(id); //获取当前节点,谁在处理 List flowRecords = flowRecordService.selectFlowRecordsByRecordIdAndStatus(id, 2); 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 8f4b7857..6c2d0bd6 100644 --- a/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java +++ b/src/main/java/com/lz/modules/job/business/DingtalkBusiness.java @@ -46,6 +46,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.RequestParam; import javax.annotation.Resource; import java.net.URLEncoder; @@ -626,6 +627,24 @@ public class DingtalkBusiness { } } + public String urging(Long recordId) { + ResultRecord lzResultRecord = resultRecordService.selectResultRecordById(recordId); + //获取当前节点,谁在处理 + List flowRecords = flowRecordService.selectFlowRecordsByRecordIdAndStatus(recordId, 2); + if(flowRecords.size() > 0){ + List ids = flowRecords.stream().map(new Function() { + @Override + public Long apply(FlowRecord flowRecord) { + return flowRecord.getApprovalStaffId(); + } + }).collect(Collectors.toList()); + List staffs = staffService.selectNamesByIds(ids); + sendNoticeMsg(lzResultRecord, staffs); + return "OK"; + } + return "error"; + } + public String sendNoticeMsg(ResultRecord lzResultRecord, List staffs) { ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);