diff --git a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/flow/app/FlowTaskDoVo.java b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/flow/app/FlowTaskDoVo.java index e04808c331..cb298c6279 100644 --- a/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/flow/app/FlowTaskDoVo.java +++ b/anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/flow/app/FlowTaskDoVo.java @@ -1,7 +1,6 @@ package com.yxt.anrui.portal.api.flow.app; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; import com.yxt.anrui.flowable.api.sysprourl.SysProUrlVo; import com.yxt.common.core.vo.Vo; import io.swagger.annotations.ApiModelProperty; @@ -12,29 +11,39 @@ import java.util.Map; /** * @Author dimengzhe * @Date 2022/7/20 9:45 - * @Description + * @Description 移动待办返回参数 */ @Data public class FlowTaskDoVo implements Vo { private static final long serialVersionUID = 8771689666940266426L; - + @ApiModelProperty(value = "环节名称") private String taskName; + @ApiModelProperty(value = "发起部门") private String startDeptName; + @ApiModelProperty(value = "发起人") private String startUserName; + @ApiModelProperty(value = "工作名称") private String procDefName; + @ApiModelProperty(value = "提交日期") private String processCreateTime; + @ApiModelProperty(value = "发起日期") private String createTime; - @JsonProperty("deployId") - private String procDefId; + // @JsonProperty("deployId") +// private String procDefId; + @ApiModelProperty(value = "流程id") + private String deployId; + @ApiModelProperty(value = "流程实例id") private String procInsId; + @ApiModelProperty(value = "任务id") private String taskId; - @JsonIgnore @ApiModelProperty("节点id") + @JsonIgnore private String taskDefKey; + @ApiModelProperty(value = "app集合") private AppVo appVariables; @JsonIgnore - private Map processVariables; + private Map processVariables; @ApiModelProperty("办理的url") @JsonIgnore - private SysProUrlVo sysProUrlVo ; + private SysProUrlVo sysProUrlVo; } diff --git a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/flow/FlowableService.java b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/flow/FlowableService.java index d6d9a4b1d1..67c00b515f 100644 --- a/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/flow/FlowableService.java +++ b/anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/flow/FlowableService.java @@ -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> resultBean = flowTaskFeign.businessTodoList(userSid, taskQueryPagerQuery); ResultBean> resultBean = flowTaskFeign.businessTodoListForApp(userSid, taskQueryPagerQuery); if (!resultBean.getSuccess()) { return rb.setMsg("流程错误"); @@ -500,30 +500,24 @@ public class FlowableService extends MybatisBaseService page = new PagerVo<>(); List 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> 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 flowMap = f.getProcessVariables(); Map 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 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(); }