Merge remote-tracking branch 'origin/master'

This commit is contained in:
chengli 2022-07-09 18:36:30 +08:00
commit de10bb6856
19 changed files with 70 additions and 63 deletions

View File

@ -3,7 +3,6 @@ package com.actionsoft.apps.coe.pal.batch;
import java.util.ArrayList;
import java.util.List;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.dc.FileProcessor;
import com.actionsoft.apps.listener.PluginListener;
import com.actionsoft.apps.resource.AppContext;
@ -25,8 +24,6 @@ public class Plugins implements PluginListener {
// 注册DC
list.add(new DCPluginProfile("tmp", FileProcessor.class.getName(), "生成下载的Excel模版等临时文件", false));
list.add(new DCPluginProfile("logs", FileProcessor.class.getName(), "批量创建/替换的log日志", false, false));
// 注册cache
list.add(new CachePluginProfile(BatchCache.class));
return list;
}

View File

@ -1,6 +1,5 @@
package com.actionsoft.apps.coe.pal.batch.web;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.constant.BatchConst;
import com.actionsoft.apps.coe.pal.batch.util.LogUtil;
import com.actionsoft.apps.coe.pal.batch.web.create.process.CreateProcessExcel;
@ -23,6 +22,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.commons.htmlframework.HtmlPageTemplate;
import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
@ -225,10 +225,7 @@ public class BatchWeb extends ActionWeb {
}
String define = PALRepositoryQueryAPIManager.getInstance().getProcessDefinition(uc, model.getId());
JSONObject array = JSONObject.parseObject(define);
if (array.containsKey("elements") && array.getJSONObject("elements").size() == 0) {
return false;
}
return true;
return !array.containsKey("elements") || array.getJSONObject("elements").size() != 0;
}

View File

@ -1,6 +1,5 @@
package com.actionsoft.apps.coe.pal.batch.web.create.process;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.constant.BatchConst;
import com.actionsoft.apps.coe.pal.batch.util.LogUtil;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
@ -12,6 +11,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.Design
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.bpms.commons.security.logging.model.Level;
import com.actionsoft.bpms.org.model.DepartmentModel;
import com.actionsoft.bpms.org.model.RoleModel;

View File

@ -1,6 +1,5 @@
package com.actionsoft.apps.coe.pal.batch.web.create.shape;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.constant.BatchConst;
import com.actionsoft.apps.coe.pal.batch.util.LogUtil;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
@ -12,6 +11,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.Design
import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.actionsoft.bpms.commons.security.logging.model.Level;
@ -636,7 +636,7 @@ public class ImportShapeExcel {
count++;
if (count % (shapeRowCount+1) == 0) {
count = 1;
initY += 130;
initY += 90;
// 换行
initX = 0;
initX = pageEdge + initX;
@ -649,7 +649,7 @@ public class ImportShapeExcel {
}
shape.put("dataAttributes", dataAttributes);
}
int totalWidth = 240;// 每个节点总宽度空白+节点+空白
int totalWidth = 160;// 每个节点总宽度空白+节点+空白
int totalHeight = 200;// 每个节点总高度空白+节点+空白
int x = 0;
int y = 0;

View File

@ -1,6 +1,5 @@
package com.actionsoft.apps.coe.pal.batch.web.replace;
import com.actionsoft.apps.coe.pal.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.batch.constant.BatchConst;
import com.actionsoft.apps.coe.pal.batch.util.LogUtil;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
@ -22,6 +21,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryShapeAttributeModel;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.bpms.commons.security.logging.model.Level;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.util.DBSql;

View File

@ -6,8 +6,6 @@ import com.actionsoft.apps.coe.pal.datamigration.aris.mapping.ModelMappingAPIMan
import com.actionsoft.apps.coe.pal.datamigration.aris.model.*;
import com.actionsoft.apps.coe.pal.datamigration.aris.util.ArisXmlUtil;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.log.cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogRealTimeCountModel;
import com.actionsoft.apps.coe.pal.datamigration.util.LogUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ProcessUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ShapeUtil;
@ -29,6 +27,8 @@ import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Model.LogRealTimeCountModel;
import com.actionsoft.bpms.server.UserContext;
import com.actionsoft.bpms.util.UUIDGener;
import com.actionsoft.bpms.util.UtilDate;

View File

@ -6,9 +6,7 @@ import com.actionsoft.apps.coe.pal.datamigration.aris.model.*;
import com.actionsoft.apps.coe.pal.datamigration.aris.util.ArisXmlUtil;
import com.actionsoft.apps.coe.pal.datamigration.aris.util.XMLUtil;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.log.cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogModel;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogRealTimeCountModel;
import com.actionsoft.apps.coe.pal.datamigration.util.LogUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ProcessUtil;
import com.actionsoft.apps.coe.pal.datamigration.util.ShapeUtil;
@ -18,6 +16,8 @@ import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Model.LogRealTimeCountModel;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;
import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;

View File

@ -1,27 +0,0 @@
package com.actionsoft.apps.coe.pal.datamigration.log.cache;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogRealTimeCountModel;
import com.actionsoft.apps.resource.plugin.profile.CachePluginProfile;
import com.actionsoft.bpms.commons.cache.Cache;
import com.actionsoft.bpms.commons.cache.CacheManager;
/**
* 存储导入数据
* @author sunlh
*
*/
public class LogRealTimeCountCache extends Cache<String, LogRealTimeCountModel>{
public LogRealTimeCountCache(CachePluginProfile configuration) {
super(configuration);
}
@Override
protected void load() {
}
public static LogRealTimeCountCache getCache() {
return CacheManager.getCache(LogRealTimeCountCache.class);
}
}

View File

@ -1,7 +1,6 @@
package com.actionsoft.apps.coe.pal.datamigration.plugin;
import com.actionsoft.apps.coe.pal.datamigration.aris.constant.ArisConstant;
import com.actionsoft.apps.coe.pal.datamigration.log.cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.datamigration.web.DataMigrationWeb;
import com.actionsoft.apps.coe.pal.pal.repository.upfile.CoeFileProcessor;
import com.actionsoft.apps.listener.PluginListener;
@ -23,9 +22,6 @@ public class Plugins implements PluginListener {
public List<AWSPluginProfile> register(AppContext context) {
List<AWSPluginProfile> list = new ArrayList<AWSPluginProfile>();
// 注册缓存
list.add(new CachePluginProfile(LogRealTimeCountCache.class));
list.add(new DCPluginProfile("migration", CoeFileProcessor.class.getName(), "存放数据迁移文件", false, false));
list.add(new DCPluginProfile(ArisConstant.REPOSITORY_NAME, CoeFileProcessor.class.getName(), "存在arisXML数据迁移日志", false, false));

View File

@ -2,7 +2,6 @@ package com.actionsoft.apps.coe.pal.datamigration.util;
import com.actionsoft.apps.coe.pal.datamigration.aris.constant.ArisConstant;
import com.actionsoft.apps.coe.pal.datamigration.constant.Constant;
import com.actionsoft.apps.coe.pal.datamigration.log.cache.LogRealTimeCountCache;
import com.actionsoft.apps.coe.pal.datamigration.log.dao.LogDao;
import com.actionsoft.apps.coe.pal.datamigration.log.model.LogModel;
import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile;

View File

@ -19,6 +19,8 @@ import com.actionsoft.apps.coe.pal.pal.home.aslp.RegisterExtendsApp;
import com.actionsoft.apps.coe.pal.pal.method.aslp.RegisterMethodApp;
import com.actionsoft.apps.coe.pal.pal.repository.addons.RepositoryDiagramExistMark;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.manager.DesignerShapeCopyCache;
import com.actionsoft.apps.coe.pal.yili.log.batch.cache.BatchCache;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Cache.LogRealTimeCountCache;
import com.actionsoft.apps.listener.PluginListener;
import com.actionsoft.apps.resource.AppContext;
import com.actionsoft.apps.resource.plugin.profile.*;
@ -75,6 +77,8 @@ public class Plugins implements PluginListener {
list.add(new CachePluginProfile(CoeDesignerImageCache.class));
list.add(new CachePluginProfile(DesignerShapeCopyCache.class));
list.add(new ACPluginProfile(new COETeamPortletAccm()));
list.add(new CachePluginProfile(LogRealTimeCountCache.class));
list.add(new CachePluginProfile(BatchCache.class));
list.add(new AtFormulaPluginProfile("PAL应用", "@getDWCondition(*fieldName,*fieldValue)", GetDWConditionExpression.class.getName(), "获取DW中的自定义查询条件", "返回DW中自定义的查询条件"));

View File

@ -1,8 +1,11 @@
package com.actionsoft.apps.coe.pal.batch.cache;
package com.actionsoft.apps.coe.pal.yili.log.batch.cache;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.resource.plugin.profile.CachePluginProfile;
import com.actionsoft.bpms.commons.cache.Cache;
import com.actionsoft.bpms.commons.cache.CacheManager;
import com.actionsoft.bpms.util.ConsolePrinter;
import com.actionsoft.sdk.local.SDK;
/**
* 存储导入数据
@ -17,6 +20,7 @@ public class BatchCache extends Cache<String, Integer>{
@Override
protected void load() {
ConsolePrinter.info("[" + SDK.getAppAPI().getAppContext(CoEConstant.APP_ID).getNameI18N() + "]Cache加载CoE批处理日志记录对象 [" + 0 + "个]");
}
public static BatchCache getCache() {

View File

@ -0,0 +1,31 @@
package com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Cache;
import com.actionsoft.apps.coe.pal.constant.CoEConstant;
import com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Model.LogRealTimeCountModel;
import com.actionsoft.apps.resource.plugin.profile.CachePluginProfile;
import com.actionsoft.bpms.commons.cache.Cache;
import com.actionsoft.bpms.commons.cache.CacheManager;
import com.actionsoft.bpms.util.ConsolePrinter;
import com.actionsoft.sdk.local.SDK;
/**
* 存储导入数据
* @author sunlh
*
*/
public class LogRealTimeCountCache extends Cache<String, LogRealTimeCountModel> {
public LogRealTimeCountCache(CachePluginProfile configuration) {
super(configuration);
}
@Override
protected void load() {
ConsolePrinter.info("[" + SDK.getAppAPI().getAppContext(CoEConstant.APP_ID).getNameI18N() + "]Cache加载CoE数据迁移日志记录对象 [" + 0 + "个]");
}
public static LogRealTimeCountCache getCache() {
return CacheManager.getCache(LogRealTimeCountCache.class);
}
}

View File

@ -1,8 +1,7 @@
package com.actionsoft.apps.coe.pal.datamigration.log.model;
package com.actionsoft.apps.coe.pal.yili.log.datamigration.log.Model;
import com.actionsoft.bpms.commons.mvc.model.ModelBean;
public class LogRealTimeCountModel extends ModelBean {
private int totalCount;// 总共条数

View File

@ -641,27 +641,28 @@
$('#content_zoom').append(Math.round(Designer.config.scale * 100) + "%")
var winSize = {
w: $(window).width() - 332,
h: $(window).height() - $('#toolbarName').height() - $('#tools').height() - 41 - 40 - 70 // 41为文件名行高 40为文件属性行高 70为下方评论行高
h: $(window).height() - $('#tools').height() - 41 - 40 - 70 // 41为文件名行高 40为最下方功能区域 70为下方评论行高
}
var designerSize = {
w: $("#canvas_container").width(),
h: $("#canvas_container").height()
}
if (designerSize.w <= designerSize.h && designerSize.h > winSize.h) {
resizeCanvas('height')
} else if(designerSize.w > designerSize.h && designerSize.w > winSize.w) {
resizeCanvas('width')
} else if(designerSize.w > designerSize.h && designerSize.w > winSize.w) {
resizeCanvas('height')
}
function resizeCanvas(type) {
if (type == 'height') {
if($("#canvas_container").height() <= winSize.h) {
console.log(Designer.config.scale)
if($("#canvas_container").height() <= winSize.h || Designer.config.scale <= 0.25) {
return
} else {
canvasresizeMin()
resizeCanvas('height')
}
} else {
if($("#canvas_container").width() <= winSize.w) {
if($("#canvas_container").width() <= winSize.w || Designer.config.scale <= 0.25) {
return
} else {
canvasresizeMin()

View File

@ -1445,6 +1445,7 @@ function isObjectRelationshipModel(linker, isAlert) {
// 文件属性的处理
function initProcessDesc() {
console.log(processDesc)
var length = Object.keys(processDesc).length;
var t = '';
for(var i = 1; i <= length; i++) {
@ -1457,13 +1458,18 @@ function initProcessDesc() {
t += '<td colspan="2" class="tableContent">' + value + '</td>';
t += '</tr>';
} else if(obj.type == 'table') {
let tableValue = JSON.parse(value.replace(/&quot;/g,'\"'))
let tableFlag = '请输入'
if (tableValue.table.length > 1) {
tableFlag = '请查看'
if(value == '') {
t += '<td colspan="2" class="tableContent">' + value + '</td>';
t += '</tr>';
} else {
let tableValue = JSON.parse(value.replace(/&quot;/g,'\"'))
let tableFlag = '请输入'
if (tableValue.table.length > 1) {
tableFlag = '请查看'
}
t += '<td colspan="2" class="tableContent" onclick="openDialog(' + JSON.stringify(tableValue).replace(/\"/g,"'") +')">' + tableFlag + '</td>';
t += '</tr>';
}
t += '<td colspan="2" class="tableContent" onclick="openDialog(' + JSON.stringify(tableValue).replace(/\"/g,"'") +')">' + tableFlag + '</td>';
t += '</tr>';
}
else {
value = value.replace(/\n/g,'<br>')