Commit 992810eb by 罗绍泽

表定义修改,流程实例修改,licensen修改,当前环节高亮图实现

parent 8390de86
#Mon Mar 10 11:34:19 CST 2014
classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:jdk1.6.0_31/owners=jst.java\:6.0
eclipse.preferences.version=1
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="jfV5lcyq"> <wb-module deploy-name="jfV5lcyq">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_process"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_test"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src_test"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_system"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src_system"/>
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_utils"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src_utils"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_jwapp"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src_jwapp"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_standard"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src_standard"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_process"/>
<property name="java-output-path" value="build/classes"/> <property name="java-output-path" value="build/classes"/>
<property name="context-root" value="jfV5lcyq"/> <property name="context-root" value="jfV5lcyq"/>
</wb-module> </wb-module>
......
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
<property name="databaseSchemaUpdate" value="true" /> <property name="databaseSchemaUpdate" value="true" />
<!-- 设置字体,防止流程图生成时候产生乱码 --> <!-- 设置字体,防止流程图生成时候产生乱码 -->
<property name="activityFontName" value="宋体"></property> <property name="activityFontName" value="宋体"></property>
<!-- 设置字体,防止xml生成时候产生乱码 -->
<property name="labelFontName" value="宋体"></property> <property name="labelFontName" value="宋体"></property>
<!-- 设置字体,防止xml生成时候产生乱码 -->
<property name="xmlEncoding" value="GBK"></property>
</bean> </bean>
<!-- 创建流程引擎对象 --> <!-- 创建流程引擎对象 -->
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean"> <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<value>classpath:com/gaowj/business/formfield/formfieldDAO.xml</value> <value>classpath:com/gaowj/business/formfield/formfieldDAO.xml</value>
<value>classpath:com/gaowj/business/formmodels/formmodelsDAO.xml</value> <value>classpath:com/gaowj/business/formmodels/formmodelsDAO.xml</value>
<value>classpath:com/gaowj/business/procdefinitionInitlink/procdefinitionInitlinkDAO.xml</value> <value>classpath:com/gaowj/business/procdefinitionInitlink/procdefinitionInitlinkDAO.xml</value>
<value>classpath:com/gaowj/business/procinstance/procinstanceDAO.xml</value>
</list> </list>
</property> </property>
</bean> </bean>
...@@ -40,6 +41,10 @@ ...@@ -40,6 +41,10 @@
<property name="mapperInterface" value="com.gaowj.business.procdefinitionInitlink.procdefinitionInitlinkDAO" /> <property name="mapperInterface" value="com.gaowj.business.procdefinitionInitlink.procdefinitionInitlinkDAO" />
<property name="sqlSessionFactory" ref="sqlSessionFactory-process" /> <property name="sqlSessionFactory" ref="sqlSessionFactory-process" />
</bean> </bean>
<bean id="procinstanceDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.gaowj.business.procinstance.procinstanceDAO" />
<property name="sqlSessionFactory" ref="sqlSessionFactory-process" />
</bean>
<!-- DAO定义结束 --> <!-- DAO定义结束 -->
<bean id="FormtableBusiness" class="com.gaowj.business.formtable.FormtableBusinessImpl"> <bean id="FormtableBusiness" class="com.gaowj.business.formtable.FormtableBusinessImpl">
...@@ -80,6 +85,12 @@ ...@@ -80,6 +85,12 @@
<bean id="ProcinstanceBusiness" class="com.gaowj.business.procinstance.ProcinstanceBusinessImpl"> <bean id="ProcinstanceBusiness" class="com.gaowj.business.procinstance.ProcinstanceBusinessImpl">
<property name="runtimeService" ref="runtimeService"></property> <property name="runtimeService" ref="runtimeService"></property>
<property name="procdefinitionDAO" ref="procdefinitionDAO"></property>
<property name="formtableDAO" ref="formtableDAO"></property>
<property name="procinstanceDAO" ref="procinstanceDAO"></property>
<property name="taskService" ref="taskService"></property>
<property name="historyService" ref="historyService"></property>
<property name="repositoryService" ref="repositoryService"></property>
</bean> </bean>
<bean id="ProcdefinitionInitLinkBusiness" class="com.gaowj.business.procdefinitionInitlink.ProcdefinitionInitLinkBusinessImpl"> <bean id="ProcdefinitionInitLinkBusiness" class="com.gaowj.business.procdefinitionInitlink.ProcdefinitionInitLinkBusinessImpl">
......
...@@ -278,3 +278,77 @@ function notleafToUnchecked(data){ ...@@ -278,3 +278,77 @@ function notleafToUnchecked(data){
} }
} }
} }
/**
* 流程编辑页面
* @returns {Boolean}
*/
function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,is_top){
$('#detail').dialog( {
title : is_title,
iconCls : $.getJwWindowPic(),
width : ls_width * is_width,
height :ls_height * is_height,
closed : false,
cache : false,
maximizable:is_max,
left:is_left,
top:is_top,
href : editUrl,
queryParams:get_FIELD(is_row),
modal : true,
buttons : [ {
text : '保存',
iconCls : 'icon-ok',
handler : function() {
saveBox('detail','list');
}
}, {
text : '下一步',
iconCls : 'icon-ok',
handler : function() {
nextBox('detail','list');
}
}, {
text : '关闭',
iconCls : 'icon-back',
handler : function() {
closeBox('detail');
}
} ],
onLoad:function editUrlOnload(){
if(is_row.OPETYPE=='insert'){
addUrlOnloadCallback(is_row);
}else{
updateUrlOnloadCallback(is_row);
}
}
});
}
/****/
//弹出层流程编辑下一步按扭
function nextBox(Box_id,List_id) {
if(Box_id==null||Box_id==''||Box_id==undefined)
Box_id='detail';
if(List_id==null||List_id==''||List_id==undefined)
List_id='list';
var returnIsValid = $('#inputForm').form('validate');
if (returnIsValid) {
//$("#inputForm").submit();
var query = $("#inputForm").getFormVal();
var v_result;
if ($('#OPETYPE').val() == null || $('#OPETYPE').val() == undefined
|| $('#OPETYPE').val() == '' || $('#OPETYPE').val()=='insert'){
v_result = insertData(query);
}
else{
v_result = updateData(query);
}
if (v_result != null && v_result != undefined) {
closeBox(Box_id);
$.messager.alert('提示', v_result.VALUE);
}
}
}
/****/
\ No newline at end of file
<%@page contentType="text/html; charset=UTF-8"%> <%@page contentType="text/html; charset=UTF-8"%>
<style>
.fieldTable{
border:1px solid;
}
</style>
<form id="inputForm" method="post" style="width: 100%;"> <form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" /> <input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" /> <input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" /> <input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;"> <table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
...@@ -6,28 +11,22 @@ ...@@ -6,28 +11,22 @@
<td style="width: 15%;" class="tableStyleLable"> <td style="width: 15%;" class="tableStyleLable">
<span>表名:</span> <span>表名:</span>
</td> </td>
<td style="width: 30%"> <td style="width: 80%">
<input class="easyui-textbox" required="required" id="TABLE_NAME" name="FIELD_TABLE_NAME" value="${is_row.TABLE_NAME}" style="width:200px" /> <input class="easyui-textbox" required="required" id="TABLE_NAME" name="FIELD_TABLE_NAME" value="${is_row.TABLE_NAME}" style="width:200px" />
</td> </td>
<td style="width: 15%;" class="tableStyleLable">
<span>同步数据库状态:</span>
</td>
<td style="width: 30%">
<input id="IS_DBSYNCH" name="FIELD_IS_DBSYNCH" value="0"/>
</td>
</tr> </tr>
<td class="tableStyleLable"> <td class="tableStyleLable">
<span>描述:</span> <span>描述:</span>
</td> </td>
<td colspan="3"> <td>
<input class="easyui-textbox" required="required" id="CONTENT" name="FIELD_CONTENT" value="${is_row.CONTENT}" style="width:570px" /> <input class="easyui-textbox" required="required" id="CONTENT" name="FIELD_CONTENT" value="${is_row.CONTENT}" style="width:200px" />
</td> </td>
</tr> </tr>
</table> </table>
<div> <div>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addLine()">插入一行</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addLine()">插入一行</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteLine()">删除行</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteLine()">删除行</a>
</div> </div>
<table id="fieldTable"> <div style="overflow:auto;width:98%;border:1px solid #ccc;"><table id="fieldTable"></div>
</table> </table>
</form> </form>
\ No newline at end of file
...@@ -15,7 +15,7 @@ procdefinitionModule.prototype.updateProcdefinition = function(){}; ...@@ -15,7 +15,7 @@ procdefinitionModule.prototype.updateProcdefinition = function(){};
//删除流程定义 //删除流程定义
procdefinitionModule.prototype.deleteProcdefinition = function(){}; procdefinitionModule.prototype.deleteProcdefinition = function(){};
//获取流程定义列表 //获取流程定义列表
procdefinitionModule.prototype.list = function(){}; procdefinitionModule.prototype.listAll = function(){};
//查找流程定义对应的表模板 //查找流程定义对应的表模板
procdefinitionModule.prototype.findFormModel = function(){}; procdefinitionModule.prototype.findFormModel = function(){};
......
...@@ -57,8 +57,8 @@ var v_formtable_data=formtableModule.data.listFormTable(); ...@@ -57,8 +57,8 @@ var v_formtable_data=formtableModule.data.listFormTable();
var ls_title="流程定义"; var ls_title="流程定义";
var is_column = [ [ var is_column = [ [
{field : 'PROC_NAME',title : '流程名',width : 100,align : 'center'}, {field : 'PROC_NAME',title : '流程名',width : 100,align : 'center'},
{field : 'DEPLOYMENT_KEY',title : 'KEY',width : 80,align : 'center'}, {field : 'DEPLOYMENT_KEY',title : 'KEY',width : 240,align : 'center'},
{field : 'CONTENT',title : '关联表',width : 80,align : 'center'}, {field : 'CONTENT',title : '关联表',width : 100,align : 'center'},
{field : 'DEPLOYMENT_ID',title : '部署id',width : 80,align : 'center',formatter:function(value,row,index){ {field : 'DEPLOYMENT_ID',title : '部署id',width : 80,align : 'center',formatter:function(value,row,index){
if(value==null||value==''){ if(value==null||value==''){
return '未部署'; return '未部署';
......
...@@ -18,13 +18,5 @@ ...@@ -18,13 +18,5 @@
<input class="easyui-textbox" data-options="required:true" id="TABLE_ID" name="FIELD_TABLE_ID" style="width:200px" /> <input class="easyui-textbox" data-options="required:true" id="TABLE_ID" name="FIELD_TABLE_ID" style="width:200px" />
</td> </td>
</tr> </tr>
<tr>
<td class="tableStyleLable">
<span>KEY:</span>
</td>
<td>
<input class="easyui-textbox" data-options="required:true" id="DEPLOYMENT_KEY" name="FIELD_DEPLOYMENT_KEY" style="width:200px" />
</td>
</tr>
</table> </table>
</form> </form>
\ No newline at end of file
...@@ -101,7 +101,8 @@ function formatMenu(value, data,index) { ...@@ -101,7 +101,8 @@ function formatMenu(value, data,index) {
//上浮横向菜单集里的具体菜单项(需更改) //上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(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=\"design('" 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-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"configureUser('"
+ 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> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>"; + index + "')\">删除</a>";
return returnData; return returnData;
...@@ -381,5 +382,8 @@ function deploy(index){ ...@@ -381,5 +382,8 @@ function deploy(index){
$.messager.alert('提示',v_result.VALUE); $.messager.alert('提示',v_result.VALUE);
} }
}); });
}
function configureUser(index){
} }
//此乃本模块与后台交互的方法接口部分
var procinstanceModule = function(format) {
this.module = "";
this.action = "";
this.format = format;
};
//定义数据交互
procinstanceModule.prototype = BusinessObject;
//插入流程实例
procinstanceModule.prototype.insertInfo = function(){};
//修改流程实例
procinstanceModule.prototype.updateInfo = function(){};
//删除流程实例
procinstanceModule.prototype.deleteInfo = function(){};
//创建一个数据操作对象,然后再后续使用
procinstanceModule.act = new procinstanceModule("json").delegate("procinstanceAct");
//创建一个数据获取对象,然后再后续使用
procinstanceModule.data = new procinstanceModule("json").delegate("procinstanceData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
// 3、前后台增删改的返回状态 如:json[{'0':{'rowSet':{'NAME':'-1','VALUE':'保存失败'}}}]
...@@ -70,10 +70,20 @@ for(var i=1;i<v_data_procdefinition.length;i++){ ...@@ -70,10 +70,20 @@ for(var i=1;i<v_data_procdefinition.length;i++){
**/ **/
//定义grid列表 //定义grid列表
var ls_title=null; var ls_title=null;
var is_column = [ [ var is_column = [[
{field : 'NAME',title : '模板名称',width : 100,align : 'center'}, {field:'PROC_NAME',title:'流程',width:100},
{field : 'KEY',title : 'KEY',width : 80,align : 'center'} {field:'INSTANCE_ID',title:'实例id',width:80},
] ]; {field:'CREATE_TIME',title:'新建时间',width:130,formatter:function(value,row,index){
return value;
}},
{field:'COMPLETE',title:'进度',width:80,formatter:function(value,row,index){
if(value==0){
return "进行中";
}else{
return "完成";
}
}}
]];
//列表加载完成回调 //列表加载完成回调
function dataOnLoadSuccess(){ function dataOnLoadSuccess(){
...@@ -112,8 +122,8 @@ function formatMenu(value, data,index) { ...@@ -112,8 +122,8 @@ function formatMenu(value, data,index) {
//上浮横向菜单集里的具体菜单项(需更改) //上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(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=\"design('" var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"showProcinstanceImg('"
+ 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-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> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>"; + index + "')\">删除</a>";
return returnData; return returnData;
...@@ -145,7 +155,7 @@ function addRow(){ ...@@ -145,7 +155,7 @@ function addRow(){
} }
var is_row={OPETYPE:'insert',PROCDEFINITION_UUID:procdefinitionUuid}; var is_row={OPETYPE:'insert',PROCDEFINITION_UUID:procdefinitionUuid};
openEditRow("procinstanceView_procinstanceTabDetail",is_row,"新增",true,0.95,0.95,0,0); openProcEditRow("procinstanceView_procinstanceTabDetail",is_row,"新增",true,0.95,0.95,0,0);
} }
//加载增加子页面成功后的回调 //加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){ function addUrlOnloadCallback(is_row){
...@@ -163,8 +173,8 @@ function addUrlOnloadCallback(is_row){ ...@@ -163,8 +173,8 @@ function addUrlOnloadCallback(is_row){
} }
//保存 //保存
function insertData(is_entity){ function insertData(is_entity){
is_entity.FIELD_PROCID=$("#PROCID").val(); is_entity.FIELD_PROCID=$('#detail #FIELD_PROCDEFINITION_UUID').combobox("getValue");
var v_result = procdefinitionmodelsModule.act.insertProcdefinitionmodels(is_entity); var v_result = procinstanceModule.act.insertInfo(is_entity);
$('#list').datagrid('reload'); $('#list').datagrid('reload');
return v_result; return v_result;
} }
...@@ -282,8 +292,53 @@ function refreshRow(){ ...@@ -282,8 +292,53 @@ function refreshRow(){
* 备注:需更改 * 备注:需更改
**/ **/
function searchRow(){ function searchRow(){
var v_query = $("#procdefinitionmodelsTab_searchForm").getFormVal(); var v_query = $("#procinstanceTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query); var FIELD_PROCDEFINITION_UUID=$('#FIELD_PROCDEFINITION_UUID').combobox('getValue');
if(FIELD_PROCDEFINITION_UUID=='-- 全部 --'||FIELD_PROCDEFINITION_UUID==''){
delete v_query.FIELD_PROCDEFINITION_UUID;
$('#list').datagrid({
columns:is_column,
queryParams:v_query
});
}else {
$('#list').datagrid({
columns : [ [ {
field : 'PEOPLE',
title : '请假人',
width : 80
}, {
field : 'REASON',
title : '原因',
width : 80
}, {
field : 'INSTANCE_ID',
title : '环节',
width : 80
}, {
field : 'CREATE_TIME',
title : '新建时间',
width : 130,
formatter : function(value, row, index) {
return value;
}
},
{
field : 'COMPLETE',
title : '进度',
width : 80,
formatter : function(value, row, index) {
if (value == 0) {
return "进行中";
} else {
return "完成";
}
}
} ] ],
queryParams:v_query
});
}
//$('#list').datagrid('load',v_query);
} }
/****/ /****/
...@@ -403,3 +458,16 @@ function fillTable(){ ...@@ -403,3 +458,16 @@ function fillTable(){
$("#table_content").html(table_content.MODEL_CONTENT); $("#table_content").html(table_content.MODEL_CONTENT);
} }
} }
function showProcinstanceImg(index) {
$('#list').datagrid('selectRow', index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
easyui.dialog({
width : 1000,
height : 500,
title : '流程图',
content:'<img src="procinstanceData_showProcinstanceImg?instanceId='+is_row[0].INSTANCE_ID+'" />'
});
}
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
流程: <input class="easyui-textbox" id="FIELD_PROCDEFINITION_UUID" name="FIELD_PROCDEFINITION_UUID" style="width:200px" value="${is_row.PROCDEFINITION_UUID}"/>&nbsp;&nbsp; 流程: <input class="easyui-textbox" id="FIELD_PROCDEFINITION_UUID" name="FIELD_PROCDEFINITION_UUID" style="width:200px" value="${is_row.PROCDEFINITION_UUID}"/>&nbsp;&nbsp;
</form> </form>
<form id="inputForm" method="post" style="width: 100%;"> <form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" /> <input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" /> <input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" />
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" />
<div id="table_content"></div> <div id="table_content"></div>
</form> </form>
\ No newline at end of file
...@@ -6,8 +6,8 @@ userDefaultPass = 0000 ...@@ -6,8 +6,8 @@ userDefaultPass = 0000
uploadPath=c:/temp/ uploadPath=c:/temp/
uploadMaxSize=10485760 uploadMaxSize=10485760
#------------license---------------------------- #------------license----------------------------
licensenumber=A010000002 licensenumber=A010000003
licensedsoftware=A040000002 licensedsoftware=A040000007
licensemaccharset=gbk licensemaccharset=gbk
licensemacshowcmd=false licensemacshowcmd=false
licensemacadress=00-21-CC-C9-D2-29 licensemacadress=00-21-CC-C9-D2-29
......
...@@ -95,6 +95,14 @@ ...@@ -95,6 +95,14 @@
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
<result name="download" type="stream">
<!-- 下载的文件数据存放的方法,该方法返回一个InputStream 例如取值为inputStream的属性需要编写getInputStream()方法 -->
<param name="inputName">inputStream</param>
<!--下载时,客户端显示的下载的文件名 -->
<param name="contentDisposition"> filename=${fileName}</param>
<!-- 数据的缓冲大小 -->
<param name="bufferSize">1024</param>
</result>
</action> </action>
</package> </package>
</struts> </struts>
...@@ -3,6 +3,8 @@ package com.gaowj.activiti.listener; ...@@ -3,6 +3,8 @@ package com.gaowj.activiti.listener;
import org.activiti.engine.delegate.DelegateTask; import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener; import org.activiti.engine.delegate.TaskListener;
import com.gaowj.business.util.SessionUtil;
public class AssignmentTaskListener implements TaskListener { public class AssignmentTaskListener implements TaskListener {
/** /**
...@@ -12,7 +14,25 @@ public class AssignmentTaskListener implements TaskListener { ...@@ -12,7 +14,25 @@ public class AssignmentTaskListener implements TaskListener {
@Override @Override
public void notify(DelegateTask task) { public void notify(DelegateTask task) {
task.setAssignee("xiaohong"); /*System.out.println(task.getAssignee());
System.out.println(task.getCategory());
System.out.println(task.getDescription());
System.out.println(task.getEventName());
System.out.println(task.getExecutionId());
System.out.println(task.getFormKey());
System.out.println(task.getId());
System.out.println(task.getName());
System.out.println(task.getOwner());
System.out.println(task.getPriority());
System.out.println(task.getProcessDefinitionId());
System.out.println(task.getProcessInstanceId());
System.out.println(task.getTaskDefinitionKey());
System.out.println(task.getTenantId());
System.out.println(task.getVariables().toString());*/
task.setAssignee(SessionUtil.getCode());
//
} }
} }
...@@ -12,36 +12,41 @@ public interface FormfieldBusiness { ...@@ -12,36 +12,41 @@ public interface FormfieldBusiness {
/** /**
* 插入 * 插入
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
void insert_form_field(Map<String,Object> entity) throws BusinessException ; void insert_form_field(Map<String, Object> entity) throws BusinessException;
/** /**
* 更新 * 更新
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
void update_form_field(Map<String,Object> entity) throws BusinessException ; void update_form_field(List<Map<String, Object>> list, String tableId) throws BusinessException;
/** /**
* 删除记录 * 删除记录
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
void delete_form_field(List<String> list)throws BusinessException; void delete_form_field(List<String> list) throws BusinessException;
/** /**
* 根据tableid做删除 * 根据tableid做删除
*
* @param list * @param list
* @throws BusinessException * @throws BusinessException
*/ */
void delete_form_field_byTableid(List<String> list)throws BusinessException; void delete_form_field_byTableid(List<String> list) throws BusinessException;
List<Map<String,Object>> list_form_field(Map<String, Object> query) throws BusinessException; List<Map<String, Object>> list_form_field(Map<String, Object> query) throws BusinessException;
/** /**
* 根据tableid做查询 * 根据tableid做查询
*
* @param tableid * @param tableid
* @return * @return
* @throws BusinessException * @throws BusinessException
......
package com.gaowj.business; package com.gaowj.business;
import java.io.InputStream;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -57,4 +58,14 @@ public interface ProcinstanceBusiness { ...@@ -57,4 +58,14 @@ public interface ProcinstanceBusiness {
* @throws BusinessException * @throws BusinessException
*/ */
int listCount_proc_instance(Map<String, Object> query) throws BusinessException; int listCount_proc_instance(Map<String, Object> query) throws BusinessException;
/**
* 根据流程实例id获取流程图(当前环节高亮显示)
*
* @param instanceId
* @param filename
* @return
* @throws BusinessException
*/
InputStream viewPic(String instanceId, StringBuffer filename) throws BusinessException;
} }
...@@ -63,29 +63,18 @@ public class FormfieldBusinessImpl implements FormfieldBusiness{ ...@@ -63,29 +63,18 @@ public class FormfieldBusinessImpl implements FormfieldBusiness{
} }
formfieldDAO.insert_form_field(entity); formfieldDAO.insert_form_field(entity);
entity.clear(); entity.clear();
} }
@Override @Override
public void update_form_field(Map<String, Object> entity) public void update_form_field(List<Map<String, Object>> list,String tableId)
throws BusinessException { throws BusinessException {
// TODO Auto-generated method stub //清除原先的所有字段信息
List<Map<String, Object>> updateList = new ArrayList<Map<String, Object>>(); List<String> listTable=new ArrayList<String>();
listTable.add(tableId);
if(entity.keySet()!=null){ formfieldDAO.delete_form_field_byTableid(listTable);
Set<String> key = entity.keySet(); //插入现在的字段信息
Map<String, Object> param=new HashMap<String, Object>(); for(Map<String, Object> field:list){
// 将map集合中的key和value 取出来分别放到list集合里 insert_form_field(field);
for (String str : key) {
Map<String, Object> updateMap = new HashMap<String, Object>();
if (StringUtils.equalsIgnoreCase("UUID",str)) continue;
updateMap.put("key", str);
updateMap.put("value", entity.get(str));
updateList.add(updateMap);
}
param.put("UUID", entity.get("UUID"));
param.put("info", updateList);
formfieldDAO.update_form_field(param);
} }
} }
......
...@@ -7,6 +7,7 @@ import java.util.HashMap; ...@@ -7,6 +7,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.UUID;
import org.activiti.engine.RepositoryService; import org.activiti.engine.RepositoryService;
import org.activiti.engine.delegate.Expression; import org.activiti.engine.delegate.Expression;
...@@ -22,11 +23,10 @@ import org.apache.ibatis.session.RowBounds; ...@@ -22,11 +23,10 @@ import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.ProcdefinitionBusiness; import com.gaowj.business.ProcdefinitionBusiness;
import com.gaowj.business.exception.BusinessException; import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.procdefinitionInitlink.procdefinitionInitlinkDAO; import com.gaowj.business.procdefinitionInitlink.procdefinitionInitlinkDAO;
import com.gaowj.business.formmodels.formmodelsDAO;
import com.gaowj.business.util.Page; import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil; import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.formmodels.formmodelsDAO;
public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness { public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
private procdefinitionDAO procdefinitionDAO; private procdefinitionDAO procdefinitionDAO;
...@@ -90,6 +90,7 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness { ...@@ -90,6 +90,7 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
if (entity.get("UPDATE_TIME") == null) { if (entity.get("UPDATE_TIME") == null) {
entity.put("UPDATE_TIME", new Date()); entity.put("UPDATE_TIME", new Date());
} }
entity.put("DEPLOYMENT_KEY", UUID.randomUUID().toString());
// 动态传值插入 // 动态传值插入
List<String> infoListKey = new ArrayList<String>(); List<String> infoListKey = new ArrayList<String>();
...@@ -113,6 +114,8 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness { ...@@ -113,6 +114,8 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
// 动态传值修改 // 动态传值修改
if (entity.keySet() != null) { if (entity.keySet() != null) {
convertEntity(entity); convertEntity(entity);
//禁止修改key值
entity.remove("DEPLOYMENT_KEY");
procdefinitionDAO.update_procde_finition(entity); procdefinitionDAO.update_procde_finition(entity);
entity.remove("info"); entity.remove("info");
} }
......
...@@ -19,4 +19,6 @@ public interface procdefinitionDAO { ...@@ -19,4 +19,6 @@ public interface procdefinitionDAO {
List<Map<String, Object>> list_procde_finition(Map<String, Object> query) throws BusinessException; List<Map<String, Object>> list_procde_finition(Map<String, Object> query) throws BusinessException;
int listCount_procde_finition(Map<String, Object> query) throws BusinessException; int listCount_procde_finition(Map<String, Object> query) throws BusinessException;
void insert_custom_business(Map<String, Object> entity) throws BusinessException;
} }
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<![CDATA[ <![CDATA[
select f.* select f.*
from ( from (
SELECT a.*,b.content FROM c_t_proc_definition a SELECT a.*,b.content,b.table_name FROM c_t_proc_definition a
LEFT JOIN c_t_form_table b ON a.table_id=b.uuid LEFT JOIN c_t_form_table b ON a.table_id=b.uuid
) f ) f
]]> ]]>
...@@ -73,4 +73,19 @@ ...@@ -73,4 +73,19 @@
<include refid="Where_Clause" /> <include refid="Where_Clause" />
</select> </select>
<insert id="insert_custom_business" parameterType="map">
insert into ${tableName}(
<trim prefix="" suffixOverrides=",">
<foreach collection="infoListKey" item="key">
${key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="infoList" item="value">
#{value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
</mapper> </mapper>
\ No newline at end of file
...@@ -247,7 +247,7 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus ...@@ -247,7 +247,7 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus
String processName = modelData.getName() + ".bpmn20.xml"; String processName = modelData.getName() + ".bpmn20.xml";
Deployment deployment = repositoryService.createDeployment().name(modelData.getName()).addString(processName, new String(bpmnBytes)).deploy(); Deployment deployment = repositoryService.createDeployment().name(modelData.getName()).addString(processName, new String(bpmnBytes),"GBK").deploy();
// 将部署id存入流程定义表 // 将部署id存入流程定义表
Map<String, Object> entity = new HashMap<String, Object>(); Map<String, Object> entity = new HashMap<String, Object>();
entity.put("UUID", procId); entity.put("UUID", procId);
......
package com.gaowj.business.procinstance; package com.gaowj.business.procinstance;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface procinstanceDAO { public interface procinstanceDAO {
void insert_proc_instance(Map<String, Object> entity) throws BusinessException;
void update_proc_instance(Map<String, Object> entity) throws BusinessException;
void delete_proc_instance(List<String> list) throws BusinessException;
List<Map<String, Object>> list_proc_instance(RowBounds rowbounds, Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_proc_instance(Map<String, Object> query) throws BusinessException;
int listCount_proc_instance(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_proc_instance_all(RowBounds rowbounds, Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_proc_instance_all(Map<String, Object> query) throws BusinessException;
int listCount_proc_instance_all(Map<String, Object> query) throws BusinessException;
} }
...@@ -9,16 +9,10 @@ ...@@ -9,16 +9,10 @@
<if test="PROC_DEFINITION_ID != null and PROC_DEFINITION_ID != ''"> <if test="PROC_DEFINITION_ID != null and PROC_DEFINITION_ID != ''">
and f.PROC_DEFINITION_ID = #{PROC_DEFINITION_ID} and f.PROC_DEFINITION_ID = #{PROC_DEFINITION_ID}
</if> </if>
<if test="listUUID != null and listUUID != ''">
and f.UUID IN
<foreach collection="listUUID" item="oneUUID" open="(" close=")" separator=",">
#{oneUUID}
</foreach>
</if>
</trim> </trim>
</sql> </sql>
<insert id="insert_procde_finition_models" parameterType="map"> <insert id="insert_proc_instance" parameterType="map">
insert into C_T_PROC_DEFINITION_MODELS( insert into C_T_PROC_INSTANCE(
<trim prefix="" suffixOverrides=","> <trim prefix="" suffixOverrides=",">
<foreach collection="infoListKey" item="key"> <foreach collection="infoListKey" item="key">
${key}, ${key},
...@@ -33,9 +27,9 @@ ...@@ -33,9 +27,9 @@
<![CDATA[ ) ]]> <![CDATA[ ) ]]>
</insert> </insert>
<update id="update_procde_finition_models" parameterType="map"> <update id="update_proc_instance" parameterType="map">
<![CDATA[ <![CDATA[
update C_T_PROC_DEFINITION_MODELS set update C_T_PROC_INSTANCE set
]]> ]]>
<trim prefix="" suffixOverrides=","> <trim prefix="" suffixOverrides=",">
<foreach collection="info" item="info"> <foreach collection="info" item="info">
...@@ -49,9 +43,9 @@ ...@@ -49,9 +43,9 @@
</where> </where>
</update> </update>
<delete id="delete_procde_finition_models" parameterType="list"> <delete id="delete_proc_instance" parameterType="list">
<![CDATA[ <![CDATA[
delete from C_T_PROC_DEFINITION_MODELS where UUID IN delete from C_T_PROC_INSTANCE where UUID IN
]]> ]]>
<foreach collection="list" item="UUID" open="(" separator="," <foreach collection="list" item="UUID" open="(" separator=","
close=")"> close=")">
...@@ -59,19 +53,54 @@ ...@@ -59,19 +53,54 @@
</foreach> </foreach>
</delete> </delete>
<select id="list_procde_finition_models" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_proc_instance" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select f.*
from (
SELECT t.*,ins.proc_definition_id,ins.instance_id,ins.complete FROM ${tableName} t
LEFT JOIN c_t_proc_instance ins
ON t.uuid=ins.business_id
) f
]]>
<include refid="Where_Clause" />
order by f.CREATE_TIME DESC
</select>
<select id="listCount_proc_instance" parameterType="map"
resultType="int">
<![CDATA[
select count(*) c from
(
SELECT t.*,ins.proc_definition_id,ins.instance_id FROM ${tableName} t
LEFT JOIN c_t_proc_instance ins
ON t.uuid=ins.business_id
)
f
]]>
<include refid="Where_Clause" />
</select>
<select id="list_proc_instance_all" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[ <![CDATA[
select f.* select f.*
from C_T_PROC_DEFINITION_MODELS f from (
SELECT ins.*,def.proc_name from c_t_proc_instance ins
LEFT JOIN c_t_proc_definition def on ins.proc_definition_id=def.uuid
) f
]]> ]]>
<include refid="Where_Clause" /> <include refid="Where_Clause" />
order by f.CREATE_TIME DESC order by f.CREATE_TIME DESC
</select> </select>
<select id="listCount_procde_finition_models" parameterType="map" <select id="listCount_proc_instance_all" parameterType="map"
resultType="int"> resultType="int">
<![CDATA[ <![CDATA[
select count(*) c from C_T_PROC_DEFINITION_MODELS f select count(*) c from
(
SELECT ins.*,def.proc_name from c_t_proc_instance ins
LEFT JOIN c_t_proc_definition def on ins.proc_definition_id=def.uuid
)
f
]]> ]]>
<include refid="Where_Clause" /> <include refid="Where_Clause" />
</select> </select>
......
package com.gaowj.formtable.action; package com.gaowj.formtable.action;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -142,8 +143,10 @@ public class actAction extends BasicAction { ...@@ -142,8 +143,10 @@ public class actAction extends BasicAction {
entity = QueryParamUtil.StringToDate(entity); entity = QueryParamUtil.StringToDate(entity);
business.update_form_table(entity); business.update_form_table(entity);
//做子表的插入 //做子表的插入
Map<String, Object> param=new HashMap<String, Object>(); List<Map<String, Object>> listField=new ArrayList<Map<String, Object>>();
Map<String, Object> param=null;
for(Property property:LIST){ for(Property property:LIST){
param=new HashMap<String, Object>();
if(property==null){ if(property==null){
continue; continue;
} }
...@@ -152,6 +155,7 @@ public class actAction extends BasicAction { ...@@ -152,6 +155,7 @@ public class actAction extends BasicAction {
} }
param.put("UUID", property.getUUID()); param.put("UUID", property.getUUID());
param.put("FIELD_NAME", property.getNAME()); param.put("FIELD_NAME", property.getNAME());
param.put("FIELD_WIDTH", property.getFIELD_WIDTH());
param.put("LENGTH",property.getLENGTH() ); param.put("LENGTH",property.getLENGTH() );
param.put("POINT", property.getPOINT()); param.put("POINT", property.getPOINT());
param.put("TABLE_ID", entity.get("UUID")); param.put("TABLE_ID", entity.get("UUID"));
...@@ -175,8 +179,9 @@ public class actAction extends BasicAction { ...@@ -175,8 +179,9 @@ public class actAction extends BasicAction {
if(property.getFIELD_DEFAULT()!=null&&""!=property.getFIELD_DEFAULT()){ if(property.getFIELD_DEFAULT()!=null&&""!=property.getFIELD_DEFAULT()){
param.put("FIELD_DEFAULT", property.getFIELD_DEFAULT()); param.put("FIELD_DEFAULT", property.getFIELD_DEFAULT());
} }
fieldBusiness.update_form_field(param); listField.add(param);
} }
fieldBusiness.update_form_field(listField,entity.get("UUID").toString());
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功")); jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
} catch (Exception e) { } catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("修改失败")); jsonObject.putAll(Status.getStatusErrorMessage("修改失败"));
......
...@@ -7,7 +7,6 @@ import java.util.Map; ...@@ -7,7 +7,6 @@ import java.util.Map;
import com.gaowj.business.ProcdefinitionBusiness; import com.gaowj.business.ProcdefinitionBusiness;
import com.gaowj.business.ProcdefinitionInitLinkBusiness; import com.gaowj.business.ProcdefinitionInitLinkBusiness;
import com.gaowj.business.StudentBusiness;
import com.gaowj.business.SystemOpeBusiness; import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction; import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager; import com.gaowj.business.comp.BusinessManager;
......
package com.gaowj.procinstance.action; package com.gaowj.procinstance.action;
import java.util.List;
import java.util.Map; import java.util.Map;
import com.gaowj.business.ProcdefinitionBusiness;
import com.gaowj.business.ProcdefinitionmodelsBusiness; import com.gaowj.business.ProcdefinitionmodelsBusiness;
import com.gaowj.business.StudentBusiness; import com.gaowj.business.ProcinstanceBusiness;
import com.gaowj.business.SystemOpeBusiness; import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction; import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager; import com.gaowj.business.comp.BusinessManager;
...@@ -39,8 +37,8 @@ public class actAction extends BasicAction { ...@@ -39,8 +37,8 @@ public class actAction extends BasicAction {
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
public String insertProcdefinitionmodels() throws BusinessException { public String insertInfo() throws BusinessException {
ProcdefinitionmodelsBusiness business = BusinessManager.getBusiness(ProcdefinitionmodelsBusiness.class); ProcinstanceBusiness business = BusinessManager.getBusiness(ProcinstanceBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX); Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject(); jsonObject = new JSONObject();
...@@ -49,12 +47,12 @@ public class actAction extends BasicAction { ...@@ -49,12 +47,12 @@ public class actAction extends BasicAction {
//去除不要更新的字段 //去除不要更新的字段
entity.remove("OPETYPE"); entity.remove("OPETYPE");
//新增 //新增
Map<String,Object> procdefinitionmodels=business.insert_procde_finition_models(entity); Map<String,Object> procinstance=business.insert_proc_instance(entity);
// 操作日志 // 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类) //sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class); SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("insertProcdefinitionmodels", "" + procdefinitionmodels, sysbusiness.insert_logBusiness("insertInfo", "" + procinstance,
"增加流程定义模板数据", (String) entity.get("UUID"), (String) entity.get("CONTENT"), "procdefinitionmodels"); "增加流程实例数据", (String) entity.get("UUID"), (String) entity.get("CONTENT"), "procinstance");
// //
// //
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功")); jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
...@@ -65,72 +63,5 @@ public class actAction extends BasicAction { ...@@ -65,72 +63,5 @@ public class actAction extends BasicAction {
return "json"; return "json";
} }
public String updateProcdefinitionmodels() throws BusinessException {
ProcdefinitionmodelsBusiness business = BusinessManager.getBusiness(ProcdefinitionmodelsBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
//去除不要更新的字段
entity.remove("OPETYPE");
//新增
business.update_procde_finition_models(entity);
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("updateProcdefinitionmodels", "" + 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";
}
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_models(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteProcdefinitionmodels", "" + ListKey,
"删除流程定义模板数据", deletekey, "多个流水号","procdefinitionmodels");
//
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("删除失败"));
e.printStackTrace();
}
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";
}
} }
package com.gaowj.procinstance.action; package com.gaowj.procinstance.action;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.sql.SQLException; import java.sql.SQLException;
import java.text.ParseException; import java.text.ParseException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.gaowj.business.ProcdefinitionBusiness;
import com.gaowj.business.ProcinstanceBusiness; import com.gaowj.business.ProcinstanceBusiness;
import com.gaowj.business.action.BasicAction; import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager; import com.gaowj.business.comp.BusinessManager;
...@@ -22,6 +26,9 @@ public class dataAction extends BasicAction{ ...@@ -22,6 +26,9 @@ public class dataAction extends BasicAction{
*/ */
private static final long serialVersionUID = -5059421324729466816L; private static final long serialVersionUID = -5059421324729466816L;
private StringBuffer filename=new StringBuffer();
private InputStream is;
private JSONObject jsonObject = new JSONObject(); private JSONObject jsonObject = new JSONObject();
private int rows = 20;// 每页显示的记录数 private int rows = 20;// 每页显示的记录数
private int page = 1;// 当前第几页 private int page = 1;// 当前第几页
...@@ -57,7 +64,7 @@ public class dataAction extends BasicAction{ ...@@ -57,7 +64,7 @@ public class dataAction extends BasicAction{
Page<Map<String, Object>> pageRows = business.list_proc_instance(pageNo,pageSize, query); Page<Map<String, Object>> pageRows = business.list_proc_instance(pageNo,pageSize, query);
setPageCount((pageRows.getCount() - 1) / pageSize + 1); setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>(); Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(pageRows.getItems())); data.put("rowSet", QueryParamUtil.DateTimeToString(pageRows.getItems()));
data.put("pageNo", pageNo); data.put("pageNo", pageNo);
data.put("pageSize", pageSize); data.put("pageSize", pageSize);
data.put("pageCount", pageCount); data.put("pageCount", pageCount);
...@@ -74,4 +81,26 @@ public class dataAction extends BasicAction{ ...@@ -74,4 +81,26 @@ public class dataAction extends BasicAction{
} }
return "json"; return "json";
} }
public String showProcinstanceImg(){
ProcinstanceBusiness business = BusinessManager.getBusiness(ProcinstanceBusiness.class);
is=business.viewPic(request.getParameter("instanceId"),filename);
return "download";
}
public InputStream getInputStream() throws Exception {
return is;
}
public String getFileName() throws UnsupportedEncodingException{
String name=filename.toString();
String agent = request.getHeader("User-agent");
// 如果浏览器是IE浏览器,就得进行编码转换
if (agent.contains("MSIE")) {
name = URLEncoder.encode(name, "UTF-8");
} else {
name = new String(name.getBytes(), "ISO-8859-1");
}
return name;
}
} }
package com.gaowj.util; package com.gaowj.util;
import java.math.BigDecimal;
public class Property { public class Property {
private String IS_NULL; private String IS_NULL;
...@@ -13,7 +15,7 @@ public class Property { ...@@ -13,7 +15,7 @@ public class Property {
private Integer ORDER_NUM; private Integer ORDER_NUM;
private String UUID; private String UUID;
private String IS_SHOW_LIST; private String IS_SHOW_LIST;
private String FIELD_WIDTH; private BigDecimal FIELD_WIDTH;
public String getIS_KEY() { public String getIS_KEY() {
return IS_KEY; return IS_KEY;
} }
...@@ -102,11 +104,11 @@ public class Property { ...@@ -102,11 +104,11 @@ public class Property {
IS_SHOW_LIST = iS_SHOW_LIST; IS_SHOW_LIST = iS_SHOW_LIST;
} }
public String getFIELD_WIDTH() { public BigDecimal getFIELD_WIDTH() {
return FIELD_WIDTH; return FIELD_WIDTH;
} }
public void setFIELD_WIDTH(String fIELD_WIDTH) { public void setFIELD_WIDTH(BigDecimal fIELD_WIDTH) {
FIELD_WIDTH = fIELD_WIDTH; FIELD_WIDTH = fIELD_WIDTH;
} }
......
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