模型处理工具
This commit is contained in:
parent
53f4f8d588
commit
7d4fc49f3e
@ -5,10 +5,27 @@ import java.util.List;
|
|||||||
import org.quartz.JobExecutionContext;
|
import org.quartz.JobExecutionContext;
|
||||||
import org.quartz.JobExecutionException;
|
import org.quartz.JobExecutionException;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishHistoryCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishUserGroupCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishUserGroupPermCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishUserGroupRoleCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.CoeProcessLevelCorrelateCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryAttributeCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryRemoveCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryShapeAttributeCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryShapeConfigCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.cache.CoeDesignerImageCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.cache.CoeDesignerShapeCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.cache.PALDesignerFileCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.cache.PALDesignerFileDragModelCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager;
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel;
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.teamwork.cache.TeamMemberPermCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.teamwork.cache.TeamPermCache;
|
||||||
import com.actionsoft.bpms.bo.engine.BO;
|
import com.actionsoft.bpms.bo.engine.BO;
|
||||||
import com.actionsoft.bpms.commons.database.RowMap;
|
import com.actionsoft.bpms.commons.database.RowMap;
|
||||||
import com.actionsoft.bpms.schedule.IJob;
|
import com.actionsoft.bpms.schedule.IJob;
|
||||||
@ -19,7 +36,7 @@ import com.actionsoft.sdk.local.SDK;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.sym;
|
import com.sun.org.apache.xalan.internal.xsltc.compiler.sym;
|
||||||
/**
|
/**
|
||||||
* 批量修改文件发布状态
|
* 空模型改为发布态文件发布状态
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -31,6 +48,8 @@ public class CreateOutputReportJob2 implements IJob {
|
|||||||
int createNum = 0;
|
int createNum = 0;
|
||||||
String sqls = "DELETE FROM BO_EU__PAL_NULL_L";
|
String sqls = "DELETE FROM BO_EU__PAL_NULL_L";
|
||||||
DBSql.update(sqls);
|
DBSql.update(sqls);
|
||||||
|
String sqls2 = "DELETE FROM BO_EU_PAL_FILE_NULL_L";
|
||||||
|
DBSql.update(sqls2);
|
||||||
// String sql = "select ID from App_Act_Coe_Pal_Repository where PUBLISHDATE <
|
// String sql = "select ID from App_Act_Coe_Pal_Repository where PUBLISHDATE <
|
||||||
// to_date('2022/10/5 9:46:18 ','yyyy-mm-dd hh24:mi:ss')";
|
// to_date('2022/10/5 9:46:18 ','yyyy-mm-dd hh24:mi:ss')";
|
||||||
// String sql = "select ID from App_Act_Coe_Pal_Repository where PUBLISHDATE >
|
// String sql = "select ID from App_Act_Coe_Pal_Repository where PUBLISHDATE >
|
||||||
@ -72,6 +91,7 @@ public class CreateOutputReportJob2 implements IJob {
|
|||||||
BO bo = new BO();
|
BO bo = new BO();
|
||||||
BO bo2 = new BO();
|
BO bo2 = new BO();
|
||||||
bo.set("PLNAME", model.getName());
|
bo.set("PLNAME", model.getName());
|
||||||
|
bo2.set("PLNAME", model.getName());
|
||||||
PALRepositoryModel prmodel = PALRepositoryCache.getCache().get(model.getParentId());
|
PALRepositoryModel prmodel = PALRepositoryCache.getCache().get(model.getParentId());
|
||||||
if (prmodel != null) {
|
if (prmodel != null) {
|
||||||
bo.set("FRAMEWORK", prmodel.getName());
|
bo.set("FRAMEWORK", prmodel.getName());
|
||||||
@ -89,34 +109,34 @@ public class CreateOutputReportJob2 implements IJob {
|
|||||||
String methodId = model.getMethodId();
|
String methodId = model.getMethodId();
|
||||||
if (methodId.contains("data")) {
|
if (methodId.contains("data")) {
|
||||||
bo.set("TYPE", "表单");
|
bo.set("TYPE", "表单");
|
||||||
bo2.set("TYPE", "表单");
|
|
||||||
createNum += SDK.getBOAPI().createDataBO("BO_EU__PAL_NULL_L", bo, UserContext.fromUID("admin"));
|
createNum += SDK.getBOAPI().createDataBO("BO_EU__PAL_NULL_L", bo, UserContext.fromUID("admin"));
|
||||||
String sqlt ="UPDATE BO_EU_PAL_FILE1 SET FILESTATE = 0 WHERE PLNAME = '"+model.getName()+"'";
|
String sqlt ="UPDATE BO_EU_PAL_FILE1 SET FILESTATE = 0 WHERE PLNAME = '"+model.getName()+"'";
|
||||||
int a = DBSql.update(sqlt);
|
int a = DBSql.update(sqlt);
|
||||||
if(a!=0) {
|
if(a!=0) {
|
||||||
|
bo2.set("TYPE", "表单");
|
||||||
System.err.println("刷新为设计的模型:" +model.getName());
|
System.err.println("刷新为设计的模型:" +model.getName());
|
||||||
updateNum += SDK.getBOAPI().createDataBO("BO_EU_PAL_FILE_NULL_L", bo2, UserContext.fromUID("admin"));
|
updateNum += SDK.getBOAPI().createDataBO("BO_EU_PAL_FILE_NULL_L", bo2, UserContext.fromUID("admin"));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (methodId.contains("control.policy")) {
|
} else if (methodId.contains("control.policy")) {
|
||||||
bo.set("TYPE", "制度");
|
bo.set("TYPE", "制度");
|
||||||
bo2.set("TYPE", "制度");
|
|
||||||
createNum += SDK.getBOAPI().createDataBO("BO_EU__PAL_NULL_L", bo, UserContext.fromUID("admin"));
|
createNum += SDK.getBOAPI().createDataBO("BO_EU__PAL_NULL_L", bo, UserContext.fromUID("admin"));
|
||||||
String sqlt ="UPDATE BO_EU_PAL_FILE1 SET FILESTATE = 0 WHERE PLNAME = '"+model.getName()+"'";
|
String sqlt ="UPDATE BO_EU_PAL_FILE1 SET FILESTATE = 0 WHERE PLNAME = '"+model.getName()+"'";
|
||||||
int a = DBSql.update(sqlt);
|
int a = DBSql.update(sqlt);
|
||||||
if(a!=0) {
|
if(a!=0) {
|
||||||
|
bo2.set("TYPE", "制度");
|
||||||
System.err.println("刷新为设计的模型:" +model.getName());
|
System.err.println("刷新为设计的模型:" +model.getName());
|
||||||
updateNum += SDK.getBOAPI().createDataBO("BO_EU_PAL_FILE_NULL_L", bo2, UserContext.fromUID("admin"));
|
updateNum += SDK.getBOAPI().createDataBO("BO_EU_PAL_FILE_NULL_L", bo2, UserContext.fromUID("admin"));
|
||||||
}
|
}
|
||||||
} else if (methodId.contains("process")) {
|
} else if (methodId.contains("process")) {
|
||||||
bo.set("TYPE", "流程");
|
bo.set("TYPE", "流程");
|
||||||
bo2.set("TYPE", "流程");
|
|
||||||
createNum += SDK.getBOAPI().createDataBO("BO_EU__PAL_NULL_L", bo, UserContext.fromUID("admin"));
|
createNum += SDK.getBOAPI().createDataBO("BO_EU__PAL_NULL_L", bo, UserContext.fromUID("admin"));
|
||||||
String sqlt ="UPDATE BO_EU_PAL_FILE1 SET FILESTATE = 0 WHERE PLNAME = '"+model.getName()+"'";
|
String sqlt ="UPDATE BO_EU_PAL_FILE1 SET FILESTATE = 0 WHERE PLNAME = '"+model.getName()+"'";
|
||||||
int a = DBSql.update(sqlt);
|
int a = DBSql.update(sqlt);
|
||||||
if(a!=0) {
|
if(a!=0) {
|
||||||
updateNum+=a;
|
bo2.set("TYPE", "流程");
|
||||||
System.err.println("刷新为设计的模型:" +model.getName());
|
System.err.println("刷新为设计的模型:" +model.getName());
|
||||||
|
updateNum += SDK.getBOAPI().createDataBO("BO_EU_PAL_FILE_NULL_L", bo2, UserContext.fromUID("admin"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,6 +156,28 @@ public class CreateOutputReportJob2 implements IJob {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDK.getLogAPI().consoleInfo("更新状态后刷新缓存开始===========>");
|
||||||
|
TeamPermCache.getCache().reload();
|
||||||
|
TeamMemberPermCache.getCache().reload();
|
||||||
|
PublishHistoryCache.getCache().reload();
|
||||||
|
PublishUserGroupCache.getCache().reload();
|
||||||
|
PublishUserGroupPermCache.getCache().reload();
|
||||||
|
PublishUserGroupRoleCache.getCache().reload();
|
||||||
|
PALDesignerFileCache.getCache().reload();
|
||||||
|
PALDesignerFileDragModelCache.getCache().reload();
|
||||||
|
PALRepositoryCache.getCache().reload();
|
||||||
|
PALRepositoryRemoveCache.getCache().reload();
|
||||||
|
CoeDesignerShapeCache.getCache().reload();
|
||||||
|
DesignerShapeRelationCache.getCache().reload();
|
||||||
|
PALRepositoryPropertyCache.getCache().reload();
|
||||||
|
PALRepositoryAttributeCache.getCache().reload();
|
||||||
|
PALRepositoryShapeConfigCache.getCache().reload();
|
||||||
|
PALRepositoryShapeAttributeCache.getCache().reload();
|
||||||
|
CoeProcessLevelCorrelateCache.getCache().reload();
|
||||||
|
CoeDesignerImageCache.getCache().reload();
|
||||||
|
SDK.getLogAPI().consoleInfo("更新状态后刷新缓存结束===========>");
|
||||||
|
|
||||||
System.err.println("更新文件表数量:" + updateNum);
|
System.err.println("更新文件表数量:" + updateNum);
|
||||||
System.err.println("本次共查询到的模型:" + createNum);
|
System.err.println("本次共查询到的模型:" + createNum);
|
||||||
|
|
||||||
|
|||||||
@ -5,10 +5,27 @@ import java.util.List;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishHistoryCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishUserGroupCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishUserGroupPermCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.cache.PublishUserGroupRoleCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
|
import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.CoeProcessLevelCorrelateCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryAttributeCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryPropertyCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryRemoveCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryShapeAttributeCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryShapeConfigCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.cache.CoeDesignerImageCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.cache.CoeDesignerShapeCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.cache.PALDesignerFileCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.cache.PALDesignerFileDragModelCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.teamwork.cache.TeamMemberPermCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.teamwork.cache.TeamPermCache;
|
||||||
import com.actionsoft.bpms.commons.database.RowMap;
|
import com.actionsoft.bpms.commons.database.RowMap;
|
||||||
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
||||||
import com.actionsoft.bpms.server.bind.annotation.Controller;
|
import com.actionsoft.bpms.server.bind.annotation.Controller;
|
||||||
@ -58,6 +75,26 @@ public class UpateFileStateController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
SDK.getLogAPI().consoleInfo("更新状态后刷新缓存开始===========>");
|
||||||
|
TeamPermCache.getCache().reload();
|
||||||
|
TeamMemberPermCache.getCache().reload();
|
||||||
|
PublishHistoryCache.getCache().reload();
|
||||||
|
PublishUserGroupCache.getCache().reload();
|
||||||
|
PublishUserGroupPermCache.getCache().reload();
|
||||||
|
PublishUserGroupRoleCache.getCache().reload();
|
||||||
|
PALDesignerFileCache.getCache().reload();
|
||||||
|
PALDesignerFileDragModelCache.getCache().reload();
|
||||||
|
PALRepositoryCache.getCache().reload();
|
||||||
|
PALRepositoryRemoveCache.getCache().reload();
|
||||||
|
CoeDesignerShapeCache.getCache().reload();
|
||||||
|
DesignerShapeRelationCache.getCache().reload();
|
||||||
|
PALRepositoryPropertyCache.getCache().reload();
|
||||||
|
PALRepositoryAttributeCache.getCache().reload();
|
||||||
|
PALRepositoryShapeConfigCache.getCache().reload();
|
||||||
|
PALRepositoryShapeAttributeCache.getCache().reload();
|
||||||
|
CoeProcessLevelCorrelateCache.getCache().reload();
|
||||||
|
CoeDesignerImageCache.getCache().reload();
|
||||||
|
SDK.getLogAPI().consoleInfo("更新状态后刷新缓存结束===========>");
|
||||||
ro.put("result", "ok");
|
ro.put("result", "ok");
|
||||||
} else {
|
} else {
|
||||||
ro.put("result", "error");
|
ro.put("result", "error");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user