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 b0d7f3b8..39594d91 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/CoEPALController.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java index 41cc3683..926f4e79 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java @@ -1509,7 +1509,7 @@ public class CoEPALController { coeRealtimeWeb.addRealtimeEvents(params); //return ""; CoeDesignerWeb web = new CoeDesignerWeb(me);//释放用户锁 - return web.releaseCheckoutRight(uuid); + return web.releaseCheckoutRight(uuid, UUIDGener.getObjectId()); } // 复制操作时缓存数据 @@ -2416,9 +2416,9 @@ public class CoEPALController { */ // @Mapping("COE_PAL_REPOSITORY_PROCESS_DEFINE_EDIT_RELEASELOCK") @Mapping("com.actionsoft.apps.coe.pal_repository_process_define_edit_releaselock") - public String releaseCheckoutRight(UserContext me, String uuid) { + public String releaseCheckoutRight(UserContext me, String uuid, String browserId) { CoeDesignerWeb web = new CoeDesignerWeb(me); - return web.releaseCheckoutRight(uuid); + return web.releaseCheckoutRight(uuid, browserId); } /** diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/web/CoeDesignerWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/web/CoeDesignerWeb.java index 3a4daed7..cfd8485b 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/web/CoeDesignerWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/web/CoeDesignerWeb.java @@ -308,7 +308,6 @@ public class CoeDesignerWeb extends ActionWeb { checkoutTip = "
" + "
" + "
您已在其他浏览器页签编辑该模型时锁定,最后一次保存日期" + "
" + UtilDate.datetimeFormat(plModel.getModifyDate()) + ",点击此处强行获取编辑权" + "
" + "
"; } else { - releaseCheckoutRight(rUUID); setCurrentCheckoutRight(rUUID, _uc.getUID(), browserId); } } else {// 本人加锁的前提下,非当前人锁定时,直接设定编辑权 @@ -2759,6 +2758,7 @@ public class CoeDesignerWeb extends ActionWeb { CheckoutModel checkoutModel = getCurrentCheckoutInfo(uuid); if (checkoutModel == null) { checkoutModel = new CheckoutModel(); + checkoutModel.setId(CoEConstant.APP_ID + "_" + "designer_" + uuid); checkoutModel.setAppId(CoEConstant.APP_ID); } checkoutModel.setUser(_uc.getUID()); @@ -2801,18 +2801,22 @@ public class CoeDesignerWeb extends ActionWeb { * @param uuid * @return */ - public String releaseCheckoutRight(String uuid) { + public String releaseCheckoutRight(String uuid, String browserId) { ResponseObject ro = ResponseObject.newOkResponse(); - PALRepositoryModel process = PALRepositoryCache.getCache().get(uuid); - if (process != null) { - List list = PALRepositoryCache.getByVersionId(process.getWsId(), process.getVersionId()); - for (PALRepositoryModel p : list) { - CheckoutModel model = getCurrentCheckoutInfo(p.getId()); - if (model != null && model.getUser().equals(_uc.getUID())) { - CheckoutCache.removeValue(CoEConstant.APP_ID + "_" + "designer_" + p.getId()); - } - } + CheckoutModel model = getCurrentCheckoutInfo(uuid); + if (model != null && model.getUser().equals(_uc.getUID()) && browserId.equals(model.getExtend())) { + CheckoutCache.removeValue(CoEConstant.APP_ID + "_" + "designer_" + uuid); } +// PALRepositoryModel process = PALRepositoryCache.getCache().get(uuid); +// if (process != null) { +// List list = PALRepositoryCache.getByVersionId(process.getWsId(), process.getVersionId()); +// for (PALRepositoryModel p : list) { +// CheckoutModel model = getCurrentCheckoutInfo(p.getId()); +// if (model != null && model.getUser().equals(_uc.getUID())) { +// CheckoutCache.removeValue(CoEConstant.APP_ID + "_" + "designer_" + p.getId()); +// } +// } +// } return ro.toString(); } diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/action.xml b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/action.xml index 50d3d0ac..78a0fd24 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/action.xml +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/action.xml @@ -1297,6 +1297,7 @@ + diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.team.pal.designer.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.team.pal.designer.js index 9642f3f9..bb3fbb99 100644 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.team.pal.designer.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.team.pal.designer.js @@ -228,7 +228,7 @@ $(function () { // uuid: ruuid // } // }); - navigator.sendBeacon("./jd?cmd=com.actionsoft.apps.coe.pal_repository_process_define_edit_releaselock&sid=" + CLB.sid + "&uuid=" + ruuid); + navigator.sendBeacon("./jd?cmd=com.actionsoft.apps.coe.pal_repository_process_define_edit_releaselock&sid=" + CLB.sid + "&uuid=" + ruuid + "&browserId=" + browserId); }; // saveTimer(); intervalRefresh();