@@ -67,7 +67,7 @@ public class CodeBuildHandler extends AbstractHandler { | |||||
if (StringUtils.isEmpty(moduleName)) throw new BizException("此项目未定义Module!"); | if (StringUtils.isEmpty(moduleName)) throw new BizException("此项目未定义Module!"); | ||||
final String eventPath = ModelFormHelper.getEventPath(form); | final String eventPath = ModelFormHelper.getEventPath(form); | ||||
codePath = ModelFormHelper.getCodePath(form) + "/src/main/resources/static/" + moduleName + "/" + eventPath.replaceAll("\\.", "/"); | |||||
codePath = ModelFormHelper.getCodePath(form) + "/src/main/resources/static/" + eventPath.replaceAll("\\.", "/"); | |||||
new File(codePath).mkdirs(); | new File(codePath).mkdirs(); | ||||
SwMap model = new SwMap(); | SwMap model = new SwMap(); | ||||
@@ -383,10 +383,10 @@ public class ModelFormHelper { | |||||
public static String getEventPath(ModelForm bean) { | public static String getEventPath(ModelForm bean) { | ||||
String moduleName = ModelProjectCache.getInstance().getModule(bean.getPrjId()); | String moduleName = ModelProjectCache.getInstance().getModule(bean.getPrjId()); | ||||
if (StringUtils.isNotEmpty(moduleName)) { | if (StringUtils.isNotEmpty(moduleName)) { | ||||
// String ep = moduleName; | |||||
return ModelCatalogCache.getInstance().getFullName(bean.getMcId()); | |||||
// if (StringUtils.isNotEmpty(cn)) ep = ep + "." + cn; | |||||
// return ep; | |||||
String ep = moduleName; | |||||
String cn = ModelCatalogCache.getInstance().getFullName(bean.getMcId()); | |||||
if (StringUtils.isNotEmpty(cn)) ep = ep + "." + cn; | |||||
return ep; | |||||
} | } | ||||
return ""; | return ""; | ||||
} | } | ||||
@@ -85,8 +85,7 @@ public class ModelFormLoadHandler extends DefaultLoadHandler<ModelForm> { | |||||
if (StringUtils.isEmpty(codeJavaPath)) { | if (StringUtils.isEmpty(codeJavaPath)) { | ||||
return r; | return r; | ||||
} | } | ||||
String moduleName = ModelProjectCache.getInstance().getModule(form.getPrjId()); | |||||
String path = ModelFormHelper.getCodePath(form) + "/src/main/resources/static/" + moduleName + "/" + ModelFormHelper.getEventPath(form).replaceAll("\\.", "/") + "/" + form.getName() + ".js"; | |||||
String path = ModelFormHelper.getCodePath(form) + "/src/main/resources/static/" + ModelFormHelper.getEventPath(form).replaceAll("\\.", "/") + "/" + form.getName() + ".js"; | |||||
String js = FileUtil.readFileStr(path); | String js = FileUtil.readFileStr(path); | ||||
if (StringUtils.isEmpty(js)) { | if (StringUtils.isEmpty(js)) { | ||||
return r; | return r; | ||||