|
@@ -2,11 +2,11 @@ package cc.smtweb.system.bpm.web.design.form; |
|
|
|
|
|
|
|
|
import cc.smtweb.framework.core.cache.AbstractCache; |
|
|
import cc.smtweb.framework.core.cache.AbstractCache; |
|
|
import cc.smtweb.framework.core.common.SwEnum; |
|
|
import cc.smtweb.framework.core.common.SwEnum; |
|
|
import cc.smtweb.framework.core.exception.BizException; |
|
|
|
|
|
import cc.smtweb.framework.core.common.SwMap; |
|
|
import cc.smtweb.framework.core.common.SwMap; |
|
|
import cc.smtweb.framework.core.db.cache.ModelTableCache; |
|
|
import cc.smtweb.framework.core.db.cache.ModelTableCache; |
|
|
import cc.smtweb.framework.core.db.vo.ModelField; |
|
|
import cc.smtweb.framework.core.db.vo.ModelField; |
|
|
import cc.smtweb.framework.core.db.vo.ModelTable; |
|
|
import cc.smtweb.framework.core.db.vo.ModelTable; |
|
|
|
|
|
import cc.smtweb.framework.core.exception.BizException; |
|
|
import cc.smtweb.framework.core.mvc.variable.SwVariableFactory; |
|
|
import cc.smtweb.framework.core.mvc.variable.SwVariableFactory; |
|
|
import cc.smtweb.framework.core.session.UserSession; |
|
|
import cc.smtweb.framework.core.session.UserSession; |
|
|
import cc.smtweb.framework.core.util.CommUtil; |
|
|
import cc.smtweb.framework.core.util.CommUtil; |
|
@@ -252,13 +252,16 @@ public class ModelFormHelper { |
|
|
public static String buildEngineModel(ModelForm form, SwMap params, UserSession us, boolean incExtra) { |
|
|
public static String buildEngineModel(ModelForm form, SwMap params, UserSession us, boolean incExtra) { |
|
|
PageDatasets datasets = form.getDatasets(); |
|
|
PageDatasets datasets = form.getDatasets(); |
|
|
if (datasets == null || datasets.list == null) return ""; |
|
|
if (datasets == null || datasets.list == null) return ""; |
|
|
|
|
|
|
|
|
|
|
|
String service = form.getService(); |
|
|
|
|
|
if (StringUtils.isEmpty(service) && form.getParent() > 0) { |
|
|
|
|
|
service = ModelFormCache.getInstance().get(form.getParent()).getService(); |
|
|
|
|
|
} |
|
|
SwMap ret = new SwMap(); |
|
|
SwMap ret = new SwMap(); |
|
|
PageModel pageInfo = parsePageInfo(form.getContent()); |
|
|
PageModel pageInfo = parsePageInfo(form.getContent()); |
|
|
if (pageInfo == null) return ""; |
|
|
if (pageInfo == null) return ""; |
|
|
ret.put("pageId", form.getEntityId()); |
|
|
ret.put("pageId", form.getEntityId()); |
|
|
ret.put("label", form.getTitle()); |
|
|
ret.put("label", form.getTitle()); |
|
|
ret.put("service", form.getService()); |
|
|
|
|
|
|
|
|
ret.put("service", service); |
|
|
ret.put("module", ModelProjectCache.getInstance().getModule(form.getPrjId())); |
|
|
ret.put("module", ModelProjectCache.getInstance().getModule(form.getPrjId())); |
|
|
buildOptsEx(form, ret); |
|
|
buildOptsEx(form, ret); |
|
|
//form不用管 |
|
|
//form不用管 |
|
@@ -374,7 +377,8 @@ public class ModelFormHelper { |
|
|
|
|
|
|
|
|
BpmConfigBean bpmConfigBean = SpringUtil.getBean(BpmConfigBean.class); |
|
|
BpmConfigBean bpmConfigBean = SpringUtil.getBean(BpmConfigBean.class); |
|
|
Map<String, String> mapIdeaModules = IdeaUtil.getModules(bpmConfigBean.getCodeJavaPath(), bpmConfigBean.getMode()); |
|
|
Map<String, String> mapIdeaModules = IdeaUtil.getModules(bpmConfigBean.getCodeJavaPath(), bpmConfigBean.getMode()); |
|
|
if (mapIdeaModules == null || mapIdeaModules.isEmpty()) throw new BizException("没有定义idea项目的路径(smtweb.bpm.codeJavaPath)!"); |
|
|
|
|
|
|
|
|
if (mapIdeaModules == null || mapIdeaModules.isEmpty()) |
|
|
|
|
|
throw new BizException("没有定义idea项目的路径(smtweb.bpm.codeJavaPath)!"); |
|
|
String codeJavaPath = mapIdeaModules.get(moduleName); |
|
|
String codeJavaPath = mapIdeaModules.get(moduleName); |
|
|
if (StringUtils.isEmpty(codeJavaPath)) { |
|
|
if (StringUtils.isEmpty(codeJavaPath)) { |
|
|
throw new BizException("没有找到对应项目在idea中Module的路径(" + moduleName + ")!"); |
|
|
throw new BizException("没有找到对应项目在idea中Module的路径(" + moduleName + ")!"); |
|
|