Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5lcyq
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV5lcyq
Commits
992810eb
Commit
992810eb
authored
Jun 29, 2018
by
罗绍泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表定义修改,流程实例修改,licensen修改,当前环节高亮图实现
parent
8390de86
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
826 additions
and
284 deletions
+826
-284
org.eclipse.jst.common.project.facet.core.prefs
.settings/org.eclipse.jst.common.project.facet.core.prefs
+0
-3
org.eclipse.wst.common.component
.settings/org.eclipse.wst.common.component
+2
-2
business-activiti.xml
WebContent/WEB-INF/conf/gaowj/bl/business-activiti.xml
+2
-1
business-process.xml
WebContent/WEB-INF/conf/gaowj/bl/business-process.xml
+11
-0
dataExchange.ca
WebContent/WEB-INF/conf/gaowj/license/dataExchange.ca
+2
-2
dataExchange.k
WebContent/WEB-INF/conf/gaowj/license/dataExchange.k
+0
-0
dataExchange.license
WebContent/WEB-INF/conf/gaowj/license/dataExchange.license
+0
-0
common_luosz_util.js
WebContent/jwapp/common/js/common_luosz_util.js
+75
-0
formtableTabDetail.jsp
WebContent/process/pages/formtable/formtableTabDetail.jsp
+11
-11
formtableTab.js
WebContent/process/pages/formtable/js/formtableTab.js
+126
-104
procdefinitionModule.js
...t/process/pages/procdefinition/js/procdefinitionModule.js
+1
-1
procdefinitionTab.js
...tent/process/pages/procdefinition/js/procdefinitionTab.js
+2
-2
procdefinitionTabDetail.jsp
.../process/pages/procdefinition/procdefinitionTabDetail.jsp
+0
-9
procdefinitionmodelsTab.js
.../pages/procdefinitionmodels/js/procdefinitionmodelsTab.js
+5
-1
procinstanceModule.js
...ntent/process/pages/procinstance/js/procinstanceModule.js
+25
-0
procinstanceTab.js
WebContent/process/pages/procinstance/js/procinstanceTab.js
+80
-11
procinstanceTabDetail.jsp
...tent/process/pages/procinstance/procinstanceTabDetail.jsp
+3
-1
quartz_service.properties
src/quartz_service.properties
+2
-2
struts-ext.xml
src/struts-ext.xml
+8
-0
AssignmentTaskListener.java
...s/com/gaowj/activiti/listener/AssignmentTaskListener.java
+21
-1
FormfieldBusiness.java
src_process/com/gaowj/business/FormfieldBusiness.java
+10
-5
ProcinstanceBusiness.java
src_process/com/gaowj/business/ProcinstanceBusiness.java
+11
-0
FormfieldBusinessImpl.java
...s/com/gaowj/business/formfield/FormfieldBusinessImpl.java
+8
-19
ProcdefinitionBusinessImpl.java
...j/business/procdefinition/ProcdefinitionBusinessImpl.java
+5
-2
procdefinitionDAO.java
.../com/gaowj/business/procdefinition/procdefinitionDAO.java
+2
-0
procdefinitionDAO.xml
...s/com/gaowj/business/procdefinition/procdefinitionDAO.xml
+17
-1
ProcdefinitionmodelsBusinessImpl.java
...rocdefinitionmodels/ProcdefinitionmodelsBusinessImpl.java
+1
-1
ProcinstanceBusinessImpl.java
...gaowj/business/procinstance/ProcinstanceBusinessImpl.java
+280
-7
procinstanceDAO.java
...cess/com/gaowj/business/procinstance/procinstanceDAO.java
+23
-0
procinstanceDAO.xml
...ocess/com/gaowj/business/procinstance/procinstanceDAO.xml
+45
-16
actAction.java
src_process/com/gaowj/formtable/action/actAction.java
+7
-2
actAction.java
src_process/com/gaowj/procdefinition/action/actAction.java
+0
-1
actAction.java
src_process/com/gaowj/procinstance/action/actAction.java
+6
-75
dataAction.java
src_process/com/gaowj/procinstance/action/dataAction.java
+30
-1
Property.java
src_utils/com/gaowj/util/Property.java
+5
-3
No files found.
.settings/org.eclipse.jst.common.project.facet.core.prefs
deleted
100644 → 0
View file @
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
.settings/org.eclipse.wst.common.component
View file @
992810eb
<?xml version="1.0" encoding="UTF-8"?>
<project-modules
id=
"moduleCoreId"
project-version=
"1.5.0"
>
<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_process"
/>
<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=
"/"
source-path=
"/WebContent"
/>
<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_standard"
/>
<wb-resource
deploy-path=
"/WEB-INF/classes"
source-path=
"/src_process"
/>
<property
name=
"java-output-path"
value=
"build/classes"
/>
<property
name=
"context-root"
value=
"jfV5lcyq"
/>
</wb-module>
...
...
WebContent/WEB-INF/conf/gaowj/bl/business-activiti.xml
View file @
992810eb
...
...
@@ -11,8 +11,9 @@
<property
name=
"databaseSchemaUpdate"
value=
"true"
/>
<!-- 设置字体,防止流程图生成时候产生乱码 -->
<property
name=
"activityFontName"
value=
"宋体"
></property>
<!-- 设置字体,防止xml生成时候产生乱码 -->
<property
name=
"labelFontName"
value=
"宋体"
></property>
<!-- 设置字体,防止xml生成时候产生乱码 -->
<property
name=
"xmlEncoding"
value=
"GBK"
></property>
</bean>
<!-- 创建流程引擎对象 -->
<bean
id=
"processEngine"
class=
"org.activiti.spring.ProcessEngineFactoryBean"
>
...
...
WebContent/WEB-INF/conf/gaowj/bl/business-process.xml
View file @
992810eb
...
...
@@ -12,6 +12,7 @@
<value>
classpath:com/gaowj/business/formfield/formfieldDAO.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/procinstance/procinstanceDAO.xml
</value>
</list>
</property>
</bean>
...
...
@@ -40,6 +41,10 @@
<property
name=
"mapperInterface"
value=
"com.gaowj.business.procdefinitionInitlink.procdefinitionInitlinkDAO"
/>
<property
name=
"sqlSessionFactory"
ref=
"sqlSessionFactory-process"
/>
</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定义结束 -->
<bean
id=
"FormtableBusiness"
class=
"com.gaowj.business.formtable.FormtableBusinessImpl"
>
...
...
@@ -80,6 +85,12 @@
<bean
id=
"ProcinstanceBusiness"
class=
"com.gaowj.business.procinstance.ProcinstanceBusinessImpl"
>
<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
id=
"ProcdefinitionInitLinkBusiness"
class=
"com.gaowj.business.procdefinitionInitlink.ProcdefinitionInitLinkBusinessImpl"
>
...
...
WebContent/WEB-INF/conf/gaowj/license/dataExchange.ca
View file @
992810eb
No preview for this file type
WebContent/WEB-INF/conf/gaowj/license/dataExchange.k
View file @
992810eb
No preview for this file type
WebContent/WEB-INF/conf/gaowj/license/dataExchange.license
View file @
992810eb
No preview for this file type
WebContent/jwapp/common/js/common_luosz_util.js
View file @
992810eb
...
...
@@ -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
WebContent/process/pages/formtable/formtableTabDetail.jsp
View file @
992810eb
<%@page contentType="text/html; charset=UTF-8"%>
<style>
.fieldTable{
border:1px solid;
}
</style>
<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}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
...
...
@@ -6,28 +11,22 @@
<td style="width: 15%;" class="tableStyleLable">
<span>表名:</span>
</td>
<td style="width:
3
0%">
<td style="width:
8
0%">
<input class="easyui-textbox" required="required" id="TABLE_NAME" name="FIELD_TABLE_NAME" value="${is_row.TABLE_NAME}" style="width:200px" />
</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>
<td class="tableStyleLable">
<span>描述:</span>
</td>
<td
colspan="3"
>
<input class="easyui-textbox" required="required" id="CONTENT" name="FIELD_CONTENT" value="${is_row.CONTENT}" style="width:
57
0px" />
<td>
<input class="easyui-textbox" required="required" id="CONTENT" name="FIELD_CONTENT" value="${is_row.CONTENT}" style="width:
20
0px" />
</td>
</tr>
</table>
<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-clear',plain:true" onclick="javascript:deleteLine()">删除行</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteLine()">删除行</a>
</div>
<
table id="fieldTable"
>
<
div style="overflow:auto;width:98%;border:1px solid #ccc;"><table id="fieldTable"></div
>
</table>
</form>
\ No newline at end of file
WebContent/process/pages/formtable/js/formtableTab.js
View file @
992810eb
$
.
extend
(
$
.
fn
.
validatebox
.
defaults
.
rules
,
{
widthBigThanZero
:{
validator
:
function
(
value
)
{
return
value
>
0
;
},
message
:
'宽度必须大于0'
},
pointIsNatural
:{
validator
:
function
(
value
)
{
var
patt
=
/
([
1-9
]\d
+
)
|
(\d)
/
;
return
patt
.
test
(
value
);;
},
message
:
'小数点必须为自然数'
},
lengthPositive
:{
validator
:
function
(
value
)
{
var
patt
=
/
[
1-9
]\d
*/
;
return
patt
.
test
(
value
);;
},
message
:
'长度必须为正整数'
}
});
/**
* 序号:1
* 功能:定义分页(EasyUI)
...
...
@@ -55,7 +77,7 @@ var type_data=[
var
list_default_field
=
[{
FIELD_NAME
:
'uuid'
,
LENGTH
:
50
,
POINT
:
0
,
POINT
:
''
,
FIELD_MUST_INPUT
:
true
,
IS_KEY
:
true
,
CONTENT
:
'主键UUID'
,
...
...
@@ -67,7 +89,7 @@ var list_default_field=[{
},{
FIELD_NAME
:
'create_id'
,
LENGTH
:
50
,
POINT
:
0
,
POINT
:
''
,
FIELD_MUST_INPUT
:
true
,
IS_KEY
:
false
,
CONTENT
:
'新建人'
,
...
...
@@ -79,7 +101,7 @@ var list_default_field=[{
},{
FIELD_NAME
:
'create_time'
,
LENGTH
:
''
,
POINT
:
0
,
POINT
:
''
,
FIELD_MUST_INPUT
:
true
,
IS_KEY
:
false
,
CONTENT
:
'新建时间'
,
...
...
@@ -91,7 +113,7 @@ var list_default_field=[{
},{
FIELD_NAME
:
'update_id'
,
LENGTH
:
50
,
POINT
:
0
,
POINT
:
''
,
FIELD_MUST_INPUT
:
true
,
IS_KEY
:
false
,
CONTENT
:
'更新人'
,
...
...
@@ -103,7 +125,7 @@ var list_default_field=[{
},{
FIELD_NAME
:
'update_time'
,
LENGTH
:
''
,
POINT
:
0
,
POINT
:
''
,
FIELD_MUST_INPUT
:
true
,
IS_KEY
:
false
,
CONTENT
:
'更新时间'
,
...
...
@@ -115,19 +137,19 @@ var list_default_field=[{
}];
var
tr
=
[
'<tr>'
,
' <td>@{index}</td>'
,
' <td>@{opt}</td>'
,
' <td>@{field_name}</td>'
,
' <td>@{content}</td>'
,
' <td>@{type}</td>'
,
' <td>@{length}</td>'
,
' <td>@{point}</td>'
,
' <td>@{field_default}</td>'
,
' <td>@{field_width}</td>'
,
' <td>@{is_key}</td>'
,
' <td>@{is_null}</td>'
,
' <td>@{order_num}</td>'
,
' <td>@{is_show_list}</td>'
,
' <td
>@{index}</td>'
,
' <td
>@{opt}</td>'
,
' <td
>@{field_name}</td>'
,
' <td
>@{content}</td>'
,
' <td
>@{type}</td>'
,
' <td
>@{length}</td>'
,
' <td
>@{point}</td>'
,
' <td
>@{field_default}</td>'
,
' <td
>@{field_width}</td>'
,
' <td
>@{is_key}</td>'
,
' <td
>@{is_null}</td>'
,
' <td
>@{order_num}</td>'
,
' <td
>@{is_show_list}</td>'
,
'</tr>'
].
join
(
""
);
/****/
...
...
@@ -227,9 +249,7 @@ function addRow(){
}
//加载增加子页面成功后的回调
function
addUrlOnloadCallback
(
is_row
){
initTableInsert
();
}
function
initTableInsert
(){
...
...
@@ -249,6 +269,7 @@ function initTableInsert(){
order_num
:
''
,
is_show_list
:
'列表显示'
,
})).
appendTo
(
fieldTable
);
fieldTable
.
find
(
'tr'
).
eq
(
0
).
find
(
'td'
).
css
({
'fontWeight'
:
'bold'
,
'background'
:
'#f1f1f1'
,
'textAlign'
:
'center'
})
$
(
'#IS_DBSYNCH'
).
combobox
({
data
:
is_dbsynch_data
,
...
...
@@ -261,9 +282,43 @@ function initTableInsert(){
for
(
var
i
=
0
;
i
<
list_default_field
.
length
;
i
++
){
var
tr2
=
tr
;
var
field
=
list_default_field
[
i
];
tr2
=
replaceByJson
(
tr2
,{
tr2
=
replaceByJson
(
tr2
,
fieldModel
(
i
,
field
));
$
(
tr2
).
appendTo
(
fieldTable
);
initEasyUiControl
(
i
);
}
//重置表的索引
resetFieldTableIndex
();
//设置表的最大索引值(为了简单起见,第一次初始化为当前行数,以后每新增一行,该值+1)
$
(
"#fieldTable"
).
data
(
'maxIndex'
,
$
(
'#fieldTable tr'
).
length
-
2
);
}
function
fieldModel
(
i
,
field
){
if
(
typeof
field
==
'undefined'
){
field
=
{
FIELD_NAME
:
''
,
CONTENT
:
''
,
TYPE
:
''
,
LENGTH
:
''
,
POINT
:
''
,
FIELD_DEFAULT
:
''
,
FIELD_WIDTH
:
''
,
IS_KEY
:
false
,
IS_NULL
:
true
,
IS_SHOW_LIST
:
false
};
}
if
(
typeof
field
.
LENGTH
==
'undefined'
){
field
.
LENGTH
=
''
;
}
if
(
typeof
field
.
POINT
==
'undefined'
){
field
.
POINT
=
''
;
}
if
(
typeof
field
.
field_width
==
'undefined'
){
field
.
FIELD_WIDTH
=
''
;
}
return
{
index
:
i
+
1
,
opt
:
'<input
type="checkbox" name="checkbox"/>'
,
opt
:
'<input style="width:25px;"
type="checkbox" name="checkbox"/>'
,
field_name
:
'<input type="text" name="LIST['
+
i
+
'].NAME" value="'
+
field
.
FIELD_NAME
+
'" />'
,
content
:
'<input type="text" name="LIST['
+
i
+
'].CONTENT" value="'
+
field
.
CONTENT
+
'" />'
,
type
:
'<input type="combobox" name="LIST['
+
i
+
'].TYPE" value="'
+
field
.
TYPE
+
'" />'
,
...
...
@@ -271,12 +326,35 @@ function initTableInsert(){
point
:
'<input type="text" name="LIST['
+
i
+
'].POINT" value="'
+
field
.
POINT
+
'" />'
,
field_default
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_DEFAULT" value="'
+
field
.
FIELD_DEFAULT
+
'" />'
,
field_width
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_WIDTH" value="'
+
field
.
FIELD_WIDTH
+
'" />'
,
is_key
:
'<input type="checkbox" value="'
+
field
.
IS_KEY
+
'" name="LIST['
+
i
+
'].IS_KEY" '
+
(
field
.
IS_KEY
==
true
?
'checked'
:
''
)
+
' />'
,
is_null
:
'<input type="checkbox" value="'
+
field
.
IS_NULL
+
'" name="LIST['
+
i
+
'].IS_NULL" '
+
(
field
.
IS_NULL
==
false
?
''
:
'checked'
)
+
' />'
,
order_num
:
'<input class="field_order_number" type="hidden" name="LIST['
+
i
+
'].ORDER_NUM" />'
,
is_show_list
:
'<input type="checkbox" value="'
+
field
.
IS_SHOW_LIST
+
'" name="LIST['
+
i
+
'].IS_SHOW_LIST" '
+
(
field
.
IS_SHOW_LIST
==
false
?
''
:
'checked'
)
+
' />'
is_key
:
'<input style="width:25px;" type="checkbox" value="'
+
field
.
IS_KEY
+
'" name="LIST['
+
i
+
'].IS_KEY" '
+
(
field
.
IS_KEY
==
true
?
'checked'
:
''
)
+
' />'
,
is_null
:
'<input style="width:57px;" type="checkbox" value="'
+
field
.
IS_NULL
+
'" name="LIST['
+
i
+
'].IS_NULL" '
+
(
field
.
IS_NULL
==
false
?
''
:
'checked'
)
+
' />'
,
order_num
:
'<input style="width:57px;" class="field_order_number" type="hidden" name="LIST['
+
i
+
'].ORDER_NUM" />'
,
is_show_list
:
'<input style="width:57px;" type="checkbox" value="'
+
field
.
IS_SHOW_LIST
+
'" name="LIST['
+
i
+
'].IS_SHOW_LIST" '
+
(
field
.
IS_SHOW_LIST
==
false
?
''
:
'checked'
)
+
' />'
};
}
/**
* 初始化easyui控件
*/
function
initEasyUiControl
(
i
){
$
(
'input[name="LIST['
+
i
+
'].NAME"]'
).
textbox
({
required
:
true
});
$
(
'input[name="LIST['
+
i
+
'].CONTENT"]'
).
textbox
({
required
:
true
});
$
(
'input[name="LIST['
+
i
+
'].LENGTH"]'
).
textbox
({
validType
:
'lengthPositive'
});
$
(
'input[name="LIST['
+
i
+
'].POINT"]'
).
textbox
({
validType
:
'pointIsNatural'
});
$
(
'input[name="LIST['
+
i
+
'].FIELD_DEFAULT"]'
).
textbox
({
});
$
(
'input[name="LIST['
+
i
+
'].FIELD_WIDTH"]'
).
textbox
({
validType
:
'widthBigThanZero'
});
$
(
tr2
).
appendTo
(
fieldTable
);
$
(
'input[name="LIST['
+
i
+
'].TYPE"]'
).
combobox
({
data
:
type_data
,
valueField
:
'CODE_ID'
,
...
...
@@ -284,32 +362,21 @@ function initTableInsert(){
editable
:
false
,
panelHeight
:
'auto'
,
onSelect
:
function
(
record
){
if
(
record
.
CODE_ID
==
'date'
){
$
(
this
).
parents
(
'td'
).
next
().
children
().
attr
(
"disabled"
,
"true"
)
$
(
this
).
parents
(
'td'
).
next
().
children
().
attr
(
"value"
,
null
)
}
if
(
record
.
CODE_ID
==
'text'
){
$
(
this
).
parents
(
'td'
).
next
().
children
().
attr
(
"disabled"
,
"true"
)
$
(
this
).
parents
(
'td'
).
next
().
children
().
attr
(
"value"
,
0
)
}
}
});
}
$
(
'#fieldTable tr'
).
eq
(
0
).
nextAll
().
each
(
function
(
index
,
element
){
if
(
$
(
element
).
find
(
'input[name="LIST['
+
index
+
'].TYPE"]'
).
val
()
==
'date'
){
$
(
element
).
find
(
'input[name="LIST['
+
index
+
'].LENGTH"]'
).
attr
(
"disabled"
,
"true"
);
}
});
}
function
resetFieldTableIndex
(){
//除标题行外的所有行内寻找".field_order_number"元素,将值设置为当前索引
//并将序号设置为当前索引
$
(
'#fieldTable tr'
).
eq
(
0
).
nextAll
().
each
(
function
(
index
,
element
){
$
(
element
).
find
(
'.field_order_number'
).
val
(
index
+
1
);
$
(
element
).
find
(
'td'
).
eq
(
0
).
html
(
'<span style="width:50px;display:inline-block;text-align:center;">'
+
(
index
+
1
)
+
'</span>'
);
});
}
//保存
function
insertData
(
is_entity
){
console
.
log
(
is_entity
);
return
;
var
v_result
=
formtableModule
.
act
.
insertFormTable
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
...
...
@@ -321,7 +388,7 @@ function editRow(index) {
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
is_row
[
0
].
OPETYPE
=
'update'
;
openEditRow
(
"formtableView_formtableTabDetail"
,
is_row
[
0
],
"编辑"
,
true
,
0.
6
5
,
0.95
,
0
,
0
);
openEditRow
(
"formtableView_formtableTabDetail"
,
is_row
[
0
],
"编辑"
,
true
,
0.
9
5
,
0.95
,
0
,
0
);
}
...
...
@@ -331,7 +398,6 @@ function updateUrlOnloadCallback(is_row){
}
function
initTableUpdate
(
is_row
){
$
.
ajax
({
url
:
'formtableAct_listTableFile'
,
type
:
'post'
,
...
...
@@ -339,7 +405,6 @@ function initTableUpdate(is_row){
UUID
:
is_row
.
UUID
},
success
:
function
(
data
){
var
fieldTable
=
$
(
"#fieldTable"
);
$
(
replaceByJson
(
tr
,{
index
:
'序号'
,
...
...
@@ -365,21 +430,7 @@ function initTableUpdate(is_row){
for
(
var
i
=
0
;
i
<
data
.
listfield
.
length
;
i
++
){
var
tr2
=
tr
;
var
field
=
data
.
listfield
[
i
];
tr2
=
replaceByJson
(
tr2
,{
index
:
i
+
1
,
opt
:
'<input type="checkbox" />'
,
field_name
:
'<input type="text" name="LIST['
+
i
+
'].NAME" value="'
+
field
.
FIELD_NAME
+
'" />'
,
content
:
'<input type="text" name="LIST['
+
i
+
'].CONTENT" value="'
+
field
.
CONTENT
+
'" />'
,
type
:
'<input type="combobox" name="LIST['
+
i
+
'].TYPE" value="'
+
field
.
TYPE
+
'" />'
,
length
:
'<input type="text" name="LIST['
+
i
+
'].LENGTH" value="'
+
field
.
LENGTH
+
'" />'
,
point
:
'<input type="text" name="LIST['
+
i
+
'].POINT" value="'
+
field
.
POINT
+
'" />'
,
field_default
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_DEFAULT" value="'
+
field
.
FIELD_DEFAULT
+
'" />'
,
field_width
:
'<input type="text" name="LIST['
+
i
+
'].FIELD_WIDTH" value="'
+
field
.
FIELD_WIDTH
+
'" />'
,
is_key
:
'<input type="checkbox" value="'
+
field
.
IS_KEY
+
'" name="LIST['
+
i
+
'].IS_KEY" '
+
(
field
.
IS_KEY
==
1
?
'checked'
:
''
)
+
' />'
,
is_null
:
'<input type="checkbox" value="'
+
field
.
IS_NULL
+
'" name="LIST['
+
i
+
'].IS_NULL" '
+
(
field
.
IS_NULL
==
0
?
''
:
'checked'
)
+
' />'
,
order_num
:
'<input class="field_order_number" type="hidden" value="'
+
field
.
ORDER_NUM
+
'" name="LIST['
+
i
+
'].ORDER_NUM" /><input type="hidden" value="'
+
field
.
UUID
+
'" name="LIST['
+
i
+
'].UUID" />'
,
is_show_list
:
'<input type="checkbox" value="'
+
field
.
IS_SHOW_LIST
+
'" name="LIST['
+
i
+
'].IS_SHOW_LIST" '
+
(
field
.
IS_SHOW_LIST
==
0
?
''
:
'checked'
)
+
' />'
});
tr2
=
replaceByJson
(
tr2
,
fieldModel
(
i
,
field
));
$
(
tr2
).
appendTo
(
fieldTable
);
$
(
'input[name="LIST['
+
i
+
'].TYPE"]'
).
combobox
({
data
:
type_data
,
...
...
@@ -389,6 +440,11 @@ function initTableUpdate(is_row){
panelHeight
:
'auto'
});
}
//重置表的索引
resetFieldTableIndex
();
//设置表的最大索引值(为了简单起见,第一次初始化为当前行数,以后每新增一行,该值+1)
fieldTable
.
data
(
'maxIndex'
,
$
(
'#fieldTable tr'
).
length
-
2
);
}
})
...
...
@@ -504,50 +560,16 @@ function replaceByJson(text,json){
return
text
;
}
var
j
=
list_default_field
.
length
+
1
;
function
addLine
(){
var
aa
=
{
index
:
j
,
opt
:
'<input type="checkbox" name="checkbox"/>'
,
field_name
:
'<input class="easyui-textbox" type="text" name="LIST['
+
j
+
'].NAME" required="true"/>'
,
content
:
'<input class="easyui-textbox" type="text" name="LIST['
+
j
+
'].CONTENT" required="required"/>'
,
type
:
'<input type="combobox" name="LIST['
+
j
+
'].TYPE" value="varchar"/>'
,
length
:
'<input type="text" name="LIST['
+
j
+
'].LENGTH" value="0"/>'
,
point
:
'<input type="text" name="LIST['
+
j
+
'].POINT" value="0" />'
,
field_default
:
'<input type="text" name="LIST['
+
j
+
'].FIELD_DEFAULT" />'
,
field_width
:
'<input type="text" name="LIST['
+
j
+
'].FIELD_WIDTH" value="20"/>'
,
is_key
:
'<input type="checkbox" name="LIST['
+
j
+
'].IS_KEY" />'
,
is_null
:
'<input type="checkbox" name="LIST['
+
j
+
'].IS_NULL" checked/>'
,
order_num
:
'<input class="field_order_number" type="hidden" name="LIST['
+
j
+
'].ORDER_NUM" />'
,
is_show_list
:
'<input type="checkbox" name="LIST['
+
j
+
'].IS_SHOW_LIST" />'
};
var
j
=
$
(
"#fieldTable"
).
data
(
'maxIndex'
)
+
1
;
$
(
"#fieldTable"
).
data
(
'maxIndex'
,
j
);
var
aa
=
fieldModel
(
j
);
var
fieldTable
=
$
(
"#fieldTable"
);
$
(
replaceByJson
(
tr
,
aa
)).
appendTo
(
fieldTable
);
$
.
parser
.
parse
();
$
(
'input[name="LIST['
+
j
+
'].TYPE"]'
).
combobox
({
data
:
type_data
,
valueField
:
'CODE_ID'
,
textField
:
'CODE_NAME'
,
editable
:
false
,
panelHeight
:
'auto'
,
onSelect
:
function
(
record
){
if
(
record
.
CODE_ID
==
'date'
||
record
.
CODE_ID
==
'text'
){
$
(
this
).
parents
(
'td'
).
next
().
children
().
attr
(
"disabled"
,
"true"
)
$
(
this
).
parents
(
'td'
).
next
().
children
().
attr
(
"value"
,
null
)
}
if
(
record
.
CODE_ID
==
'text'
){
$
(
this
).
parents
(
'td'
).
next
().
children
().
attr
(
"disabled"
,
"true"
)
$
(
this
).
parents
(
'td'
).
next
().
children
().
attr
(
"value"
,
0
)
}
}
});
$
(
'#fieldTable tr'
).
eq
(
0
).
nextAll
().
each
(
function
(
index
,
element
){
$
(
element
).
find
(
'.field_order_number'
).
val
(
index
+
1
);
});
j
++
;
initEasyUiControl
(
j
);
//重置表的索引
resetFieldTableIndex
();
}
function
deleteLine
(){
...
...
@@ -558,6 +580,8 @@ function deleteLine(){
$
(
":checkbox[name='checkbox']:checked"
).
each
(
function
(){
$
(
this
).
parent
().
parent
().
remove
();
});
//重置表的索引
resetFieldTableIndex
();
}
function
templateRow
(
index
){
...
...
@@ -580,7 +604,6 @@ function synchRow(index){
}
is_row
[
0
].
IS_DBSYNCH
=
1
;
formtableModule
.
act
.
updateFormTable
(
is_row
[
0
])
console
.
log
(
is_row
[
0
]);
return
;
}
\ No newline at end of file
WebContent/process/pages/procdefinition/js/procdefinitionModule.js
View file @
992810eb
...
...
@@ -15,7 +15,7 @@ procdefinitionModule.prototype.updateProcdefinition = function(){};
//删除流程定义
procdefinitionModule
.
prototype
.
deleteProcdefinition
=
function
(){};
//获取流程定义列表
procdefinitionModule
.
prototype
.
list
=
function
(){};
procdefinitionModule
.
prototype
.
list
All
=
function
(){};
//查找流程定义对应的表模板
procdefinitionModule
.
prototype
.
findFormModel
=
function
(){};
...
...
WebContent/process/pages/procdefinition/js/procdefinitionTab.js
View file @
992810eb
...
...
@@ -57,8 +57,8 @@ var v_formtable_data=formtableModule.data.listFormTable();
var
ls_title
=
"流程定义"
;
var
is_column
=
[
[
{
field
:
'PROC_NAME'
,
title
:
'流程名'
,
width
:
100
,
align
:
'center'
},
{
field
:
'DEPLOYMENT_KEY'
,
title
:
'KEY'
,
width
:
8
0
,
align
:
'center'
},
{
field
:
'CONTENT'
,
title
:
'关联表'
,
width
:
8
0
,
align
:
'center'
},
{
field
:
'DEPLOYMENT_KEY'
,
title
:
'KEY'
,
width
:
24
0
,
align
:
'center'
},
{
field
:
'CONTENT'
,
title
:
'关联表'
,
width
:
10
0
,
align
:
'center'
},
{
field
:
'DEPLOYMENT_ID'
,
title
:
'部署id'
,
width
:
80
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
){
if
(
value
==
null
||
value
==
''
){
return
'未部署'
;
...
...
WebContent/process/pages/procdefinition/procdefinitionTabDetail.jsp
View file @
992810eb
...
...
@@ -18,13 +18,5 @@
<input class="easyui-textbox" data-options="required:true" id="TABLE_ID" name="FIELD_TABLE_ID" style="width:200px" />
</td>
</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>
</form>
\ No newline at end of file
WebContent/process/pages/procdefinitionmodels/js/procdefinitionmodelsTab.js
View file @
992810eb
...
...
@@ -101,7 +101,8 @@ 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=
\"
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>"
;
return
returnData
;
...
...
@@ -381,5 +382,8 @@ function deploy(index){
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
}
});
}
function
configureUser
(
index
){
}
WebContent/process/pages/procinstance/js/procinstanceModule.js
View file @
992810eb
//此乃本模块与后台交互的方法接口部分
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':'保存失败'}}}]
WebContent/process/pages/procinstance/js/procinstanceTab.js
View file @
992810eb
...
...
@@ -70,10 +70,20 @@ for(var i=1;i<v_data_procdefinition.length;i++){
**/
//定义grid列表
var
ls_title
=
null
;
var
is_column
=
[
[
{
field
:
'NAME'
,
title
:
'模板名称'
,
width
:
100
,
align
:
'center'
},
{
field
:
'KEY'
,
title
:
'KEY'
,
width
:
80
,
align
:
'center'
}
]
];
var
is_column
=
[[
{
field
:
'PROC_NAME'
,
title
:
'流程'
,
width
:
100
},
{
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
(){
...
...
@@ -112,8 +122,8 @@ 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=
\"
design
('"
+
index
+
"')
\"
>
设计
</a> | <span class=
\"
icon-ext-file
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
deploy('"
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-clear
\"
style=
\"
padding-left:20px;*width:20px;
\"
></span><a href=
\"
javascript:void(0);
\"
onclick=
\"
deleteRow('"
+
index
+
"')
\"
>删除</a>"
;
return
returnData
;
...
...
@@ -145,7 +155,7 @@ function addRow(){
}
var
is_row
=
{
OPETYPE
:
'insert'
,
PROCDEFINITION_UUID
:
procdefinitionUuid
};
openEditRow
(
"procinstanceView_procinstanceTabDetail"
,
is_row
,
"新增"
,
true
,
0.95
,
0.95
,
0
,
0
);
open
Proc
EditRow
(
"procinstanceView_procinstanceTabDetail"
,
is_row
,
"新增"
,
true
,
0.95
,
0.95
,
0
,
0
);
}
//加载增加子页面成功后的回调
function
addUrlOnloadCallback
(
is_row
){
...
...
@@ -163,8 +173,8 @@ function addUrlOnloadCallback(is_row){
}
//保存
function
insertData
(
is_entity
){
is_entity
.
FIELD_PROCID
=
$
(
"#PROCID"
).
val
(
);
var
v_result
=
proc
definitionmodelsModule
.
act
.
insertProcdefinitionmodels
(
is_entity
);
is_entity
.
FIELD_PROCID
=
$
(
'#detail #FIELD_PROCDEFINITION_UUID'
).
combobox
(
"getValue"
);
var
v_result
=
proc
instanceModule
.
act
.
insertInfo
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
}
...
...
@@ -282,8 +292,53 @@ function refreshRow(){
* 备注:需更改
**/
function
searchRow
(){
var
v_query
=
$
(
"#procdefinitionmodelsTab_searchForm"
).
getFormVal
();
$
(
'#list'
).
datagrid
(
'load'
,
v_query
);
var
v_query
=
$
(
"#procinstanceTab_searchForm"
).
getFormVal
();
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(){
$
(
"#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
WebContent/process/pages/procinstance/procinstanceTabDetail.jsp
View file @
992810eb
...
...
@@ -3,6 +3,7 @@
流程: <input class="easyui-textbox" id="FIELD_PROCDEFINITION_UUID" name="FIELD_PROCDEFINITION_UUID" style="width:200px" value="${is_row.PROCDEFINITION_UUID}"/>
</form>
<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>
</form>
\ No newline at end of file
src/quartz_service.properties
View file @
992810eb
...
...
@@ -6,8 +6,8 @@ userDefaultPass = 0000
uploadPath
=
c:/temp/
uploadMaxSize
=
10485760
#------------license----------------------------
licensenumber
=
A01000000
2
licensedsoftware
=
A04000000
2
licensenumber
=
A01000000
3
licensedsoftware
=
A04000000
7
licensemaccharset
=
gbk
licensemacshowcmd
=
false
licensemacadress
=
00-21-CC-C9-D2-29
...
...
src/struts-ext.xml
View file @
992810eb
...
...
@@ -95,6 +95,14 @@
<result
name=
"json"
type=
"json"
>
<param
name=
"root"
>
jsonObject
</param>
</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>
</package>
</struts>
src_process/com/gaowj/activiti/listener/AssignmentTaskListener.java
View file @
992810eb
...
...
@@ -3,6 +3,8 @@ package com.gaowj.activiti.listener;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.delegate.TaskListener
;
import
com.gaowj.business.util.SessionUtil
;
public
class
AssignmentTaskListener
implements
TaskListener
{
/**
...
...
@@ -12,7 +14,25 @@ public class AssignmentTaskListener implements TaskListener {
@Override
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
());
//
}
}
src_process/com/gaowj/business/FormfieldBusiness.java
View file @
992810eb
...
...
@@ -12,36 +12,41 @@ public interface FormfieldBusiness {
/**
* 插入
*
* @param entity
* @throws BusinessException
*/
void
insert_form_field
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
void
insert_form_field
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
/**
* 更新
*
* @param entity
* @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
* @throws BusinessException
*/
void
delete_form_field
(
List
<
String
>
list
)
throws
BusinessException
;
void
delete_form_field
(
List
<
String
>
list
)
throws
BusinessException
;
/**
* 根据tableid做删除
*
* @param list
* @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做查询
*
* @param tableid
* @return
* @throws BusinessException
...
...
src_process/com/gaowj/business/ProcinstanceBusiness.java
View file @
992810eb
package
com
.
gaowj
.
business
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -57,4 +58,14 @@ public interface ProcinstanceBusiness {
* @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
;
}
src_process/com/gaowj/business/formfield/FormfieldBusinessImpl.java
View file @
992810eb
...
...
@@ -63,29 +63,18 @@ public class FormfieldBusinessImpl implements FormfieldBusiness{
}
formfieldDAO
.
insert_form_field
(
entity
);
entity
.
clear
();
}
@Override
public
void
update_form_field
(
Map
<
String
,
Object
>
entity
)
public
void
update_form_field
(
List
<
Map
<
String
,
Object
>>
list
,
String
tableId
)
throws
BusinessException
{
// TODO Auto-generated method stub
List
<
Map
<
String
,
Object
>>
updateList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
entity
.
keySet
()!=
null
){
Set
<
String
>
key
=
entity
.
keySet
();
Map
<
String
,
Object
>
param
=
new
HashMap
<
String
,
Object
>();
// 将map集合中的key和value 取出来分别放到list集合里
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
);
//清除原先的所有字段信息
List
<
String
>
listTable
=
new
ArrayList
<
String
>();
listTable
.
add
(
tableId
);
formfieldDAO
.
delete_form_field_byTableid
(
listTable
);
//插入现在的字段信息
for
(
Map
<
String
,
Object
>
field:
list
){
insert_form_field
(
field
);
}
}
...
...
src_process/com/gaowj/business/procdefinition/ProcdefinitionBusinessImpl.java
View file @
992810eb
...
...
@@ -7,6 +7,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.UUID
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.delegate.Expression
;
...
...
@@ -22,11 +23,10 @@ import org.apache.ibatis.session.RowBounds;
import
com.gaowj.business.ProcdefinitionBusiness
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.procdefinitionInitlink.procdefinitionInitlinkDAO
;
import
com.gaowj.business.formmodels.formmodelsDAO
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.SessionUtil
;
import
com.gaowj.business.formmodels.formmodelsDAO
;
public
class
ProcdefinitionBusinessImpl
implements
ProcdefinitionBusiness
{
private
procdefinitionDAO
procdefinitionDAO
;
...
...
@@ -90,6 +90,7 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
if
(
entity
.
get
(
"UPDATE_TIME"
)
==
null
)
{
entity
.
put
(
"UPDATE_TIME"
,
new
Date
());
}
entity
.
put
(
"DEPLOYMENT_KEY"
,
UUID
.
randomUUID
().
toString
());
// 动态传值插入
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
...
...
@@ -113,6 +114,8 @@ public class ProcdefinitionBusinessImpl implements ProcdefinitionBusiness {
// 动态传值修改
if
(
entity
.
keySet
()
!=
null
)
{
convertEntity
(
entity
);
//禁止修改key值
entity
.
remove
(
"DEPLOYMENT_KEY"
);
procdefinitionDAO
.
update_procde_finition
(
entity
);
entity
.
remove
(
"info"
);
}
...
...
src_process/com/gaowj/business/procdefinition/procdefinitionDAO.java
View file @
992810eb
...
...
@@ -19,4 +19,6 @@ public interface procdefinitionDAO {
List
<
Map
<
String
,
Object
>>
list_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
;
}
src_process/com/gaowj/business/procdefinition/procdefinitionDAO.xml
View file @
992810eb
...
...
@@ -57,7 +57,7 @@
<![CDATA[
select f.*
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
) f
]]>
...
...
@@ -73,4 +73,19 @@
<include
refid=
"Where_Clause"
/>
</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>
\ No newline at end of file
src_process/com/gaowj/business/procdefinitionmodels/ProcdefinitionmodelsBusinessImpl.java
View file @
992810eb
...
...
@@ -247,7 +247,7 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus
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存入流程定义表
Map
<
String
,
Object
>
entity
=
new
HashMap
<
String
,
Object
>();
entity
.
put
(
"UUID"
,
procId
);
...
...
src_process/com/gaowj/business/procinstance/ProcinstanceBusinessImpl.java
View file @
992810eb
package
com
.
gaowj
.
business
.
procinstance
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
org.activiti.engine.ManagementService
;
import
javax.xml.stream.XMLInputFactory
;
import
javax.xml.stream.XMLStreamException
;
import
javax.xml.stream.XMLStreamReader
;
import
org.activiti.bpmn.converter.BpmnXMLConverter
;
import
org.activiti.bpmn.model.BpmnModel
;
import
org.activiti.engine.HistoryService
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.RuntimeService
;
import
org.activiti.engine.TaskService
;
import
org.activiti.engine.history.HistoricActivityInstance
;
import
org.activiti.engine.history.HistoricProcessInstance
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.runtime.ProcessInstanceQuery
;
import
org.activiti.image.impl.DefaultProcessDiagramGenerator
;
import
org.apache.ibatis.session.RowBounds
;
import
com.gaowj.business.ProcinstanceBusiness
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.formtable.formtableDAO
;
import
com.gaowj.business.procdefinition.procdefinitionDAO
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.SessionUtil
;
public
class
ProcinstanceBusinessImpl
implements
ProcinstanceBusiness
{
private
procinstanceDAO
procinstanceDAO
;
private
procdefinitionDAO
procdefinitionDAO
;
private
formtableDAO
formtableDAO
;
private
RuntimeService
runtimeService
;
private
TaskService
taskService
;
private
HistoryService
historyService
;
private
RepositoryService
repositoryService
;
public
RuntimeService
getRuntimeService
()
{
return
runtimeService
;
}
...
...
@@ -40,10 +67,140 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
}
public
formtableDAO
getFormtableDAO
()
{
return
formtableDAO
;
}
public
void
setFormtableDAO
(
formtableDAO
formtableDAO
)
{
this
.
formtableDAO
=
formtableDAO
;
}
public
procinstanceDAO
getProcinstanceDAO
()
{
return
procinstanceDAO
;
}
public
void
setProcinstanceDAO
(
procinstanceDAO
procinstanceDAO
)
{
this
.
procinstanceDAO
=
procinstanceDAO
;
}
public
TaskService
getTaskService
()
{
return
taskService
;
}
public
void
setTaskService
(
TaskService
taskService
)
{
this
.
taskService
=
taskService
;
}
public
HistoryService
getHistoryService
()
{
return
historyService
;
}
public
void
setHistoryService
(
HistoryService
historyService
)
{
this
.
historyService
=
historyService
;
}
public
RepositoryService
getRepositoryService
()
{
return
repositoryService
;
}
public
void
setRepositoryService
(
RepositoryService
repositoryService
)
{
this
.
repositoryService
=
repositoryService
;
}
@Override
public
Map
<
String
,
Object
>
insert_proc_instance
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
// TODO Auto-generated method stub
return
null
;
//流程定义id
String
procId
=
entity
.
get
(
"PROCID"
).
toString
();
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
query
.
put
(
"UUID"
,
procId
);
Map
<
String
,
Object
>
procdeFinition
=
procdefinitionDAO
.
list_procde_finition
(
query
).
get
(
0
);
//存储自定义表单的业务数据
String
businessId
=
insert_custom_business
(
procdeFinition
.
get
(
"TABLE_ID"
).
toString
(),
entity
);
//通过流程定义id启动流程
String
deploymentKey
=
procdeFinition
.
get
(
"DEPLOYMENT_KEY"
).
toString
();
ProcessInstance
processInstance
=
runtimeService
.
startProcessInstanceByKey
(
deploymentKey
);
//存储流程实例id和业务数据id的关联
insertProcInstance
(
procId
,
businessId
,
processInstance
.
getId
());
/*//第一步,通过流程定义id启动流程
String deploymentKey=procdeFinition.get("DEPLOYMENT_KEY").toString();
ProcessInstance processInstance=runtimeService.startProcessInstanceByKey(deploymentKey);
//第二步,存储自定义表单的业务数据
String businessId=insert_custom_business(procdeFinition.get("TABLE_ID").toString(),entity);
//第三步,存储流程实例id和业务数据id的关联
insertProcInstance(businessId,processInstance.getId());*/
return
entity
;
}
private
void
insertProcInstance
(
String
procId
,
String
businessId
,
String
instanceId
)
{
Map
<
String
,
Object
>
entity
=
new
HashMap
<
String
,
Object
>();
entity
.
put
(
"BUSINESS_ID"
,
businessId
);
if
(
instanceId
!=
null
)
{
entity
.
put
(
"INSTANCE_ID"
,
instanceId
);
}
entity
.
put
(
"PROC_DEFINITION_ID"
,
procId
);
entity
.
put
(
"UUID"
,
java
.
util
.
UUID
.
randomUUID
().
toString
());
entity
.
put
(
"CREATE_TIME"
,
new
Date
());
entity
.
put
(
"CREATE_ID"
,
SessionUtil
.
getCode
());
entity
.
put
(
"UPDATE_ID"
,
SessionUtil
.
getCode
());
entity
.
put
(
"UPDATE_TIME"
,
new
Date
());
// 动态传值插入
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
if
(
entity
.
keySet
()
!=
null
)
{
Set
<
String
>
key
=
entity
.
keySet
();
// 将map集合中的key和value 取出来分别放到list集合里
for
(
String
str
:
key
)
{
infoList
.
add
(
entity
.
get
(
str
));
infoListKey
.
add
(
str
);
}
entity
.
put
(
"infoListKey"
,
infoListKey
);
entity
.
put
(
"infoList"
,
infoList
);
}
procinstanceDAO
.
insert_proc_instance
(
entity
);
}
private
String
insert_custom_business
(
String
tableId
,
Map
<
String
,
Object
>
entity
)
{
entity
.
remove
(
"PROCID"
);
if
(
entity
.
get
(
"UUID"
)
==
null
)
{
entity
.
put
(
"UUID"
,
java
.
util
.
UUID
.
randomUUID
().
toString
());
}
if
(
entity
.
get
(
"CREATE_TIME"
)
==
null
)
{
entity
.
put
(
"CREATE_TIME"
,
new
Date
());
}
if
(
entity
.
get
(
"CREATE_ID"
)
==
null
)
{
entity
.
put
(
"CREATE_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"UPDATE_ID"
)
==
null
)
{
entity
.
put
(
"UPDATE_ID"
,
SessionUtil
.
getCode
());
}
if
(
entity
.
get
(
"UPDATE_TIME"
)
==
null
)
{
entity
.
put
(
"UPDATE_TIME"
,
new
Date
());
}
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
query
.
put
(
"UUID"
,
tableId
);
// 动态传值插入
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
if
(
entity
.
keySet
()
!=
null
)
{
Set
<
String
>
key
=
entity
.
keySet
();
// 将map集合中的key和value 取出来分别放到list集合里
for
(
String
str
:
key
)
{
infoList
.
add
(
entity
.
get
(
str
));
infoListKey
.
add
(
str
);
}
entity
.
put
(
"infoListKey"
,
infoListKey
);
entity
.
put
(
"infoList"
,
infoList
);
}
//设置表名
String
tableName
=
formtableDAO
.
list_form_table
(
query
).
get
(
0
).
get
(
"TABLE_NAME"
).
toString
();
entity
.
put
(
"tableName"
,
tableName
);
procdefinitionDAO
.
insert_custom_business
(
entity
);
return
entity
.
get
(
"UUID"
).
toString
();
}
@Override
...
...
@@ -60,8 +217,59 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
@Override
public
Page
<
Map
<
String
,
Object
>>
list_proc_instance
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
/*List<Task> listTask=taskService.createTaskQuery().taskAssignee(SessionUtil.getCode()).list();
System.out.println(listTask.size());*/
//只查询当前登陆人的实例列表
query
.
put
(
"CREATE_ID"
,
SessionUtil
.
getCode
());
String
procdefinitionUuid
=
null
;
String
tableName
=
null
;
boolean
notExist
=
false
;
if
(
query
.
get
(
"PROCDEFINITION_UUID"
)
!=
null
&&
!
""
.
equals
(
query
.
get
(
"PROCDEFINITION_UUID"
)))
{
procdefinitionUuid
=
query
.
get
(
"PROCDEFINITION_UUID"
).
toString
();
query
.
remove
(
"PROCDEFINITION_UUID"
);
//通过流程定义id获取表名
Map
<
String
,
Object
>
query2
=
new
HashMap
<
String
,
Object
>();
query2
.
put
(
"UUID"
,
procdefinitionUuid
);
tableName
=
procdefinitionDAO
.
list_procde_finition
(
query2
).
get
(
0
).
get
(
"TABLE_NAME"
).
toString
();
}
// 计算起始记录
int
pageStart
=
(
pageNo
-
1
)
*
pageSize
;
// 获取列表
List
<
Map
<
String
,
Object
>>
items
=
null
;
if
(
tableName
!=
null
){
query
.
put
(
"tableName"
,
tableName
);
query
.
put
(
"PROC_DEFINITION_ID"
,
procdefinitionUuid
);
try
{
items
=
procinstanceDAO
.
list_proc_instance
(
new
RowBounds
(
pageStart
,
pageSize
),
query
);
}
catch
(
Exception
e
)
{
if
(
e
.
getMessage
().
indexOf
(
"doesn't exist"
)!=-
1
){
//如果有XX不存在字样,说明当前需要查询的表不存在,则直接设置为空list
items
=
new
ArrayList
<
Map
<
String
,
Object
>>();
notExist
=
true
;
}
}
}
else
{
items
=
procinstanceDAO
.
list_proc_instance_all
(
new
RowBounds
(
pageStart
,
pageSize
),
query
);
}
// 获取列表个数
int
count
=
0
;
if
(!
notExist
)
{
// 如果表存在,则继续查询数量
count
=
listCount_proc_instance
(
query
);
}
// 创建分页对象
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<
Map
<
String
,
Object
>>();
page
.
setStart
(
pageStart
);
page
.
setLimit
(
pageSize
);
page
.
setCount
(
count
);
page
.
setItems
(
items
);
return
page
;
/*// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
ProcessInstanceQuery leaveDynamicQuery = runtimeService.createProcessInstanceQuery()
.orderByProcessInstanceId().desc().active();
if(query.get("PROCDEFINITION_UUID")!=null&&!"".equals(query.get("PROCDEFINITION_UUID"))){
...
...
@@ -89,7 +297,7 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return
page
;
return page;
*/
}
@Override
...
...
@@ -100,8 +308,73 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
@Override
public
int
listCount_proc_instance
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
// TODO Auto-generated method stub
return
0
;
if
(
query
.
get
(
"tableName"
)==
null
){
return
procinstanceDAO
.
listCount_proc_instance_all
(
query
);
}
return
procinstanceDAO
.
listCount_proc_instance
(
query
);
}
@Override
public
InputStream
viewPic
(
String
instanceId
,
StringBuffer
filename
)
throws
BusinessException
{
InputStream
imageStream
=
null
;
// 获取历史流程实例
HistoricProcessInstance
historicProcessInstance
=
historyService
.
createHistoricProcessInstanceQuery
().
processInstanceId
(
instanceId
).
singleResult
();
if
(
historicProcessInstance
==
null
)
{
throw
new
BusinessException
(
"Instance doesn't exist."
);
}
else
{
// 获取图片资源名称
List
<
String
>
list
=
repositoryService
.
getDeploymentResourceNames
(
historicProcessInstance
.
getProcessDefinitionId
());
// 定义图片资源的名称(一个流程定义,默认都有两个资源文件,一个是png,一个是xml,这里只获取png)
String
resourceName
=
""
;
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
String
name
:
list
)
{
if
(
name
.
indexOf
(
".png"
)
>=
0
)
{
resourceName
=
name
;
}
}
}
filename
.
append
(
resourceName
);
// 获取流程历史中已执行节点,并按照节点在流程中执行先后顺序排序
List
<
HistoricActivityInstance
>
historicActivityInstanceList
=
historyService
.
createHistoricActivityInstanceQuery
().
processInstanceId
(
instanceId
).
orderByHistoricActivityInstanceId
().
asc
().
list
();
// 已执行的节点ID集合
List
<
String
>
executedActivityIdList
=
new
ArrayList
<
String
>();
@SuppressWarnings
(
"unused"
)
int
index
=
1
;
for
(
HistoricActivityInstance
activityInstance
:
historicActivityInstanceList
)
{
executedActivityIdList
.
add
(
activityInstance
.
getActivityId
());
index
++;
}
// 获取流程定义对象
ProcessDefinition
processDefinition
=
repositoryService
.
createProcessDefinitionQuery
().
processDefinitionId
(
historicProcessInstance
.
getProcessDefinitionId
()).
singleResult
();
String
xmlName
=
processDefinition
.
getResourceName
();
// 获取流程资源
InputStream
inputStream
=
repositoryService
.
getResourceAsStream
(
processDefinition
.
getDeploymentId
(),
xmlName
);
// 创建转换对象
BpmnXMLConverter
converter
=
new
BpmnXMLConverter
();
// 读取xml文件
XMLInputFactory
factory
=
XMLInputFactory
.
newInstance
();
XMLStreamReader
reader
=
null
;
try
{
reader
=
factory
.
createXMLStreamReader
(
inputStream
);
}
catch
(
XMLStreamException
e1
)
{
// TODO Auto-generated catch block
e1
.
printStackTrace
();
}
// 将xml文件转换成BpmnModel
BpmnModel
bpmnModel
=
converter
.
convertToBpmnModel
((
XMLStreamReader
)
reader
);
// BpmnModel bpmnModel =
// this.repositoryService.getBpmnModel(historicProcessInstance.getProcessDefinitionId());
//imageStream = new DefaultProcessDiagramGenerator().generateDiagram(bpmnModel, "png", executedActivityIdList);
imageStream
=
new
DefaultProcessDiagramGenerator
().
generateDiagram
(
bpmnModel
,
"png"
,
executedActivityIdList
,
Collections
.<
String
>
emptyList
(),
"宋体"
,
"宋体"
,
null
,
1.0
);
}
return
imageStream
;
}
}
src_process/com/gaowj/business/procinstance/procinstanceDAO.java
View file @
992810eb
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
{
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
;
}
src_process/com/gaowj/business/procinstance/procinstanceDAO.xml
View file @
992810eb
...
...
@@ -9,16 +9,10 @@
<if
test=
"PROC_DEFINITION_ID != null and PROC_DEFINITION_ID != ''"
>
and f.PROC_DEFINITION_ID = #{PROC_DEFINITION_ID}
</if>
<if
test=
"listUUID != null and listUUID != ''"
>
and f.UUID IN
<foreach
collection=
"listUUID"
item=
"oneUUID"
open=
"("
close=
")"
separator=
","
>
#{oneUUID}
</foreach>
</if>
</trim>
</sql>
<insert
id=
"insert_proc
de_finition_models
"
parameterType=
"map"
>
insert into C_T_PROC_
DEFINITION_MODELS
(
<insert
id=
"insert_proc
_instance
"
parameterType=
"map"
>
insert into C_T_PROC_
INSTANCE
(
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"infoListKey"
item=
"key"
>
${key},
...
...
@@ -33,9 +27,9 @@
<![CDATA[ ) ]]>
</insert>
<update
id=
"update_proc
de_finition_models
"
parameterType=
"map"
>
<update
id=
"update_proc
_instance
"
parameterType=
"map"
>
<![CDATA[
update C_T_PROC_
DEFINITION_MODELS
set
update C_T_PROC_
INSTANCE
set
]]>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"info"
item=
"info"
>
...
...
@@ -49,9 +43,9 @@
</where>
</update>
<delete
id=
"delete_proc
de_finition_models
"
parameterType=
"list"
>
<delete
id=
"delete_proc
_instance
"
parameterType=
"list"
>
<![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=
","
close=
")"
>
...
...
@@ -59,19 +53,54 @@
</foreach>
</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[
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"
/>
order by f.CREATE_TIME DESC
</select>
<select
id=
"listCount_proc
de_finition_models
"
parameterType=
"map"
<select
id=
"listCount_proc
_instance_all
"
parameterType=
"map"
resultType=
"int"
>
<![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"
/>
</select>
...
...
src_process/com/gaowj/formtable/action/actAction.java
View file @
992810eb
package
com
.
gaowj
.
formtable
.
action
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -142,8 +143,10 @@ public class actAction extends BasicAction {
entity
=
QueryParamUtil
.
StringToDate
(
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
){
param
=
new
HashMap
<
String
,
Object
>();
if
(
property
==
null
){
continue
;
}
...
...
@@ -152,6 +155,7 @@ public class actAction extends BasicAction {
}
param
.
put
(
"UUID"
,
property
.
getUUID
());
param
.
put
(
"FIELD_NAME"
,
property
.
getNAME
());
param
.
put
(
"FIELD_WIDTH"
,
property
.
getFIELD_WIDTH
());
param
.
put
(
"LENGTH"
,
property
.
getLENGTH
()
);
param
.
put
(
"POINT"
,
property
.
getPOINT
());
param
.
put
(
"TABLE_ID"
,
entity
.
get
(
"UUID"
));
...
...
@@ -175,8 +179,9 @@ public class actAction extends BasicAction {
if
(
property
.
getFIELD_DEFAULT
()!=
null
&&
""
!=
property
.
getFIELD_DEFAULT
()){
param
.
put
(
"FIELD_DEFAULT"
,
property
.
getFIELD_DEFAULT
());
}
fieldBusiness
.
update_form_fiel
d
(
param
);
listField
.
ad
d
(
param
);
}
fieldBusiness
.
update_form_field
(
listField
,
entity
.
get
(
"UUID"
).
toString
());
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"修改成功"
));
}
catch
(
Exception
e
)
{
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"修改失败"
));
...
...
src_process/com/gaowj/procdefinition/action/actAction.java
View file @
992810eb
...
...
@@ -7,7 +7,6 @@ import java.util.Map;
import
com.gaowj.business.ProcdefinitionBusiness
;
import
com.gaowj.business.ProcdefinitionInitLinkBusiness
;
import
com.gaowj.business.StudentBusiness
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
...
...
src_process/com/gaowj/procinstance/action/actAction.java
View file @
992810eb
package
com
.
gaowj
.
procinstance
.
action
;
import
java.util.List
;
import
java.util.Map
;
import
com.gaowj.business.ProcdefinitionBusiness
;
import
com.gaowj.business.ProcdefinitionmodelsBusiness
;
import
com.gaowj.business.
Student
Business
;
import
com.gaowj.business.
Procinstance
Business
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
...
...
@@ -39,8 +37,8 @@ public class actAction extends BasicAction {
* @param entity
* @throws BusinessException
*/
public
String
insert
Procdefinitionmodels
()
throws
BusinessException
{
Proc
definitionmodelsBusiness
business
=
BusinessManager
.
getBusiness
(
Procdefinitionmodels
Business
.
class
);
public
String
insert
Info
()
throws
BusinessException
{
Proc
instanceBusiness
business
=
BusinessManager
.
getBusiness
(
Procinstance
Business
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
jsonObject
=
new
JSONObject
();
...
...
@@ -49,12 +47,12 @@ public class actAction extends BasicAction {
//去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
//新增
Map
<
String
,
Object
>
proc
definitionmodels
=
business
.
insert_procde_finition_models
(
entity
);
Map
<
String
,
Object
>
proc
instance
=
business
.
insert_proc_instance
(
entity
);
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"insert
Procdefinitionmodels"
,
""
+
procdefinitionmodels
,
"增加流程
定义模板数据"
,
(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"CONTENT"
),
"procdefinitionmodels
"
);
sysbusiness
.
insert_logBusiness
(
"insert
Info"
,
""
+
procinstance
,
"增加流程
实例数据"
,
(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"CONTENT"
),
"procinstance
"
);
//
//
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"保存成功"
));
...
...
@@ -65,72 +63,5 @@ public class actAction extends BasicAction {
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"
;
}
}
src_process/com/gaowj/procinstance/action/dataAction.java
View file @
992810eb
package
com
.
gaowj
.
procinstance
.
action
;
import
java.io.InputStream
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.sql.SQLException
;
import
java.text.ParseException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.gaowj.business.ProcdefinitionBusiness
;
import
com.gaowj.business.ProcinstanceBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
...
...
@@ -22,6 +26,9 @@ public class dataAction extends BasicAction{
*/
private
static
final
long
serialVersionUID
=
-
5059421324729466816L
;
private
StringBuffer
filename
=
new
StringBuffer
();
private
InputStream
is
;
private
JSONObject
jsonObject
=
new
JSONObject
();
private
int
rows
=
20
;
// 每页显示的记录数
private
int
page
=
1
;
// 当前第几页
...
...
@@ -57,7 +64,7 @@ public class dataAction extends BasicAction{
Page
<
Map
<
String
,
Object
>>
pageRows
=
business
.
list_proc_instance
(
pageNo
,
pageSize
,
query
);
setPageCount
((
pageRows
.
getCount
()
-
1
)
/
pageSize
+
1
);
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
data
.
put
(
"rowSet"
,
QueryParamUtil
.
DateToString
(
pageRows
.
getItems
()));
data
.
put
(
"rowSet"
,
QueryParamUtil
.
DateT
imeT
oString
(
pageRows
.
getItems
()));
data
.
put
(
"pageNo"
,
pageNo
);
data
.
put
(
"pageSize"
,
pageSize
);
data
.
put
(
"pageCount"
,
pageCount
);
...
...
@@ -74,4 +81,26 @@ public class dataAction extends BasicAction{
}
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
;
}
}
src_utils/com/gaowj/util/Property.java
View file @
992810eb
package
com
.
gaowj
.
util
;
import
java.math.BigDecimal
;
public
class
Property
{
private
String
IS_NULL
;
...
...
@@ -13,7 +15,7 @@ public class Property {
private
Integer
ORDER_NUM
;
private
String
UUID
;
private
String
IS_SHOW_LIST
;
private
String
FIELD_WIDTH
;
private
BigDecimal
FIELD_WIDTH
;
public
String
getIS_KEY
()
{
return
IS_KEY
;
}
...
...
@@ -102,11 +104,11 @@ public class Property {
IS_SHOW_LIST
=
iS_SHOW_LIST
;
}
public
String
getFIELD_WIDTH
()
{
public
BigDecimal
getFIELD_WIDTH
()
{
return
FIELD_WIDTH
;
}
public
void
setFIELD_WIDTH
(
String
fIELD_WIDTH
)
{
public
void
setFIELD_WIDTH
(
BigDecimal
fIELD_WIDTH
)
{
FIELD_WIDTH
=
fIELD_WIDTH
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment