@@ -62,7 +62,13 @@ public class ModelProcService extends AbstractCompService { | |||||
ModelFormHelper.buildFieldInfo(table, field, col); | ModelFormHelper.buildFieldInfo(table, field, col); | ||||
ret.add(col); | ret.add(col); | ||||
} | } | ||||
SwMap col = new SwMap(); | |||||
col.put("name", "selTaskId"); | |||||
col.put("dataType", SwEnum.DataType.ID.value); | |||||
col.put("title", "选中的任务id"); | |||||
col.put("table", table.getId()); | |||||
col.put("table_text", table.getTitle()); | |||||
ret.add(col); | |||||
return R.success(ret); | return R.success(ret); | ||||
} | } | ||||
@@ -318,6 +318,7 @@ public class FlowInstance { | |||||
* 返回页面前的设置 | * 返回页面前的设置 | ||||
*/ | */ | ||||
public void setPageRetExtra(SwMap ret) { | public void setPageRetExtra(SwMap ret) { | ||||
procInst.setSelTaskId(actInst.getId()); | |||||
SwMap extra = ret.computeMapIfAbsent("extra", k -> new SwMap()); | SwMap extra = ret.computeMapIfAbsent("extra", k -> new SwMap()); | ||||
List<Task> listTask = adjustTasks(); | List<Task> listTask = adjustTasks(); | ||||
@@ -232,4 +232,11 @@ public class ProcInst extends DefaultEntity { | |||||
public void setUrl(String pri_url) { | public void setUrl(String pri_url) { | ||||
put("pri_url", pri_url); | put("pri_url", pri_url); | ||||
} | } | ||||
/** | |||||
* 当前选择的任务 | |||||
*/ | |||||
public void setSelTaskId(long selTaskId) { | |||||
put("selTaskId", selTaskId); | |||||
} | |||||
} | } |
@@ -28,9 +28,10 @@ public class FlowSingleLoadHandler<T extends DefaultEntity> extends LCSingleLoad | |||||
bean.setEntityId(flowInstance.getProcInst().getId()); | bean.setEntityId(flowInstance.getProcInst().getId()); | ||||
ret.put(cardDataset.name, DynRetBean.createBean(bean)); | ret.put(cardDataset.name, DynRetBean.createBean(bean)); | ||||
flowInstance.setPageRetExtra(ret); | |||||
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst())); | ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst())); | ||||
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY)); | ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY)); | ||||
flowInstance.setPageRetExtra(ret); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -47,9 +48,9 @@ public class FlowSingleLoadHandler<T extends DefaultEntity> extends LCSingleLoad | |||||
//加载流程信息 | //加载流程信息 | ||||
flowInstance = FlowInstance.createById(us, this, id, taskId); | flowInstance = FlowInstance.createById(us, this, id, taskId); | ||||
flowInstance.setPageRetExtra(ret); | |||||
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst())); | ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst())); | ||||
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.create(flowInstance.loadComment(), 0))); | ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.create(flowInstance.loadComment(), 0))); | ||||
flowInstance.setPageRetExtra(ret); | |||||
afterLoad(ret, bean); | afterLoad(ret, bean); | ||||
return R.success(ret); | return R.success(ret); | ||||
} | } | ||||
@@ -55,9 +55,9 @@ public class FlowSingleSaveHandler<T extends DefaultEntity> extends LCSingleSave | |||||
@Override | @Override | ||||
protected void afterSave(SwMap ret, T bean) { | protected void afterSave(SwMap ret, T bean) { | ||||
super.afterSave(ret, bean); | super.afterSave(ret, bean); | ||||
flowInstance.setPageRetExtra(ret); | |||||
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst())); | ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst())); | ||||
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY)); | ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY)); | ||||
flowInstance.setPageRetExtra(ret); | |||||
} | } | ||||
//单据编号,新增保存时调用 | //单据编号,新增保存时调用 | ||||
@@ -34,9 +34,10 @@ public class FlowTransHandler<T extends DefaultEntity> extends AbstractDynPageHa | |||||
private SwMap buildRetData() { | private SwMap buildRetData() { | ||||
SwMap ret = new SwMap(); | SwMap ret = new SwMap(); | ||||
ret.put(LCSingleHelper.DATASET_NAME_CARD, DynRetBean.createBean(bean)); | ret.put(LCSingleHelper.DATASET_NAME_CARD, DynRetBean.createBean(bean)); | ||||
flowInstance.setPageRetExtra(ret); | |||||
ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst())); | ret.put(FlowHelper.DATASET_NAME_FLOW, DynRetBean.createBean(flowInstance.getProcInst())); | ||||
ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY)); | ret.put(FlowHelper.DATASET_NAME_COMMENT, DynRetBean.createList(SwListData.EMPTY)); | ||||
flowInstance.setPageRetExtra(ret); | |||||
return ret; | return ret; | ||||
} | } | ||||