diff --git a/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/UpateFileStateController.java b/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/UpateFileStateController.java index 32425e6c..9783066d 100644 --- a/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/UpateFileStateController.java +++ b/com.awspaas.user.apps.app20221008163300/src/com/awspaas/user/apps/app/controller/UpateFileStateController.java @@ -1,5 +1,6 @@ package com.awspaas.user.apps.app.controller; +import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory; import com.actionsoft.bpms.bo.engine.BO; import com.actionsoft.bpms.bpmn.engine.model.run.delegate.ProcessInstance; import com.actionsoft.bpms.commons.database.RowMap; @@ -72,9 +73,10 @@ public class UpateFileStateController { * "'WHERE PALREPOSITORYID='" + plId + "'"); } } */ - PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(plId); - PALRepositoryCache.getCache().put(plId, palRepositoryModel); - + PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(plId); + if (plModel != null) { + PALRepositoryCache.getCache().put(plId, plModel); + } SDK.getLogAPI().consoleInfo("更新状态后刷新缓存结束===========>"); if(Integer.valueOf(state) == 1){ createPermScopeData(plId , me); @@ -87,9 +89,10 @@ public class UpateFileStateController { System.err.println("审批改为设计=======>" + updataSql); count = DBSql.update(updataSql); - PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(plId); - PALRepositoryCache.getCache().put(plId, palRepositoryModel); - + PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(plId); + if (plModel != null) { + PALRepositoryCache.getCache().put(plId, plModel); + } SDK.getLogAPI().consoleInfo("更新状态后刷新缓存结束===========>"); } else if ("3".equals(type)) { // 重新生成手册 @@ -121,8 +124,11 @@ public class UpateFileStateController { System.err.println("停用改设计=======>" + updataSql); count = DBSql.update(updataSql); - PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(plId); - PALRepositoryCache.getCache().put(plId, palRepositoryModel); + PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(plId); + if (plModel != null) { + PALRepositoryCache.getCache().put(plId, plModel); + } + SDK.getLogAPI().consoleInfo("更新状态后刷新缓存结束===========>"); }