|
@@ -44,7 +44,7 @@ public class CommonEvent extends BaseController {
|
|
|
DingApi dingApi;
|
|
|
|
|
|
@PostMapping("/send-ding-message")
|
|
|
- public String sendDingMessage(@ParamModel Map flowInstance, @ParamModel Map activityInstance) {
|
|
|
+ public String sendDingMessage(@ParamModel Map flowInstance, @ParamModel Map activityInstance,String currentUserId) {
|
|
|
try {
|
|
|
if (!Objects.isNull(activityInstance) && activityInstance.containsKey("id")) {
|
|
|
String flowName = flowInstance.get("name").toString();
|
|
@@ -61,11 +61,17 @@ public class CommonEvent extends BaseController {
|
|
|
IFlowInstanceReq iFlowInstanceReq = new IFlowInstanceReq();
|
|
|
iFlowInstanceReq.setFlowInstanceId(flowInstanceId);
|
|
|
iFlowInstanceReq.setMobile(true);
|
|
|
+ iFlowInstanceReq.setUserId(currentUserId);
|
|
|
CommonResult<String> flowUrlRes = workflowClient.getFlowUrl(iFlowInstanceReq);
|
|
|
+ int index = 0;
|
|
|
+ while(describtion == null || StringUtils.isBlank(describtion.toString()) || index < 5){
|
|
|
+ Thread.sleep(200);
|
|
|
+ CommonResult<IFlowInstance> res = workflowClient.flowInstance(flowInstanceId);
|
|
|
+ IFlowInstance checkedData = res.getCheckedData();
|
|
|
+ describtion = checkedData.getDescribtion();
|
|
|
+ index ++;
|
|
|
+ }
|
|
|
String mobileUrl = flowUrlRes.getCheckedData();
|
|
|
- iFlowInstanceReq.setMobile(false);
|
|
|
- CommonResult<String> flowPcUrlRes = workflowClient.getFlowUrl(iFlowInstanceReq);
|
|
|
- String pcUrl = flowPcUrlRes.getCheckedData();
|
|
|
for (int i = 0; i < parts.size(); i++) {
|
|
|
IActivityInsParticiPantDto item = parts.get(i);
|
|
|
String content = "";
|
|
@@ -77,9 +83,6 @@ public class CommonEvent extends BaseController {
|
|
|
if(StringUtils.isNotBlank(mobileUrl)){
|
|
|
OA oa = new OA();
|
|
|
oa.setMessageUrl(mobileUrl);
|
|
|
- if(StringUtils.isNotBlank(pcUrl)){
|
|
|
- oa.setPcMessageUrl(pcUrl);
|
|
|
- }
|
|
|
OA.Head head = new OA.Head();
|
|
|
head.setBgcolor("FFBBBBBB");
|
|
|
head.setText("浙江万维OA");
|