Commit b299d9ca by 罗绍泽

activiti jar包升级(5.17-5.19)

parent 213a9961
......@@ -28,4 +28,5 @@
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="formService" factory-bean="processEngine" factory-method="getFormService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
</beans>
......@@ -40,5 +40,16 @@
<property name="sqlSessionFactory" ref="sqlSessionFactory-process" />
</bean>
</property>
<property name="procdefinitionDAO">
<bean class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.gaowj.business.procdefinition.procdefinitionDAO" />
<property name="sqlSessionFactory" ref="sqlSessionFactory-process" />
</bean>
</property>
<property name="repositoryService" ref="repositoryService"></property>
<property name="managementService" ref="managementService"></property>
</bean>
</beans>
......@@ -58,7 +58,14 @@ var ls_title="流程定义";
var is_column = [ [
{field : 'PROC_NAME',title : '流程名',width : 100,align : 'center'},
{field : 'DEPLOYMENT_KEY',title : 'KEY',width : 80,align : 'center'},
{field : 'CONTENT',title : '关联表',width : 80,align : 'center'}
{field : 'CONTENT',title : '关联表',width : 80,align : 'center'},
{field : 'DEPLOYMENT_ID',title : '部署id',width : 80,align : 'center',formatter:function(value,row,index){
if(value==null||value==''){
return '未部署';
}else{
return value;
}
}}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
......
......@@ -8,12 +8,14 @@ var procdefinitionmodelsModule = function(format) {
//定义数据交互
procdefinitionmodelsModule.prototype = BusinessObject;
//插入流程定义
//插入模板
procdefinitionmodelsModule.prototype.insertProcdefinitionmodels = function(){};
//修改流程定义
//修改模板
procdefinitionmodelsModule.prototype.updateProcdefinitionmodels = function(){};
//删除流程定义
//删除模板
procdefinitionmodelsModule.prototype.deleteProcdefinitionmodels = function(){};
//部署模板到流程定义
procdefinitionmodelsModule.prototype.deploy = function(){};
//创建一个数据操作对象,然后再后续使用
procdefinitionmodelsModule.act = new procdefinitionmodelsModule("json").delegate("procdefinitionmodelsAct");
......
......@@ -56,9 +56,9 @@ var ls_ywlx = 'YBYW';
//定义grid列表
var ls_title=null;
var is_column = [ [
{field : 'PROC_NAME',title : '流程名',width : 100,align : 'center'},
{field : 'DEPLOYMENT_KEY',title : 'KEY',width : 80,align : 'center'},
{field : 'CONTENT',title : '关联表',width : 80,align : 'center'}
{field : 'NAME',title : '模板名称',width : 100,align : 'center'},
{field : 'DESCRIPTION',title : '描述',width : 80,align : 'center'},
{field : 'KEY',title : 'KEY',width : 80,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
......@@ -74,7 +74,7 @@ function rowstyler(index,row){
}
}
//展示列表
datagrid("list", ls_title, gaowj.WEB_APP_NAME + "/procdefinitionmodelsData_list", queryData, is_column, 60, 80);
datagrid("list", ls_title, gaowj.WEB_APP_NAME + "/procdefinitionmodelsData_list", Object.assign({},$("#procdefinitionmodelsTab_searchForm").getFormVal(),queryData), is_column, 60, 80);
/****/
......@@ -98,10 +98,10 @@ function formatMenu(value, data,index) {
//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"modelList('"
+ index + "')\">模板</a>";
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"design('"
+ index + "')\">设计</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deploy('"
+ index + "')\">部署</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>";
return returnData;
}
......@@ -252,7 +252,7 @@ function refreshRow(){
* 备注:需更改
**/
function searchRow(){
var v_query = $("#procdefinitionTab_searchForm").getFormVal();
var v_query = $("#procdefinitionmodelsTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
/****/
......@@ -359,60 +359,25 @@ function uploadcommonBatchRow(){
}
/****/
function replaceByJson(text,json){
for(key in json){
text = text.replace('@{'+key+'}',json[key]);
}
return text;
}
function modelList(index){
function design(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
openViewIframRow("detail","procdefinitionView_modelList",is_row[0],"流程模板列表",true,0.65,0.95,0,0);
window.open('http://localhost:92/process-editor/modeler.jsp?modelId=' + is_row[0].ID);
}
function modelList_datagrid(is_view,is_title,is_url,is_query,is_column,is_opetipmenuwidth,optionWidth){
if(optionWidth==null || optionWidth==''){
optionWidth = 80;
}
$('#'+is_view).datagrid({
title:is_title,
iconCls:$.getJwWindowPic(),
url:is_url,
queryParams : is_query,//查询参数
rownumbers : true,//显示索引号
singleSelect : false,//是否多选
fitColumns : false,//是否撑满
autoRowHeight : false,//设定高度
rowStyler :function(index,row){return rowstyler(index,row);},
pagination : true,//分页显示
pageSize : rows,//显示行数
pageList : listPageSize,//条数选择
striped : true, //是否隔行显示
remoteSort : false,//是否从服务器排序
frozenColumns : [[
{
field : 'ck',
checkbox : true
},
{
field : 'option',
title : '操作',
width : optionWidth,
align : 'center',
formatter : formatMenu
}
]],
columns : is_column,
//toolbar : '#modelTabTb',
onLoadSuccess : function() {
if(is_opetipmenuwidth==null){
is_opetipmenuwidth = 60;
}
createOptionMenuTooltip(is_opetipmenuwidth);
dataOnLoadSuccess();
function deploy(index){
$.messager.confirm('警告', '您确定需要部署该模板吗?', function(r) {
if (r) {
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var v_result=procdefinitionmodelsModule.act.deploy({
FIELD_PROCID:$("#PROCID").val(),
FIELD_MODELID:is_row[0].ID
});
$.messager.alert('提示',v_result.VALUE);
}
});
}
\ No newline at end of file
......@@ -12,43 +12,57 @@ import com.gaowj.business.util.Page;
public interface ProcdefinitionmodelsBusiness {
/**
* 插入
*
* @param entity
* @throws BusinessException
*/
Map<String,Object> insert_procde_finition_models(Map<String,Object> entity) throws BusinessException ;
Map<String, Object> insert_procde_finition_models(Map<String, Object> entity) throws BusinessException;
/**
* 更新
*
* @param entity
* @throws BusinessException
*/
void update_procde_finition_models(Map<String,Object> entity) throws BusinessException ;
/**
void update_procde_finition_models(Map<String, Object> entity) throws BusinessException;
/**
* 删除记录
*
* @param entity
* @throws BusinessException
*/
void delete_procde_finition_models(List<String> list)throws BusinessException;
/**
void delete_procde_finition_models(List<String> list) throws BusinessException;
/**
* 分页获取记录
*
* @param entity
* @throws BusinessException
*/
Page<Map<String, Object>> list_procde_finition_models(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ;
/**
Page<Map<String, Object>> list_procde_finition_models(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
/**
* 获取所有记录
*
* @param entity
* @throws BusinessException
*/
List<Map<String,Object>> list_procde_finition_models(Map<String, Object> query) throws BusinessException ;
/**
List<Map<String, Object>> list_procde_finition_models(Map<String, Object> query) throws BusinessException;
/**
* 获取所有记录数
*
* @param entity
* @throws BusinessException
*/
int listCount_procde_finition_models(Map<String, Object> query) throws BusinessException ;
int listCount_procde_finition_models(Map<String, Object> query) throws BusinessException;
/**
* 模板部署
*
* @param query
* @throws BusinessException
*/
void deploy(Map<String, Object> query) throws BusinessException;
}
......@@ -4,6 +4,7 @@ import java.util.List;
import java.util.Map;
import com.gaowj.business.ProcdefinitionBusiness;
import com.gaowj.business.ProcdefinitionmodelsBusiness;
import com.gaowj.business.StudentBusiness;
import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction;
......@@ -38,8 +39,8 @@ public class actAction extends BasicAction {
* @param entity
* @throws BusinessException
*/
public String insertProcdefinition() throws BusinessException {
ProcdefinitionBusiness business = BusinessManager.getBusiness(ProcdefinitionBusiness.class);
public String insertProcdefinitionmodels() throws BusinessException {
ProcdefinitionmodelsBusiness business = BusinessManager.getBusiness(ProcdefinitionmodelsBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
......@@ -48,12 +49,12 @@ public class actAction extends BasicAction {
//去除不要更新的字段
entity.remove("OPETYPE");
//新增
Map<String,Object> procdefinition=business.insert_procde_finition(entity);
Map<String,Object> procdefinitionmodels=business.insert_procde_finition_models(entity);
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("insertProcdefinition", "" + entity,
"增加流程定义数据", (String) entity.get("UUID"), (String) entity.get("CONTENT"), "procdefinition");
sysbusiness.insert_logBusiness("insertProcdefinitionmodels", "" + procdefinitionmodels,
"增加流程定义模板数据", (String) entity.get("UUID"), (String) entity.get("CONTENT"), "procdefinitionmodels");
//
//
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
......@@ -64,8 +65,8 @@ public class actAction extends BasicAction {
return "json";
}
public String updateProcdefinition() throws BusinessException {
ProcdefinitionBusiness business = BusinessManager.getBusiness(ProcdefinitionBusiness.class);
public String updateProcdefinitionmodels() throws BusinessException {
ProcdefinitionmodelsBusiness business = BusinessManager.getBusiness(ProcdefinitionmodelsBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
......@@ -74,12 +75,12 @@ public class actAction extends BasicAction {
//去除不要更新的字段
entity.remove("OPETYPE");
//新增
business.update_procde_finition(entity);
business.update_procde_finition_models(entity);
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("updateProcdefinition", "" + entity,
"修改流程定义数据", (String) entity.get("UUID"), (String) entity.get("CONTENT"), "procdefinition");
sysbusiness.insert_logBusiness("updateProcdefinitionmodels", "" + entity,
"修改流程定义模板数据", (String) entity.get("UUID"), (String) entity.get("CONTENT"), "procdefinitionmodels");
//
//
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
......@@ -90,18 +91,18 @@ public class actAction extends BasicAction {
return "json";
}
public String deleteProcdefinition() throws BusinessException {
ProcdefinitionBusiness business = BusinessManager.getBusiness(ProcdefinitionBusiness.class);
public String deleteProcdefinitionmodels() throws BusinessException {
ProcdefinitionmodelsBusiness business = BusinessManager.getBusiness(ProcdefinitionmodelsBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_procde_finition(ListKey);
business.delete_procde_finition_models(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteProcdefinition", "" + ListKey,
"删除流程定义数据", deletekey, "多个流水号","procdefinition");
sysbusiness.insert_logBusiness("deleteProcdefinitionmodels", "" + ListKey,
"删除流程定义模板数据", deletekey, "多个流水号","procdefinitionmodels");
//
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
......@@ -111,5 +112,25 @@ public class actAction extends BasicAction {
}
return "json";
}
public String deploy() throws BusinessException {
ProcdefinitionmodelsBusiness business = BusinessManager.getBusiness(ProcdefinitionmodelsBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
business.deploy(entity);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deploy", "" + entity,
"部署流程定义模板数据", (String) entity.get("UUID"), (String) entity.get("CONTENT"), "procdefinitionmodels");
//
jsonObject.putAll(Status.getStatusSuccessMessage("部署成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("部署失败"));
e.printStackTrace();
}
return "json";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment