|
|
@ -60,6 +60,7 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
@ -492,7 +493,6 @@ public class FlowableService extends MybatisBaseService<FlowableMapper, Flowable |
|
|
|
} |
|
|
|
taskQuery.setFields(taskParamList); |
|
|
|
taskQueryPagerQuery.setParams(taskQuery); |
|
|
|
// ResultBean<Page<FlowTaskDto>> resultBean = flowTaskFeign.businessTodoList(userSid, taskQueryPagerQuery);
|
|
|
|
ResultBean<Page<FlowTaskDto>> resultBean = flowTaskFeign.businessTodoListForApp(userSid, taskQueryPagerQuery); |
|
|
|
if (!resultBean.getSuccess()) { |
|
|
|
return rb.setMsg("流程错误"); |
|
|
@ -500,30 +500,24 @@ public class FlowableService extends MybatisBaseService<FlowableMapper, Flowable |
|
|
|
PagerVo<FlowTaskDoVo> page = new PagerVo<>(); |
|
|
|
List<FlowTaskDoVo> voList = Optional.ofNullable(resultBean.getData().getRecords()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), FlowTaskDoVo.class)).collect(Collectors.toList()); |
|
|
|
voList.removeAll(Collections.singleton(null)); |
|
|
|
//定义的app的sid的index集合
|
|
|
|
Map<String, List<Integer>> appVer = new HashMap<>(); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
for (int i = 0; i < voList.size(); i++) { |
|
|
|
FlowTaskDoVo f = voList.get(i); |
|
|
|
f.setCreateTime(sdf.format(new Date(Long.parseLong(f.getCreateTime())))); |
|
|
|
f.setProcessCreateTime(sdf.format(new Date(Long.parseLong(f.getProcessCreateTime())))); |
|
|
|
Map<String, Object> flowMap = f.getProcessVariables(); |
|
|
|
Map<String, Object> appMap = ConstantUtils.getMap(flowMap, "app"); |
|
|
|
String json = JSONObject.toJSONString(appMap); |
|
|
|
System.out.println(json); |
|
|
|
//根据节点id和流程定义id以及类型查询地址以及版本号等:待定,需要流程返回。
|
|
|
|
//========================================================================
|
|
|
|
// String procDefId = f.getProcDefId();
|
|
|
|
// String taskDefKey = f.getTaskDefKey();
|
|
|
|
// ResultBean<SysProUrlVo> resultBean1 = sysProUrlFeign.selectUrlByKey(procDefId, taskDefKey, "1","2");
|
|
|
|
//========================================================================
|
|
|
|
AppVo appVo = new AppVo(); |
|
|
|
appVo.setJson(json); |
|
|
|
//app版本的sid
|
|
|
|
String appSid = ""; |
|
|
|
//app版本的类型
|
|
|
|
String type = ""; |
|
|
|
/* if (resultBean1.getData() != null) { |
|
|
|
appVo.setModuleAction(resultBean1.getData().getUrl()); |
|
|
|
appSid = resultBean1.getData().getModulePluginName(); |
|
|
|
}*/ |
|
|
|
if(f.getSysProUrlVo() != null){ |
|
|
|
if (f.getSysProUrlVo() != null) { |
|
|
|
appVo.setModuleAction(f.getSysProUrlVo().getUrl()); |
|
|
|
appSid = f.getSysProUrlVo().getModulePluginName(); |
|
|
|
} |
|
|
|