diff --git a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar index 833a89bd..429fddbe 100644 Binary files a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar and b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar differ diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java index b31f61a6..761f8ad9 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java @@ -1,7 +1,5 @@ package com.actionsoft.apps.coe.pal.publisher; -import java.util.HashMap; - import com.actionsoft.apps.AppsConst; import com.actionsoft.apps.coe.pal.pal.repository.PALRepositoryQueryAPIManager; import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishClientWeb; @@ -18,867 +16,889 @@ import com.actionsoft.bpms.server.bind.annotation.Mapping; import com.actionsoft.bpms.server.conf.server.AWSServerConf; import com.actionsoft.sdk.local.SDK; import com.actionsoft.sdk.local.api.PortalAPI; -import com.alibaba.fastjson.JSONObject; + +import java.util.HashMap; @Controller public class PublisherController { - //流程发布-首页 - @Mapping("com.actionsoft.apps.coe.pal.publisher_home") - public String publisherHome(UserContext me, String teamId, String wsid) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.processPublishNewPage(teamId, wsid); - } - - //流程发布-代办任务列表 - @Mapping("com.actionsoft.apps.coe.pal.publisher_tasklist") - public String getTaskInstanceList(UserContext me, String start, String size){ - ProcessPublishWeb web = new ProcessPublishWeb(me); - int startNum = 0; - if (start != null) { - startNum = Integer.parseInt(start); - } else { - return null; - } - int sizeNum = 0; - if (size != null) { - sizeNum = Integer.parseInt(size); - } else { - return null; - } - return web.getTaskInstanceList(startNum, sizeNum); - } + //流程发布-首页 + @Mapping("com.actionsoft.apps.coe.pal.publisher_home") + public String publisherHome(UserContext me, String teamId, String wsid) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.processPublishNewPage(teamId, wsid); + } - /** - * 新版待办列表 - * - * @param me - * @param start - * @param size - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_new_taskList_handle") - public String getNewTaskInstanceList(UserContext me, int start, int size, String search) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getNewTaskInstanceList(start, size, search); - } + //流程发布-代办任务列表 + @Mapping("com.actionsoft.apps.coe.pal.publisher_tasklist") + public String getTaskInstanceList(UserContext me, String start, String size) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + int startNum = 0; + if (start != null) { + startNum = Integer.parseInt(start); + } else { + return null; + } + int sizeNum = 0; + if (size != null) { + sizeNum = Integer.parseInt(size); + } else { + return null; + } + return web.getTaskInstanceList(startNum, sizeNum); + } - /** - * 新版待阅列表 - * - * @param me - * @param start - * @param size - * @param search - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_new_taskList_read") - public String getNewTaskInstanceListForRead(UserContext me, int start, int size, String search) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getNewTaskInstanceListForRead(start, size, search); - } - - //流程发布-已办任务列表 - @Mapping("com.actionsoft.apps.coe.pal.publisher_historytasklist") - public String getHistoryTaskInstanceList(UserContext me, String start, String size){ - ProcessPublishWeb web = new ProcessPublishWeb(me); - int startNum = 0; - if (start != null) { - startNum = Integer.parseInt(start); - } else { - return null; - } - int sizeNum = 0; - if (size != null) { - sizeNum = Integer.parseInt(size); - } else { - return null; - } - - return web.getHistoryTaskInstanceList(startNum, sizeNum); - } + /** + * 新版待办列表 + * + * @param me + * @param start + * @param size + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_new_taskList_handle") + public String getNewTaskInstanceList(UserContext me, int start, int size, String search) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getNewTaskInstanceList(start, size, search); + } - /** - * 新版已办列表 - * - * @param me - * @param start - * @param size - * @param search - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_new_historyTaskList_handled") - public String getNewHistoryTaskInstanceList(UserContext me, int start, int size, String search) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getNewHistoryTaskInstanceList(start, size, search); - } + /** + * 新版待阅列表 + * + * @param me + * @param start + * @param size + * @param search + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_new_taskList_read") + public String getNewTaskInstanceListForRead(UserContext me, int start, int size, String search) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getNewTaskInstanceListForRead(start, size, search); + } - /** - * 新版已阅列表 - * - * @param me - * @param start - * @param size - * @param search - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_new_historyTaskList_read") - public String getNewHistoryTaskInstanceListForRead(UserContext me, int start, int size, String search) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getNewHistoryTaskInstanceListForRead(start, size, search); - } - - //流程发布-历史任务列表 - @Mapping("com.actionsoft.apps.coe.pal.publisher_processlist") - public String getProcessInstanceList(UserContext me, String start, String size){ - ProcessPublishWeb web = new ProcessPublishWeb(me); - int pageNum = 0; - if (start != null) { - pageNum = Integer.parseInt(start); - } else { - return null; - } - int sizeNum = 0; - if (size != null) { - sizeNum = Integer.parseInt(size); - } else { - return null; - } - - return web.getProcessInstanceList(pageNum, sizeNum); - } + //流程发布-已办任务列表 + @Mapping("com.actionsoft.apps.coe.pal.publisher_historytasklist") + public String getHistoryTaskInstanceList(UserContext me, String start, String size) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + int startNum = 0; + if (start != null) { + startNum = Integer.parseInt(start); + } else { + return null; + } + int sizeNum = 0; + if (size != null) { + sizeNum = Integer.parseInt(size); + } else { + return null; + } - //流程发布-得到新的历史任务列表页面 - @Mapping("com.actionsoft.apps.coe.pal.publisher_processlist_page") - public String getNewProcessInstanceListPage(UserContext me) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getNewProcessInstanceListPage(me); - } + return web.getHistoryTaskInstanceList(startNum, sizeNum); + } + + /** + * 新版已办列表 + * + * @param me + * @param start + * @param size + * @param search + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_new_historyTaskList_handled") + public String getNewHistoryTaskInstanceList(UserContext me, int start, int size, String search) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getNewHistoryTaskInstanceList(start, size, search); + } + + /** + * 新版已阅列表 + * + * @param me + * @param start + * @param size + * @param search + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_new_historyTaskList_read") + public String getNewHistoryTaskInstanceListForRead(UserContext me, int start, int size, String search) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getNewHistoryTaskInstanceListForRead(start, size, search); + } + + //流程发布-历史任务列表 + @Mapping("com.actionsoft.apps.coe.pal.publisher_processlist") + public String getProcessInstanceList(UserContext me, String start, String size) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + int pageNum = 0; + if (start != null) { + pageNum = Integer.parseInt(start); + } else { + return null; + } + int sizeNum = 0; + if (size != null) { + sizeNum = Integer.parseInt(size); + } else { + return null; + } + + return web.getProcessInstanceList(pageNum, sizeNum); + } + + //流程发布-得到新的历史任务列表页面 + @Mapping("com.actionsoft.apps.coe.pal.publisher_processlist_page") + public String getNewProcessInstanceListPage(UserContext me) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getNewProcessInstanceListPage(me); + } //流程发布-得到新的历史任务列表数据 @Mapping("com.actionsoft.apps.coe.pal.publisher_processlist_new") - public String getNewProcessInstanceList(UserContext me, int start, int size, String search) { + public String getNewProcessInstanceList(UserContext me, int start, int size, String search) { ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getNewProcessInstanceList(me,start, size, search); + return web.getNewProcessInstanceList(me, start, size, search); } //流程发布-催办发送消息处理 @Mapping("com.actionsoft.apps.coe.pal.publisher_urge") public String sendMessageUrge(UserContext me, String processInstId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.sendMessageUrge(me, processInstId); - } - - //流程发布-新增流程实例 - @Mapping("com.actionsoft.apps.coe.pal.publisher_save") - public String savePublishInstance(UserContext me, String title, String teamId, String teamName, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.savePublishInstance(title, teamId, teamName, wsId); - } + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.sendMessageUrge(me, processInstId); + } + + //流程发布-新增流程实例 + @Mapping("com.actionsoft.apps.coe.pal.publisher_save") + public String savePublishInstance(UserContext me, String title, String teamId, String teamName, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.savePublishInstance(title, teamId, teamName, wsId); + } - - //流程发布-新增MA流程实例 - @Mapping("com.actionsoft.apps.coe.pal.ma.publisher_save") - public String saveMaPublishInstance(UserContext me, String title, String teamId, String teamName, String wsId,String processInstId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.saveMaPublishInstance(title, teamId, teamName, wsId,processInstId); - } + //流程发布-新增MA流程实例 + @Mapping("com.actionsoft.apps.coe.pal.ma.publisher_save") + public String saveMaPublishInstance(UserContext me, String title, String teamId, String teamName, String wsId, String processInstId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.saveMaPublishInstance(title, teamId, teamName, wsId, processInstId); + } + //流程发布-流程办理页面 + @Mapping("com.actionsoft.apps.coe.pal.publisher_handle") + public String toPublishInstanceHandle(UserContext me, String processInstId, String taskInstId, String openState) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.toPublishInstanceHandle(processInstId, taskInstId, openState); + } + //流程发布-删除流程实例 + @Mapping("com.actionsoft.apps.coe.pal.publisher_remove") + public String removeProcessInstance(UserContext me, String processInstIds) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.removeProcessInstance(processInstIds); + } + //流程发布-流程办理获取未发布流程 + @Mapping("com.actionsoft.apps.coe.pal.publisher_handle_notpublished") + public String getNotPublishedRepositorys(UserContext me, String teamId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getNotPublishedRepositorys(teamId, wsId); + } - //流程发布-流程办理页面 - @Mapping("com.actionsoft.apps.coe.pal.publisher_handle") - public String toPublishInstanceHandle(UserContext me, String processInstId, String taskInstId, String openState){ - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.toPublishInstanceHandle(processInstId, taskInstId, openState); - } - - //流程发布-删除流程实例 - @Mapping("com.actionsoft.apps.coe.pal.publisher_remove") - public String removeProcessInstance(UserContext me, String processInstIds) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.removeProcessInstance(processInstIds); - } - - //流程发布-流程办理获取未发布流程 - @Mapping("com.actionsoft.apps.coe.pal.publisher_handle_notpublished") - public String getNotPublishedRepositorys(UserContext me, String teamId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getNotPublishedRepositorys(teamId, wsId); - } - - //流程发布-流程办理获取已发布流程未发布版本 - @Mapping("com.actionsoft.apps.coe.pal.publisher_handle_notpublishedversion") - public String getNotPublishedVersionRepositorys(UserContext me, String teamId, String wsId, String resourceId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getNotPublishedVersionRepositorys(teamId, wsId, resourceId); - } - - //流程发布-流程办理获取已发布流程未发布版本 - @Mapping("com.actionsoft.apps.coe.pal.publisher_handle_published") - public String getPublishedRepositorys(UserContext me, String teamId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getPublishedRepositorys(teamId, wsId); - } + //流程发布-流程办理获取已发布流程未发布版本 + @Mapping("com.actionsoft.apps.coe.pal.publisher_handle_notpublishedversion") + public String getNotPublishedVersionRepositorys(UserContext me, String teamId, String wsId, String resourceId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getNotPublishedVersionRepositorys(teamId, wsId, resourceId); + } - //流程发布客户端-首页(整合版) - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_home") - public String publishClientHome(UserContext me) { + //流程发布-流程办理获取已发布流程未发布版本 + @Mapping("com.actionsoft.apps.coe.pal.publisher_handle_published") + public String getPublishedRepositorys(UserContext me, String teamId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getPublishedRepositorys(teamId, wsId); + } + + //流程发布客户端-首页(整合版) + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_home") + public String publishClientHome(UserContext me) { // ProcessPublishWeb web = new ProcessPublishWeb(me); // return web.getClientHome(); - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.getHomePage(me); - } - - //流程发布客户端-流程树数据 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_treedata") - public String getTreeData(UserContext me, String roleId, String wsId, String wsName) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getTreeData(roleId, wsId, wsName); - } - - //流程发布客户端-流程发布历史 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_history") - public String getPublishHistoryList(UserContext me, String wsId, String repositoryId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getPublishHistoryList(repositoryId, wsId); - } - - //流程发布客户端-主页面 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_main") - public String publishClientMain(UserContext me) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getClientMain(); - } - - //流程发布客户端-主页面-发布历史 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_main_more") - public String getMorePublishHistory(UserContext me, String time) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getMorePublishHistory(time); - } - - - //流程发布客户端-搜索已发布的流程文件 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_search") - public String searchPublishPALRepository(UserContext me, String name) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.searchPublishPALRepository(name); - } - - //流程发布客户端-更新浏览次数 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_update_viewcount") - public String updateViewCount(UserContext me, String repositoryId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.updateViewCount(repositoryId); - } - - //流程发布客户端-index页(集成版) - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso") - public String publishClientHomeSSO(UserContext me) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.getHomePage(me); - } - - //流程发布客户端-首页(集成版) - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_main") - public String publishClientMainSSO(UserContext me, String wsId) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.getClientMain(wsId); - } - - //流程发布客户端-首页-查询 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_search") - public String publishClientMainSSOSearch(UserContext me, String palIds, String filter, String order, String name) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.searchInClientMain(palIds, filter, order, name); - } - - //获取登录coe的session - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_coe") - public String getCoESesstionId(UserContext me) { - ResponseObject response = ResponseObject.newOkResponse(); + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.getHomePage(me); + } - String uid = me.getUID(); - SessionModel sessionModel = null; - if (SessionConst.SESSION_STATUS_OK == me.validateSession()) { - SessionImpl mySession = new SessionImpl(AWSServerConf.getMainServerSessionIdleTime()); - sessionModel = mySession.registerSession(LoginConst.SYSTEM_COE, uid, me.getClientIP(), me.getLanguage(), me.getDeviceType(), true, null); - } - response.put("sid", sessionModel.getSessionId()); - return response.toString(); - } - - //退出 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_logout") - public String logout(UserContext me) { - String sid = me.getSessionId(); - PortalAPI portalApi = SDK.getPortalAPI(); - portalApi.closeSession(sid); - return HtmlPageTemplate.merge(AppsConst.SYS_APP_PORTAL, "client.user.sys.logout.htm", new HashMap()); - } - - //修改密码 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_pwd") - public String modifyPassword(UserContext me, String oldPassword, String password) { - PortalAPI portalApi = SDK.getPortalAPI(); - // 返回由ResponseObject生成的JSON串,result=ok修改成功,否则检查msg(如不允许修改口令、口令不合法) - return portalApi.changePasswd(me, oldPassword, password); - } - - //参数设置 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_setting_data") - public String getSettingParams(UserContext me) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.getSettingData(); - } - - //参数设置 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_setting") - public String setting(UserContext me, String title, String fotter, String isComment, String isPrint, String isViewAttribute, String isViewHistory) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.setting(title, fotter, isComment, isPrint, isViewAttribute, isViewHistory); - } - - //发布历史 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_publish_list") - public String getPublishList(UserContext me, String start, String type) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.getPublishList(start, type); - } - - //获取所有组织模型的资产库数据 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_ws_treedata") - public String getOrgWsTreeData(UserContext me) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.getOrgWsTreeData(); - } - - //标准化体系页面 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_page") - public String toOrgRelationPage(UserContext me) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.toOrgRelationPage(); - } - - //组织模型关联页面(标准化体系页面) - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_main_page") - public String toOrgRelationMainPage(UserContext me) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.toOrgRelationModelPage(); - } - - //组织模型关联数据 - @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_data") - public String getOrgRelativeModel(UserContext me, String orgModelId, String modelIds) { - ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); - return web.getOrgRelativeModel(orgModelId, modelIds); - } - //生成流程手册 - @Mapping("com.actionsoft.apps.coe.pal.publisher_openProcess") - public String openProcess(UserContext me,String wsId,String fileId,String teamId,String processInstId,String type) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.openProcess(me,wsId,fileId,teamId,processInstId,type); - } - //保存子表 - @Mapping("com.actionsoft.apps.coe.pal.publisher_savebefore") - public String savebefore(UserContext me,String ProFile_N,String ProFile_NId,String processInstId, String ProFile_c,String ProFile_CId,String ChangeDFileNameNew,String AfterChange_CId,String ProFile_s,String ProFile_SId,String PublishDesc,String StopDesc,String ChangeDesc,String N_taskId,String C_taskId,String S_taskId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.savebefore(ProFile_N, ProFile_NId,processInstId,ProFile_c,ProFile_CId,ChangeDFileNameNew,AfterChange_CId,ProFile_s,ProFile_SId,PublishDesc,StopDesc,ChangeDesc,N_taskId,C_taskId,S_taskId); - } - //查询 - @Mapping("com.actionsoft.apps.coe.pal.publisher_selectcns") - public String selectcns(UserContext me,String processInstId){ - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.selectcns(processInstId); - } - //预览流程手册 - @Mapping("com.actionsoft.apps.coe.pal.publisher_ReportPreview") - public String ReportPreview(UserContext me,String processInstId,String type) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.ReportPreview(me, processInstId,type); - } - //快速查询 - @Mapping("com.actionsoft.apps.coe.pal.publisher_tree_query") - public String treeQuery(UserContext me,String wsId,String scope,String queryType,String autoContent) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.treeQuery(me,wsId,scope,queryType,autoContent); - } - - /** - * 获取字表数据 - * @param me - * @param processInstId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_data_query") - public String getPublisherData (UserContext me, String processInstId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getPublisherData(processInstId, wsId); - } + //流程发布客户端-流程树数据 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_treedata") + public String getTreeData(UserContext me, String roleId, String wsId, String wsName) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getTreeData(roleId, wsId, wsName); + } + + //流程发布客户端-流程发布历史 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_history") + public String getPublishHistoryList(UserContext me, String wsId, String repositoryId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getPublishHistoryList(repositoryId, wsId); + } + + //流程发布客户端-主页面 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_main") + public String publishClientMain(UserContext me) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getClientMain(); + } + + //流程发布客户端-主页面-发布历史 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_main_more") + public String getMorePublishHistory(UserContext me, String time) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getMorePublishHistory(time); + } + //流程发布客户端-搜索已发布的流程文件 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_search") + public String searchPublishPALRepository(UserContext me, String name) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.searchPublishPALRepository(name); + } - /** - * 是否开启三员管理 - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_high_security_mode_query") - public String querySecutiryMode(){ - ResponseObject ro = ResponseObject.newOkResponse(); - boolean mode = PALRepositoryQueryAPIManager.getInstance().isSecurityMode(); - ro.put("isHighSecurity",mode); - return ro.toString(); - } + //流程发布客户端-更新浏览次数 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_update_viewcount") + public String updateViewCount(UserContext me, String repositoryId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.updateViewCount(repositoryId); + } - /** - * 打开流程详情页面 - * @param me - * @param uuid - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_file_open") - public String openPublishFilePage(UserContext me, String uuid, String taskId) { - return PALRepositoryQueryAPIManager.getInstance().getPublishPortalHtml(me, uuid, taskId, false); - } + //流程发布客户端-index页(集成版) + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso") + public String publishClientHomeSSO(UserContext me) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.getHomePage(me); + } + + //流程发布客户端-首页(集成版) + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_main") + public String publishClientMainSSO(UserContext me, String wsId) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.getClientMain(wsId); + } + + //流程发布客户端-首页-查询 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_search") + public String publishClientMainSSOSearch(UserContext me, String palIds, String filter, String order, String name) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.searchInClientMain(palIds, filter, order, name); + } + + //获取登录coe的session + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_coe") + public String getCoESesstionId(UserContext me) { + ResponseObject response = ResponseObject.newOkResponse(); + + String uid = me.getUID(); + SessionModel sessionModel = null; + if (SessionConst.SESSION_STATUS_OK == me.validateSession()) { + SessionImpl mySession = new SessionImpl(AWSServerConf.getMainServerSessionIdleTime()); + sessionModel = mySession.registerSession(LoginConst.SYSTEM_COE, uid, me.getClientIP(), me.getLanguage(), me.getDeviceType(), true, null); + } + response.put("sid", sessionModel.getSessionId()); + return response.toString(); + } + + //退出 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_logout") + public String logout(UserContext me) { + String sid = me.getSessionId(); + PortalAPI portalApi = SDK.getPortalAPI(); + portalApi.closeSession(sid); + return HtmlPageTemplate.merge(AppsConst.SYS_APP_PORTAL, "client.user.sys.logout.htm", new HashMap()); + } + + //修改密码 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_pwd") + public String modifyPassword(UserContext me, String oldPassword, String password) { + PortalAPI portalApi = SDK.getPortalAPI(); + // 返回由ResponseObject生成的JSON串,result=ok修改成功,否则检查msg(如不允许修改口令、口令不合法) + return portalApi.changePasswd(me, oldPassword, password); + } + + //参数设置 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_setting_data") + public String getSettingParams(UserContext me) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.getSettingData(); + } + + //参数设置 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_setting") + public String setting(UserContext me, String title, String fotter, String isComment, String isPrint, String isViewAttribute, String isViewHistory) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.setting(title, fotter, isComment, isPrint, isViewAttribute, isViewHistory); + } + + //发布历史 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_publish_list") + public String getPublishList(UserContext me, String start, String type) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.getPublishList(start, type); + } + + //获取所有组织模型的资产库数据 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_ws_treedata") + public String getOrgWsTreeData(UserContext me) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.getOrgWsTreeData(); + } + + //标准化体系页面 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_page") + public String toOrgRelationPage(UserContext me) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.toOrgRelationPage(); + } + + //组织模型关联页面(标准化体系页面) + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_main_page") + public String toOrgRelationMainPage(UserContext me) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.toOrgRelationModelPage(); + } + + //组织模型关联数据 + @Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_data") + public String getOrgRelativeModel(UserContext me, String orgModelId, String modelIds) { + ProcessPublishClientWeb web = new ProcessPublishClientWeb(me); + return web.getOrgRelativeModel(orgModelId, modelIds); + } + + //生成流程手册 + @Mapping("com.actionsoft.apps.coe.pal.publisher_openProcess") + public String openProcess(UserContext me, String wsId, String fileId, String teamId, String processInstId, String type) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.openProcess(me, wsId, fileId, teamId, processInstId, type); + } + + //保存子表 + @Mapping("com.actionsoft.apps.coe.pal.publisher_savebefore") + public String savebefore(UserContext me, String ProFile_N, String ProFile_NId, String processInstId, String ProFile_c, String ProFile_CId, String ChangeDFileNameNew, String AfterChange_CId, String ProFile_s, String ProFile_SId, String PublishDesc, String StopDesc, String ChangeDesc, String N_taskId, String C_taskId, String S_taskId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.savebefore(ProFile_N, ProFile_NId, processInstId, ProFile_c, ProFile_CId, ChangeDFileNameNew, AfterChange_CId, ProFile_s, ProFile_SId, PublishDesc, StopDesc, ChangeDesc, N_taskId, C_taskId, S_taskId); + } + + //查询 + @Mapping("com.actionsoft.apps.coe.pal.publisher_selectcns") + public String selectcns(UserContext me, String processInstId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.selectcns(processInstId); + } + + //预览流程手册 + @Mapping("com.actionsoft.apps.coe.pal.publisher_ReportPreview") + public String ReportPreview(UserContext me, String processInstId, String type) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.ReportPreview(me, processInstId, type); + } + + //快速查询 + @Mapping("com.actionsoft.apps.coe.pal.publisher_tree_query") + public String treeQuery(UserContext me, String wsId, String scope, String queryType, String autoContent) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.treeQuery(me, wsId, scope, queryType, autoContent); + } + + /** + * 获取字表数据 + * + * @param me + * @param processInstId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_data_query") + public String getPublisherData(UserContext me, String processInstId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getPublisherData(processInstId, wsId); + } + /** + * 是否开启三员管理 + * + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_high_security_mode_query") + public String querySecutiryMode() { + ResponseObject ro = ResponseObject.newOkResponse(); + boolean mode = PALRepositoryQueryAPIManager.getInstance().isSecurityMode(); + ro.put("isHighSecurity", mode); + return ro.toString(); + } - /** - * 打开流程详情页面 (移动端) - * @param me - * @param uuid - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_file_mobile_open") - public String openPublishFileMobilePage(UserContext me, String uuid, String taskId) { - return PALRepositoryQueryAPIManager.getInstance().getPublishMobilePortalHtml(me, uuid, taskId, false); - } + /** + * 打开流程详情页面 + * + * @param me + * @param uuid + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_file_open") + public String openPublishFilePage(UserContext me, String uuid, String taskId) { + return PALRepositoryQueryAPIManager.getInstance().getPublishPortalHtml(me, uuid, taskId, false); + } + /** + * 打开流程详情页面 (移动端) + * + * @param me + * @param uuid + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_file_mobile_open") + public String openPublishFileMobilePage(UserContext me, String uuid, String taskId) { + return PALRepositoryQueryAPIManager.getInstance().getPublishMobilePortalHtml(me, uuid, taskId, false); + } - /** - * 预览流程手册 - * @param me - * @param taskId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_output_file_open") - public String openPublishOutputFile(UserContext me, String taskId) { - String ro = PALRepositoryQueryAPIManager.getInstance().outputReportPreview(me, taskId); - return ro; - } - - /** - * 查询发布数据的树结构 - * @param me - * @param type new change stop 三种类型查询不同的树结构 - * @param wsId - * @param teamId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query") - public String queryPublishTreeData(UserContext me, String type, String wsId, String teamId, boolean flag, String pid) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.queryPublishTreeData(type, wsId, teamId, flag, pid); - } + /** + * 预览流程手册 + * + * @param me + * @param taskId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_output_file_open") + public String openPublishOutputFile(UserContext me, String taskId) { + String ro = PALRepositoryQueryAPIManager.getInstance().outputReportPreview(me, taskId); + return ro; + } + + /** + * 查询发布数据的树结构 + * + * @param me + * @param type new change stop 三种类型查询不同的树结构 + * @param wsId + * @param teamId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query") + public String queryPublishTreeData(UserContext me, String type, String wsId, String teamId, boolean flag, String pid) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.queryPublishTreeData(type, wsId, teamId, flag, pid); + } - - /** - * 查询发布数据的ma类型树结构 - * @param me - * @param type new change stop 三种类型查询不同的树结构 - * @param wsId - * @param teamId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_tree_ma_data_query") - public String queryMaPublishTreeData(UserContext me, String type, String wsId, String teamId, boolean flag, String pid) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.queryMaPublishTreeData(type, wsId, teamId, flag, pid); - } + /** + * 查询发布数据的ma类型树结构 + * + * @param me + * @param type new change stop 三种类型查询不同的树结构 + * @param wsId + * @param teamId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_tree_ma_data_query") + public String queryMaPublishTreeData(UserContext me, String type, String wsId, String teamId, boolean flag, String pid) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.queryMaPublishTreeData(type, wsId, teamId, flag, pid); + } - - /** - * 根据当前环境返回wsid - * @param me - * @param type new change stop - * @param wsId - * @param teamId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_getWsId") - public String queryMaPublishTreeData(UserContext me) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.queryMaPublishGetWsId(); - } + /** + * 根据当前环境返回wsid + * + * @param me + * @param type new change stop + * @param wsId + * @param teamId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_getWsId") + public String queryMaPublishTreeData(UserContext me) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.queryMaPublishGetWsId(); + } - /** - * 快速查询定位到需要的发布流程 - * - * @param me - * @param wsId - * @param teamId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query_search") - public String queryPublishTreeSearchByName(UserContext me, String wsId, String teamId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getTreeDataForSearchByName(wsId, teamId); - } - - /** - * 创建流程手册 - * @param me - * @param uuid - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_output_pr_report_create") - public String createOutputPrReport(UserContext me, String uuid, String teamId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.createOutputPrReport(uuid, wsId, teamId); - } - - /** - * 查询流程的未发布版本 - * @param me - * @param uuid - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_not_publish_version_query") - public String queryNotPublishVersion(UserContext me, String uuid, String teamId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.queryNotPublishVersion(uuid, wsId, teamId); - } - - /** - * 查询流程的流程手册ID - * @param me - * @param uuid - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_output_pr_report_query") - public String queryOutputReport(UserContext me, String uuid, String teamId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.queryOutputReport(uuid, wsId, teamId); - } - - /** - * 表单保存/办理之前执行 - * @param me - * @param data - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_save_before") - public String saveFormPublishSubData(UserContext me, String data, String teamId, String wsId, String processInstId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.saveFormPublishSubData(data, teamId, wsId, processInstId); - } - - /** - * 查询流程发布表数据(批量) - * @param me - * @param processInstId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_batch_data_query") - public String getPublishBatchData(UserContext me, String processInstId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getPublisherBatchData(processInstId, wsId); - } - - /** - * 批量创建流程手册 - * @param me - * @param uuids - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_output_pr_reports_create") + /** + * 快速查询定位到需要的发布流程 + * + * @param me + * @param wsId + * @param teamId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_tree_data_query_search") + public String queryPublishTreeSearchByName(UserContext me, String wsId, String teamId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getTreeDataForSearchByName(wsId, teamId); + } + + /** + * 创建流程手册 + * + * @param me + * @param uuid + * @param teamId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_output_pr_report_create") + public String createOutputPrReport(UserContext me, String uuid, String teamId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.createOutputPrReport(uuid, wsId, teamId); + } + + /** + * 查询流程的未发布版本 + * + * @param me + * @param uuid + * @param teamId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_not_publish_version_query") + public String queryNotPublishVersion(UserContext me, String uuid, String teamId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.queryNotPublishVersion(uuid, wsId, teamId); + } + + /** + * 查询流程的流程手册ID + * + * @param me + * @param uuid + * @param teamId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_output_pr_report_query") + public String queryOutputReport(UserContext me, String uuid, String teamId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.queryOutputReport(uuid, wsId, teamId); + } + + /** + * 表单保存/办理之前执行 + * + * @param me + * @param data + * @param teamId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_save_before") + public String saveFormPublishSubData(UserContext me, String data, String teamId, String wsId, String processInstId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.saveFormPublishSubData(data, teamId, wsId, processInstId); + } + + /** + * 查询流程发布表数据(批量) + * + * @param me + * @param processInstId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_batch_data_query") + public String getPublishBatchData(UserContext me, String processInstId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getPublisherBatchData(processInstId, wsId); + } + + /** + * 批量创建流程手册 + * @param me + * @param uuids + * @param teamId + * @param wsId + * @return + */ + /*@Mapping("com.actionsoft.apps.coe.pal.publisher_output_pr_reports_create") public String createOutputPrReports(UserContext me, String uuids, String teamId, String wsId) { ProcessPublishWeb web = new ProcessPublishWeb(me); return web.createOutputPrReports(wsId, teamId, uuids); - } + }*/ - /** - * 查询发布流程中支持文件形状属性上传附件 - * @param me - * @param uuids - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_get_publishFlow_files") - public String getPublishFlowFiles(UserContext me, String uuids, String teamId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.getPublishFlowFiles(wsId, teamId, uuids); - } + /** + * 查询发布流程中支持文件形状属性上传附件 + * + * @param me + * @param uuids + * @param teamId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_get_publishFlow_files") + public String getPublishFlowFiles(UserContext me, String uuids, String teamId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.getPublishFlowFiles(wsId, teamId, uuids); + } - - /** - * 将关联未发布数据插入发布表中 - * @param me - * @param uuids - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_get_RelevancyPublish") - public String RelevancyPublish(UserContext me, String uuids, String teamId, String wsId,String bindid) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.RelevancyPublish(wsId, teamId, uuids,bindid); - } + /** + * 将关联未发布数据插入发布表中 + * + * @param me + * @param uuids + * @param teamId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_get_RelevancyPublish") + public String RelevancyPublish(UserContext me, String uuids, String teamId, String wsId, String bindid) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.RelevancyPublish(wsId, teamId, uuids, bindid); + } - /** - * 查询流程的其他版本并默认查询结果的第一条创建流程手册 - * @param me - * @param data - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_versions_query_output_pr_reports_create") - public String queryVersionsAndCreateOputputPrReports(UserContext me, String data, String teamId, String wsId, String createTime) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.queryVersionsAndCreateOputputPrReports(wsId, teamId, data, createTime); - } - - /** - * 批量查询流程的流程手册ID - * @param me - * @param uuids - * @param teamId - * @param wsId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_batch_output_pr_report_query") - public String queryBatchOutputReport(UserContext me, String uuids, String teamId, String wsId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.queryBatchOutputReport(uuids, wsId, teamId); - } - - /** - * 子表数据批量保存 - * @param me - * @param wsId - * @param teamId - * @param processInstId - * @param type - * @param data - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_batch_save") - public String saveBatchData(UserContext me, String wsId, String teamId, String processInstId, String type, String data) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.saveBatchData(wsId, teamId, processInstId, type, data); - } - - /** - * 表单保存/办理前执行(批量) - * @param me - * @param wsId - * @param teamId - * @param processInstId - * @param newData - * @param changeData - * @param stopData - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_batch_save_before") - public String saveFormBatchPubishData(UserContext me, String wsId, String teamId, String processInstId, String newData, String changeData, String stopData, boolean isTransact) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.saveFormBatchPubishData(wsId, teamId, processInstId, newData, changeData, stopData, isTransact); - } - - /** - * 校验文件类型是否可打开 - * @param me - * @param uuid - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_repository_method_check") - public String checkPublishRepositoryMethod(UserContext me, String uuid) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.checkPublishRepositoryMethod(uuid); - } - - /** - * 查询流程实例bo表状态字段 - * @param me - * @param processInstId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_save_status_query") - public String querySaveStatus(UserContext me, String processInstId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.querySaveStatus(processInstId); - } + /** + * 查询流程的其他版本并默认查询结果的第一条创建流程手册 + * + * @param me + * @param data + * @param teamId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_versions_query_output_pr_reports_create") + public String queryVersionsAndCreateOputputPrReports(UserContext me, String data, String teamId, String wsId, String createTime) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.queryVersionsAndCreateOputputPrReports(wsId, teamId, data, createTime); + } - /** - * 更改模型文件的审批状态 - * @param me - * @param repositoryIds - * @param isApproval - * @return - */ + /** + * 批量查询流程的流程手册ID + * + * @param me + * @param uuids + * @param teamId + * @param wsId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_batch_output_pr_report_query") + public String queryBatchOutputReport(UserContext me, String uuids, String teamId, String wsId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.queryBatchOutputReport(uuids, wsId, teamId); + } + + /** + * 子表数据批量保存 + * + * @param me + * @param wsId + * @param teamId + * @param processInstId + * @param type + * @param data + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_batch_save") + public String saveBatchData(UserContext me, String wsId, String teamId, String processInstId, String type, String data) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.saveBatchData(wsId, teamId, processInstId, type, data); + } + + /** + * 表单保存/办理前执行(批量) + * + * @param me + * @param wsId + * @param teamId + * @param processInstId + * @param newData + * @param changeData + * @param stopData + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_batch_save_before") + public String saveFormBatchPubishData(UserContext me, String wsId, String teamId, String processInstId, String newData, String changeData, String stopData, boolean isTransact) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.saveFormBatchPubishData(wsId, teamId, processInstId, newData, changeData, stopData, isTransact); + } + + /** + * 校验文件类型是否可打开 + * + * @param me + * @param uuid + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_repository_method_check") + public String checkPublishRepositoryMethod(UserContext me, String uuid) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.checkPublishRepositoryMethod(uuid); + } + + /** + * 查询流程实例bo表状态字段 + * + * @param me + * @param processInstId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_save_status_query") + public String querySaveStatus(UserContext me, String processInstId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.querySaveStatus(processInstId); + } + + /** + * 更改模型文件的审批状态 + * @param me + * @param repositoryIds + * @param isApproval + * @return + */ // @Mapping("com.actionsoft.apps.coe.pal.publisher_update_isApproval_status") // public String updateRepositoryModelStatus(UserContext me,String repositoryIds,int isApproval){ // ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); // return publishWeb.updateRepositoryModelStatus(repositoryIds,isApproval); // } - /** - * 获取流程的L1 L2 L3数据 - * @param me - * @param processInstId - * @param wsId - * @param datas - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_getPublishNameByJs") - public String getPublishNameByJs(UserContext me,String processInstId,String wsId,String type,String datas){ - ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); - return publishWeb.getLevelByData(me,wsId,type,datas,processInstId); - } + /** + * 获取流程的L1 L2 L3数据 + * + * @param me + * @param processInstId + * @param wsId + * @param datas + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_getPublishNameByJs") + public String getPublishNameByJs(UserContext me, String processInstId, String wsId, String type, String datas) { + ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); + return publishWeb.getLevelByData(me, wsId, type, datas, processInstId); + } + /** + * 根据矩阵信息查询审批信息 + * + * @param me + * @param level1 + * @param level2 + * @param level3 + * @param company + * @param region + * @param product + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_getApproveInfos") + public String getApproveInfo(UserContext me, String level1, String level2, String level3, String level4, String company, String region, String product, String bindid) { + ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); + return publishWeb.getApproveInfos(me, level1, level2, level3, level4, company, region, product, bindid); + } + + /** + * 权限矩阵录入的时候,获取默认的单位和单位编码 + * + * @param me + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_getOrgInfo") + public String getOrgInfo(UserContext me) { + ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); + return publishWeb.getOrgInfo(me); + } + + /** + * 下载日志 + * + * @param me + * @param taskId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_output_download") + public String downloadOutput(UserContext me, String taskId, String uuid) { + ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); + return publishWeb.downloadOutput(taskId, uuid); + } + + /** + * 获取流程模型的形状属性列表 + * + * @param me me + * @param publishFileId 发布文件id + * @param fileName 文件名称 + * @return {@link String} + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_process_manifest") + public String getProcessManifest(UserContext me, String publishFileId, String fileName) { + ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); + return publishWeb.getProcessManifest(publishFileId, fileName); + } + + /** + * 获得发布指导dw数据id + * + * @param me me + * @param areaType 区域类型 + * @return {@link String} + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_guide") + public String getPublishGuideDwDataId(UserContext me, String areaType) { + ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); + return publishWeb.getPublishGuideDwDataId(areaType); + } + + /** + * 获得发布指导台账各个显示区域的配置状态 + * + * @param me me + * @return {@link String} + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_guide_status") + public String getPublishGuideStatus(UserContext me) { + ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); + return publishWeb.getPublishGuideStatus(); + } - /** - * 根据矩阵信息查询审批信息 - * @param me - * @param level1 - * @param level2 - * @param level3 - * @param company - * @param region - * @param product - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_getApproveInfos") - public String getApproveInfo(UserContext me,String level1,String level2,String level3,String level4,String company,String region,String product,String bindid){ - ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); - return publishWeb.getApproveInfos(me,level1,level2,level3,level4,company,region,product,bindid); - } - - /** - * 权限矩阵录入的时候,获取默认的单位和单位编码 - * @param me - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_getOrgInfo") - public String getOrgInfo(UserContext me){ - ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); - return publishWeb.getOrgInfo(me); - } - - /** - * 下载日志 - * @param me - * @param taskId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_output_download") - public String downloadOutput(UserContext me, String taskId, String uuid) { - ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); - return publishWeb.downloadOutput(taskId, uuid); - } - /** - * 获取流程模型的形状属性列表 - * - * @param me me - * @param publishFileId 发布文件id - * @param fileName 文件名称 - * @return {@link String} - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_process_manifest") - public String getProcessManifest(UserContext me , String publishFileId , String fileName) { - ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); - return publishWeb.getProcessManifest(publishFileId , fileName); - } - - /** - * 获得发布指导dw数据id - * - * @param me me - * @param areaType 区域类型 - * @return {@link String} - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_guide") - public String getPublishGuideDwDataId(UserContext me, String areaType) { - ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); - return publishWeb.getPublishGuideDwDataId(areaType); - } - - /** - * 获得发布指导台账各个显示区域的配置状态 - * - * @param me me - * @return {@link String} - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_guide_status") - public String getPublishGuideStatus(UserContext me) { - ProcessPublishWeb publishWeb = new ProcessPublishWeb(me); - return publishWeb.getPublishGuideStatus(); - } + /** + * 重新生成手册 + * + * @param me + * @param plId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_Refresh_Manual") + public String RefreshManual(UserContext me, String processInstId, String type) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.RefreshManual(processInstId, type); + } - /** - * 重新生成手册 - * @param me - * @param plId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_Refresh_Manual") - public String RefreshManual(UserContext me,String processInstId,String type) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.RefreshManual(processInstId,type); - } + /** + * 发布变更流程:下拉获取最新架构进行赋值 + * + * @param me + * @param plId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_updateFramework") + public String updateFramework(UserContext me, String uuid, String processInstId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.updateFramework(uuid, processInstId); + } - - /** - * 发布变更流程:下拉获取最新架构进行赋值 - * @param me - * @param plId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_updateFramework") - public String updateFramework(UserContext me,String uuid,String processInstId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.updateFramework(uuid,processInstId); - } - - /** - * 中断任务操作 - * @param me - * @param plId - * @return - */ - @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_InterruptTask") - public String InterruptTask(UserContext me,String taskId) { - ProcessPublishWeb web = new ProcessPublishWeb(me); - return web.InterruptTask(taskId); - } + /** + * 中断任务操作 + * + * @param me + * @param plId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_InterruptTask") + public String InterruptTask(UserContext me, String taskId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.InterruptTask(taskId); + } } \ No newline at end of file diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishFormBeforeSaveEvent.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishFormBeforeSaveEvent.java index d5b5c061..c334f1a0 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishFormBeforeSaveEvent.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishFormBeforeSaveEvent.java @@ -253,79 +253,84 @@ public class PublishFormBeforeSaveEvent extends InterruptListener implements Int public void defineQualityCheck(String uuid){ PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid); - String vison = getVison(uuid); - List elements_fei = getShapeJsonToJsonObject2(vison); - StringBuffer sb6= new StringBuffer(); - StringBuilder sbs = new StringBuilder(); - List list_linker = new LinkedList<>(); - //连线数据增加 - JSONObject json = new JSONObject(new LinkedHashMap<>()); - for (JSONObject o : elements_fei) { - String shapeId = o.getString("id"); + if(!model.getMethodId().equals("control.policy") && !model.getMethodId().equals("data.form")){ + String vison = getVison(uuid); + List elements_fei = getShapeJsonToJsonObject2(vison); + StringBuffer sb6= new StringBuffer(); + StringBuilder sbs = new StringBuilder(); + List list_linker = new LinkedList<>(); + //连线数据增加 + JSONObject json = new JSONObject(new LinkedHashMap<>()); + for (JSONObject o : elements_fei) { + String shapeId = o.getString("id"); - String shapeName = o.getString("name"); - String title = o.getString("text"); - if (!shapeName.equals("linker")) { - list_linker.add(shapeId); - json.put(shapeId,title); - } - } - - for (JSONObject o : elements_fei) { - String shapeId = o.getString("id"); - - String shapeName = o.getString("name"); - //System.out.println("这个名字是什么>>>>>>>" + shapeName); - if (shapeName.equals("linker")) { - JSONObject from = o.getJSONObject("from"); - JSONObject to = o.getJSONObject("to"); - if (to==null||from==null){ - throw new BPMNError("0313", "出入线未与其他形状进行关联,请查看模型,连线校验未通过!!!"); - } - String from_id = from.getString("id"); - String to_id = to.getString("id"); - if (UtilString.isEmpty(from_id)&&UtilString.isEmpty(to_id)){ - throw new BPMNError("0313", "出入线未与其他形状进行关联,请查看模型,连线校验未通过!!!"); - } - if (UtilString.isNotEmpty(from_id)) { - list_linker.remove(from_id); - }else { - JSONObject definition = JSONObject.parseObject(vison); - JSONObject elements = definition.getJSONObject("elements"); - JSONObject string = elements.getJSONObject(to_id); - String title = string.getString("title"); - sb6.append("\""+title+"\"").append("连线没有入线"); - list_linker.add("\""+title+"\""+"连线没有入线"); - } - if (UtilString.isNotEmpty(to_id)) { - list_linker.remove(to_id); - }else { - JSONObject definition = JSONObject.parseObject(vison); - JSONObject elements = definition.getJSONObject("elements"); - JSONObject string = elements.getJSONObject(from_id); - String title = string.getString("title"); - sb6.append("\""+title+"\"").append("连线没有出线"); - list_linker.add("\""+title+"\""+"连线没有出线"); + String shapeName = o.getString("name"); + String title = o.getString("text"); + if (!shapeName.equals("linker")) { + list_linker.add(shapeId); + json.put(shapeId,title); } } - //System.out.println("m的值>>>>>>>>>>>" + ms); - } + + for (JSONObject o : elements_fei) { + String shapeId = o.getString("id"); + + String shapeName = o.getString("name"); + //System.out.println("这个名字是什么>>>>>>>" + shapeName); + if (shapeName.equals("linker")) { + JSONObject from = o.getJSONObject("from"); + JSONObject to = o.getJSONObject("to"); + if (to==null||from==null){ + throw new BPMNError("0313", "出入线未与其他形状进行关联,请查看模型,连线校验未通过!!!"); + } + String from_id = from.getString("id"); + String to_id = to.getString("id"); + if (UtilString.isEmpty(from_id)&&UtilString.isEmpty(to_id)){ + throw new BPMNError("0313", "出入线未与其他形状进行关联,请查看模型,连线校验未通过!!!"); + } + if (UtilString.isNotEmpty(from_id)) { + list_linker.remove(from_id); + }else { + JSONObject definition = JSONObject.parseObject(vison); + JSONObject elements = definition.getJSONObject("elements"); + JSONObject string = elements.getJSONObject(to_id); + String title = string.getString("title"); + sb6.append("\""+title+"\"").append("连线没有入线"); + list_linker.add("\""+title+"\""+"连线没有入线"); + } + if (UtilString.isNotEmpty(to_id)) { + list_linker.remove(to_id); + }else { + JSONObject definition = JSONObject.parseObject(vison); + JSONObject elements = definition.getJSONObject("elements"); + JSONObject string = elements.getJSONObject(from_id); + String title = string.getString("title"); + sb6.append("\""+title+"\"").append("连线没有出线"); + list_linker.add("\""+title+"\""+"连线没有出线"); + } + } + //System.out.println("m的值>>>>>>>>>>>" + ms); + } //System.out.println("linker>>>>>>>>>>>>" + list_linker.size()); - if (list_linker.size() > 0) { - sbs.append("连线校验:"); - for (String d : - list_linker) { - String name = json.getString(d); - sb6.append(name).append("没有连线"); + if (list_linker.size() > 0) { + sbs.append("连线校验:"); + for (String d : + list_linker) { + String name = json.getString(d); + sb6.append(name).append("没有连线"); + } + sb6.append("校验未通过,请检查模型是否都已连线!"); + sbs.append(sb6); + } + + if (sbs.length()>0){ + throw new BPMNError("0313", sbs.toString()); } - sb6.append("校验未通过,请检查模型是否都已连线!"); - sbs.append(sb6); - } - if (sbs.length()>0){ - throw new BPMNError("0313", sbs.toString()); } + + /************************************文件属性校验************************************/ ResponseObject ro = ResponseObject.newOkResponse(); PALRepositoryModel m = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(uuid);