diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index ea64e346..c51c433c 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/dao/PALRepository.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/dao/PALRepository.java index 0cb433a2..47558c4e 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/dao/PALRepository.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/dao/PALRepository.java @@ -914,6 +914,7 @@ public class PALRepository extends DaoObject { if (r1 > 0) { repositoryModel.setPublish(true); repositoryModel.setStop(false); + repositoryModel.setApproval(false); repositoryModel.setPublishDate(date); PALRepositoryCache.getCache().put(targetId, repositoryModel); } @@ -921,24 +922,26 @@ public class PALRepository extends DaoObject { case "C":// 变更 repositoryModel = (PALRepositoryModelImpl) PALRepositoryCache.getCache().get(targetId); if (repositoryModel == null) break; - sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " set " + PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISSTOP + "=?, " + PALRepositoryModelImpl.FIELD_PL_PUBLISHDATE + "=?, " + PALRepositoryModelImpl.FIELD_PL_CHANGEDATE + "=? where " + PALRepositoryModelImpl.FIELD_UUID + "=?"; - Object [] args2 = {1, 0, date, date, targetId};// target变为发布状态,停用状态初始为0 + sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " set " + PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISAPPROVAL + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISSTOP + "=?, " + PALRepositoryModelImpl.FIELD_PL_PUBLISHDATE + "=?, " + PALRepositoryModelImpl.FIELD_PL_CHANGEDATE + "=? where " + PALRepositoryModelImpl.FIELD_UUID + "=?"; + Object [] args2 = {1,0, 0, date, date, targetId};// target变为发布状态,停用状态初始为0 int r2 = DBSql.update(sql, args2); if (r2 > 0) { repositoryModel.setPublish(true); repositoryModel.setStop(false); + repositoryModel.setApproval(false); repositoryModel.setPublishDate(date); repositoryModel.setChangeDate(date); PALRepositoryCache.getCache().put(targetId, repositoryModel); } repositoryModel = (PALRepositoryModelImpl) PALRepositoryCache.getCache().get(sourceId); if (repositoryModel == null) break; - sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " set " + PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISSTOP + "=?, " + PALRepositoryModelImpl.FIELD_PL_STOPDATE + "=? where " + PALRepositoryModelImpl.FIELD_UUID + "=?"; - Object [] args3 = {0, 1, date, sourceId};// source变为停用状态 + sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " set " + PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISAPPROVAL + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISSTOP + "=?, " + PALRepositoryModelImpl.FIELD_PL_STOPDATE + "=? where " + PALRepositoryModelImpl.FIELD_UUID + "=?"; + Object [] args3 = {0,0, 1, date, sourceId};// source变为停用状态 int r3 = DBSql.update(sql, args3); if (r3 > 0) { repositoryModel.setPublish(false); repositoryModel.setStop(true); + repositoryModel.setApproval(false); repositoryModel.setStopDate(date); PALRepositoryCache.getCache().put(sourceId, repositoryModel); } @@ -946,12 +949,13 @@ public class PALRepository extends DaoObject { default:// 停用 repositoryModel = (PALRepositoryModelImpl) PALRepositoryCache.getCache().get(targetId); if (repositoryModel == null) break; - sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " set " + PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISSTOP + "=?, " + PALRepositoryModelImpl.FIELD_PL_STOPDATE + "=? where " + PALRepositoryModelImpl.FIELD_UUID + "=?"; - Object [] args4 = {0, 1, date, targetId}; + sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " set " + PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISAPPROVAL + "=?, " + PALRepositoryModelImpl.FIELD_PL_ISSTOP + "=?, " + PALRepositoryModelImpl.FIELD_PL_STOPDATE + "=? where " + PALRepositoryModelImpl.FIELD_UUID + "=?"; + Object [] args4 = {0,0, 1, date, targetId}; int r4 = DBSql.update(sql, args4); if (r4 > 0) { repositoryModel.setPublish(false); repositoryModel.setStop(true); + repositoryModel.setApproval(false); repositoryModel.setStopDate(date); PALRepositoryCache.getCache().put(targetId, repositoryModel); }