|
|
@@ -52,37 +52,24 @@ public class ModelProcService extends AbstractCompService { |
|
|
|
} |
|
|
|
|
|
|
|
//加载工作流的列表字段 |
|
|
|
public R loadProcInstFields(@SwBody SwMap params, UserSession us) { |
|
|
|
ModelTable table = ModelTableCache.getInstance().getByName(ProcInst.ENTITY_NAME); |
|
|
|
if (table == null) return R.error("没有找到表定义信息(table=" + ProcInst.ENTITY_NAME + ")!"); |
|
|
|
|
|
|
|
public R loadFlowListFields (@SwBody SwMap params, UserSession us) { |
|
|
|
List<SwMap> ret = new ArrayList<>(); |
|
|
|
for (ModelField field : table.getFields()) { |
|
|
|
SwMap col = new SwMap(2); |
|
|
|
ModelFormHelper.buildFieldInfo(table, field, 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); |
|
|
|
ModelFormHelper.buildTableFields(ret, ProcInst.ENTITY_NAME); |
|
|
|
return R.success(ret); |
|
|
|
} |
|
|
|
|
|
|
|
public R loadFlowCardFields(@SwBody SwMap params, UserSession us) { |
|
|
|
List<SwMap> ret = new ArrayList<>(); |
|
|
|
ModelFormHelper.buildTableFields(ret, ProcInst.ENTITY_NAME); |
|
|
|
ret.add(buildField("selTaskId", SwEnum.DataType.ID.value, "选中任务")); |
|
|
|
|
|
|
|
return R.success(ret); |
|
|
|
} |
|
|
|
|
|
|
|
//加载审批意见的列表字段 |
|
|
|
public R loadCommentFields(@SwBody SwMap params, UserSession us) { |
|
|
|
ModelTable table = ModelTableCache.getInstance().getByName(Comment.ENTITY_NAME); |
|
|
|
if (table == null) return R.error("没有找到表定义信息(table=" + Comment.ENTITY_NAME + ")!"); |
|
|
|
|
|
|
|
List<SwMap> ret = new ArrayList<>(); |
|
|
|
for (ModelField field : table.getFields()) { |
|
|
|
SwMap col = new SwMap(2); |
|
|
|
ModelFormHelper.buildFieldInfo(table, field, col); |
|
|
|
ret.add(col); |
|
|
|
} |
|
|
|
ModelFormHelper.buildTableFields(ret, Comment.ENTITY_NAME); |
|
|
|
ret.add(buildField("cmt_act_code", SwEnum.DataType.CODE.value, "活动编号")); |
|
|
|
ret.add(buildField("cmt_act_text", SwEnum.DataType.NAME.value, "活动名称")); |
|
|
|
return R.success(ret); |
|
|
|