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
5c7f1abf
Commit
5c7f1abf
authored
Sep 07, 2018
by
罗绍泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流程引擎修改
parent
37688f64
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
350 additions
and
64 deletions
+350
-64
business-process.xml
WebContent/WEB-INF/conf/gaowj/bl/business-process.xml
+1
-0
web.xml
WebContent/WEB-INF/web.xml
+5
-5
jfcas
WebContent/jfcas
+2
-0
common_luosz_util.js
WebContent/jwapp/common/js/common_luosz_util.js
+34
-2
formtableTab.js
WebContent/process/pages/formtable/js/formtableTab.js
+1
-1
procdefinitionTab.js
...tent/process/pages/procdefinition/js/procdefinitionTab.js
+0
-9
help.jsp
WebContent/process/pages/procdefinitionmodels/help.jsp
+16
-0
procdefinitionmodelsTab.js
.../pages/procdefinitionmodels/js/procdefinitionmodelsTab.js
+7
-1
procdefinitionmodelsTab.jsp
...ss/pages/procdefinitionmodels/procdefinitionmodelsTab.jsp
+5
-0
approval.jsp
WebContent/process/pages/process/approval.jsp
+2
-0
detail.jsp
WebContent/process/pages/process/detail.jsp
+6
-0
progressHistory.jsp
WebContent/process/pages/process/progressHistory.jsp
+2
-0
progressRate.jsp
WebContent/process/pages/process/progressRate.jsp
+2
-0
procinstanceTab.js
WebContent/process/pages/procinstance/js/procinstanceTab.js
+12
-2
quartz_service.properties
src/quartz_service.properties
+9
-0
struts-ext.xml
src/struts-ext.xml
+6
-0
ProcdefinitionInitLinkBusiness.java
...ss/com/gaowj/business/ProcdefinitionInitLinkBusiness.java
+2
-0
ProcdefinitionInitLinkBusinessImpl.java
...efinitionInitlink/ProcdefinitionInitLinkBusinessImpl.java
+112
-38
ProcdefinitionmodelsBusinessImpl.java
...rocdefinitionmodels/ProcdefinitionmodelsBusinessImpl.java
+3
-2
ActivitiTools.java
src_process/com/gaowj/business/utils/ActivitiTools.java
+5
-0
actAction.java
src_process/com/gaowj/formmodel/action/actAction.java
+31
-4
viewAction.java
src_process/com/gaowj/formmodel/action/viewAction.java
+4
-0
DeploymentBuilderImpl.java
...ctiviti/engine/impl/repository/DeploymentBuilderImpl.java
+3
-0
CasAction.java
src_system/com/gaowj/system/login/CasAction.java
+80
-0
No files found.
WebContent/WEB-INF/conf/gaowj/bl/business-process.xml
View file @
5c7f1abf
...
...
@@ -107,6 +107,7 @@
<bean
id=
"ProcdefinitionInitLinkBusiness"
class=
"com.gaowj.business.procdefinitionInitlink.ProcdefinitionInitLinkBusinessImpl"
>
<property
name=
"procdefinitionInitlinkDAO"
ref=
"procdefinitionInitlinkDAO"
></property>
<property
name=
"repositoryService"
ref=
"repositoryService"
></property>
</bean>
<bean
id=
"ProcdefiChooseUserBusiness"
class=
"com.gaowj.business.procdefiChooseUser.ProcdefiChooseUserBusinessImpl"
>
...
...
WebContent/WEB-INF/web.xml
View file @
5c7f1abf
...
...
@@ -69,12 +69,12 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<filter-class>
org.jasig.cas.client.authentication.AuthenticationFilter
</filter-class>
<init-param>
<param-name>
casServerLoginUrl
</param-name>
<param-value>
http://cas.jfbrother.com
:9003
/cas-jfsso/login
</param-value>
<!-- cas 服务器登录 地址 http://IP:PORT/CasWebProName/login -->
<param-value>
http://cas.jfbrother.com/cas-jfsso/login
</param-value>
<!-- cas 服务器登录 地址 http://IP:PORT/CasWebProName/login -->
</init-param>
<init-param>
<!-- 这里的server是服务端的IP -->
<param-name>
serverName
</param-name>
<param-value>
http://localhost:808
2
</param-value>
<!-- 客户端服务器地址 http://IP:PORT -->
<param-value>
http://localhost:808
0
</param-value>
<!-- 客户端服务器地址 http://IP:PORT -->
</init-param>
</filter>
<filter-mapping>
...
...
@@ -89,11 +89,11 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
<filter-class>
org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter
</filter-class>
<init-param>
<param-name>
casServerUrlPrefix
</param-name>
<param-value>
http://cas.jfbrother.com
:9003
/cas-jfsso
</param-value>
<!-- cas 服务器地址 http://IP:PORT/CasWebProName -->
<param-value>
http://cas.jfbrother.com/cas-jfsso
</param-value>
<!-- cas 服务器地址 http://IP:PORT/CasWebProName -->
</init-param>
<init-param>
<param-name>
serverName
</param-name>
<param-value>
http://localhost:808
2
</param-value>
<!-- 客户端服务器地址 http://IP:PORT -->
<param-value>
http://localhost:808
0
</param-value>
<!-- 客户端服务器地址 http://IP:PORT -->
</init-param>
</filter>
<filter-mapping>
...
...
@@ -159,7 +159,7 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j
</session-config>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
<welcome-file>
jfcas
</welcome-file>
</welcome-file-list>
<error-page>
...
...
WebContent/jfcas
0 → 100644
View file @
5c7f1abf
1
\ No newline at end of file
WebContent/jwapp/common/js/common_luosz_util.js
View file @
5c7f1abf
...
...
@@ -375,4 +375,36 @@ function nextBox(Box_id,List_id) {
}
}
}
/****/
\ No newline at end of file
/****/
/**
* 模块初始化
*/
function
initModule
(
listFunction
,
strutsRoutes
)
{
//此乃本模块与后台交互的方法接口部分
var
currency_module
=
function
(
format
)
{
this
.
module
=
""
;
this
.
action
=
""
;
this
.
format
=
format
;
};
//定义数据交互
currency_module
.
prototype
=
BusinessObject
;
if
(
Object
.
prototype
.
toString
.
call
(
listFunction
)
===
'[object Function]'
)
{
//如果是数组,这直接根据数组的元素进行方法初始化
for
(
k
in
listFunction
){
eval
(
'currency_module.prototype.'
+
k
+
' = function() {};'
);
}
}
else
{
//map形式的对象,用于后期拓展,例如传入特殊的function等,暂未知
for
(
k
in
listFunction
)
{
eval
(
'currency_module.prototype.'
+
listFunction
[
k
]
+
' = function() {};'
);
}
}
//创建一个数据操作对象,然后再后续使用
for
(
k
in
strutsRoutes
)
{
eval
(
'currency_module.'
+
k
+
' = new module("json").delegate("'
+
strutsRoutes
[
k
]
+
'");'
);
}
return
module
;
}
\ No newline at end of file
WebContent/process/pages/formtable/js/formtableTab.js
View file @
5c7f1abf
...
...
@@ -607,7 +607,7 @@ function templateRow(index){
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
openViewIframRow
(
"templateIframe"
,
"formmodelView_formmodelTab?tableId="
+
is_row
[
0
].
UUID
,
is_row
[
0
],
"
流程
模板列表"
,
true
,
0.95
,
0.95
,
0
,
0
);
openViewIframRow
(
"templateIframe"
,
"formmodelView_formmodelTab?tableId="
+
is_row
[
0
].
UUID
,
is_row
[
0
],
"
申请单
模板列表"
,
true
,
0.95
,
0.95
,
0
,
0
);
}
/**
...
...
WebContent/process/pages/procdefinition/js/procdefinitionTab.js
View file @
5c7f1abf
...
...
@@ -421,14 +421,5 @@ function choosePeopleRow(index){
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
$
.
ajax
({
url
:
'procdefinitionAct_procdefinitionInitLink'
,
type
:
'post'
,
data
:{
DEPLOYMENT_ID
:
is_row
[
0
].
DEPLOYMENT_ID
},
success
:
function
(
data
){
}
});
openViewIframRow
(
"choosePeople"
,
"procdefinitionView_procdefiChoosePeopleTab?DEPLOYMENT_ID="
+
is_row
[
0
].
DEPLOYMENT_ID
,
is_row
[
0
],
"环节配置"
,
true
,
0.95
,
0.95
,
0
,
0
);
}
WebContent/process/pages/procdefinitionmodels/help.jsp
0 → 100644
View file @
5c7f1abf
<
%@
page
language=
"java"
import=
"java.util.*"
pageEncoding=
"UTF-8"
%
>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>
帮助文档
</title>
</head>
<body>
<h1>
事件
</h1>
<table>
<tr>
<td></td>
</tr>
</table>
</body>
</html>
WebContent/process/pages/procdefinitionmodels/js/procdefinitionmodelsTab.js
View file @
5c7f1abf
...
...
@@ -401,7 +401,7 @@ function design(index){
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
window
.
open
(
'http://localhost:92
/process-editor/modeler.jsp?modelId='
+
is_row
[
0
].
ID
);
window
.
open
(
$
(
"#process_engine"
).
html
()
+
'
/process-editor/modeler.jsp?modelId='
+
is_row
[
0
].
ID
);
}
function
deploy
(
index
){
...
...
@@ -422,3 +422,9 @@ function deploy(index){
function
configureUser
(
index
){
}
function
help
(){
easyui
.
dialog
({
href
:
'procdefinitionmodelsView_help'
});
}
WebContent/process/pages/procdefinitionmodels/procdefinitionmodelsTab.jsp
View file @
5c7f1abf
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<%
String process_engine=com.gaowj.business.util.PropUtil.getValue("lcyq_server", "quartz_service", "");
%>
<div id="process_engine" style="display:none;"><%=process_engine %></div>
<div id="procdefinitionmodelsTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
...
...
@@ -15,6 +19,7 @@
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:help()">查看帮助</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
...
...
WebContent/process/pages/process/approval.jsp
View file @
5c7f1abf
...
...
@@ -32,6 +32,7 @@
<script>
$
(
function
()
{
document
.
domain
=
$
(
"#office_domain"
).
val
();;
init_office_approval_list
();
});
function
searchInfo
(){
...
...
@@ -194,6 +195,7 @@
</style>
<body
style=
"height:480px;"
>
<input
type=
"hidden"
id=
"office_domain"
value=
"<%=com.gaowj.business.util.PropUtil.getValue("
domain
",
"
quartz_service
",
"")
%
>
" />
<div
class=
"office_module_title col-md-12"
>
<img
src=
"${ctx}/custom/images/office_title.png"
height=
"16"
width=
"16"
/>
<span
style=
"font-size: 14px;"
>
我要审批
</span>
<div>
...
...
WebContent/process/pages/process/detail.jsp
View file @
5c7f1abf
...
...
@@ -20,6 +20,9 @@
businessData
=
{};
}
businessData
=
commonutil
.
keyAddStr
(
businessData
);
if
(
typeof
dataProcessing
==
'function'
){
dataProcessing
(
businessData
);
}
$
(
"#form"
).
form
(
'load'
,
businessData
);
//如果已经结束,则隐藏保存,下一步,回退按钮
if
(
businessData
.
FIELD_COMPLETE
==
1
){
...
...
@@ -33,6 +36,9 @@
if
(
businessData
.
FIELD_INSTANCE_ID
){
$
(
"#procImg"
).
attr
(
'src'
,
'${ctx}/procinstanceData_showProcinstanceImg?instanceId='
+
businessData
.
FIELD_INSTANCE_ID
);
}
if
(
typeof
afterLoadSuccess
==
'function'
){
afterLoadSuccess
(
businessData
);
}
});
function
proc_save
()
{
var
returnIsValid
=
$
(
'#form'
).
form
(
'validate'
);
...
...
WebContent/process/pages/process/progressHistory.jsp
View file @
5c7f1abf
...
...
@@ -32,6 +32,7 @@
<script>
$
(
function
()
{
document
.
domain
=
$
(
"#office_domain"
).
val
();;
init_office_progress_list
();
});
function
searchInfo
(){
...
...
@@ -195,6 +196,7 @@
</style>
<body
style=
"height:480px;"
>
<input
type=
"hidden"
id=
"office_domain"
value=
"<%=com.gaowj.business.util.PropUtil.getValue("
domain
",
"
quartz_service
",
"")
%
>
" />
<div
class=
"office_module_title col-md-12"
>
<img
src=
"${ctx}/custom/images/office_title.png"
height=
"16"
width=
"16"
/>
<span
style=
"font-size: 14px;"
>
历史查询
</span>
<div>
...
...
WebContent/process/pages/process/progressRate.jsp
View file @
5c7f1abf
...
...
@@ -32,6 +32,7 @@
<script>
$
(
function
()
{
document
.
domain
=
$
(
"#office_domain"
).
val
();;
init_office_progress_list
();
});
function
searchInfo
(){
...
...
@@ -195,6 +196,7 @@
</style>
<body
style=
"height:480px;"
>
<input
type=
"hidden"
id=
"office_domain"
value=
"<%=com.gaowj.business.util.PropUtil.getValue("
domain
",
"
quartz_service
",
"")
%
>
" />
<div
class=
"office_module_title col-md-12"
>
<img
src=
"${ctx}/custom/images/office_title.png"
height=
"16"
width=
"16"
/>
<span
style=
"font-size: 14px;"
>
进度查询
</span>
<div>
...
...
WebContent/process/pages/procinstance/js/procinstanceTab.js
View file @
5c7f1abf
...
...
@@ -236,9 +236,16 @@ function fillTable2(businessId,taskId){
}
info
.
BUSINESS_DATA
[
'FIELD_OPETYPE'
]
=
'update'
;
if
(
typeof
dataProcessing
==
'function'
){
dataProcessing
(
info
);
}
$
(
"#inputForm"
).
form
(
'load'
,
info
.
BUSINESS_DATA
);
//$.parser.parse();
if
(
typeof
afterLoadSuccess
==
'function'
){
afterLoadSuccess
(
info
);
}
$
.
parser
.
parse
(
'#table_content'
);
}
//下一步按钮执行事件
function
updateDataToNext
(
is_entity
){
...
...
@@ -528,7 +535,10 @@ function fillTable(){
$
(
"#table_content"
).
html
(
table_content
.
MODEL_CONTENT
);
$
(
"#FIELD_FORM_MODEL_ID"
).
val
(
table_content
.
UUID
);
}
//$.parser.parse();
if
(
typeof
afterLoadSuccess
==
'function'
){
afterLoadSuccess
();
}
$
.
parser
.
parse
(
'#table_content'
);
}
function
showProcinstanceImg
(
index
)
{
...
...
src/quartz_service.properties
View file @
5c7f1abf
...
...
@@ -28,3 +28,12 @@ downloadFilenameEncode1 = gbk
downloadFilenameEncode2
=
iso8859-1
#------------business table database----------------------
lcyq_table_db
=
lcyq_table.
#lcyq_server = http://lcyqsjq.jfbrother.com
lcyq_server
=
http://localhost:92
#--------------convertToXMLEncoding-----------------------
convertToXMLEncoding
=
GBK
#--------------deployEncoding-----------------------
deployEncoding
=
GBK
#--------------domain------------------------------
#domain = jfbrother.com
domain
=
localhost
src/struts-ext.xml
View file @
5c7f1abf
...
...
@@ -129,4 +129,10 @@
</result>
</action>
</package>
<package
name=
"caslogin"
extends=
"struts-default,json-default"
>
<action
name=
"jfcas"
class=
"com.gaowj.system.login.CasAction"
>
</action>
</package>
</struts>
src_process/com/gaowj/business/ProcdefinitionInitLinkBusiness.java
View file @
5c7f1abf
...
...
@@ -18,4 +18,6 @@ public interface ProcdefinitionInitLinkBusiness {
void
update_procde_finition_init_link
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
Page
<
Map
<
String
,
Object
>>
list_procde_finition
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
int
init_procde_finition_people_approval
(
String
procdefinitionUuid
)
throws
BusinessException
;
}
src_process/com/gaowj/business/procdefinitionInitlink/ProcdefinitionInitLinkBusinessImpl.java
View file @
5c7f1abf
...
...
@@ -7,6 +7,14 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Set
;
import
org.activiti.engine.RepositoryService
;
import
org.activiti.engine.delegate.Expression
;
import
org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior
;
import
org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity
;
import
org.activiti.engine.impl.pvm.delegate.ActivityBehavior
;
import
org.activiti.engine.impl.pvm.process.ActivityImpl
;
import
org.activiti.engine.impl.task.TaskDefinition
;
import
org.activiti.engine.repository.ProcessDefinition
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.ibatis.session.RowBounds
;
...
...
@@ -15,28 +23,29 @@ import com.gaowj.business.exception.BusinessException;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.SessionUtil
;
public
class
ProcdefinitionInitLinkBusinessImpl
implements
ProcdefinitionInitLinkBusiness
{
public
class
ProcdefinitionInitLinkBusinessImpl
implements
ProcdefinitionInitLinkBusiness
{
private
procdefinitionInitlinkDAO
procdefinitionInitlinkDAO
;
private
RepositoryService
repositoryService
;
public
procdefinitionInitlinkDAO
getProcdefinitionInitlinkDAO
()
{
return
procdefinitionInitlinkDAO
;
}
public
void
setProcdefinitionInitlinkDAO
(
procdefinitionInitlinkDAO
procdefinitionInitlinkDAO
)
{
public
void
setProcdefinitionInitlinkDAO
(
procdefinitionInitlinkDAO
procdefinitionInitlinkDAO
)
{
this
.
procdefinitionInitlinkDAO
=
procdefinitionInitlinkDAO
;
}
public
RepositoryService
getRepositoryService
()
{
return
repositoryService
;
}
public
void
setRepositoryService
(
RepositoryService
repositoryService
)
{
this
.
repositoryService
=
repositoryService
;
}
@Override
public
void
insert_procde_finition_init_link
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
public
void
insert_procde_finition_init_link
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
// TODO Auto-generated method stub
if
(
entity
.
get
(
"UUID"
)
==
null
)
{
entity
.
put
(
"UUID"
,
java
.
util
.
UUID
.
randomUUID
().
toString
());
...
...
@@ -70,47 +79,41 @@ public class ProcdefinitionInitLinkBusinessImpl implements ProcdefinitionInitLin
procdefinitionInitlinkDAO
.
insert_procde_finition_init_link
(
entity
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
list_procde_finition_init_link
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
public
List
<
Map
<
String
,
Object
>>
list_procde_finition_init_link
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
// TODO Auto-generated method stub
List
<
Map
<
String
,
Object
>>
result
=
procdefinitionInitlinkDAO
.
list_procde_finition_init_link
(
entity
);
List
<
Map
<
String
,
Object
>>
result
=
procdefinitionInitlinkDAO
.
list_procde_finition_init_link
(
entity
);
return
result
;
}
@Override
public
void
update_procde_finition_init_link
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
public
void
update_procde_finition_init_link
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
{
// TODO Auto-generated method stub
List
<
Map
<
String
,
Object
>>
updateList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
entity
.
keySet
()!=
null
)
{
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
);
procdefinitionInitlinkDAO
.
update_procde_finition_init_link
(
param
);
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
);
procdefinitionInitlinkDAO
.
update_procde_finition_init_link
(
param
);
}
}
}
@Override
public
Page
<
Map
<
String
,
Object
>>
list_procde_finition
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
public
Page
<
Map
<
String
,
Object
>>
list_procde_finition
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
init_procde_finition_people_approval
(
query
.
get
(
"DEPLOYMENT_ID"
).
toString
());
// TODO Auto-generated method stub
int
pageStart
=
(
pageNo
-
1
)
*
pageSize
;
// 获取列表
...
...
@@ -126,4 +129,75 @@ public class ProcdefinitionInitLinkBusinessImpl implements ProcdefinitionInitLin
return
page
;
}
@Override
public
int
init_procde_finition_people_approval
(
String
deploymentId
)
throws
BusinessException
{
// 根据deployment_id找到activities对应的流程
ProcessDefinition
processDefinition
=
repositoryService
.
createProcessDefinitionQuery
().
deploymentId
(
deploymentId
).
singleResult
();
if
(
processDefinition
==
null
)
{
return
-
1
;
}
ProcessDefinitionEntity
processDef
=
(
ProcessDefinitionEntity
)
repositoryService
.
getProcessDefinition
(
processDefinition
.
getId
());
List
<
ActivityImpl
>
activitiList
=
processDef
.
getActivities
();
List
<
String
>
taskKey
=
new
ArrayList
<
String
>();
for
(
ActivityImpl
activity
:
activitiList
)
{
ActivityBehavior
activityBehavior
=
activity
.
getActivityBehavior
();
if
(
activityBehavior
instanceof
UserTaskActivityBehavior
)
{
UserTaskActivityBehavior
userTaskActivityBehavior
=
(
UserTaskActivityBehavior
)
activityBehavior
;
TaskDefinition
taskDefinition
=
userTaskActivityBehavior
.
getTaskDefinition
();
//
String
taskDefKey
=
taskDefinition
.
getKey
();
taskKey
.
add
(
taskDefKey
);
}
}
//删除原有的
procdefinitionInitlinkDAO
.
delete_procde_finition_init_link_byLinkKey
(
taskKey
);
//插入最新的
for
(
ActivityImpl
activity
:
activitiList
)
{
ActivityBehavior
activityBehavior
=
activity
.
getActivityBehavior
();
if
(
activityBehavior
instanceof
UserTaskActivityBehavior
)
{
UserTaskActivityBehavior
userTaskActivityBehavior
=
(
UserTaskActivityBehavior
)
activityBehavior
;
TaskDefinition
taskDefinition
=
userTaskActivityBehavior
.
getTaskDefinition
();
//
Map
<
String
,
Object
>
entity
=
new
HashMap
<
String
,
Object
>();
entity
.
put
(
"DEPLOYMENT_ID"
,
deploymentId
);
String
taskDefKey
=
taskDefinition
.
getKey
();
Expression
taskName
=
taskDefinition
.
getNameExpression
();
insertProcdeLink
(
deploymentId
,
processDefinition
,
entity
,
taskDefKey
,
taskName
);
}
}
return
1
;
}
private
void
insertProcdeLink
(
String
DEPLOYMENT_ID
,
ProcessDefinition
processDefinition
,
Map
<
String
,
Object
>
entity
,
String
taskDefKey
,
Expression
taskName
)
{
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
());
}
entity
.
put
(
"DEPLOYMENT_ID"
,
DEPLOYMENT_ID
);
entity
.
put
(
"LINK_KEY"
,
taskDefKey
);
if
(
taskName
!=
null
)
{
entity
.
put
(
"LINK_NAME"
,
taskName
.
toString
());
}
entity
.
put
(
"PROC_DEFIN_KEY"
,
processDefinition
.
getKey
());
entity
.
put
(
"PROC_DEFIN_ID"
,
processDefinition
.
getId
());
entity
.
put
(
"PROC_DEFIN_NAME"
,
processDefinition
.
getName
());
entity
.
put
(
"PROC_DEFIN_VERSION"
,
processDefinition
.
getVersion
());
// 动态传值插入
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
);
}
procdefinitionInitlinkDAO
.
insert_procde_finition_init_link
(
entity
);
entity
.
clear
();
}
}
src_process/com/gaowj/business/procdefinitionmodels/ProcdefinitionmodelsBusinessImpl.java
View file @
5c7f1abf
...
...
@@ -38,6 +38,7 @@ import com.gaowj.business.ProcdefinitionmodelsBusiness;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.procdefinition.procdefinitionDAO
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.PropUtil
;
import
com.gaowj.business.util.SessionUtil
;
public
class
ProcdefinitionmodelsBusinessImpl
implements
ProcdefinitionmodelsBusiness
{
...
...
@@ -248,7 +249,7 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus
byte
[]
bpmnBytes
=
null
;
BpmnModel
model
=
new
BpmnJsonConverter
().
convertToBpmnModel
(
modelNode
);
bpmnBytes
=
new
BpmnXMLConverter
().
convertToXML
(
model
,
"GBK"
);
bpmnBytes
=
new
BpmnXMLConverter
().
convertToXML
(
model
,
PropUtil
.
getValue
(
"convertToXMLEncoding"
,
"quartz_service"
,
"GBK"
)
);
String
processName
=
modelData
.
getName
()
+
".bpmn20.xml"
;
...
...
@@ -281,7 +282,7 @@ public class ProcdefinitionmodelsBusinessImpl implements ProcdefinitionmodelsBus
e
.
printStackTrace
();
}
Deployment
deployment
=
repositoryService
.
createDeployment
().
name
(
modelData
.
getName
()).
addString
(
processName
,
bpmText
,
"GBK"
).
deploy
();
Deployment
deployment
=
repositoryService
.
createDeployment
().
name
(
modelData
.
getName
()).
addString
(
processName
,
bpmText
,
PropUtil
.
getValue
(
"deployEncoding"
,
"quartz_service"
,
"GBK"
)
).
deploy
();
// 将部署id存入流程定义表
Map
<
String
,
Object
>
entity
=
new
HashMap
<
String
,
Object
>();
entity
.
put
(
"UUID"
,
procId
);
...
...
src_process/com/gaowj/business/utils/ActivitiTools.java
View file @
5c7f1abf
...
...
@@ -244,6 +244,11 @@ public class ActivitiTools {
for
(
Task
task
:
listTask
)
{
taskService
.
complete
(
task
.
getId
());
}
long
count
=
taskService
.
createTaskQuery
().
processInstanceId
(
procInstance
.
get
(
"INSTANCE_ID"
).
toString
()).
count
();
if
(
count
==
0
){
//说明已经结束
procInstanceUpdate
.
put
(
"COMPLETE"
,
1
);
}
}
//更新实例表
updateProcInstanceData
(
procInstanceUpdate
);
...
...
src_process/com/gaowj/formmodel/action/actAction.java
View file @
5c7f1abf
package
com
.
gaowj
.
formmodel
.
action
;
import
java.sql.SQLException
;
import
java.text.ParseException
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
com.gaowj.business.FormfieldBusiness
;
import
com.gaowj.business.FormmodelsBusiness
;
import
com.gaowj.business.FormtableBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.exception.BusinessException
;
...
...
@@ -16,6 +19,8 @@ import com.gaowj.business.util.QueryParamUtil;
import
com.gaowj.business.util.RequestUtils
;
import
com.gaowj.business.util.Status
;
import
net.sf.json.JSONObject
;
public
class
actAction
extends
BasicAction
{
private
JSONObject
jsonObject
=
new
JSONObject
();
...
...
@@ -34,7 +39,7 @@ public class actAction extends BasicAction{
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
jsonObject
=
new
JSONObject
();
try
{
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
entity
=
StringToDate
(
entity
);
//去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
business
.
insert_form_model
(
entity
);
...
...
@@ -68,6 +73,7 @@ public class actAction extends BasicAction{
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
try
{
entity
.
remove
(
"OPETYPE"
);
entity
=
StringToDate
(
entity
);
business
.
update_form_model
(
entity
);
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"更新成功"
));
}
catch
(
Exception
e
)
{
...
...
@@ -100,4 +106,25 @@ public class actAction extends BasicAction{
}
return
"json"
;
}
public
static
Map
<
String
,
Object
>
StringToDate
(
Map
<
String
,
Object
>
map
)
throws
SQLException
,
ParseException
{
Set
<
String
>
key
=
map
.
keySet
();
for
(
Iterator
it
=
key
.
iterator
();
it
.
hasNext
();)
{
String
s
=
(
String
)
it
.
next
();
if
((
map
.
get
(
s
)
!=
null
)
&&
((
map
.
get
(
s
)
instanceof
String
))
&&
(
map
.
get
(
s
).
toString
().
length
()
>
0
)
&&
map
.
get
(
s
).
toString
().
startsWith
(
"DATE_"
)
&&
(
map
.
get
(
s
).
toString
().
split
(
"_"
).
length
>=
2
)
&&
(
map
.
get
(
s
).
toString
().
split
(
"_"
)[
1
].
length
()
>
0
))
{
String
tempDate
=
map
.
get
(
s
).
toString
().
split
(
"_"
)[
1
];
if
((!
tempDate
.
contains
(
"-"
))
&&
(!
tempDate
.
contains
(
"/"
)))
{
tempDate
=
DateFormatUtils
.
format
(
new
java
.
sql
.
Date
(
Long
.
parseLong
(
tempDate
)),
"yyyy-MM-dd"
);
}
map
.
put
(
s
,
DateUtils
.
parseDate
(
tempDate
,
new
String
[]
{
"yyyy-MM-dd"
}));
}
}
return
map
;
}
}
src_process/com/gaowj/formmodel/action/viewAction.java
View file @
5c7f1abf
...
...
@@ -17,4 +17,8 @@ public class viewAction extends BasicAction{
request
.
setAttribute
(
"is_row"
,
query
);
return
"formmodelTabDetail"
;
}
public
String
help
()
throws
BusinessException
{
return
"help"
;
}
}
src_process/org/activiti/engine/impl/repository/DeploymentBuilderImpl.java
View file @
5c7f1abf
...
...
@@ -80,6 +80,9 @@ public class DeploymentBuilderImpl implements DeploymentBuilder, Serializable {
ResourceEntity
resource
=
new
ResourceEntity
();
resource
.
setName
(
resourceName
);
try
{
System
.
out
.
println
(
text
);
System
.
out
.
println
(
encoding
);
System
.
out
.
println
(
text
.
getBytes
(
encoding
));
resource
.
setBytes
(
text
.
getBytes
(
encoding
));
}
catch
(
UnsupportedEncodingException
e
)
{
throw
new
ActivitiException
(
"Unable to get process bytes."
,
e
);
...
...
src_system/com/gaowj/system/login/CasAction.java
0 → 100644
View file @
5c7f1abf
package
com
.
gaowj
.
system
.
login
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.jasig.cas.client.authentication.AttributePrincipal
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.util.Java_tool
;
public
class
CasAction
extends
BasicAction
{
/**
*
*/
private
static
final
long
serialVersionUID
=
4192673206777760091L
;
public
String
execute
()
throws
BusinessException
{
response
.
setHeader
(
"P3P"
,
"CP=CAO PSA OUR"
);
AttributePrincipal
principal
=
(
AttributePrincipal
)
request
.
getUserPrincipal
();
Map
<
String
,
Object
>
attributes
=
principal
.
getAttributes
();
String
userID
=
attributes
.
get
(
"userid"
).
toString
();
String
userName
=
attributes
.
get
(
"USER_NAME"
).
toString
();
System
.
out
.
println
(
"-----1"
+
userID
);
System
.
out
.
println
(
"-----2"
+
userName
);
System
.
out
.
println
(
"-----3"
+
attributes
.
get
(
"UNIT_ID"
));
if
(
userID
!=
null
){
String
username
=
userID
;
Java_tool
jt
=
new
Java_tool
();
SystemOpeBusiness
systemOpeBusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
Map
<
String
,
Object
>
query
=
new
HashMap
<
String
,
Object
>();
query
.
put
(
"EMID"
,
username
);
Map
<
String
,
Object
>
userInfoI
=
systemOpeBusiness
.
listLoginUserInfo
(
query
).
get
(
0
);
Map
<
String
,
Object
>
sessionUser
=
new
HashMap
<
String
,
Object
>();
String
u_all_m
=
systemOpeBusiness
.
getUserAllModule
(
userInfoI
.
get
(
"CODE"
).
toString
());
sessionUser
.
put
(
"CODE"
,
userInfoI
.
get
(
"CODE"
));
sessionUser
.
put
(
"EMID"
,
userInfoI
.
get
(
"EMID"
));
sessionUser
.
put
(
"EMSEX"
,
userInfoI
.
get
(
"EMSEX"
));
sessionUser
.
put
(
"EMDEPARTNAME"
,
userInfoI
.
get
(
"EMDEPARTNAME"
));
sessionUser
.
put
(
"EMDEPART"
,
userInfoI
.
get
(
"EMDEPART"
));
sessionUser
.
put
(
"EMNAME"
,
userInfoI
.
get
(
"EMNAME"
));
sessionUser
.
put
(
"BEFORETIME"
,
jt
.
date3string
((
Date
)
userInfoI
.
get
(
"BEFORETIME"
)));
sessionUser
.
put
(
"SESSIONID"
,
request
.
getSession
().
getId
());
sessionUser
.
put
(
"CURRENTTIME"
,
jt
.
now_datetime
());
sessionUser
.
put
(
"LOGINIP"
,
request
.
getRemoteAddr
());
sessionUser
.
put
(
"SERVERIP"
,
request
.
getLocalAddr
());
sessionUser
.
put
(
"QUANXIAN"
,
u_all_m
);
request
.
getSession
().
setAttribute
(
"userInfo"
,
sessionUser
);
//增加登陆日志
Map
<
String
,
Object
>
log
=
new
HashMap
<
String
,
Object
>();
log
.
put
(
"CODE"
,
sessionUser
.
get
(
"CODE"
));
log
.
put
(
"EMNAME"
,
sessionUser
.
get
(
"EMNAME"
));
log
.
put
(
"EMIP"
,
sessionUser
.
get
(
"LOGINIP"
));
log
.
put
(
"OPENAME"
,
"登陆"
);
log
.
put
(
"OPETIME"
,
jt
.
String3date
((
String
)
sessionUser
.
get
(
"CURRENTTIME"
)));
log
.
put
(
"TYPE"
,
userInfoI
.
get
(
"TYPE"
));
log
.
put
(
"OPETYPE"
,
"B/S登陆"
);
systemOpeBusiness
.
insert_log
(
log
);
}
String
strRedirecturl
=
request
.
getParameter
(
"redirectUrl"
);
String
toUrl
=
""
;
if
(
strRedirecturl
!=
null
&&
strRedirecturl
.
length
()
>
0
)
{
toUrl
=
strRedirecturl
;
}
else
{
toUrl
=
"index.jsp"
;
}
try
{
response
.
sendRedirect
(
toUrl
);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
return
null
;
}
}
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