Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1526e3e245
@ -0,0 +1,151 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishClientWeb;
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishWeb;
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.conf.PublisherConf;
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.event.PublishAppCustomAction;
|
||||||
|
import com.actionsoft.apps.listener.PluginListener;
|
||||||
|
import com.actionsoft.apps.resource.AppContext;
|
||||||
|
import com.actionsoft.apps.resource.plugin.profile.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插件需要的资源注册
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class Plugins implements PluginListener {
|
||||||
|
|
||||||
|
public Plugins() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AWSPluginProfile> register(AppContext context) {
|
||||||
|
List<AWSPluginProfile> list = new ArrayList<AWSPluginProfile>();
|
||||||
|
|
||||||
|
// PAL应用扩展点
|
||||||
|
Map<String, Object> params0 = new HashMap<String, Object>();
|
||||||
|
params0.put("title", "流程发布");
|
||||||
|
params0.put("icon", "");
|
||||||
|
params0.put("desc", "流程发布");
|
||||||
|
params0.put("mainClass", ProcessPublishWeb.class.getName());
|
||||||
|
params0.put("deletedClass", "");
|
||||||
|
list.add(new AppExtensionProfile("PAL流程资产库->流程发布", "aslp://com.actionsoft.apps.coe.pal/registerExtendsApp", params0));
|
||||||
|
|
||||||
|
// 注册应用扩展点
|
||||||
|
Map<String, Object> params16 = new HashMap<String, Object>();
|
||||||
|
params16.put("title", "流程发布");
|
||||||
|
params16.put("desc", "发布流程到流程管理门户");
|
||||||
|
params16.put("deletedClass", ReciveTeamDeleted.class.getName());
|
||||||
|
list.add(new AppExtensionProfile("PAL小组->流程发布", "aslp://com.actionsoft.apps.coe.pal.cooperation/registerApp", params16));
|
||||||
|
|
||||||
|
list.add(new SkinsPluginProfile(ProcessPublishClientWeb.class.getName(), false));
|
||||||
|
|
||||||
|
|
||||||
|
//自定义事件
|
||||||
|
list.add(new AppCustomActionPluginProfile(PublishAppCustomAction.class.getName()));
|
||||||
|
|
||||||
|
// 注册xpages
|
||||||
|
Map<String, Object> params2 = new HashMap<String, Object>();
|
||||||
|
params2.put("systemName", "常用流程");
|
||||||
|
params2.put("type", "2");
|
||||||
|
params2.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_common_msg");
|
||||||
|
params2.put("xpagesContent",PublisherConf.getXpagesContent("common") );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-常用流程", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params2));
|
||||||
|
|
||||||
|
Map<String, Object> params3 = new HashMap<String, Object>();
|
||||||
|
params3.put("systemName", "高频流程");
|
||||||
|
params3.put("type", "2");
|
||||||
|
params3.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_frequency_msg");
|
||||||
|
params3.put("xpagesContent",PublisherConf.getXpagesContent("frequency") );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-高频流程", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params3));
|
||||||
|
|
||||||
|
Map<String, Object> params4 = new HashMap<String, Object>();
|
||||||
|
params4.put("systemName", "系统地图");
|
||||||
|
params4.put("type", "2");
|
||||||
|
params4.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_system_msg");
|
||||||
|
params4.put("xpagesContent",PublisherConf.getXpagesContent("systemMap") );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-系统地图", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params4));
|
||||||
|
|
||||||
|
Map<String, Object> params5 = new HashMap<String, Object>();
|
||||||
|
params5.put("systemName", "流程地图");
|
||||||
|
params5.put("type", "2");
|
||||||
|
params5.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_processmap_msg");
|
||||||
|
params5.put("xpagesContent",PublisherConf.getXpagesContent("processMap") );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-流程地图", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params5));
|
||||||
|
|
||||||
|
Map<String, Object> params6 = new HashMap<String, Object>();
|
||||||
|
params6.put("systemName", "发布动态");
|
||||||
|
params6.put("type", "2");
|
||||||
|
params6.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_notification_msg");
|
||||||
|
params6.put("xpagesContent",PublisherConf.getXpagesContent("notification") );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-发布动态", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params6));
|
||||||
|
|
||||||
|
Map<String, Object> params7 = new HashMap<String, Object>();
|
||||||
|
params7.put("systemName", "数据地图");
|
||||||
|
params7.put("type", "2");
|
||||||
|
params7.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_data_msg");
|
||||||
|
params7.put("xpagesContent",PublisherConf.getXpagesContent("dataMap") );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-数据地图", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params7));
|
||||||
|
|
||||||
|
Map<String, Object> params8 = new HashMap<String, Object>();
|
||||||
|
params8.put("systemName", "组织地图");
|
||||||
|
params8.put("type", "2");
|
||||||
|
params8.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_org_msg");
|
||||||
|
params8.put("xpagesContent",PublisherConf.getXpagesContent("orgMap") );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-组织地图", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params8));
|
||||||
|
|
||||||
|
Map<String, Object> params9 = new HashMap<String, Object>();
|
||||||
|
params9.put("systemName", "控制地图");
|
||||||
|
params9.put("type", "2");
|
||||||
|
params9.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_control_msg");
|
||||||
|
params9.put("xpagesContent",PublisherConf.getXpagesContent("controlMap") );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-控制地图", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params9));
|
||||||
|
|
||||||
|
Map<String, Object> params10 = new HashMap<String, Object>();
|
||||||
|
params10.put("systemName", "轮播图");
|
||||||
|
params10.put("type", "1");
|
||||||
|
params10.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_banner_msg");
|
||||||
|
params10.put("xpagesContent", "./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_banner_msg" );
|
||||||
|
list.add(new AppExtensionProfile("流程发布-轮播图", "aslp://com.actionsoft.apps.addons.xpages/registerApp", params10));
|
||||||
|
|
||||||
|
Map<String, Object> param11 = new HashMap<>();
|
||||||
|
param11.put("systemName", "我参与的");
|
||||||
|
param11.put("type", "2");
|
||||||
|
param11.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_participant_msg");
|
||||||
|
param11.put("xpagesContent",PublisherConf.getXpagesContent("participant") );
|
||||||
|
// list.add(new AppExtensionProfile("流程发布-我参与的", "aslp://com.actionsoft.apps.addons.xpages/registerApp", param11));
|
||||||
|
|
||||||
|
Map<String, Object> param12 = new HashMap<>();
|
||||||
|
param12.put("systemName", "我负责的");
|
||||||
|
param12.put("type", "2");
|
||||||
|
param12.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_responsible_msg");
|
||||||
|
param12.put("xpagesContent",PublisherConf.getXpagesContent("responsible") );
|
||||||
|
// list.add(new AppExtensionProfile("流程发布-我负责的", "aslp://com.actionsoft.apps.addons.xpages/registerApp", param12));
|
||||||
|
|
||||||
|
Map<String, Object> param13 = new HashMap<>();
|
||||||
|
param13.put("systemName", "岗位职责");
|
||||||
|
param13.put("type", "2");
|
||||||
|
param13.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_postresponsibility_msg");
|
||||||
|
param13.put("xpagesContent",PublisherConf.getXpagesContent("postresponsibility") );
|
||||||
|
// list.add(new AppExtensionProfile("流程发布-岗位职责", "aslp://com.actionsoft.apps.addons.xpages/registerApp", param13));
|
||||||
|
|
||||||
|
Map<String, Object> param14 = new HashMap<>();
|
||||||
|
param14.put("systemName", "RCAI矩阵");
|
||||||
|
param14.put("type", "2");
|
||||||
|
param14.put("urlIdentifier", "com.actionsoft.apps.publisher_xpages_rcaimatrix_msg");
|
||||||
|
param14.put("xpagesContent",PublisherConf.getXpagesContent("rcaimatrix") );
|
||||||
|
// list.add(new AppExtensionProfile("流程发布-RCAI矩阵", "aslp://com.actionsoft.apps.addons.xpages/registerApp", param14));
|
||||||
|
|
||||||
|
Map<String, Object> params15 = new HashMap<String, Object>();
|
||||||
|
params15.put("systemName", "流程发布->催办通知");
|
||||||
|
params15.put("icon", "");
|
||||||
|
list.add(new AppExtensionProfile("流程发布->通知", "aslp://com.actionsoft.apps.notification/registerApp", params15));
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,505 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishClientWeb;
|
||||||
|
import com.actionsoft.bpms.server.UserContext;
|
||||||
|
import com.actionsoft.bpms.server.bind.annotation.Controller;
|
||||||
|
import com.actionsoft.bpms.server.bind.annotation.Mapping;
|
||||||
|
import com.actionsoft.bpms.util.UtilString;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class PublishClientController {
|
||||||
|
//流程发布首页
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_home")
|
||||||
|
public String publishClientHome(UserContext me) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.getHomePage(me);
|
||||||
|
}
|
||||||
|
//按组织维护流程-首页
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_manage_home")
|
||||||
|
public String getManageHome(UserContext me, String wsId, String categorys) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
if (UtilString.isEmpty(categorys)) {
|
||||||
|
categorys = "process";
|
||||||
|
}
|
||||||
|
return web.getManageHome(wsId, categorys);
|
||||||
|
}
|
||||||
|
|
||||||
|
//流程查询-首页
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_manage_search_home")
|
||||||
|
public String getManageSearchHome(UserContext me, String wsId, String categorys) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
if (UtilString.isEmpty(categorys)) {
|
||||||
|
categorys = "process";
|
||||||
|
}
|
||||||
|
|
||||||
|
return web.getManageSearchHome(wsId, categorys);
|
||||||
|
}
|
||||||
|
|
||||||
|
//流程查询-条件查询
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_manage_search_condition_home")
|
||||||
|
public String getManageSearchHomeCondition(UserContext me, String wsId, String categorys) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
if (UtilString.isEmpty(categorys)) {
|
||||||
|
categorys = "process";
|
||||||
|
}
|
||||||
|
|
||||||
|
return web.getManageSearchHomeCondition(wsId, categorys);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 常用流程查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_common_msg")
|
||||||
|
public String commonProcessQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.commonProcessQuery(me, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高频流程查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_frequency_msg")
|
||||||
|
public String frequencyProcessQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.frequencyProcessQuery(me, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统地图查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_system_msg")
|
||||||
|
public String systemDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryDataBycategory(me, count, "itsystem", "systemmap");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织地图查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_org_msg")
|
||||||
|
public String orgDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryDataBycategory(me, count, "org", "orgmap");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据/表单地图查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_data_msg")
|
||||||
|
public String dataDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryDataBycategory(me, count, "data", "systemmap");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 控制/风险地图查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_control_msg")
|
||||||
|
public String controlDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryDataBycategory(me, count, "control", "controlmap");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程通知公告
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_notification_msg")
|
||||||
|
public String notificationDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryNotificationData(me, "0", count);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询启用中的资产库列表和aws组织列表
|
||||||
|
* @param me
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_processmap_ws_org_query")
|
||||||
|
public String processmapWsAndOrgDataQuery(UserContext me) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.processmapWsAndOrgDataQuery(me);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程地图
|
||||||
|
* @param me
|
||||||
|
* @param wsId
|
||||||
|
* @param orgId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_processmap_msg")
|
||||||
|
public String processmapDataQuery(UserContext me, String wsId, String orgId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryProcessmapData(me, wsId, orgId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轮播图
|
||||||
|
* @param me
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_banner_msg")
|
||||||
|
public String bannerDataQuery(UserContext me) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryBannerData(me);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开流程
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_page")
|
||||||
|
public String openPage(UserContext me, String uuid, String taskId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.openPage(me, uuid, taskId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索功能
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_search_page")
|
||||||
|
public String search(UserContext me, String text, String type, String templateId, String wsId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.search(me, text, type, templateId, wsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_search_data")
|
||||||
|
public String searchData(UserContext me, String searchText, String searchType, String searchWsId, int start, int pageLimit) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.searchData(me, searchText, searchType, searchWsId, start, pageLimit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开流程地图主页
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_page")
|
||||||
|
public String openProcessMapPage(UserContext me, String wsId, String orgId, String type) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.openProcessMapPage(me, wsId, orgId, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务架构
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_ws_page")
|
||||||
|
public String openProcessMapWsPage(UserContext me, String wsId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.openProcessMapWsPage(me, wsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织架构
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_org_page")
|
||||||
|
public String openProcessMapOrgPage(UserContext me, String orgId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.openProcessMapOrgPage(me, orgId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务架构展开
|
||||||
|
* @param me
|
||||||
|
* @param id
|
||||||
|
* @param wsId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_ws_expand")
|
||||||
|
public String expendProcessMapWsData(UserContext me, String id, String wsId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.expendProcessMapWsData(me, id, wsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验是否可打开
|
||||||
|
* @param me
|
||||||
|
* @param id
|
||||||
|
* @param wsId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_ws_check_open")
|
||||||
|
public String openProcessMapWsDataCheck(UserContext me, String id, String wsId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.openProcessMapWsDataCheck(me, id, wsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织架构展开
|
||||||
|
* @param me
|
||||||
|
* @param id
|
||||||
|
* @param orgId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_expand")
|
||||||
|
public String expendProcessMapOrgData(UserContext me, String id, String orgId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.expendProcessMapOrgData(me, id, orgId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织架构中查询部门下的流程
|
||||||
|
* @param me
|
||||||
|
* @param deptId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_dept_dialog_page")
|
||||||
|
public String openProcessMapOrgDeptDialog(UserContext me, String deptId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.openProcessMapOrgDeptDialog(me, deptId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************永辉接口start*************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导航条-搜索
|
||||||
|
* 获取所有已发布的文件
|
||||||
|
* @param me
|
||||||
|
* @param wsId
|
||||||
|
* @param type all:所有当前正在使用状态中的模型,包括发布和停用 publish:已发布模型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_search_data_json")
|
||||||
|
public String queryPublishRepositoryDataJson(UserContext me, String wsId, String type) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryPublishRepositoryDataJson(me, wsId, null, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有有权限的资产库
|
||||||
|
* @param me
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_ws_data_json")
|
||||||
|
public String queryPermWorkspaceDataJson(UserContext me) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryPermWorkspaceDataJson(me);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取发布动态
|
||||||
|
* @param me
|
||||||
|
* @param wsId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_dynamic_history_data_json")
|
||||||
|
public String queryDynamicHistoryDataJson(UserContext me, String wsId, String type) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryDynamicHistoryDataJson(me, wsId, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取发布动态(更多)
|
||||||
|
* @param me
|
||||||
|
* @param wsId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_dynamic_history_more_data_json")
|
||||||
|
public String queryDynamicHistoryMoreDataJson(UserContext me, String wsId, String type) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryDynamicHistoryMoreDataJson(me, wsId, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据类别获取权限下已发布的流程列表
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_process_by_type_data_json")
|
||||||
|
public String queryPublishRepositoryDataJsonByType(UserContext me, String type, String wsId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryPublishRepositoryDataJsonByType(me, type, wsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有有权限的部门列表,部门列表来源于所有具有权限的流程的责任部门
|
||||||
|
* @param me
|
||||||
|
* @param wsId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_aws_department_data_json")
|
||||||
|
public String queryAwsDepartmentDataJson(UserContext me, String wsId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryAwsDepartmentDataJson(me, wsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前部门的流程数据(责任部门)和当前部门下具有权限的子部门列表
|
||||||
|
* @param me
|
||||||
|
* @param wsId
|
||||||
|
* @param departmentId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_process_by_department_data_json")
|
||||||
|
public String queryPublishedProcessAndSubDepartment(UserContext me, String wsId, String departmentId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryPublishedProcessAndSubDepartment(me, wsId, departmentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取子流程列表
|
||||||
|
* @param me
|
||||||
|
* @param uuid 流程ID
|
||||||
|
* @param type all:所有当前正在使用状态中的模型,包括发布和停用 publish:已发布模型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_process_by_parent_data_json")
|
||||||
|
public String queryPublishProcessByParent(UserContext me, String uuid, String type) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryPublishProcessByParent(me, uuid, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击流程名称打开流程
|
||||||
|
* 获取流程详情页面
|
||||||
|
* @param me
|
||||||
|
* @param uuid
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_process_open")
|
||||||
|
public String openPublishRepository(UserContext me, String uuid, String type) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.openPublishRepository(me, uuid, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取二级或三级流程
|
||||||
|
* @param me
|
||||||
|
* @param wsId
|
||||||
|
* @param level 默认三级,可选值(2,3),参数值不正确也默认三级
|
||||||
|
* @param type all:所有当前正在使用状态中的模型,包括发布和停用 publish:已发布模型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_second_level_data_json")
|
||||||
|
public String querySecendLevelRepositoryDataJson(UserContext me, String wsId, String level, String type) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
String rtnStr = "";
|
||||||
|
if("2".equals(level)) {
|
||||||
|
rtnStr = web.querySecondLevelRepositoryDataJson(me, wsId, type);
|
||||||
|
} else {
|
||||||
|
rtnStr = web.queryThirdLevelRepositoryDataJson(me, wsId, type);
|
||||||
|
}
|
||||||
|
return rtnStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取已加入的群组
|
||||||
|
* @param me
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_user_joined_team_data_json")
|
||||||
|
public String queryJoinedTeamByUserId(UserContext me) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryJoinedTeamByUserId(me);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取未加入群组(私密小组除外)
|
||||||
|
* @param me
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_user_not_join_team_data_json")
|
||||||
|
public String queryNotJoinTeamByUserId(UserContext me ) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.queryNotJoinTeamByUserId(me);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织架构中查询部门下的流程(返回json)
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_dept_data")
|
||||||
|
public String openProcessMapOrgDeptData(UserContext me, String wsId, String deptId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.openProcessMapOrgDeptData(me, wsId, deptId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 依据流程库Id获取该流程库主题风格的轮播图资源
|
||||||
|
* @param me
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_client_sso_banner_carousel")
|
||||||
|
public String bannerCarouselData(UserContext me, String wsId) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.bannerCarouselData(me);
|
||||||
|
}
|
||||||
|
/********************永辉接口end*************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我参与的流程查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_participant_msg")
|
||||||
|
public String participantDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.participantDataQuery(me, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我负责的流程查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_responsible_msg")
|
||||||
|
public String responsibleDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.responsibleDataQuery(me, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位职责模块查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_postresponsibility_msg")
|
||||||
|
public String postresponsibilityDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.postresponsibilityDataQuery(me, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RCAI模块查询
|
||||||
|
* @param me
|
||||||
|
* @param count
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_xpages_rcaimatrix_msg")
|
||||||
|
public String rcaimatrixDataQuery(UserContext me, String count) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.rcaimatrixDataQuery(me, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程地图默认资产库和默认组织设置
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.publisher_workspace_and_org_msg")
|
||||||
|
public String getCoeWorkSpaceAndOrgInfo(UserContext me) {
|
||||||
|
ProcessPublishClientWeb web = new ProcessPublishClientWeb(me);
|
||||||
|
return web.getCoeWorkSpaceAndOrgInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,641 @@
|
|||||||
|
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;
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.client.web.ProcessPublishWeb;
|
||||||
|
import com.actionsoft.bpms.commons.htmlframework.HtmlPageTemplate;
|
||||||
|
import com.actionsoft.bpms.commons.login.constant.LoginConst;
|
||||||
|
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
||||||
|
import com.actionsoft.bpms.commons.session.SessionImpl;
|
||||||
|
import com.actionsoft.bpms.commons.session.constant.SessionConst;
|
||||||
|
import com.actionsoft.bpms.commons.session.model.SessionModel;
|
||||||
|
import com.actionsoft.bpms.server.UserContext;
|
||||||
|
import com.actionsoft.bpms.server.bind.annotation.Controller;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新版待办列表
|
||||||
|
*
|
||||||
|
* @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_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
|
||||||
|
* @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) {
|
||||||
|
ProcessPublishWeb web = new ProcessPublishWeb(me);
|
||||||
|
return web.getNewProcessInstanceList(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);
|
||||||
|
}
|
||||||
|
|
||||||
|
//流程发布-流程办理页面
|
||||||
|
@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_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();
|
||||||
|
|
||||||
|
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<String, Object>());
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改密码
|
||||||
|
@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_open")
|
||||||
|
public String openPublishFilePage(UserContext me, String uuid, String taskId) {
|
||||||
|
return PALRepositoryQueryAPIManager.getInstance().getPublishPortalHtml(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 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 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher;
|
||||||
|
|
||||||
|
public class ReciveTeamDeleted {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收小组被删除的通知(此时小组已被删除),补偿扩展App的操作,如删除垃圾配置
|
||||||
|
*
|
||||||
|
* @param teamId 小组Id
|
||||||
|
*/
|
||||||
|
public void execute(String teamId) {
|
||||||
|
//System.out.println("黄河收到,工作网络的一个小组[" + teamId + "]被删除了!");
|
||||||
|
// 删除该小组产生的发布申请记录及相关
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,340 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.client.dao;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.constant.PublisherConstant;
|
||||||
|
import com.actionsoft.apps.coe.pal.system.util.StringUtil;
|
||||||
|
import com.actionsoft.bpms.commons.database.RowMapper;
|
||||||
|
import com.actionsoft.bpms.server.conf.server.AWSServerConf;
|
||||||
|
import com.actionsoft.bpms.util.DBSql;
|
||||||
|
public class PublisherClientDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模型关联的模型Id
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @author zhangming
|
||||||
|
*/
|
||||||
|
public List<Map<String, String>> getFileIdsByRelationFileId(String id) {
|
||||||
|
String sql = "SELECT DISTINCT(r.FILEID), pal.PLNAME, MODIFYDATE FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_REPOSITORY pal WHERE r.RELATIONFILEID in (" + id + ") AND r.FILEID = pal.ID AND pal.PLCATEGORY='process' ORDER BY MODIFYDATE DESC";
|
||||||
|
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
map.put("id", rs.getString(1));
|
||||||
|
map.put("name", rs.getString(2));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模型关联的模型Id(只有文件属性关联)
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @author zhangming
|
||||||
|
*/
|
||||||
|
public List<Map<String, String>> getFileIdsByRelationFileId1(String id) {
|
||||||
|
String sql = "SELECT DISTINCT(r.FILEID), pal.PLNAME, MODIFYDATE FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_REPOSITORY pal WHERE r.RELATIONFILEID in (" + id + ") AND r.FILEID = pal.ID AND r.SHAPEID='' AND pal.PLCATEGORY='process' ORDER BY MODIFYDATE DESC";
|
||||||
|
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
map.put("id", rs.getString(1));
|
||||||
|
map.put("name", rs.getString(2));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取管理标准、技术标准和工作标准的Id
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @author zhangming
|
||||||
|
*/
|
||||||
|
public Map<String, String> getControlPolicyId(String wsId) {
|
||||||
|
Map<String, String> resultMap = new HashMap<String, String>();
|
||||||
|
String sql = "SELECT ID, PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME IN (?,?,?) AND WSID=? AND PLMETHODID='control.policy'";
|
||||||
|
List<Map<String, String>> listMap = DBSql.query(sql, new RowMapper<Map<String, String>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
map.put(rs.getString(2), rs.getString(1));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}, new Object[]{PublisherConstant.ORG_RELATION_MANAGEMENT_STANDARD, PublisherConstant.ORG_RELATION_TECHNICAL_STANDARD, PublisherConstant.ORG_RELATION_WORK_STANDARD, wsId});
|
||||||
|
for (Map<String, String> map : listMap) {
|
||||||
|
Set<String> set = map.keySet();
|
||||||
|
for (String key : set) {
|
||||||
|
resultMap.put(key, map.get(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取某个范围内的关联模型Id
|
||||||
|
*
|
||||||
|
* @param relationFileIds
|
||||||
|
* @return
|
||||||
|
* @author zhangming
|
||||||
|
*/
|
||||||
|
public List<Map<String, String>> getFileIdsByRelation(String relationFileIds) {
|
||||||
|
if (relationFileIds == null || "".equals(relationFileIds)) {
|
||||||
|
return new ArrayList<Map<String, String>>();
|
||||||
|
}
|
||||||
|
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE FROM APP_ACT_COE_PAL_REPOSITORY pal, ("
|
||||||
|
+ " SELECT r.FILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
|
||||||
|
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
|
||||||
|
+ " WHERE r.FILEID = pl.PALREPOSITORYID AND r.RELATIONFILEID IN (" + relationFileIds + ") AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
|
||||||
|
+ " GROUP BY r.FILEID) p"
|
||||||
|
+ " WHERE pal.ID = p.FILEID and pal.ISPUBLISH=1"
|
||||||
|
+ " ORDER BY p.PUBLISHDATE DESC";
|
||||||
|
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
if (rs.getString(1) == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
map.put("id", rs.getString(1));
|
||||||
|
map.put("name", rs.getString(2));
|
||||||
|
Timestamp publishDate = rs.getTimestamp(3);
|
||||||
|
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
map.put("publishDate", sdf.format(publishDate));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取某个范围内的关联模型Id(只有文件属性关联)
|
||||||
|
*
|
||||||
|
* @param relationFileIds
|
||||||
|
* @return
|
||||||
|
* @author zhangming
|
||||||
|
*/
|
||||||
|
public List<Map<String, String>> getFileIdsByRelation1(String relationFileIds) {
|
||||||
|
if (relationFileIds == null || "".equals(relationFileIds)) {
|
||||||
|
return new ArrayList<Map<String, String>>();
|
||||||
|
}
|
||||||
|
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE FROM APP_ACT_COE_PAL_REPOSITORY pal, ("
|
||||||
|
+ " SELECT r.FILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
|
||||||
|
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
|
||||||
|
+ " WHERE r.FILEID = pl.PALREPOSITORYID AND r.RELATIONFILEID IN (" + relationFileIds + ") AND r.SHAPEID='' AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
|
||||||
|
+ " GROUP BY r.FILEID) p"
|
||||||
|
+ " WHERE pal.ID = p.FILEID and pal.ISPUBLISH=1"
|
||||||
|
+ " ORDER BY p.PUBLISHDATE DESC";
|
||||||
|
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
if (rs.getString(1) == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
map.put("id", rs.getString(1));
|
||||||
|
map.put("name", rs.getString(2));
|
||||||
|
Timestamp publishDate = rs.getTimestamp(3);
|
||||||
|
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
map.put("publishDate", sdf.format(publishDate));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取某个范围内的被关联模型Id
|
||||||
|
*
|
||||||
|
* @param fileIds
|
||||||
|
* @param relationFileIds
|
||||||
|
* @return
|
||||||
|
* @author zhangming
|
||||||
|
*/
|
||||||
|
public List<Map<String, String>> getRelationFileIds(String fileIds, String relationFileIds) {
|
||||||
|
if (fileIds == null || "".equals(fileIds) || relationFileIds == null || "".equals(relationFileIds)) {
|
||||||
|
return new ArrayList<Map<String, String>>();
|
||||||
|
}
|
||||||
|
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE from APP_ACT_COE_PAL_REPOSITORY pal, ("
|
||||||
|
+ " SELECT r.RELATIONFILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
|
||||||
|
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
|
||||||
|
+ " WHERE r.RELATIONFILEID = pl.PALREPOSITORYID AND r.FILEID IN (" + fileIds + ") AND r.RELATIONFILEID IN (" + relationFileIds + ") AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
|
||||||
|
+ " GROUP BY r.RELATIONFILEID) p"
|
||||||
|
+ " WHERE pal.ID=p.RELATIONFILEID and pal.ISPUBLISH=1"
|
||||||
|
+ " ORDER BY p.PUBLISHDATE DESC";
|
||||||
|
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
if (rs.getString(1) == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
map.put("id", rs.getString(1));
|
||||||
|
map.put("name", rs.getString(2));
|
||||||
|
Timestamp publishDate = rs.getTimestamp(3);
|
||||||
|
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
map.put("publishDate", sdf.format(publishDate));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布历史
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
* @author zhangming
|
||||||
|
*/
|
||||||
|
public List<Map<String, String>> getPublishListData(String ids, String category, String wsId, String methodId) {
|
||||||
|
if (ids == null || "".equals(ids)) {
|
||||||
|
return new ArrayList<Map<String, String>>();
|
||||||
|
}
|
||||||
|
String sql = "SELECT r.ID, r.PLNAME, p.PUBLISHDATE from APP_ACT_COE_PAL_REPOSITORY r, ("
|
||||||
|
+ " SELECT pl.PALREPOSITORYID, MAX(p.PUBLISHDATE) publishdate "
|
||||||
|
+ " FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
|
||||||
|
+ " WHERE p.ID=pl.PID AND pl.PALREPOSITORYID IN (" + ids + ")"
|
||||||
|
+ " GROUP BY pl.PALREPOSITORYID ) p"
|
||||||
|
+ " WHERE r.ID = p.PALREPOSITORYID AND r.PLCATEGORY='" + category + "' AND r.PLMETHODID <> 'default' AND r.WSID='" + wsId + "'";
|
||||||
|
if (methodId != null && !"".equals(methodId)) {
|
||||||
|
sql += " AND r.PLMETHODID='" + methodId + "'";
|
||||||
|
}
|
||||||
|
sql += " ORDER BY p.PUBLISHDATE DESC";
|
||||||
|
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
if (rs.getString(1) == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
map.put("id", rs.getString(1));
|
||||||
|
map.put("name", rs.getString(2));
|
||||||
|
Timestamp publishDate = rs.getTimestamp(3);
|
||||||
|
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
map.put("publishDate", sdf.format(publishDate));
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据name获取未发布的流程文件
|
||||||
|
* @param name
|
||||||
|
* @param wsId
|
||||||
|
* @param methodId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<PALRepositoryModel> getCoeProcessLevelByNamen(String name, String wsId, String methodId) {
|
||||||
|
String namelike = "";
|
||||||
|
if (StringUtil.containSpecialChar(name)) {
|
||||||
|
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
|
||||||
|
} else {
|
||||||
|
namelike = "'%" + name + "%'";
|
||||||
|
}
|
||||||
|
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and ISPUBLISH = '0'");
|
||||||
|
if (methodId != null && !"".equals(methodId)) {
|
||||||
|
sql.append(" and PLMETHODID = '" + methodId + "' ");
|
||||||
|
}
|
||||||
|
sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
|
||||||
|
return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据name获取有多个版本的流程文件
|
||||||
|
* @param name
|
||||||
|
* @param wsId
|
||||||
|
* @param methodId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<PALRepositoryModel> getCoeProcessLevelByNamec(String name, String wsId, String methodId) {
|
||||||
|
String namelike = "";
|
||||||
|
if (StringUtil.containSpecialChar(name)) {
|
||||||
|
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
|
||||||
|
} else {
|
||||||
|
namelike = "'%" + name + "%'";
|
||||||
|
}
|
||||||
|
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and ISPUBLISH = '1'");
|
||||||
|
String sqlcount = "select count(*) from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + "";
|
||||||
|
|
||||||
|
if (methodId != null && !"".equals(methodId)) {
|
||||||
|
sql.append(" and PLMETHODID = '" + methodId + "' ");
|
||||||
|
}
|
||||||
|
sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
|
||||||
|
sqlcount+=" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC";
|
||||||
|
String num = DBSql.getString(sqlcount);
|
||||||
|
int number = Integer.parseInt(num);
|
||||||
|
if(number <= 1) {
|
||||||
|
List<PALRepositoryModel> data = null;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据name获取停用的流程文件
|
||||||
|
* @param name
|
||||||
|
* @param wsId
|
||||||
|
* @param category
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<PALRepositoryModel> getCoeProcessLevelByNameAndCategorys(String name, String wsId, String category) {
|
||||||
|
|
||||||
|
String namelike = "";
|
||||||
|
|
||||||
|
if (StringUtil.containSpecialChar(name)) {
|
||||||
|
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
|
||||||
|
} else {
|
||||||
|
namelike = "'%" + name + "%'";
|
||||||
|
}
|
||||||
|
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and " + PALRepositoryModelImpl.FIELD_IS_USE + "='1' and ISPUBLISH = '1'");
|
||||||
|
|
||||||
|
if (category != null && !"".equals(category)) {
|
||||||
|
sql.append(" and PLCATEGORY = '" + category + "' ");
|
||||||
|
}
|
||||||
|
sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
|
||||||
|
return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
|
||||||
|
}
|
||||||
|
private class PALRespositoryModelMapper implements RowMapper<PALRepositoryModel> {
|
||||||
|
PALRepository pal = new PALRepository();
|
||||||
|
public PALRepositoryModel mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
return (PALRepositoryModel) pal.record2Model(rs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据userId获取资源Id列表
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<String> getTeamUserPerms(String userId) {
|
||||||
|
String sql = " select distinct perm.RESOURCEID from APP_ACT_NETWORK_TEAM_MEMBER tm , APP_ACT_COE_TEAM_PERM perm " +
|
||||||
|
"where tm.TEAMID=perm.TEAMID and tm.MEMBERSTATUS='1' and tm.USERID=? ";
|
||||||
|
List<String> resourceIdList = DBSql.query(sql.toString(), new RowMapper<String>() {
|
||||||
|
@Override
|
||||||
|
public String mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
return rs.getString(1);
|
||||||
|
}
|
||||||
|
}, new Object[] { userId });
|
||||||
|
if(resourceIdList == null) {
|
||||||
|
resourceIdList = new ArrayList<String>();
|
||||||
|
}
|
||||||
|
return resourceIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.client.dto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程发布代办已办传输类
|
||||||
|
*
|
||||||
|
* @author 郝文豪(James)
|
||||||
|
* @date 2020/7/13 0013 上午 11:16
|
||||||
|
*/
|
||||||
|
public class ProcessPublishDTO {
|
||||||
|
/**
|
||||||
|
* 流程实例id
|
||||||
|
*/
|
||||||
|
private String processInstId;
|
||||||
|
/**
|
||||||
|
* 序号
|
||||||
|
*/
|
||||||
|
private int index;
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
/**
|
||||||
|
* 来自谁+部门
|
||||||
|
*/
|
||||||
|
private String fromUser;
|
||||||
|
/**
|
||||||
|
* 接收时间
|
||||||
|
*/
|
||||||
|
private String date;
|
||||||
|
/**
|
||||||
|
* 是否是自己发起填写的流程
|
||||||
|
*/
|
||||||
|
private boolean ownerProcess;
|
||||||
|
/**
|
||||||
|
* 任务实例id
|
||||||
|
*/
|
||||||
|
private String taskInstId;
|
||||||
|
/**
|
||||||
|
* 打开状态
|
||||||
|
*/
|
||||||
|
private String openState;
|
||||||
|
|
||||||
|
public String getProcessInstId() {
|
||||||
|
return processInstId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessInstId(String processInstId) {
|
||||||
|
this.processInstId = processInstId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndex(int index) {
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFromUser() {
|
||||||
|
return fromUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFromUser(String fromUser) {
|
||||||
|
this.fromUser = fromUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDate() {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDate(String date) {
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOwnerProcess() {
|
||||||
|
return ownerProcess;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOwnerProcess(boolean ownerProcess) {
|
||||||
|
this.ownerProcess = ownerProcess;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskInstId() {
|
||||||
|
return taskInstId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskInstId(String taskInstId) {
|
||||||
|
this.taskInstId = taskInstId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOpenState() {
|
||||||
|
return openState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenState(String openState) {
|
||||||
|
this.openState = openState;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,140 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.client.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程发布的数据传输对象类
|
||||||
|
*
|
||||||
|
* @author 郝文豪(James)
|
||||||
|
* @date 2020/4/7 0007 下午 2:09
|
||||||
|
*/
|
||||||
|
public class ProcessPublishHistoryDTO implements Serializable {
|
||||||
|
/**
|
||||||
|
* 流程实例id
|
||||||
|
*/
|
||||||
|
private String processInstId;
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人
|
||||||
|
*/
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请时间
|
||||||
|
*/
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态
|
||||||
|
*/
|
||||||
|
private String approvalState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批人
|
||||||
|
*/
|
||||||
|
private String approvalUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批人id
|
||||||
|
*/
|
||||||
|
private String approvalUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否完成
|
||||||
|
*/
|
||||||
|
private Boolean end;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务实例id
|
||||||
|
*/
|
||||||
|
private String taskInstId;
|
||||||
|
|
||||||
|
public String getTaskInstId() {
|
||||||
|
return taskInstId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskInstId(String taskInstId) {
|
||||||
|
this.taskInstId = taskInstId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessInstId() {
|
||||||
|
return processInstId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessInstId(String processInstId) {
|
||||||
|
this.processInstId = processInstId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getEnd() {
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnd(Boolean end) {
|
||||||
|
this.end = end;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApprovalUserId() {
|
||||||
|
return approvalUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApprovalUserId(String approvalUserId) {
|
||||||
|
this.approvalUserId = approvalUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateUser() {
|
||||||
|
return createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateUser(String createUser) {
|
||||||
|
this.createUser = createUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApprovalState() {
|
||||||
|
return approvalState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApprovalState(String approvalState) {
|
||||||
|
this.approvalState = approvalState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApprovalUser() {
|
||||||
|
return approvalUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApprovalUser(String approvalUser) {
|
||||||
|
this.approvalUser = approvalUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.client.util;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.actionsoft.bpms.commons.database.RowMapper;
|
||||||
|
import com.actionsoft.bpms.commons.pagination.SQLPagination;
|
||||||
|
import com.actionsoft.bpms.util.DBSql;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导航处理类
|
||||||
|
*
|
||||||
|
* @author ZZ
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class PublisherSkinsDao {
|
||||||
|
|
||||||
|
public long getPrevLoginTime(String userId) {
|
||||||
|
long prevLoginTime = 0;
|
||||||
|
String sql = " select * from SYS_SESSION s where s.userid = '" + userId + "' order by s.STARTTIME desc ";
|
||||||
|
List<Long> list = DBSql.query(SQLPagination.getPaginitionSQL(sql, 0, 2), new RowMapper<Long>() {
|
||||||
|
public Long mapRow(ResultSet rs, int paramInt) throws SQLException {
|
||||||
|
return rs.getLong("starttime");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
prevLoginTime = list.get(list.size() - 1);
|
||||||
|
}
|
||||||
|
return prevLoginTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,235 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.conf;
|
||||||
|
|
||||||
|
import com.actionsoft.bpms.util.UtilString;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
|
||||||
|
public final class PublisherConf {
|
||||||
|
public static final String APPID = "com.actionsoft.apps.coe.pal.publisher";
|
||||||
|
|
||||||
|
public static final String RELATION_SEARCH_ID = "com.actionsoft.apps.coe.pal.relationsearch";
|
||||||
|
public static final String RELATION_SEARCH_NAME = "关联查询";
|
||||||
|
|
||||||
|
public static final String PORTAL_TREE_ICON_FOLDER = "../apps/com.actionsoft.apps.coe.pal.publisher/img/tree-folder.png";
|
||||||
|
public static final String PORTAL_TREE_ICON_FOLDER1 = "../apps/com.actionsoft.apps.coe.pal.publisher/img/tree-folder1.png";
|
||||||
|
|
||||||
|
public static String PUBLISH_PORTAL_VERSION = "v1";
|
||||||
|
|
||||||
|
public static String XPAGES_ID = "";
|
||||||
|
|
||||||
|
public static JSONArray PORTAL_TABS = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页底信息,如客户流程管理部联系信息
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getFotter() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "fotter");
|
||||||
|
if (UtilString.isEmpty(value)) {
|
||||||
|
value = "炎黄盈动";
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setFotter(String fotter) {
|
||||||
|
fotter = fotter == null ? "" : fotter;
|
||||||
|
SDK.getAppAPI().setProperty(APPID, "fotter", fotter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门户标题
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getTitle() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "title");
|
||||||
|
if (UtilString.isEmpty(value)) {
|
||||||
|
value = "CoE Process Portal";
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setTitle(String title) {
|
||||||
|
title = title == null ? "" : title;
|
||||||
|
SDK.getAppAPI().setProperty(APPID, "title", title);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程发布流程版本Id
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getPublishProcessId() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "publishProcessId");
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布门户的浏览者是否整合AWS用户
|
||||||
|
*
|
||||||
|
* @return 整合返回true
|
||||||
|
*/
|
||||||
|
public static boolean isIntegrationAWSUser() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "isIntegrationAWSUser");
|
||||||
|
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 如果门户未整合AWS用户,此处配置来自外部系统访问门户的统一访客账户。该账户是AWS平台合法的账户
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getGuest() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "guest");
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布门户的内容允许复制
|
||||||
|
*
|
||||||
|
* @return 允许返回true
|
||||||
|
*/
|
||||||
|
public static boolean isCopy() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "isCopy");
|
||||||
|
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setCopy(String isCopy) {
|
||||||
|
if (isCopy != null && isCopy.trim().equalsIgnoreCase("true")) {
|
||||||
|
isCopy = "true";
|
||||||
|
} else {
|
||||||
|
isCopy = "false";
|
||||||
|
}
|
||||||
|
SDK.getAppAPI().setProperty(APPID, "isCopy", isCopy);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布门户的内容允许打印
|
||||||
|
*
|
||||||
|
* @return 允许返回true
|
||||||
|
*/
|
||||||
|
public static boolean isPrint() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "isPrint");
|
||||||
|
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setPrint(String isPrint) {
|
||||||
|
if (isPrint != null && isPrint.trim().equalsIgnoreCase("true")) {
|
||||||
|
isPrint = "true";
|
||||||
|
} else {
|
||||||
|
isPrint = "false";
|
||||||
|
}
|
||||||
|
SDK.getAppAPI().setProperty(APPID, "isPrint", isPrint);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布门户的内容允许留言
|
||||||
|
*
|
||||||
|
* @return 允许返回true
|
||||||
|
*/
|
||||||
|
public static boolean isComment() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "isComment");
|
||||||
|
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setComment(String isComment) {
|
||||||
|
if (isComment != null && isComment.trim().equalsIgnoreCase("true")) {
|
||||||
|
isComment = "true";
|
||||||
|
} else {
|
||||||
|
isComment = "false";
|
||||||
|
}
|
||||||
|
SDK.getAppAPI().setProperty(APPID, "isComment", isComment);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布门户的内容允许查看属性
|
||||||
|
*
|
||||||
|
* @return 允许返回true
|
||||||
|
*/
|
||||||
|
public static boolean isViewAttribute() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "isViewAttribute");
|
||||||
|
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setViewAttribute(String isViewAttribute) {
|
||||||
|
if (isViewAttribute != null && isViewAttribute.trim().equalsIgnoreCase("true")) {
|
||||||
|
isViewAttribute = "true";
|
||||||
|
} else {
|
||||||
|
isViewAttribute = "false";
|
||||||
|
}
|
||||||
|
SDK.getAppAPI().setProperty(APPID, "isViewAttribute", isViewAttribute);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布门户的内容允许查看历史发布记录
|
||||||
|
*
|
||||||
|
* @return 允许返回true
|
||||||
|
*/
|
||||||
|
public static boolean isViewHistory() {
|
||||||
|
String value = SDK.getAppAPI().getProperty(APPID, "isViewHistory");
|
||||||
|
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setViewHistory(String isViewHistory) {
|
||||||
|
if (isViewHistory != null && isViewHistory.trim().equalsIgnoreCase("true")) {
|
||||||
|
isViewHistory = "true";
|
||||||
|
} else {
|
||||||
|
isViewHistory = "false";
|
||||||
|
}
|
||||||
|
SDK.getAppAPI().setProperty(APPID, "isViewHistory", isViewHistory);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程管理门户xpage
|
||||||
|
* @param type common:常用流程;frequency:高频流程;systemMap:系统地图;processMap:流程地图;notification:发布动态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getXpagesContent(String type) {
|
||||||
|
StringBuffer content = new StringBuffer();
|
||||||
|
switch (type) {
|
||||||
|
case "common":
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.common.js'></script>");
|
||||||
|
break;
|
||||||
|
case "frequency":
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.frequency.js'></script>");
|
||||||
|
break;
|
||||||
|
case "systemMap":
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.systemmap.js'></script>");
|
||||||
|
break;
|
||||||
|
case "dataMap":
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.datamap.js'></script>");
|
||||||
|
break;
|
||||||
|
case "controlMap":
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.controlmap.js'></script>");
|
||||||
|
break;
|
||||||
|
case "orgMap":
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.orgmap.js'></script>");
|
||||||
|
break;
|
||||||
|
case "processMap":
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.processmap.js'></script>");
|
||||||
|
break;
|
||||||
|
case "notification":
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.notification.js'></script>");
|
||||||
|
break;
|
||||||
|
case "banner":// 横幅轮播图
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.banner.js'></script>");
|
||||||
|
break;
|
||||||
|
case "participant":// 我参与的
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.participant.js'></script>");
|
||||||
|
break;
|
||||||
|
case "responsible":// 我负责的
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.responsible.js'></script>");
|
||||||
|
break;
|
||||||
|
case "postresponsibility":// 岗位职责
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.postresponsibility.js'></script>");
|
||||||
|
break;
|
||||||
|
case "rcaimatrix":// rcai矩阵
|
||||||
|
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.rcaimatrix.js'></script>");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return content.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 流程发布Constant
|
||||||
|
* @author zhangming
|
||||||
|
* @date 2014年9月19日
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface PublisherConstant {
|
||||||
|
public static final String PUBLISH = "com.actionsoft.apps.coe.pal.publisher"; //流程发布AppId
|
||||||
|
|
||||||
|
public static final String PROCESSGROUPID = "obj_f2903c7c6a2d405a981a87e115d4261e"; //发布流程流程组Id
|
||||||
|
public static final String PROCESSID = "obj_d2b56ab6bd96477b9b14fc355f3c5ee9";
|
||||||
|
|
||||||
|
public static final String BOTABLENAME = "BO_ACT_COE_PUBLISH"; //发布流程BO表主表表名
|
||||||
|
public static final String BOSUBTABLE_N = "BO_ACT_COE_PUBLISH_N"; //发布流程BO子表-新增
|
||||||
|
public static final String BOSUBTABLE_C = "BO_ACT_COE_PUBLISH_C"; //发布流程BO子表-更新
|
||||||
|
public static final String BOSUBTABLE_S = "BO_ACT_COE_PUBLISH_S"; //发布流程BO子表-停止
|
||||||
|
|
||||||
|
public static final String ORG_RELATION_MANAGEMENT_STANDARD = "管理标准"; //管理标准
|
||||||
|
public static final String ORG_RELATION_TECHNICAL_STANDARD = "技术标准"; //技术标准
|
||||||
|
public static final String ORG_RELATION_WORK_STANDARD = "工作标准"; //工作标准
|
||||||
|
}
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.AppsConst;
|
||||||
|
import com.actionsoft.apps.listener.AppListener;
|
||||||
|
import com.actionsoft.apps.resource.AppContext;
|
||||||
|
import com.actionsoft.bpms.util.Base64;
|
||||||
|
import com.actionsoft.exception.AWSException;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
import com.actionsoft.sdk.local.api.AppAPI;
|
||||||
|
|
||||||
|
public class AppInstallListener implements AppListener {
|
||||||
|
|
||||||
|
@SuppressWarnings("resource")
|
||||||
|
@Override
|
||||||
|
public void after(AppContext app) {
|
||||||
|
// 流程管理门户xpages文件同步到xpages应用中
|
||||||
|
try {
|
||||||
|
String path = AppsConst.APPS_ROOT + AppsConst.FOLDER_INSTALL + File.separator + app.getId() + File.separator + "xpages" + File.separator;
|
||||||
|
File fileDir = new File(path);
|
||||||
|
if (fileDir.exists()) {
|
||||||
|
File [] files = fileDir.listFiles();
|
||||||
|
for (File file : files) {
|
||||||
|
InputStream input = null;
|
||||||
|
ByteArrayOutputStream arrayOutputStream = null;
|
||||||
|
input = new FileInputStream(file);
|
||||||
|
arrayOutputStream = new ByteArrayOutputStream();
|
||||||
|
byte [] buf = new byte[1024];
|
||||||
|
int len = 0;
|
||||||
|
while ((len = input.read(buf)) != -1) {
|
||||||
|
arrayOutputStream.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
byte [] bytedata = arrayOutputStream.toByteArray();
|
||||||
|
String content = new String(Base64.encode(bytedata));
|
||||||
|
// 调用App
|
||||||
|
String sourceAppId = app.getId();
|
||||||
|
// aslp服务地址
|
||||||
|
String aslp = "aslp://com.actionsoft.apps.addons.xpages/createTemplateByContent";
|
||||||
|
// 参数定义列表
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
//内容,必填
|
||||||
|
params.put("content", content);
|
||||||
|
//0,覆盖 1不覆盖,非必填
|
||||||
|
params.put("overWriteFlag", "0");
|
||||||
|
AppAPI appAPI = SDK.getAppAPI();
|
||||||
|
//根据一个xpages文件的内容创建一个xpages模板记录
|
||||||
|
appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new AWSException("流程管理门户xpages文件解析错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean before(AppContext arg0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.conf.PublisherConf;
|
||||||
|
import com.actionsoft.apps.listener.AppListener;
|
||||||
|
import com.actionsoft.apps.resource.AppContext;
|
||||||
|
import com.actionsoft.exception.AWSException;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
|
||||||
|
public class AppStartListener implements AppListener{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void after(AppContext arg0) {
|
||||||
|
// 初始化门户版本
|
||||||
|
String value = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalVersion");
|
||||||
|
PublisherConf.PUBLISH_PORTAL_VERSION = value;
|
||||||
|
if (value.equals("v3")) {
|
||||||
|
// 初始化门户配置
|
||||||
|
String xpagesId = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalTemplateId_xpages");
|
||||||
|
if ("".equals(xpagesId.trim())) {
|
||||||
|
throw new AWSException("PAL门户默认xpages模版配置参数不允许为空");
|
||||||
|
}
|
||||||
|
PublisherConf.XPAGES_ID = xpagesId;
|
||||||
|
String portalTabs = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalTabs");
|
||||||
|
if (!"".equals(portalTabs.trim())) {
|
||||||
|
try {
|
||||||
|
JSONArray array = JSON.parseArray(portalTabs.trim());
|
||||||
|
PublisherConf.PORTAL_TABS = array;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new AWSException("PAL门户Tab标签配置参数解析出错,请检查参数格式是否正确");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
PublisherConf.PORTAL_TABS = new JSONArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean before(AppContext arg0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.AppsConst;
|
||||||
|
import com.actionsoft.apps.lifecycle.log.AppsLogger;
|
||||||
|
import com.actionsoft.apps.listener.AppListener;
|
||||||
|
import com.actionsoft.apps.resource.AppContext;
|
||||||
|
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
||||||
|
import com.actionsoft.bpms.util.ConsolePrinter;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
import com.actionsoft.sdk.local.api.AppAPI;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
public class AppUnInstallListener implements AppListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void after(AppContext app) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
ConsolePrinter.info("publish app custom uninstall");
|
||||||
|
System.out.print("publish app custom uninstall");
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
AppAPI appAPI = SDK.getAppAPI();
|
||||||
|
String sourceAppId = app.getId();
|
||||||
|
String xpagesid = "com.actionsoft.apps.addons.xpages";
|
||||||
|
AppContext xpagesApp = appAPI.getAppContext(xpagesid);
|
||||||
|
AppContext publishApp = appAPI.getAppContext(sourceAppId);
|
||||||
|
if (xpagesApp != null && SDK.getAppAPI().isActive(xpagesApp.getId())) {
|
||||||
|
// 服务地址
|
||||||
|
String aslp = "aslp://com.actionsoft.apps.addons.xpages/deleteTemplate";
|
||||||
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
|
try {
|
||||||
|
// 参数定义列表
|
||||||
|
String templateId = "30267ab3-aeb6-4371-88e0-ecc13cef94a6";
|
||||||
|
params.put("templateId", templateId);
|
||||||
|
appAPI.callASLP(publishApp, aslp, params);
|
||||||
|
if (ro.isErr()) {
|
||||||
|
AppsLogger.err(publishApp, ro.getMsg());
|
||||||
|
}
|
||||||
|
ConsolePrinter.info(ro.toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
ro.err(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean before(AppContext arg0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.AppsConst;
|
||||||
|
import com.actionsoft.apps.lifecycle.dist.DistContext;
|
||||||
|
import com.actionsoft.apps.lifecycle.event.AppCustomActionInterface;
|
||||||
|
import com.actionsoft.apps.resource.AppContext;
|
||||||
|
import com.actionsoft.bpms.util.Base64;
|
||||||
|
import com.actionsoft.bpms.util.ConsolePrinter;
|
||||||
|
import com.actionsoft.exception.AWSException;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
import com.actionsoft.sdk.local.api.AppAPI;
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
public class PublishAppCustomAction implements AppCustomActionInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dist(AppContext app, DistContext distCtx) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void install(AppContext app) {
|
||||||
|
ConsolePrinter.info("publish app custom install");
|
||||||
|
System.out.print("publish app custom install");
|
||||||
|
// 流程管理门户xpages文件同步到xpages应用中
|
||||||
|
handleXPagesTemplate(app,"0");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void uninstall(AppContext app) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
ConsolePrinter.info("publish app custom uninstall");
|
||||||
|
System.out.print("publish app custom uninstall");
|
||||||
|
//根据publish应用下的模板路径对应删除掉xpages模板
|
||||||
|
String path = AppsConst.APPS_ROOT + AppsConst.FOLDER_INSTALL + File.separator + app.getId() + File.separator + "xpages" + File.separator;
|
||||||
|
ConsolePrinter.info(path);
|
||||||
|
File fileDir = new File(path);
|
||||||
|
if (fileDir.exists()) {
|
||||||
|
File [] files = fileDir.listFiles();
|
||||||
|
for (File file : files) {
|
||||||
|
String sourceAppId = app.getId();
|
||||||
|
// aslp服务地址
|
||||||
|
String aslp = "aslp://com.actionsoft.apps.addons.xpages/deleteTemplate";
|
||||||
|
// 参数定义列表
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
String fileName = file.getName();
|
||||||
|
String templateId ="";
|
||||||
|
int dotindex = fileName.lastIndexOf(".");
|
||||||
|
if (dotindex != -1) {
|
||||||
|
templateId = fileName.substring(0, dotindex);
|
||||||
|
}
|
||||||
|
System.out.print(templateId);
|
||||||
|
ConsolePrinter.info(templateId);
|
||||||
|
params.put("templateId", templateId);
|
||||||
|
AppAPI appAPI = SDK.getAppAPI();
|
||||||
|
appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void upgrade(AppContext app) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
handleXPagesTemplate(app,"0");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作xpages模板
|
||||||
|
* @param app
|
||||||
|
* @param overWriteFlag
|
||||||
|
*/
|
||||||
|
private void handleXPagesTemplate(AppContext app,String overWriteFlag){
|
||||||
|
// 流程管理门户xpages文件同步到xpages应用中
|
||||||
|
try {
|
||||||
|
String path = AppsConst.APPS_ROOT + AppsConst.FOLDER_INSTALL + File.separator + app.getId() + File.separator + "xpages" + File.separator;
|
||||||
|
ConsolePrinter.info(path);
|
||||||
|
File fileDir = new File(path);
|
||||||
|
if (fileDir.exists()) {
|
||||||
|
File [] files = fileDir.listFiles();
|
||||||
|
for (File file : files) {
|
||||||
|
InputStream input = null;
|
||||||
|
ByteArrayOutputStream arrayOutputStream = null;
|
||||||
|
input = new FileInputStream(file);
|
||||||
|
arrayOutputStream = new ByteArrayOutputStream();
|
||||||
|
byte [] buf = new byte[1024];
|
||||||
|
int len = 0;
|
||||||
|
while ((len = input.read(buf)) != -1) {
|
||||||
|
arrayOutputStream.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
byte [] bytedata = arrayOutputStream.toByteArray();
|
||||||
|
String content = new String(Base64.encode(bytedata));
|
||||||
|
// 调用App
|
||||||
|
String sourceAppId = app.getId();
|
||||||
|
// aslp服务地址
|
||||||
|
String aslp = "aslp://com.actionsoft.apps.addons.xpages/createTemplateByContent";
|
||||||
|
// 参数定义列表
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
//内容,必填
|
||||||
|
params.put("content", content);
|
||||||
|
//0,覆盖 1不覆盖,非必填
|
||||||
|
params.put("overWriteFlag", overWriteFlag);
|
||||||
|
AppAPI appAPI = SDK.getAppAPI();
|
||||||
|
//根据一个xpages文件的内容创建一个xpages模板记录
|
||||||
|
appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new AWSException("流程管理门户xpages文件解析错误");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,134 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.dao.PublishHistory;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.dao.PublishListHistory;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.model.PublishHistoryModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.model.PublishListHistoryModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.constant.PublisherConstant;
|
||||||
|
import com.actionsoft.bpms.bo.engine.BO;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListenerInterface;
|
||||||
|
import com.actionsoft.bpms.util.UUIDGener;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
|
||||||
|
public class PublishExecuteListenerInterfaceImpl extends ExecuteListener implements ExecuteListenerInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
|
return "将发布信息保存至CoE中。";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getProvider() {
|
||||||
|
return "aws-coe";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getVersion() {
|
||||||
|
return "V6.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(ProcessExecutionContext param) throws Exception {
|
||||||
|
//将发布信息保存至coe的发布表中
|
||||||
|
PublishHistoryModel model = new PublishHistoryModel();
|
||||||
|
String processInstId = param.getProcessInstance().getId();
|
||||||
|
if ("terminate".equals(param.getProcessInstance().getControlState())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
BO bo = SDK.getBOAPI().query(PublisherConstant.BOTABLENAME).detailByBindId(processInstId);
|
||||||
|
model.setId(UUIDGener.getUUID());
|
||||||
|
model.setProcessInstId(processInstId);
|
||||||
|
model.setWsId(bo.get("WSID").toString());
|
||||||
|
model.setUserId(bo.get("APPLYUSERID").toString());
|
||||||
|
String auditorId = "";
|
||||||
|
if (bo.get("AUDITOR3") != null && !"".equals(bo.get("AUDITOR3").toString())) {
|
||||||
|
auditorId = bo.get("AUDITOR3").toString();
|
||||||
|
} else if (bo.get("AUDITOR2") != null && !"".equals(bo.get("AUDITOR2").toString())) {
|
||||||
|
auditorId = bo.get("AUDITOR2").toString();
|
||||||
|
} else {
|
||||||
|
auditorId = bo.get("AUDITOR1").toString();
|
||||||
|
}
|
||||||
|
model.setAuditorId(auditorId);
|
||||||
|
model.setPublishDate(Timestamp.valueOf(bo.get("UPDATEDATE").toString()));
|
||||||
|
model.setPublishDesc(bo.get("PUBLISHDESC") == null ? "" : bo.get("PUBLISHDESC").toString());
|
||||||
|
model.setTeamId(bo.get("TEAMID").toString());
|
||||||
|
|
||||||
|
List<BO> bolistN = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(processInstId).list();
|
||||||
|
model.setPublishNew(bolistN == null ? 0 : bolistN.size());
|
||||||
|
List<BO> bolistC = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_C).bindId(processInstId).list();
|
||||||
|
model.setPublishChange(bolistC == null ? 0 : bolistC.size());
|
||||||
|
List<BO> bolistS = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_S).bindId(processInstId).list();
|
||||||
|
model.setPublishStop(bolistS == null ? 0 : bolistS.size());
|
||||||
|
|
||||||
|
PublishHistory dao = new PublishHistory();
|
||||||
|
dao.insert(model);
|
||||||
|
|
||||||
|
PublishListHistory listDao = new PublishListHistory();
|
||||||
|
PALRepository repositoryDao = new PALRepository();
|
||||||
|
//将发布信息保存至coe的发布子表中
|
||||||
|
if (bolistN != null) {
|
||||||
|
for (BO boN : bolistN) {
|
||||||
|
PublishListHistoryModel publishListHistoryModelN = new PublishListHistoryModel();
|
||||||
|
publishListHistoryModelN.setId(UUIDGener.getUUID());
|
||||||
|
publishListHistoryModelN.setActionType("N");
|
||||||
|
publishListHistoryModelN.setpId(model.getId());
|
||||||
|
publishListHistoryModelN.setPublishDate(model.getPublishDate());
|
||||||
|
publishListHistoryModelN.setPalRepositoryId(boN.get("PUBLISHFILEID").toString());
|
||||||
|
publishListHistoryModelN.setPublishDesc(boN.get("PUBLISHDESC") == null ? "" : boN.get("PUBLISHDESC").toString());
|
||||||
|
if (boN.get("TASKID") != null && !"".equals(boN.get("TASKID"))) {
|
||||||
|
publishListHistoryModelN.setTaskId(boN.get("TASKID").toString());
|
||||||
|
} else {
|
||||||
|
publishListHistoryModelN.setTaskId("");
|
||||||
|
}
|
||||||
|
listDao.insert(publishListHistoryModelN);
|
||||||
|
//修改流程文件的发布属性和发布时间
|
||||||
|
repositoryDao.updatePublishStatusAndDate("N", boN.get("PUBLISHFILEID").toString(), null, model.getPublishDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bolistC != null) {
|
||||||
|
for (BO boC : bolistC) {
|
||||||
|
PublishListHistoryModel publishListHistoryModelC = new PublishListHistoryModel();
|
||||||
|
publishListHistoryModelC.setId(UUIDGener.getUUID());
|
||||||
|
publishListHistoryModelC.setActionType("C");
|
||||||
|
publishListHistoryModelC.setpId(model.getId());
|
||||||
|
publishListHistoryModelC.setPublishDate(model.getPublishDate());
|
||||||
|
publishListHistoryModelC.setPalRepositoryId(boC.get("CHANGEDFILEIDNEW").toString());
|
||||||
|
publishListHistoryModelC.setPublishDesc(boC.get("CHANGEDDESC") == null ? "" : boC.get("CHANGEDDESC").toString());
|
||||||
|
if (boC.get("TASKID") != null && !"".equals(boC.get("TASKID"))) {
|
||||||
|
publishListHistoryModelC.setTaskId(boC.get("TASKID").toString());
|
||||||
|
} else {
|
||||||
|
publishListHistoryModelC.setTaskId("");
|
||||||
|
}
|
||||||
|
listDao.insert(publishListHistoryModelC);
|
||||||
|
//修改流程文件的发布属性
|
||||||
|
repositoryDao.updatePublishStatusAndDate("C", boC.get("CHANGEDFILEIDNEW").toString(), boC.get("CHANGEFILEID").toString(), model.getPublishDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bolistS != null) {
|
||||||
|
for (BO boS : bolistS) {
|
||||||
|
PublishListHistoryModel publishListHistoryModelS = new PublishListHistoryModel();
|
||||||
|
publishListHistoryModelS.setId(UUIDGener.getUUID());
|
||||||
|
publishListHistoryModelS.setActionType("S");
|
||||||
|
publishListHistoryModelS.setpId(model.getId());
|
||||||
|
publishListHistoryModelS.setPublishDate(model.getPublishDate());
|
||||||
|
publishListHistoryModelS.setPalRepositoryId(boS.get("STOPFILEID").toString());
|
||||||
|
publishListHistoryModelS.setPublishDesc(boS.get("STOPDESC") == null ? "" : boS.get("STOPDESC").toString());
|
||||||
|
if (boS.get("TASKID") != null && !"".equals(boS.get("TASKID"))) {
|
||||||
|
publishListHistoryModelS.setTaskId(boS.get("TASKID").toString());
|
||||||
|
} else {
|
||||||
|
publishListHistoryModelS.setTaskId("");
|
||||||
|
}
|
||||||
|
listDao.insert(publishListHistoryModelS);
|
||||||
|
//修改流程文件的发布属性
|
||||||
|
repositoryDao.updatePublishStatusAndDate("S", boS.get("STOPFILEID").toString(), null, model.getPublishDate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,244 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.dao.PublishHistory;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.manage.publish.model.PublishHistoryModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
|
||||||
|
import com.actionsoft.apps.coe.pal.publisher.constant.PublisherConstant;
|
||||||
|
import com.actionsoft.bpms.bo.engine.BO;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.model.run.delegate.ProcessInstance;
|
||||||
|
import com.actionsoft.bpms.commons.database.RowMap;
|
||||||
|
import com.actionsoft.bpms.util.DBSql;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
|
||||||
|
public class PublishInstanceAfterReactivateLIstener extends ExecuteListener{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription() {
|
||||||
|
return "流程复活后进行相关数据还原处理";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getProvider() {
|
||||||
|
return "aws-coe";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getVersion() {
|
||||||
|
return "V6.3";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(ProcessExecutionContext ctx) throws Exception {
|
||||||
|
String processInstId = ctx.getProcessInstance().getId();
|
||||||
|
ProcessInstance processInstance = ctx.getProcessInstance();
|
||||||
|
SDK.getLogAPI().consoleInfo("-----------执行流程复活后事件-------------");
|
||||||
|
SDK.getLogAPI().consoleInfo("流程实例标题:" + processInstance.getTitle() + "[processInstId=" + processInstId + "]");
|
||||||
|
// 获取相关的流程数据
|
||||||
|
|
||||||
|
List<BO> bolistN = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(processInstId).list();
|
||||||
|
List<BO> bolistC = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_C).bindId(processInstId).list();
|
||||||
|
List<BO> bolistS = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_S).bindId(processInstId).list();
|
||||||
|
List<PALRepositoryModel> pList = new ArrayList<>();
|
||||||
|
if (bolistN != null) {
|
||||||
|
for (BO boN : bolistN) {
|
||||||
|
String publishFileId = boN.get("PUBLISHFILEID").toString();
|
||||||
|
PALRepositoryModel palModel = PALRepositoryCache.getCache().get(publishFileId);
|
||||||
|
if (palModel != null && palModel.isPublish()) {// 若当前为非已发布状态,则不进行处理
|
||||||
|
// 若当前流程model.getPalRepositoryId()除此次发布以外存在发布过、变更过、废止过,则退回至停用状态,否则退回至设计状态
|
||||||
|
// List<PublishListHistoryModel> allPublishData = listDao.query("PALREPOSITORYID = ?", publishFileId).list();
|
||||||
|
List<RowMap> allPublishData = DBSql.getMaps("SELECT ID FROM SYS_COE_PAL_PUBLISH_LIST WHERE PALREPOSITORYID = ?", new Object[] {publishFileId});
|
||||||
|
if (allPublishData != null) {
|
||||||
|
boolean isPublish = false;
|
||||||
|
boolean isStop = false;
|
||||||
|
boolean isApproval = false;
|
||||||
|
if (allPublishData.size() > 1) {
|
||||||
|
// 退回至停用状态
|
||||||
|
isStop = true;
|
||||||
|
} else {
|
||||||
|
// 退回至设计状态
|
||||||
|
}
|
||||||
|
createResultMap(palModel.getName(), palModel.getId(), isPublish, isStop, isApproval, pList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bolistC != null) {
|
||||||
|
for (BO boC : bolistC) {
|
||||||
|
String changefileId = boC.get("CHANGEFILEID").toString();// 变更文件id
|
||||||
|
String changedFileIdNew = boC.get("CHANGEDFILEIDNEW").toString();// 变更后文件id
|
||||||
|
PALRepositoryModel changeModel = PALRepositoryCache.getCache().get(changefileId);
|
||||||
|
PALRepositoryModel changeNewModel = PALRepositoryCache.getCache().get(changedFileIdNew);
|
||||||
|
// 符合该条件可进行复活,状态值不符合则暂时不处理
|
||||||
|
if (changeModel != null && changeNewModel != null && changeModel.isStop() && changeNewModel.isPublish()) {
|
||||||
|
// changeModel退回至已发布状态
|
||||||
|
boolean isPublish = true;
|
||||||
|
boolean isStop = false;
|
||||||
|
boolean isApproval = false;
|
||||||
|
createResultMap(changeModel.getName(), changefileId, isPublish, isStop, isApproval, pList);
|
||||||
|
// List<PublishListHistoryModel> allchangeData = listDao.query("PALREPOSITORYID = ?", changedFileIdNew).list();
|
||||||
|
List<RowMap> allchangeData = DBSql.getMaps("SELECT ID FROM SYS_COE_PAL_PUBLISH_LIST WHERE PALREPOSITORYID = ?", new Object[] {changedFileIdNew});
|
||||||
|
if (allchangeData != null) {
|
||||||
|
isPublish = false;
|
||||||
|
isStop = false;
|
||||||
|
isApproval = false;
|
||||||
|
if (allchangeData.size() > 1) {
|
||||||
|
// changeNewModel退回至停用状态
|
||||||
|
isStop = true;
|
||||||
|
} else {
|
||||||
|
// changeNewModel退回至设计状态
|
||||||
|
}
|
||||||
|
createResultMap(changeNewModel.getName(), changedFileIdNew, isPublish, isStop, isApproval, pList);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bolistS != null) {
|
||||||
|
for (BO boS : bolistS) {
|
||||||
|
String stopFileId = boS.get("STOPFILEID").toString();
|
||||||
|
PALRepositoryModel stopModel = PALRepositoryCache.getCache().get(stopFileId);
|
||||||
|
// 已停用且该流程版本下所有流程没有在发布状态的进行退回,保证退回之后该流程所有版本中只有一条为已发布状态
|
||||||
|
if (stopModel != null && stopModel.isStop()) {
|
||||||
|
List<PALRepositoryModel> stopList = PALRepositoryCache.getByVersionId(stopModel.getVersionId());
|
||||||
|
boolean flag = false;
|
||||||
|
for (PALRepositoryModel model : stopList) {
|
||||||
|
if (model.isPublish()) {
|
||||||
|
flag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!flag) {
|
||||||
|
// 退回至已发布状态
|
||||||
|
boolean isPublish = true;
|
||||||
|
boolean isStop = false;
|
||||||
|
boolean isApproval = false;
|
||||||
|
createResultMap(stopModel.getName(), stopFileId, isPublish, isStop, isApproval, pList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pList.size() > 0) {
|
||||||
|
restoreData(pList, processInstId);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 还原数据
|
||||||
|
* @param pList
|
||||||
|
* @param processInstId
|
||||||
|
*/
|
||||||
|
private void restoreData(List<PALRepositoryModel> pList, String processInstId) {
|
||||||
|
// 批量处理回退数据
|
||||||
|
boolean flag = batchHandleRepositoryData(pList);
|
||||||
|
int r = 0;
|
||||||
|
if (flag) {
|
||||||
|
// 删除SYS_COE_PAL_PUBLISH和SYS_COE_PAL_PUBLISH_LIST表数据
|
||||||
|
PublishHistory dao = new PublishHistory();// 发布结果主表
|
||||||
|
PublishHistoryModel history = dao.queryBy("PROCESSINSTID = ?", processInstId);
|
||||||
|
if (history != null) {
|
||||||
|
r = dao.delete(history.getId());
|
||||||
|
}
|
||||||
|
SDK.getLogAPI().consoleInfo("流程状态还原,变更数据[" + pList.size() + "]条");
|
||||||
|
for (PALRepositoryModel model : pList) {
|
||||||
|
SDK.getLogAPI().consoleInfo("流程名称:" + model.getName() + "[id=" + model.getId() + ",isPublish=" + model.isPublish() + ",isStop=" + model.isStop() + "]");
|
||||||
|
}
|
||||||
|
if (r > 0) {
|
||||||
|
SDK.getLogAPI().consoleInfo("删除发布结果数据成功[processInstId=" + processInstId + "]");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程数据库状态还原
|
||||||
|
* @param pList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private boolean batchHandleRepositoryData(List<PALRepositoryModel> pList) {
|
||||||
|
boolean completeSuccess = false;
|
||||||
|
Connection conn = DBSql.open();
|
||||||
|
PreparedStatement ps = null;
|
||||||
|
java.sql.ResultSet rset = null;
|
||||||
|
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
||||||
|
try {
|
||||||
|
conn.setAutoCommit(false);
|
||||||
|
String sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " SET "
|
||||||
|
+ PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + " =?, "
|
||||||
|
+ PALRepositoryModelImpl.FIELD_PL_ISSTOP + "= ?,"
|
||||||
|
+ PALRepositoryModelImpl.FIELD_PL_MODIFYDATE + " = ? WHERE "
|
||||||
|
+ PALRepositoryModelImpl.FIELD_UUID + "=?";
|
||||||
|
ps = conn.prepareStatement(sql);
|
||||||
|
for (int i = 0; i < pList.size(); i++) {
|
||||||
|
String id = pList.get(i).getId();
|
||||||
|
int isPublish = pList.get(i).isPublish() ? 1 : 0;
|
||||||
|
int isStop = pList.get(i).isStop() ? 1 : 0;
|
||||||
|
ps.setInt(1, isPublish);
|
||||||
|
ps.setInt(2, isStop);
|
||||||
|
ps.setTimestamp(3, nowTime);
|
||||||
|
ps.setString(4, id);
|
||||||
|
ps.addBatch();
|
||||||
|
}
|
||||||
|
int[] results = ps.executeBatch();
|
||||||
|
for (int i = 0; i < results.length; i++) {
|
||||||
|
if ((results[i] >= 0) || (results[i] == PreparedStatement.SUCCESS_NO_INFO)) {
|
||||||
|
completeSuccess = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (completeSuccess) {
|
||||||
|
conn.commit();
|
||||||
|
PALRepository dao = new PALRepository();
|
||||||
|
for (PALRepositoryModel model : pList) {
|
||||||
|
PALRepositoryModel model2 = dao.getInstance(model.getId());
|
||||||
|
if (model2 != null) {
|
||||||
|
PALRepositoryCache.getCache().put(model2.getId(), model2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
conn.rollback();
|
||||||
|
PALRepositoryCache.getCache().reload();
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
try {
|
||||||
|
conn.rollback();
|
||||||
|
} catch (SQLException e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
DBSql.close(conn, ps, rset);
|
||||||
|
}
|
||||||
|
return completeSuccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果集,用于批量处理数据源
|
||||||
|
* @param id
|
||||||
|
* @param isPublish
|
||||||
|
* @param isStop
|
||||||
|
* @param isApproval
|
||||||
|
*/
|
||||||
|
private void createResultMap(String name, String id, boolean isPublish, boolean isStop, boolean isApproval, List<PALRepositoryModel> pList) {
|
||||||
|
PALRepositoryModelImpl modelImpl = new PALRepositoryModelImpl();
|
||||||
|
modelImpl.setId(id);
|
||||||
|
modelImpl.setName(name);
|
||||||
|
modelImpl.setPublish(isPublish);
|
||||||
|
modelImpl.setStop(isStop);
|
||||||
|
// modelImpl.setApproval(isApproval);// 不处理
|
||||||
|
pList.add(modelImpl);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||||
|
import com.actionsoft.bpms.bo.engine.BO;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.listener.ListenerConst;
|
||||||
|
import com.actionsoft.bpms.util.UUIDGener;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
import com.actionsoft.sdk.local.api.BOQueryAPI;
|
||||||
|
|
||||||
|
public class SubFormAfterSave extends ExecuteListener {
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return "子表单保存后,拆分成多条数据保存到数据库中";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProvider() {
|
||||||
|
return "Actionsoft";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return "1.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void execute(ProcessExecutionContext param) throws Exception {
|
||||||
|
//记录ID
|
||||||
|
String boId = param.getParameterOfString(ListenerConst.FORM_EVENT_PARAM_BOID);
|
||||||
|
//表单ID
|
||||||
|
String formId = param.getParameterOfString(ListenerConst.FORM_EVENT_PARAM_FORMID);
|
||||||
|
//BO表名
|
||||||
|
String boName = param.getParameterOfString(ListenerConst.FORM_EVENT_PARAM_BONAME);
|
||||||
|
BO formData = (BO) param.getParameter(ListenerConst.FORM_EVENT_PARAM_FORMDATA);
|
||||||
|
String bindId = formData.getBindId();
|
||||||
|
String uid = formData.getCreateUser();
|
||||||
|
if (boName.equals("BO_ACT_COE_PUBLISH_N")) {
|
||||||
|
// 保存前的表单数据,注意:该参数针对不同场景获取内容会有所不同
|
||||||
|
// 主表场景获取主表数据;子表场景获取子表数据;获取不同的数据请使用BOQueryAPI获取
|
||||||
|
String publishFileId = formData.getString("PUBLISHFILEID");
|
||||||
|
String publishDesc = formData.getString("PUBLISHDESC");
|
||||||
|
|
||||||
|
BOQueryAPI boQueryAPI = SDK.getBOAPI().query(boName);
|
||||||
|
boQueryAPI = boQueryAPI.bindId(bindId);
|
||||||
|
List<BO> list = boQueryAPI.list();
|
||||||
|
StringBuilder boFileIds = new StringBuilder();
|
||||||
|
for (BO bo : list) {
|
||||||
|
if (!bo.getId().equals(formData.getId())) {
|
||||||
|
boFileIds.append(bo.get("PUBLISHFILEID"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String existedBoFileIds = boFileIds.toString();
|
||||||
|
if (publishFileId != null && publishFileId.length() > 0) {
|
||||||
|
String[] publishFileIds = publishFileId.split(",");
|
||||||
|
List<BO> boList = new ArrayList<BO>();
|
||||||
|
for (String fileId : publishFileIds) {
|
||||||
|
if (!existedBoFileIds.contains(fileId)) {
|
||||||
|
PALRepositoryModel repositoryModel = PALRepositoryCache.getCache().get(fileId);
|
||||||
|
if (repositoryModel != null) {
|
||||||
|
BO newBO = new BO();
|
||||||
|
newBO.setId(UUIDGener.getUUID());
|
||||||
|
newBO.set("PUBLISTHTYPE", "N");
|
||||||
|
newBO.set("PUBLISHFILEID", fileId);
|
||||||
|
newBO.set("PUBLISHFILENAME", repositoryModel.getName());
|
||||||
|
newBO.set("PUBLISHDESC", publishDesc);
|
||||||
|
boList.add(newBO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SDK.getBOAPI().create(boName, boList, bindId, uid);
|
||||||
|
// 该记录是否新建的状态,由于机制调整,BO对象中的ID是不为空的,不能通过ID判断记录是否处于新建状态还是修改状态
|
||||||
|
boolean isCreate = param.getParameterOfBoolean(ListenerConst.FORM_EVENT_PARAM_ISCREATE);
|
||||||
|
if (isCreate) {
|
||||||
|
SDK.getBOAPI().remove(boName, boId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (boName.equals("BO_ACT_COE_PUBLISH_S")) {
|
||||||
|
BOQueryAPI boQueryAPI = SDK.getBOAPI().query(boName);
|
||||||
|
boQueryAPI = boQueryAPI.bindId(bindId);
|
||||||
|
List<BO> list = boQueryAPI.list();
|
||||||
|
StringBuilder boFileIds = new StringBuilder();
|
||||||
|
for (BO bo : list) {
|
||||||
|
if (!bo.getId().equals(formData.getId())) {
|
||||||
|
boFileIds.append(bo.get("STOPFILEID"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String existedBoFileIds = boFileIds.toString();
|
||||||
|
|
||||||
|
String stopFileId = formData.getString("STOPFILEID");
|
||||||
|
String stopDesc = formData.getString("STOPDESC");
|
||||||
|
if (stopFileId != null && stopFileId.length() > 0) {
|
||||||
|
String[] publishFileIds = stopFileId.split(",");
|
||||||
|
List<BO> boList = new ArrayList<BO>();
|
||||||
|
for (String fileId : publishFileIds) {
|
||||||
|
if (!existedBoFileIds.contains(fileId)) {
|
||||||
|
PALRepositoryModel repositoryModel = PALRepositoryCache.getCache().get(fileId);
|
||||||
|
if (repositoryModel != null) {
|
||||||
|
BO newBO = new BO();
|
||||||
|
newBO.setId(UUIDGener.getUUID());
|
||||||
|
newBO.set("STOPTYPE", "S");
|
||||||
|
newBO.set("STOPFILEID", fileId);
|
||||||
|
newBO.set("STOPFILENAME", repositoryModel.getName());
|
||||||
|
newBO.set("STOPDESC", stopDesc);
|
||||||
|
boList.add(newBO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SDK.getBOAPI().create(boName, boList, bindId, uid);
|
||||||
|
// 该记录是否新建的状态,由于机制调整,BO对象中的ID是不为空的,不能通过ID判断记录是否处于新建状态还是修改状态
|
||||||
|
boolean isCreate = param.getParameterOfBoolean(ListenerConst.FORM_EVENT_PARAM_ISCREATE);
|
||||||
|
if (isCreate) {
|
||||||
|
SDK.getBOAPI().remove(boName, boId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.publisher.event;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.actionsoft.bpms.bo.design.model.BOItemModel;
|
||||||
|
import com.actionsoft.bpms.bo.engine.BO;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.listener.FormGridFilterListener;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.listener.FormGridRowLookAndFeel;
|
||||||
|
import com.actionsoft.bpms.bpmn.engine.listener.ListenerConst;
|
||||||
|
import com.actionsoft.bpms.form.design.model.FormItemModel;
|
||||||
|
|
||||||
|
public class SubFormGridFilterListener extends FormGridFilterListener {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FormGridRowLookAndFeel acceptRowData(ProcessExecutionContext context, List<BOItemModel> boItemList, BO boData) {
|
||||||
|
String tableName = context.getParameterOfString(ListenerConst.FORM_EVENT_PARAM_BONAME);
|
||||||
|
if (tableName.equals("BO_ACT_COE_PUBLISH_N")) {
|
||||||
|
//创建一个对象
|
||||||
|
FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel();
|
||||||
|
String fileName = boData.getString("PUBLISHFILENAME");
|
||||||
|
if (fileName != null) {
|
||||||
|
boData.set("PUBLISHFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("PUBLISHFILEID") + "\')\">" + fileName + "</a>");// 重新设定一个字段的值
|
||||||
|
}
|
||||||
|
|
||||||
|
boData.set("字段子表字段名", "|");
|
||||||
|
|
||||||
|
//处理好之后,将该对象返回
|
||||||
|
return diyLookAndFeel;
|
||||||
|
} else if (tableName.equals("BO_ACT_COE_PUBLISH_C")) {
|
||||||
|
//创建一个对象
|
||||||
|
FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel();
|
||||||
|
String fileName1 = boData.getString("CHANGEFILENAME");
|
||||||
|
if (fileName1 != null) {
|
||||||
|
boData.set("CHANGEFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("CHANGEFILEID") + "\')\">" + fileName1 + "</a>");// 重新设定一个字段的值
|
||||||
|
}
|
||||||
|
String fileName2 = boData.getString("CHANGEDFILENAMENEW");
|
||||||
|
if (fileName2 != null) {
|
||||||
|
boData.set("CHANGEDFILENAMENEW", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("CHANGEDFILEIDNEW") + "\')\">" + fileName2 + "</a>");// 重新设定一个字段的值
|
||||||
|
}
|
||||||
|
|
||||||
|
boData.set("字段子表字段名", "|");
|
||||||
|
|
||||||
|
//处理好之后,将该对象返回
|
||||||
|
return diyLookAndFeel;
|
||||||
|
} else if (tableName.equals("BO_ACT_COE_PUBLISH_S")) {
|
||||||
|
//创建一个对象
|
||||||
|
FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel();
|
||||||
|
String fileName = boData.getString("STOPFILENAME");
|
||||||
|
if (fileName != null) {
|
||||||
|
boData.set("STOPFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("STOPFILEID") + "\')\">" + fileName + "</a>");// 重新设定一个字段的值
|
||||||
|
}
|
||||||
|
boData.set("字段子表字段名", "|");
|
||||||
|
|
||||||
|
//处理好之后,将该对象返回
|
||||||
|
return diyLookAndFeel;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCustomeTableHeaderHtml(ProcessExecutionContext arg0, FormItemModel arg1, List<String> arg2) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String orderByStatement(ProcessExecutionContext arg0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user