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
952dcef5
Commit
952dcef5
authored
6 years ago
by
罗绍泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流程实例详情实现,考虑后期加一个环节可处理人列表,就是配置环节的时候的人员列表,但是activiti中暂时没有找到可以获取的方法
parent
539975bc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
262 additions
and
63 deletions
+262
-63
business-process.xml
WebContent/WEB-INF/conf/gaowj/bl/business-process.xml
+1
-0
common_luosz_util.js
WebContent/jwapp/common/js/common_luosz_util.js
+24
-0
procdefiChoosePeopleTab.js
...rocess/pages/procdefinition/js/procdefiChoosePeopleTab.js
+1
-1
procdefinitionTab.js
...tent/process/pages/procdefinition/js/procdefinitionTab.js
+2
-2
procinstanceTab.js
WebContent/process/pages/procinstance/js/procinstanceTab.js
+60
-1
procinstanceTabHistory.jsp
...ent/process/pages/procinstance/procinstanceTabHistory.jsp
+8
-0
proctaskModule.js
WebContent/process/pages/proctask/js/proctaskModule.js
+2
-0
proctaskTab.js
WebContent/process/pages/proctask/js/proctaskTab.js
+2
-1
AssignmentTaskListener.java
...s/com/gaowj/activiti/listener/AssignmentTaskListener.java
+18
-33
AssignmentTaskListenerComplete.java
...owj/activiti/listener/AssignmentTaskListenerComplete.java
+26
-0
ProcinstanceBusiness.java
src_process/com/gaowj/business/ProcinstanceBusiness.java
+10
-0
ProctaskBusiness.java
src_process/com/gaowj/business/ProctaskBusiness.java
+2
-0
ProcdefinitionmodelsBusinessImpl.java
...rocdefinitionmodels/ProcdefinitionmodelsBusinessImpl.java
+3
-0
ProcinstanceBusinessImpl.java
...gaowj/business/procinstance/ProcinstanceBusinessImpl.java
+54
-25
ProctaskBusinessImpl.java
...ess/com/gaowj/business/proctask/ProctaskBusinessImpl.java
+0
-0
dataAction.java
src_process/com/gaowj/procinstance/action/dataAction.java
+21
-0
viewAction.java
src_process/com/gaowj/procinstance/action/viewAction.java
+5
-0
actAction.java
src_process/com/gaowj/proctask/action/actAction.java
+15
-0
SystemBackDAO.xml
src_system/com/gaowj/business/system/SystemBackDAO.xml
+8
-0
No files found.
WebContent/WEB-INF/conf/gaowj/bl/business-process.xml
View file @
952dcef5
...
@@ -102,6 +102,7 @@
...
@@ -102,6 +102,7 @@
<property
name=
"taskService"
ref=
"taskService"
></property>
<property
name=
"taskService"
ref=
"taskService"
></property>
<property
name=
"historyService"
ref=
"historyService"
></property>
<property
name=
"historyService"
ref=
"historyService"
></property>
<property
name=
"repositoryService"
ref=
"repositoryService"
></property>
<property
name=
"repositoryService"
ref=
"repositoryService"
></property>
<property
name=
"systemBackDAO"
ref=
"systemBackDAO"
></property>
</bean>
</bean>
<bean
id=
"ProcdefinitionInitLinkBusiness"
class=
"com.gaowj.business.procdefinitionInitlink.ProcdefinitionInitLinkBusinessImpl"
>
<bean
id=
"ProcdefinitionInitLinkBusiness"
class=
"com.gaowj.business.procdefinitionInitlink.ProcdefinitionInitLinkBusinessImpl"
>
...
...
This diff is collapsed.
Click to expand it.
WebContent/jwapp/common/js/common_luosz_util.js
View file @
952dcef5
...
@@ -304,6 +304,12 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le
...
@@ -304,6 +304,12 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le
saveBox
(
'detail'
,
'list'
);
saveBox
(
'detail'
,
'list'
);
}
}
},
{
},
{
text
:
'退回'
,
iconCls
:
'icon-ext-44_08'
,
handler
:
function
()
{
lastBox
(
'detail'
,
'list'
);
}
},
{
text
:
'下一步'
,
text
:
'下一步'
,
iconCls
:
'icon-ext-44_08'
,
iconCls
:
'icon-ext-44_08'
,
handler
:
function
()
{
handler
:
function
()
{
...
@@ -327,6 +333,24 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le
...
@@ -327,6 +333,24 @@ function openProcEditRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_le
}
}
/****/
/****/
//弹出层流程编辑上一步(退回)按扭
function
lastBox
(
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
=
backProc
(
query
);
if
(
v_result
!=
null
&&
v_result
!=
undefined
)
{
closeBox
(
Box_id
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
}
}
}
//弹出层流程编辑下一步按扭
//弹出层流程编辑下一步按扭
function
nextBox
(
Box_id
,
List_id
)
{
function
nextBox
(
Box_id
,
List_id
)
{
if
(
Box_id
==
null
||
Box_id
==
''
||
Box_id
==
undefined
)
if
(
Box_id
==
null
||
Box_id
==
''
||
Box_id
==
undefined
)
...
...
This diff is collapsed.
Click to expand it.
WebContent/process/pages/procdefinition/js/procdefiChoosePeopleTab.js
View file @
952dcef5
...
@@ -29,7 +29,7 @@ var ls_module_id='2';
...
@@ -29,7 +29,7 @@ var ls_module_id='2';
var
ls_ywlx
=
'YBYW'
;
var
ls_ywlx
=
'YBYW'
;
//定义grid列表
//定义grid列表
var
ls_title
=
"选择人员"
;
var
ls_title
=
null
;
var
is_column
=
[
[
var
is_column
=
[
[
{
field
:
'LINK_NAME'
,
title
:
'环节名'
,
width
:
300
,
align
:
'center'
},
{
field
:
'LINK_NAME'
,
title
:
'环节名'
,
width
:
300
,
align
:
'center'
},
{
field
:
'PROC_DEFIN_KEY'
,
title
:
'PROC_DEFIN_KEY'
,
width
:
300
,
align
:
'center'
}
{
field
:
'PROC_DEFIN_KEY'
,
title
:
'PROC_DEFIN_KEY'
,
width
:
300
,
align
:
'center'
}
...
...
This diff is collapsed.
Click to expand it.
WebContent/process/pages/procdefinition/js/procdefinitionTab.js
View file @
952dcef5
...
@@ -412,7 +412,7 @@ function procdefinitionImg(index){
...
@@ -412,7 +412,7 @@ function procdefinitionImg(index){
width
:
1000
,
width
:
1000
,
height
:
500
,
height
:
500
,
title
:
'流程图'
,
title
:
'流程图'
,
content
:
'<
img src="procdefinitionData_showProcdefinitionImg?deploymentId='
+
is_row
[
0
].
DEPLOYMENT_ID
+
'" /
>'
content
:
'<
div style="height:100%;overflow:auto;"><img src="procdefinitionData_showProcdefinitionImg?deploymentId='
+
is_row
[
0
].
DEPLOYMENT_ID
+
'" /></div
>'
});
});
}
}
...
@@ -430,5 +430,5 @@ function choosePeopleRow(index){
...
@@ -430,5 +430,5 @@ function choosePeopleRow(index){
success
:
function
(
data
){
success
:
function
(
data
){
}
}
});
});
openViewIframRow
(
"choosePeople"
,
"procdefinitionView_procdefiChoosePeopleTab?DEPLOYMENT_ID="
+
is_row
[
0
].
DEPLOYMENT_ID
,
is_row
[
0
],
"
选人列表
"
,
true
,
0.95
,
0.95
,
0
,
0
);
openViewIframRow
(
"choosePeople"
,
"procdefinitionView_procdefiChoosePeopleTab?DEPLOYMENT_ID="
+
is_row
[
0
].
DEPLOYMENT_ID
,
is_row
[
0
],
"
环节配置
"
,
true
,
0.95
,
0.95
,
0
,
0
);
}
}
This diff is collapsed.
Click to expand it.
WebContent/process/pages/procinstance/js/procinstanceTab.js
View file @
952dcef5
...
@@ -541,6 +541,64 @@ function showProcinstanceImg(index) {
...
@@ -541,6 +541,64 @@ function showProcinstanceImg(index) {
width
:
1000
,
width
:
1000
,
height
:
500
,
height
:
500
,
title
:
'流程图'
,
title
:
'流程图'
,
content
:
'<img src="procinstanceData_showProcinstanceImg?instanceId='
+
is_row
[
0
].
INSTANCE_ID
+
'" />'
href
:
'procinstanceView_procinstanceTabHistory?instanceId='
+
is_row
[
0
].
INSTANCE_ID
,
onLoad
:
function
(){
$
(
'#historyTable'
).
datagrid
({
iconCls
:
$
.
getJwWindowPic
(),
url
:
gaowj
.
WEB_APP_NAME
+
"/procinstanceData_procinstanceHistory"
,
queryParams
:
{
processInstanceId
:
$
(
"#instanceIdHide"
).
val
()
},
//查询参数
rownumbers
:
true
,
//显示索引号
singleSelect
:
false
,
//是否多选
fitColumns
:
false
,
//是否撑满
autoRowHeight
:
false
,
//设定高度
rowStyler
:
function
(
index
,
row
){
return
rowstyler
(
index
,
row
);},
pagination
:
true
,
//分页显示
pageSize
:
rows
,
//显示行数
pageList
:
listPageSize
,
//条数选择
striped
:
true
,
//是否隔行显示
remoteSort
:
false
,
//是否从服务器排序
frozenColumns
:
[[
{
field
:
'ck'
,
checkbox
:
true
}
]],
columns
:
[
[
{
field
:
'ACTIVITY_NAME'
,
title
:
'环节名称'
,
width
:
200
,
align
:
'center'
,
},
{
field
:
'ASSIGNEE'
,
title
:
'办理人'
,
width
:
200
,
align
:
'center'
,
},
{
field
:
'START_TIME'
,
title
:
'开始时间'
,
width
:
250
,
align
:
'center'
,
},
{
field
:
'END_TIME'
,
title
:
'结束时间'
,
width
:
250
,
align
:
'center'
,
}
]
],
onLoadSuccess
:
function
()
{
if
(
is_opetipmenuwidth
==
null
){
is_opetipmenuwidth
=
60
;
}
}
});
}
});
});
}
}
//流程退回
function
backProc
(
is_entity
){
var
v_result
=
proctaskModule
.
act
.
back
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
WebContent/process/pages/procinstance/procinstanceTabHistory.jsp
0 → 100644
View file @
952dcef5
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<div style="overflow:auto;height:100%;">
<div style="overflow:auto;">
<img src="procinstanceData_showProcinstanceImg?instanceId=${instanceId}" />
</div>
<input type="hidden" id="instanceIdHide" value="${instanceId}" />
<div id="historyTable"></div>
</div>
This diff is collapsed.
Click to expand it.
WebContent/process/pages/proctask/js/proctaskModule.js
View file @
952dcef5
...
@@ -16,6 +16,8 @@ proctaskModule.prototype.updateInfo = function(){};
...
@@ -16,6 +16,8 @@ proctaskModule.prototype.updateInfo = function(){};
proctaskModule
.
prototype
.
updateInfoToNext
=
function
(){};
proctaskModule
.
prototype
.
updateInfoToNext
=
function
(){};
//删除流程实例
//删除流程实例
proctaskModule
.
prototype
.
deleteInfo
=
function
(){};
proctaskModule
.
prototype
.
deleteInfo
=
function
(){};
//退回流程实例
proctaskModule
.
prototype
.
back
=
function
(){};
//创建一个数据操作对象,然后再后续使用
//创建一个数据操作对象,然后再后续使用
proctaskModule
.
act
=
new
proctaskModule
(
"json"
).
delegate
(
"proctaskAct"
);
proctaskModule
.
act
=
new
proctaskModule
(
"json"
).
delegate
(
"proctaskAct"
);
...
...
This diff is collapsed.
Click to expand it.
WebContent/process/pages/proctask/js/proctaskTab.js
View file @
952dcef5
...
@@ -438,6 +438,6 @@ function showProcinstanceImg(index) {
...
@@ -438,6 +438,6 @@ function showProcinstanceImg(index) {
width
:
1000
,
width
:
1000
,
height
:
500
,
height
:
500
,
title
:
'流程图'
,
title
:
'流程图'
,
content
:
'<
img src="procinstanceData_showProcinstanceImg?instanceId='
+
is_row
[
0
].
INSTANCE_ID
+
'" /
>'
content
:
'<
div style="height:100%;overflow:auto;"><img src="procinstanceData_showProcinstanceImg?instanceId='
+
is_row
[
0
].
INSTANCE_ID
+
'" /></div
>'
});
});
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/activiti/listener/AssignmentTaskListener.java
View file @
952dcef5
...
@@ -18,6 +18,12 @@ import com.gaowj.business.ProcinstanceBusiness;
...
@@ -18,6 +18,12 @@ import com.gaowj.business.ProcinstanceBusiness;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.util.SessionUtil
;
import
com.gaowj.business.util.SessionUtil
;
/**
* 流程任务新建时,设置该任务在数据库存储的人员列表
*
* @author luosz
*
*/
public
class
AssignmentTaskListener
implements
TaskListener
{
public
class
AssignmentTaskListener
implements
TaskListener
{
/**
/**
...
@@ -28,49 +34,28 @@ public class AssignmentTaskListener implements TaskListener {
...
@@ -28,49 +34,28 @@ public class AssignmentTaskListener implements TaskListener {
@Override
@Override
public
void
notify
(
DelegateTask
task
)
{
public
void
notify
(
DelegateTask
task
)
{
ApplicationContext
context
=
ContextLoaderListener
.
getCurrentWebApplicationContext
();
ApplicationContext
context
=
ContextLoaderListener
.
getCurrentWebApplicationContext
();
HistoryService
historyService
=
(
HistoryService
)
context
.
getBean
(
"historyService"
);
HistoryService
historyService
=
(
HistoryService
)
context
.
getBean
(
"historyService"
);
// 获取流程历史中已执行节点,并按照节点在流程中执行先后顺序排序
// 获取流程历史中已执行节点,并按照节点在流程中执行先后顺序排序
List
<
HistoricActivityInstance
>
historicActivityInstanceList
=
historyService
.
createHistoricActivityInstanceQuery
().
processInstanceId
(
task
.
getProcessInstanceId
()).
orderByHistoricActivityInstanceId
().
asc
().
list
();
List
<
HistoricActivityInstance
>
historicActivityInstanceList
=
historyService
.
createHistoricActivityInstanceQuery
().
processInstanceId
(
task
.
getProcessInstanceId
()).
orderByHistoricActivityInstanceId
().
asc
().
list
();
System
.
out
.
println
(
"历史环节数量:"
+
historicActivityInstanceList
.
size
());
if
(
historicActivityInstanceList
.
size
()==
0
)
{
if
(
historicActivityInstanceList
.
size
()
==
0
)
{
//如果历史环节数量为0,则表示这个实例第一次启动,第一个环节默认为当前登陆人
//
如果历史环节数量为0,则表示这个实例第一次启动,第一个环节默认为当前登陆人
//task.setAssignee(SessionUtil.getCode());
//
task.setAssignee(SessionUtil.getCode());
List
<
String
>
listUserId
=
new
ArrayList
<
String
>();
List
<
String
>
listUserId
=
new
ArrayList
<
String
>();
listUserId
.
add
(
SessionUtil
.
getCode
());
listUserId
.
add
(
SessionUtil
.
getCode
());
task
.
addCandidateUsers
(
listUserId
);
task
.
addCandidateUsers
(
listUserId
);
}
else
{
}
else
{
//读取环节人员配置信息,循环设置人员
//
读取环节人员配置信息,循环设置人员
ProcdefiChooseUserBusiness
procdefiChooseUserBusiness
=
(
ProcdefiChooseUserBusiness
)
context
.
getBean
(
"ProcdefiChooseUserBusiness"
);
ProcdefiChooseUserBusiness
procdefiChooseUserBusiness
=
(
ProcdefiChooseUserBusiness
)
context
.
getBean
(
"ProcdefiChooseUserBusiness"
);
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
query
.
put
(
"LINK_KEY"
,
task
.
getTaskDefinitionKey
().
toString
());
query
.
put
(
"LINK_KEY"
,
task
.
getTaskDefinitionKey
().
toString
());
List
<
Map
<
String
,
Object
>>
listUser
=
procdefiChooseUserBusiness
.
list_procdefi_chooseUser
(
query
);
List
<
Map
<
String
,
Object
>>
listUser
=
procdefiChooseUserBusiness
.
list_procdefi_chooseUser
(
query
);
List
<
String
>
listUserId
=
new
ArrayList
<
String
>();
List
<
String
>
listUserId
=
new
ArrayList
<
String
>();
for
(
Map
<
String
,
Object
>
user:
listUser
)
{
for
(
Map
<
String
,
Object
>
user
:
listUser
)
{
listUserId
.
add
(
user
.
get
(
"CODE"
).
toString
());
listUserId
.
add
(
user
.
get
(
"CODE"
).
toString
());
}
}
task
.
addCandidateUsers
(
listUserId
);
task
.
addCandidateUsers
(
listUserId
);
}
}
/*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());*/
//
}
}
}
}
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/activiti/listener/AssignmentTaskListenerComplete.java
0 → 100644
View file @
952dcef5
package
com
.
gaowj
.
activiti
.
listener
;
import
org.activiti.engine.delegate.DelegateTask
;
import
org.activiti.engine.delegate.TaskListener
;
import
com.gaowj.business.util.SessionUtil
;
/**
* 任务完成时,设置实际的办理人为当前登录人
*
* @author luosz
*
*/
public
class
AssignmentTaskListenerComplete
implements
TaskListener
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
void
notify
(
DelegateTask
task
)
{
task
.
setAssignee
(
SessionUtil
.
getCode
());
}
}
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/business/ProcinstanceBusiness.java
View file @
952dcef5
...
@@ -60,6 +60,16 @@ public interface ProcinstanceBusiness {
...
@@ -60,6 +60,16 @@ public interface ProcinstanceBusiness {
Page
<
Map
<
String
,
Object
>>
list_proc_instance
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
Page
<
Map
<
String
,
Object
>>
list_proc_instance
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
/**
/**
* 获取历史任务列表
* @param pageNo
* @param pageSize
* @param query
* @return
* @throws BusinessException
*/
List
<
Map
<
String
,
Object
>>
list_proc_instance_history
(
String
processInstanceId
)
throws
BusinessException
;
/**
* 获取所有记录
* 获取所有记录
*
*
* @param entity
* @param entity
...
...
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/business/ProctaskBusiness.java
View file @
952dcef5
...
@@ -22,4 +22,6 @@ public interface ProctaskBusiness {
...
@@ -22,4 +22,6 @@ public interface ProctaskBusiness {
Map
<
String
,
Object
>
update
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
Map
<
String
,
Object
>
update
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
Map
<
String
,
Object
>
updateToNext
(
String
taskId
,
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
Map
<
String
,
Object
>
updateToNext
(
String
taskId
,
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
Map
<
String
,
Object
>
back
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
}
}
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/business/procdefinitionmodels/ProcdefinitionmodelsBusinessImpl.java
View file @
952dcef5
...
@@ -270,6 +270,9 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus
...
@@ -270,6 +270,9 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus
Element
taskListener
=
extensionElements
.
addElement
(
"activiti:taskListener"
);
Element
taskListener
=
extensionElements
.
addElement
(
"activiti:taskListener"
);
taskListener
.
addAttribute
(
"event"
,
"create"
);
taskListener
.
addAttribute
(
"event"
,
"create"
);
taskListener
.
addAttribute
(
"class"
,
"com.gaowj.activiti.listener.AssignmentTaskListener"
);
taskListener
.
addAttribute
(
"class"
,
"com.gaowj.activiti.listener.AssignmentTaskListener"
);
Element
taskListenerComplete
=
extensionElements
.
addElement
(
"activiti:taskListener"
);
taskListenerComplete
.
addAttribute
(
"event"
,
"complete"
);
taskListenerComplete
.
addAttribute
(
"class"
,
"com.gaowj.activiti.listener.AssignmentTaskListenerComplete"
);
}
}
}
}
bpmText
=
doc
.
asXML
();
bpmText
=
doc
.
asXML
();
...
...
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/business/procinstance/ProcinstanceBusinessImpl.java
View file @
952dcef5
...
@@ -21,6 +21,7 @@ import org.activiti.engine.RuntimeService;
...
@@ -21,6 +21,7 @@ import org.activiti.engine.RuntimeService;
import
org.activiti.engine.TaskService
;
import
org.activiti.engine.TaskService
;
import
org.activiti.engine.history.HistoricActivityInstance
;
import
org.activiti.engine.history.HistoricActivityInstance
;
import
org.activiti.engine.history.HistoricProcessInstance
;
import
org.activiti.engine.history.HistoricProcessInstance
;
import
org.activiti.engine.history.HistoricTaskInstance
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.runtime.ProcessInstance
;
import
org.activiti.engine.task.Task
;
import
org.activiti.engine.task.Task
;
...
@@ -31,6 +32,7 @@ import com.gaowj.business.ProcinstanceBusiness;
...
@@ -31,6 +32,7 @@ import com.gaowj.business.ProcinstanceBusiness;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.formtable.formtableDAO
;
import
com.gaowj.business.formtable.formtableDAO
;
import
com.gaowj.business.procdefinition.procdefinitionDAO
;
import
com.gaowj.business.procdefinition.procdefinitionDAO
;
import
com.gaowj.business.system.SystemBackDAO
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.SessionUtil
;
import
com.gaowj.business.util.SessionUtil
;
...
@@ -50,6 +52,8 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
...
@@ -50,6 +52,8 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
private
RepositoryService
repositoryService
;
private
RepositoryService
repositoryService
;
private
SystemBackDAO
systemBackDAO
;
public
RuntimeService
getRuntimeService
()
{
public
RuntimeService
getRuntimeService
()
{
return
runtimeService
;
return
runtimeService
;
}
}
...
@@ -107,6 +111,14 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
...
@@ -107,6 +111,14 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
this
.
repositoryService
=
repositoryService
;
this
.
repositoryService
=
repositoryService
;
}
}
public
SystemBackDAO
getSystemBackDAO
()
{
return
systemBackDAO
;
}
public
void
setSystemBackDAO
(
SystemBackDAO
systemBackDAO
)
{
this
.
systemBackDAO
=
systemBackDAO
;
}
@Override
@Override
public
Map
<
String
,
Object
>
insert_proc_instance
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
public
Map
<
String
,
Object
>
insert_proc_instance
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
//流程定义id
//流程定义id
...
@@ -443,36 +455,53 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
...
@@ -443,36 +455,53 @@ public class ProcinstanceBusinessImpl implements ProcinstanceBusiness {
page
.
setItems
(
items
);
page
.
setItems
(
items
);
return
page
;
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"))){
Map<String, Object> query2=new HashMap<String, Object>();
query2.put("UUID", query.get("PROCDEFINITION_UUID"));
String deploymentKey=procdefinitionDAO.list_procde_finition(query2).get(0).get("DEPLOYMENT_KEY").toString();
if(deploymentKey!=null&&!"".equals(deploymentKey)){
@Override
leaveDynamicQuery.processDefinitionKey(deploymentKey);
public
List
<
Map
<
String
,
Object
>>
list_proc_instance_history
(
String
processInstanceId
)
throws
BusinessException
{
List
<
HistoricActivityInstance
>
listHistoricActivityInstance
=
historyService
// 历史相关Service
.
createHistoricActivityInstanceQuery
()
// 创建历史活动实例查询
.
processInstanceId
(
processInstanceId
)
// 执行流程实例id
//.finished()
.
orderByHistoricActivityInstanceStartTime
().
asc
().
list
();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
String
>
listAssignee
=
new
ArrayList
<
String
>();
for
(
HistoricActivityInstance
hai
:
listHistoricActivityInstance
)
{
if
(
hai
.
getActivityName
()==
null
){
continue
;
}
}
if
(
hai
.
getAssignee
()==
null
&&
hai
.
getEndTime
()!=
null
){
//如果没有办理人,但是有结束时间,任务该环节是开始环节,默认剔除
continue
;
}
}
List<ProcessInstance> list = leaveDynamicQuery.listPage(pageStart, pageSize);
if
(
hai
.
getAssignee
()!=
null
){
List<Map<String, Object>> items=new ArrayList<Map<String,Object>>();
listAssignee
.
add
(
hai
.
getAssignee
());
for(ProcessInstance processInstance:list){
}
Map<String, Object> item=new HashMap<String, Object>();
Map
<
String
,
Object
>
entry
=
new
HashMap
<
String
,
Object
>();
items.add(item);
entry
.
put
(
"ACTIVITY_NAME"
,
hai
.
getActivityName
());
entry
.
put
(
"ASSIGNEE"
,
hai
.
getAssignee
()==
null
?
""
:
hai
.
getAssignee
());
item.put("NAME", processInstance.getName());
entry
.
put
(
"START_TIME"
,
hai
.
getStartTime
());
entry
.
put
(
"END_TIME"
,
hai
.
getEndTime
()==
null
?
""
:
hai
.
getEndTime
());
list
.
add
(
entry
);
}
}
int count=(int) leaveDynamicQuery.count();
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
// 创建分页对象
query
.
put
(
"CODE_IN"
,
listAssignee
);
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
List
<
Map
<
String
,
Object
>>
items
=
systemBackDAO
.
listLoginUserInfo
(
query
);
page.setStart(pageStart);
page.setLimit(pageSize);
outer:
page.setCount(count);
for
(
Map
<
String
,
Object
>
m:
list
){
page.setItems(items);
for
(
Map
<
String
,
Object
>
user:
items
){
return page;*/
if
(
m
.
get
(
"ASSIGNEE"
)!=
null
&&!
""
.
equals
(
m
.
get
(
"ASSIGNEE"
))){
if
(
m
.
get
(
"ASSIGNEE"
).
equals
(
user
.
get
(
"CODE"
))){
m
.
put
(
"ASSIGNEE"
,
user
.
get
(
"EMNAME"
));
continue
outer
;
}
}
}
}
return
list
;
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/business/proctask/ProctaskBusinessImpl.java
View file @
952dcef5
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/procinstance/action/dataAction.java
View file @
952dcef5
...
@@ -6,6 +6,7 @@ import java.net.URLEncoder;
...
@@ -6,6 +6,7 @@ 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.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.gaowj.business.ProcdefinitionBusiness
;
import
com.gaowj.business.ProcdefinitionBusiness
;
...
@@ -103,4 +104,24 @@ public class dataAction extends BasicAction{
...
@@ -103,4 +104,24 @@ public class dataAction extends BasicAction{
}
}
return
name
;
return
name
;
}
}
public
String
procinstanceHistory
()
throws
BusinessException
{
ProcinstanceBusiness
business
=
BusinessManager
.
getBusiness
(
ProcinstanceBusiness
.
class
);
try
{
List
<
Map
<
String
,
Object
>>
listRows
=
business
.
list_proc_instance_history
(
RequestUtils
.
getString
(
request
,
"processInstanceId"
));
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
data
.
put
(
"rowSet"
,
QueryParamUtil
.
DateTimeToString
(
listRows
));
data
.
put
(
"pageNo"
,
pageNo
);
data
.
put
(
"pageSize"
,
pageSize
);
data
.
put
(
"pageCount"
,
pageCount
);
data
.
put
(
"rows"
,
data
.
get
(
"rowSet"
));
data
.
put
(
"total"
,
listRows
.
size
());
jsonObject
=
new
JSONObject
();
jsonObject
.
putAll
(
data
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
"json"
;
}
}
}
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/procinstance/action/viewAction.java
View file @
952dcef5
...
@@ -29,4 +29,9 @@ public class viewAction extends BasicAction {
...
@@ -29,4 +29,9 @@ public class viewAction extends BasicAction {
return
"procinstanceTabDetailEdit"
;
return
"procinstanceTabDetailEdit"
;
}
}
public
String
procinstanceTabHistory
()
throws
BusinessException
{
request
.
setAttribute
(
"instanceId"
,
RequestUtils
.
getString
(
request
,
"instanceId"
));
return
"procinstanceTabHistory"
;
}
}
}
This diff is collapsed.
Click to expand it.
src_process/com/gaowj/proctask/action/actAction.java
View file @
952dcef5
...
@@ -84,4 +84,19 @@ public class actAction extends BasicAction{
...
@@ -84,4 +84,19 @@ public class actAction extends BasicAction{
}
}
return
"json"
;
return
"json"
;
}
}
public
String
back
()
throws
BusinessException
{
ProctaskBusiness
business
=
BusinessManager
.
getBusiness
(
ProctaskBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
jsonObject
=
new
JSONObject
();
try
{
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
//business.list_proc_task(pageNo, pageSize, query)
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"保存成功"
));
}
catch
(
Exception
e
)
{
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"保存失败"
));
e
.
printStackTrace
();
}
return
"json"
;
}
}
}
This diff is collapsed.
Click to expand it.
src_system/com/gaowj/business/system/SystemBackDAO.xml
View file @
952dcef5
...
@@ -103,6 +103,14 @@
...
@@ -103,6 +103,14 @@
<if
test=
"EMID != null and EMID != ''"
>
<if
test=
"EMID != null and EMID != ''"
>
and u.emid like CONCAT('%',#{EMID},'%')
and u.emid like CONCAT('%',#{EMID},'%')
</if>
</if>
<if
test=
"CODE_IN != null and CODE_IN != ''"
>
and u.code IN
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<foreach
collection=
"CODE_IN"
item=
"value"
>
#{value},
</foreach>
</trim>
</if>
<if
test=
"NAME != null and NAME != ''"
>
<if
test=
"NAME != null and NAME != ''"
>
and u.emid in (select lu.emid from c_t_sys_loginuser lu where lu.emname like CONCAT('%',#{NAME},'%') or lu.emid like CONCAT('%',#{NAME},'%'))
and u.emid in (select lu.emid from c_t_sys_loginuser lu where lu.emname like CONCAT('%',#{NAME},'%') or lu.emid like CONCAT('%',#{NAME},'%'))
</if>
</if>
...
...
This diff is collapsed.
Click to expand it.
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