权限阅览代码恢复
This commit is contained in:
parent
66f02980c0
commit
5874c2a16d
Binary file not shown.
@ -24,6 +24,7 @@ import com.actionsoft.apps.coe.pal.pal.output.dao.OutputTask;
|
|||||||
import com.actionsoft.apps.coe.pal.pal.output.model.OutputTaskModel;
|
import com.actionsoft.apps.coe.pal.pal.output.model.OutputTaskModel;
|
||||||
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.PALRepositoryCache;
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory;
|
||||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||||
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.constant.CoeDesignerConstant;
|
import com.actionsoft.apps.coe.pal.pal.repository.designer.constant.CoeDesignerConstant;
|
||||||
@ -166,6 +167,9 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
updateProcessNumber(boN.get("PUBLISHFILEID").toString(), param.getUserContext(), bo.get("WSID").toString(), boN.getString("PUBLISH_NUMBER"), model.getPublishDate());
|
updateProcessNumber(boN.get("PUBLISHFILEID").toString(), param.getUserContext(), bo.get("WSID").toString(), boN.getString("PUBLISH_NUMBER"), model.getPublishDate());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//by bzp 测试编号生成
|
//by bzp 测试编号生成
|
||||||
//new ProcesNumberUtil().getNumber(processInstId);
|
//new ProcesNumberUtil().getNumber(processInstId);
|
||||||
@ -239,9 +243,92 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
SDK.getBOAPI().create("BO_EU_EVENT_DATA_MONITORING",bodata1,boProcessInstance1.getId(),"");
|
SDK.getBOAPI().create("BO_EU_EVENT_DATA_MONITORING",bodata1,boProcessInstance1.getId(),"");
|
||||||
|
|
||||||
|
|
||||||
|
//更新部门视图
|
||||||
|
updateDeptView(bolistN, bolistC, bolistS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新部门视图
|
||||||
|
* @param bolistN
|
||||||
|
* @param bolistC
|
||||||
|
* @param bolistS
|
||||||
|
*/
|
||||||
|
public void updateDeptView(List<BO> bolistN, List<BO> bolistC, List<BO> bolistS){
|
||||||
|
if (bolistN != null) {
|
||||||
|
for (BO boN : bolistN) {
|
||||||
|
String fileId = boN.getString("PUBLISHFILEID");
|
||||||
|
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='" + fileId + "'");
|
||||||
|
/**
|
||||||
|
* 更新部门视图EXT6字段
|
||||||
|
*/
|
||||||
|
List<RowMap> rlatRowMap = DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='" + fileId + "' and ATTRID='Issuing_department'");
|
||||||
|
if (rlatRowMap.size() > 0) {
|
||||||
|
// 发布部门
|
||||||
|
String dempId = "";
|
||||||
|
for (RowMap oneRowMap : rlatRowMap) {
|
||||||
|
String relationshapetext = oneRowMap.getString("RELATIONSHAPETEXT");
|
||||||
|
JSONObject js = JSONObject.parseObject(relationshapetext);
|
||||||
|
dempId += js.getString("id") + ",";
|
||||||
|
}
|
||||||
|
dempId = dempId.substring(0, dempId.length() - 1);
|
||||||
|
|
||||||
|
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6=TO_CLOB('" + dempId + "') WHERE ID = '" + fileId + "'");
|
||||||
|
|
||||||
|
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
||||||
|
if (plModel != null) {
|
||||||
|
PALRepositoryCache.getCache().put(fileId, plModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (bolistC != null) {
|
||||||
|
for (BO boC : bolistC) {
|
||||||
|
|
||||||
|
String changefileId = boC.getString("CHANGEFILEID");
|
||||||
|
String changefileIdNew = boC.getString("CHANGEDFILEIDNEW");
|
||||||
|
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='0' WHERE ID='"+changefileId+"'");
|
||||||
|
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='"+changefileIdNew+"'");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新部门视图EXT6字段
|
||||||
|
*/
|
||||||
|
List<RowMap> rlatRowMap=DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+changefileIdNew+"' and ATTRID='Issuing_department'");
|
||||||
|
if(rlatRowMap.size()>0){
|
||||||
|
// 发布部门
|
||||||
|
String dempId = "";
|
||||||
|
for(RowMap oneRowMap:rlatRowMap){
|
||||||
|
String relationshapetext=oneRowMap.getString("RELATIONSHAPETEXT");
|
||||||
|
JSONObject js=JSONObject.parseObject(relationshapetext);
|
||||||
|
dempId += js.getString("id") + ",";
|
||||||
|
}
|
||||||
|
dempId = dempId.substring(0, dempId.length() - 1);
|
||||||
|
|
||||||
|
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6=TO_CLOB('" + dempId + "') WHERE ID='" + changefileIdNew + "'");
|
||||||
|
|
||||||
|
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(changefileIdNew);
|
||||||
|
if (plModel != null) {
|
||||||
|
PALRepositoryCache.getCache().put(changefileIdNew, plModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bolistS != null) {
|
||||||
|
for (BO boS : bolistS) {
|
||||||
|
String fileId = boS.get("STOPFILEID").toString();
|
||||||
|
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='0' WHERE ID='"+fileId+"'");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 以当前发布、变更、停用的流程作为前后置流程的流程,对其流程接口的文本进行调整
|
* 以当前发布、变更、停用的流程作为前后置流程的流程,对其流程接口的文本进行调整
|
||||||
*
|
*
|
||||||
@ -664,6 +751,19 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
* @param bolistS 停用发布流程信息,删除相应流程权限信息
|
* @param bolistS 停用发布流程信息,删除相应流程权限信息
|
||||||
*/
|
*/
|
||||||
private void savePublishScope(BO publish, List<BO> bolistN, List<BO> bolistC, List<BO> bolistS) {
|
private void savePublishScope(BO publish, List<BO> bolistN, List<BO> bolistC, List<BO> bolistS) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ProcessInstance boProcessInstances = SDK.getProcessAPI()
|
||||||
|
.createBOProcessInstance("obj_e0ba99c88d4e423a88c00da30700d722","admin", "阅览权限监控");
|
||||||
|
BO viewing=new BO();
|
||||||
|
viewing.set("PROCESSID", publish.getBindId());
|
||||||
|
//存储发布流程的流程实例ID,与权限阅览数据视图做关联
|
||||||
|
viewing.set("PROCESSTITLE" , publish.getString("PROCESS_TITLE"));
|
||||||
|
SDK.getBOAPI().create("BO_ACT_VIEWING_RIGHTS",viewing,boProcessInstances.getId(),"");
|
||||||
|
|
||||||
|
|
||||||
|
String newBoName = "BO_ACT_PUBLISH_PERM_SCOPE";
|
||||||
String bindId = publish.getBindId();
|
String bindId = publish.getBindId();
|
||||||
String wsId = publish.getString("WSID");
|
String wsId = publish.getString("WSID");
|
||||||
String applyUser = publish.getString("APPLYUSERID");
|
String applyUser = publish.getString("APPLYUSERID");
|
||||||
@ -673,6 +773,8 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
String sendScopeLevel = publish.getString("SEND_SCOPE_LEVEL");
|
String sendScopeLevel = publish.getString("SEND_SCOPE_LEVEL");
|
||||||
Set<String> removeVerIds = new HashSet<>();
|
Set<String> removeVerIds = new HashSet<>();
|
||||||
Map<String, String> addVerMap = new HashMap<>();
|
Map<String, String> addVerMap = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
//将发布范围权限信息保存至范围权限表
|
//将发布范围权限信息保存至范围权限表
|
||||||
if (bolistN != null) {
|
if (bolistN != null) {
|
||||||
for (BO boN : bolistN) {
|
for (BO boN : bolistN) {
|
||||||
@ -682,8 +784,8 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
addVerMap.put(model.getId(), model.getName());
|
addVerMap.put(model.getVersionId(), model.getName());
|
||||||
//removeVerIds.add(model.getVersionId());
|
removeVerIds.add(model.getVersionId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bolistC != null) {
|
if (bolistC != null) {
|
||||||
@ -694,8 +796,8 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
addVerMap.put(model.getId(), model.getName());
|
addVerMap.put(model.getVersionId(), model.getName());
|
||||||
//removeVerIds.add(model.getVersionId());
|
removeVerIds.add(model.getVersionId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bolistS != null) {
|
if (bolistS != null) {
|
||||||
@ -706,15 +808,10 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
SDK.getLogAPI().consoleErr("[发布范围权限信息保存至范围权限表]更新失败,模型[" + palId + "]");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BO publishPermScope=SDK.getBOAPI().query("BO_ACT_PUBLISH_PERM_SCOPE").addQuery("PALVERSIONID=",palId).detail();
|
removeVerIds.add(model.getVersionId());
|
||||||
if(publishPermScope!=null){
|
|
||||||
SDK.getBOAPI().remove("BO_ACT_PUBLISH_PERM_SCOPE",publishPermScope.getId());
|
|
||||||
}
|
|
||||||
//removeVerIds.add(model.getVersionId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// 先删除相应原有权限数据,再进行数据更新
|
// 先删除相应原有权限数据,再进行数据更新
|
||||||
Set<String> removeIds = new HashSet<>();
|
Set<String> removeIds = new HashSet<>();
|
||||||
for (String removeVerId : removeVerIds) {
|
for (String removeVerId : removeVerIds) {
|
||||||
@ -727,8 +824,7 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
}
|
}
|
||||||
for (String removeId : removeIds) {
|
for (String removeId : removeIds) {
|
||||||
SDK.getBOAPI().remove(newBoName, removeId);
|
SDK.getBOAPI().remove(newBoName, removeId);
|
||||||
}*/
|
}
|
||||||
String newBoName = "BO_ACT_PUBLISH_PERM_SCOPE";
|
|
||||||
// 重新添加权限
|
// 重新添加权限
|
||||||
//List<BO> list = new ArrayList<>();
|
//List<BO> list = new ArrayList<>();
|
||||||
for (Map.Entry<String, String> entry : addVerMap.entrySet()) {
|
for (Map.Entry<String, String> entry : addVerMap.entrySet()) {
|
||||||
@ -817,8 +913,6 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme
|
|||||||
bo.set("BUSINESS_DIVISION",department);
|
bo.set("BUSINESS_DIVISION",department);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else if(allpath.contains("伊利集团总部")){
|
} else if(allpath.contains("伊利集团总部")){
|
||||||
bo.set("BUSINESS_DIVISION","伊利集团总部");
|
bo.set("BUSINESS_DIVISION","伊利集团总部");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -500,60 +500,8 @@ public class ProcessEndAfterEvent_gc extends ExecuteListener implements ExecuteL
|
|||||||
for (BO bo : bo_act_coe_publish_n) {
|
for (BO bo : bo_act_coe_publish_n) {
|
||||||
try {
|
try {
|
||||||
String fileId = bo.getString("PUBLISHFILEID");
|
String fileId = bo.getString("PUBLISHFILEID");
|
||||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='1' WHERE ID='"+fileId+"'");
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新部门视图EXT6字段
|
|
||||||
*/
|
|
||||||
List<RowMap> rlatRowMap=DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '"+fileId+"' and ATTRID='Issuing_department'");
|
|
||||||
if(rlatRowMap.size()>0){
|
|
||||||
// 发布部门
|
|
||||||
String dempId = "";
|
|
||||||
for(RowMap oneRowMap:rlatRowMap){
|
|
||||||
String relationshapetext=oneRowMap.getString("RELATIONSHAPETEXT");
|
|
||||||
JSONObject js=JSONObject.parseObject(relationshapetext);
|
|
||||||
dempId += js.getString("id") + ",";
|
|
||||||
}
|
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
|
||||||
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + fileId + "'");
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
|
||||||
if (plModel != null) {
|
|
||||||
PALRepositoryCache.getCache().put(fileId, plModel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*Map<String, JSONObject> queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(fileId);
|
|
||||||
if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) {
|
|
||||||
// 发布部门
|
|
||||||
String dempId = "";
|
|
||||||
JSONObject Issuing_department = queryRepositoryAttributeById.get("Issuing_department");
|
|
||||||
if (null != Issuing_department && !Issuing_department.equals("")) {
|
|
||||||
JSONArray PUBDEPTJA = Issuing_department.getJSONArray("value");
|
|
||||||
SDK.getLogAPI().consoleInfo(Issuing_department.toString());
|
|
||||||
if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) {
|
|
||||||
for (Object PUBDEPTO : PUBDEPTJA) {
|
|
||||||
JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO));
|
|
||||||
dempId += PUBDEPTJO.getString("id") + ",";
|
|
||||||
}
|
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + fileId + "'");
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
|
||||||
if (plModel != null) {
|
|
||||||
PALRepositoryCache.getCache().put(fileId, plModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
@ -564,61 +512,8 @@ public class ProcessEndAfterEvent_gc extends ExecuteListener implements ExecuteL
|
|||||||
try {
|
try {
|
||||||
String changefileId = bo.getString("CHANGEFILEID");
|
String changefileId = bo.getString("CHANGEFILEID");
|
||||||
String changefileIdNew = bo.getString("CHANGEDFILEIDNEW");
|
String changefileIdNew = bo.getString("CHANGEDFILEIDNEW");
|
||||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '0' WHERE ID = '"+changefileId+"'");
|
|
||||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '1' WHERE ID = '"+changefileIdNew+"'");
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新部门视图EXT6字段
|
|
||||||
*/
|
|
||||||
/* Map<String, JSONObject> queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(changefileIdNew);
|
|
||||||
if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) {
|
|
||||||
// 发布部门
|
|
||||||
String dempId = "";
|
|
||||||
JSONObject Issuing_department = queryRepositoryAttributeById.get("Issuing_department");
|
|
||||||
if (null != Issuing_department && !Issuing_department.equals("")) {
|
|
||||||
JSONArray PUBDEPTJA = Issuing_department.getJSONArray("value");
|
|
||||||
SDK.getLogAPI().consoleInfo(Issuing_department.toString());
|
|
||||||
if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) {
|
|
||||||
for (Object PUBDEPTO : PUBDEPTJA) {
|
|
||||||
JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO));
|
|
||||||
dempId += PUBDEPTJO.getString("id") + ",";
|
|
||||||
}
|
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + changefileIdNew + "'");
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(changefileIdNew);
|
|
||||||
if (plModel != null) {
|
|
||||||
PALRepositoryCache.getCache().put(changefileIdNew, plModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新部门视图EXT6字段
|
|
||||||
*/
|
|
||||||
List<RowMap> rlatRowMap=DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '"+changefileIdNew+"' and ATTRID='Issuing_department'");
|
|
||||||
if(rlatRowMap.size()>0){
|
|
||||||
// 发布部门
|
|
||||||
String dempId = "";
|
|
||||||
for(RowMap oneRowMap:rlatRowMap){
|
|
||||||
String relationshapetext=oneRowMap.getString("RELATIONSHAPETEXT");
|
|
||||||
JSONObject js=JSONObject.parseObject(relationshapetext);
|
|
||||||
dempId += js.getString("id") + ",";
|
|
||||||
}
|
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
|
||||||
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + changefileIdNew + "'");
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(changefileIdNew);
|
|
||||||
if (plModel != null) {
|
|
||||||
PALRepositoryCache.getCache().put(changefileIdNew, plModel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
@ -629,7 +524,6 @@ public class ProcessEndAfterEvent_gc extends ExecuteListener implements ExecuteL
|
|||||||
for (BO bo : bo_act_coe_publish_s) {
|
for (BO bo : bo_act_coe_publish_s) {
|
||||||
try {
|
try {
|
||||||
String fileId = bo.getString("STOPFILEID");
|
String fileId = bo.getString("STOPFILEID");
|
||||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '0' WHERE ID = '"+fileId+"'");
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
||||||
|
|
||||||
@ -1371,7 +1265,6 @@ public class ProcessEndAfterEvent_gc extends ExecuteListener implements ExecuteL
|
|||||||
recordFailLists.add(bo);
|
recordFailLists.add(bo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("recordFailLists========="+recordFailLists.size());
|
|
||||||
SDK.getBOAPI().create("BO_EU_READ_COUNT", recordFailLists, processInstance, UserContext.fromUID(processInstance.getCreateUser()));
|
SDK.getBOAPI().create("BO_EU_READ_COUNT", recordFailLists, processInstance, UserContext.fromUID(processInstance.getCreateUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1398,7 +1291,6 @@ public class ProcessEndAfterEvent_gc extends ExecuteListener implements ExecuteL
|
|||||||
throws DocumentException {
|
throws DocumentException {
|
||||||
|
|
||||||
|
|
||||||
System.out.println("idList========="+idList.toString());
|
|
||||||
String processInstId = processInstance.getId();
|
String processInstId = processInstance.getId();
|
||||||
// System.err.println(processInstance.getTitle() + "开始发送:" + userId);
|
// System.err.println(processInstance.getTitle() + "开始发送:" + userId);
|
||||||
|
|
||||||
|
|||||||
@ -513,32 +513,8 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
for (BO bo : bo_act_coe_publish_n) {
|
for (BO bo : bo_act_coe_publish_n) {
|
||||||
try {
|
try {
|
||||||
String fileId = bo.getString("PUBLISHFILEID");
|
String fileId = bo.getString("PUBLISHFILEID");
|
||||||
DBSql.update(open, "UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '1' WHERE ID = '" + fileId + "'");
|
|
||||||
|
|
||||||
|
/*RowMap rowMap = DBSql
|
||||||
/**
|
|
||||||
* 更新部门视图EXT6字段
|
|
||||||
*/
|
|
||||||
List<RowMap> rlatRowMap = DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '" + fileId + "' and ATTRID='Issuing_department'");
|
|
||||||
if (rlatRowMap.size() > 0) {
|
|
||||||
// 发布部门
|
|
||||||
String dempId = "";
|
|
||||||
for (RowMap oneRowMap : rlatRowMap) {
|
|
||||||
String relationshapetext = oneRowMap.getString("RELATIONSHAPETEXT");
|
|
||||||
JSONObject js = JSONObject.parseObject(relationshapetext);
|
|
||||||
dempId += js.getString("id") + ",";
|
|
||||||
}
|
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
|
||||||
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + fileId + "'");
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
|
||||||
if (plModel != null) {
|
|
||||||
PALRepositoryCache.getCache().put(fileId, plModel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowMap rowMap = DBSql
|
|
||||||
.getMap("SELECT * FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID=" +fileId+"");
|
.getMap("SELECT * FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID=" +fileId+"");
|
||||||
|
|
||||||
OutputTaskModel model = new OutputTask().getTaskReportById(rowMap.getString("TASKID"));
|
OutputTaskModel model = new OutputTask().getTaskReportById(rowMap.getString("TASKID"));
|
||||||
@ -555,7 +531,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
String sql_lever = sql_lever = "SELECT PLVER FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID = '"
|
String sql_lever = sql_lever = "SELECT PLVER FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID = '"
|
||||||
+ rowMap.getString("PUBLISHFILEID") + "'";
|
+ rowMap.getString("PUBLISHFILEID") + "'";
|
||||||
String lever = DBSql.getString(sql_lever);
|
String lever = DBSql.getString(sql_lever);
|
||||||
// lever = lever.substring(0,3);
|
|
||||||
if (lever.length() == 5 && lever.substring(4).equals("0")) {
|
if (lever.length() == 5 && lever.substring(4).equals("0")) {
|
||||||
lever.substring(0, 3);
|
lever.substring(0, 3);
|
||||||
} else if (lever.length() == 1) {
|
} else if (lever.length() == 1) {
|
||||||
@ -585,37 +560,11 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
|
|
||||||
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, boProcessInstance.getId(), processExecutionContext.getProcessInstance().getCreateUser());
|
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, boProcessInstance.getId(), processExecutionContext.getProcessInstance().getCreateUser());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*Map<String, JSONObject> queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(fileId);
|
|
||||||
if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) {
|
|
||||||
// 发布部门
|
|
||||||
String dempId = "";
|
|
||||||
JSONObject Issuing_department = queryRepositoryAttributeById.get("Issuing_department");
|
|
||||||
if (null != Issuing_department && !Issuing_department.equals("")) {
|
|
||||||
JSONArray PUBDEPTJA = Issuing_department.getJSONArray("value");
|
|
||||||
SDK.getLogAPI().consoleInfo(Issuing_department.toString());
|
|
||||||
if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) {
|
|
||||||
for (Object PUBDEPTO : PUBDEPTJA) {
|
|
||||||
JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO));
|
|
||||||
dempId += PUBDEPTJO.getString("id") + ",";
|
|
||||||
}
|
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + fileId + "'");
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
|
||||||
if (plModel != null) {
|
|
||||||
PALRepositoryCache.getCache().put(fileId, plModel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -625,38 +574,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
try {
|
try {
|
||||||
String changefileId = bo.getString("CHANGEFILEID");
|
String changefileId = bo.getString("CHANGEFILEID");
|
||||||
String changefileIdNew = bo.getString("CHANGEDFILEIDNEW");
|
String changefileIdNew = bo.getString("CHANGEDFILEIDNEW");
|
||||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '0' WHERE ID = '"+changefileId+"'");
|
|
||||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '1' WHERE ID = '"+changefileIdNew+"'");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新部门视图EXT6字段
|
|
||||||
*/
|
|
||||||
List<RowMap> rlatRowMap=DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '"+changefileIdNew+"' and ATTRID='Issuing_department'");
|
|
||||||
if(rlatRowMap.size()>0){
|
|
||||||
// 发布部门
|
|
||||||
String dempId = "";
|
|
||||||
for(RowMap oneRowMap:rlatRowMap){
|
|
||||||
String relationshapetext=oneRowMap.getString("RELATIONSHAPETEXT");
|
|
||||||
JSONObject js=JSONObject.parseObject(relationshapetext);
|
|
||||||
dempId += js.getString("id") + ",";
|
|
||||||
}
|
|
||||||
dempId = dempId.substring(0, dempId.length() - 1);
|
|
||||||
|
|
||||||
int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + changefileIdNew + "'");
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(changefileIdNew);
|
|
||||||
if (plModel != null) {
|
|
||||||
PALRepositoryCache.getCache().put(changefileIdNew, plModel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//先查找旧文件
|
//先查找旧文件
|
||||||
BO docfile= SDK.getBOAPI().query("BO_EU_GPT_DOCFILE").addQuery("PLID=", changefileId).detail();
|
/*BO docfile= SDK.getBOAPI().query("BO_EU_GPT_DOCFILE").addQuery("PLID=", changefileId).detail();
|
||||||
if(docfile!=null){
|
if(docfile!=null){
|
||||||
String docid=docfile.getString("DOCID");
|
String docid=docfile.getString("DOCID");
|
||||||
|
|
||||||
@ -721,7 +641,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -733,7 +653,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
for (BO bo : bo_act_coe_publish_s) {
|
for (BO bo : bo_act_coe_publish_s) {
|
||||||
try {
|
try {
|
||||||
String fileId = bo.getString("STOPFILEID");
|
String fileId = bo.getString("STOPFILEID");
|
||||||
DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='0' WHERE ID = '"+fileId+"'");
|
|
||||||
|
|
||||||
|
|
||||||
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user