提交 ac5ff03d 编写于 作者: xignzi006's avatar xignzi006

update:

上级 30357556
......@@ -156,7 +156,7 @@
<dependency>
<groupId>net.ibizsys.model</groupId>
<artifactId>ibiz-model</artifactId>
<version>0.3.0</version>
<version>0.2.23</version>
<exclusions>
<exclusion>
<artifactId>slf4j-simple</artifactId>
......
......@@ -69,8 +69,13 @@ public class AppEntityModel extends BaseModel{
}
// 初始化界面行为
try {
keyField = getAppDataEntity().getPSDataEntity().getKeyPSDEField().getCodeName();
majorField = getAppDataEntity().getPSDataEntity().getMajorPSDEField().getCodeName();
}catch (Exception e){
}
if(getAppDataEntity().getAllPSAppDEUIActions() != null){
getAppDataEntity().getAllPSAppDEUIActions().forEach(appDEUIAction ->{
JSONObject actionJson = new JSONObject();
......
......@@ -113,7 +113,7 @@ public class ModelStorage {
CliOption opt = newCliOption(TemplateFileType.apiDto)
.setCliSubType(dto.getType())
.baseData(dto, dto.getCodeName())
.set("apiDtos", dto.getCodeName()).set("apis", dto.getApi().getCodeName().toLowerCase());
.set("apiDtos", dto.getCodeName()).set("apis", dto.getApi().getCodeName().toLowerCase()).set("modules",item.getEntity().getModule());
rt.addOption(opt);
});
});
......@@ -146,6 +146,14 @@ public class ModelStorage {
getSystemModel().getWorkflows().forEach(item -> {
CliOption opt = newCliOption(TemplateFileType.workflow)
.baseData(item, item.getCodeName().toString())
.set("wf",item.getWFVer().getWFCodeName());
rt.addOption(opt);
});
}
else if (type.equals(TemplateFileType.sysUtil)) {
getSystemModel().getSysUtils().forEach(item -> {
CliOption opt = newCliOption(TemplateFileType.sysUtil)
.baseData(item, item.getCodeName().toString());
rt.addOption(opt);
});
......
......@@ -142,6 +142,26 @@ public class SystemModel extends BaseModel {
return getWorkflowsMap().values();
}
private Map<String, SysUtilModel> sysUtilModelMap;
public synchronized Map<String, SysUtilModel> getSysUtilModelMaps() {
if (sysUtilModelMap == null) {
try {
sysUtilModelMap = new LinkedHashMap<>();
getSystem().getAllPSSysUtils().forEach(iPSSysUtil -> {
sysUtilModelMap.put(iPSSysUtil.getCodeName(), new SysUtilModel(iPSSysUtil));
});
} catch (Exception e) {
}
}
return sysUtilModelMap;
}
public Collection<SysUtilModel> getSysUtils() {
return getSysUtilModelMaps().values();
}
public boolean isHasMsgTemplate() {
return !ObjectUtils.isEmpty(getSystem().getAllPSSysMsgTempls());
}
......
......@@ -10,6 +10,7 @@ import net.ibizsys.model.dataentity.action.IPSDEAction;
import net.ibizsys.model.dataentity.action.IPSDELogicAction;
import net.ibizsys.model.dataentity.action.IPSDEScriptAction;
import net.ibizsys.model.wf.*;
import org.springframework.util.CollectionUtils;
import org.springframework.util.DigestUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
......@@ -515,5 +516,23 @@ public class WorkflowModel extends BaseModel{
return fieldCond;
}
public List<IPSWFLink> getLinks() {
List<IPSWFLink> links = new ArrayList<>();
IPSWFProcess startProcess = getWFVer().getStartPSWFProcess();
getProcessLink(startProcess, links);
return links;
}
public void getProcessLink(IPSWFProcess process, List<IPSWFLink> links) {
List<IPSWFLink> processLinks = process.getPSWFLinks();
if(CollectionUtils.isEmpty(processLinks))
return ;
for (IPSWFLink link : processLinks) {
if(links.stream().anyMatch(l ->l.getId().equals(link.getId())))
continue;
links.add(link);
getProcessLink(link.getToPSWFProcess(), links);
}
}
}
......@@ -10,6 +10,7 @@ public enum TemplateFileType {
entity(Constants.ENTITIES),
module(Constants.MODULES),
workflow(Constants.WORKFLOWS),
sysUtil(Constants.SYSUTILS),
subService(Constants.SUB_SERVICEAPIS),
subEntity(Constants.SUB_ENTITIES),
api(Constants.APIS),
......@@ -52,6 +53,7 @@ public enum TemplateFileType {
public static final String APPS = "apps";
public static final String ENTITIES = "entities";
public static final String WORKFLOWS = "workflows";
public static final String SYSUTILS = "syUtils";
public static final String SUB_SERVICEAPIS = "subServiceApis";
public static final String SUB_ENTITIES = "subEntities";
public static final String API_ENTITIES = "apiEntities";
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册