Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
IM
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBizPOC_20003
IM
提交
c3dab18a
提交
c3dab18a
编写于
4月 09, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
f90c15c1
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
229 行增加
和
13 行删除
+229
-13
config.xml
config.xml
+0
-8
IMService.java
...-web/src/main/java/com/ibiz/web/ht/service/IMService.java
+224
-0
application-wfweb2.yml
...p/im-app-wfweb2/src/main/resources/application-wfweb2.yml
+5
-5
未找到文件。
config.xml
浏览文件 @
c3dab18a
...
...
@@ -40,14 +40,6 @@
mvn install
cd ..
mvn install
cd im-app/im-app-wfweb
mvn clean package -Pprod
echo
'
echo
"
$para1
"'
>
apppasswd.sh
chmod -R 777 *
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh root@172.16.102.61
"
mkdir -p /ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F
"
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
scp -r ./target/im-app-wfweb.jar root@172.16.102.61:/ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh root@172.16.102.61
"
ps -ef | grep
'
/ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F
'
| tr -s
'
'
|cut -d
'
'
-f2,8,9 | grep -v grep | grep
'
jar
'
| cut -d
'
'
-f1|xargs --no-run-if-empty kill -9
"
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh root@172.16.102.61
"
source /etc/profile;source ~/.bash_profile; nohup java -jar -Xms512m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=128m /ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F/im-app-wfweb.jar
>>
/ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F/im_appim 流程应用-`date --date=
'
0 days ago
'
+%Y-%m-%d`.log 2
>&
1
&"
</command>
</hudson.tasks.Shell>
</builders>
...
...
im-app/im-app-web/src/main/java/com/ibiz/web/ht/service/IMService.java
0 → 100644
浏览文件 @
c3dab18a
package
com
.
ibiz
.
web
.
ht
.
service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
import
com.alibaba.fastjson.JSONObject
;
import
feign.Client
;
import
feign.Contract
;
import
feign.Feign
;
import
feign.codec.Decoder
;
import
feign.codec.Encoder
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.security.core.Authentication
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.openfeign.ribbon.LoadBalancerFeignClient
;
import
org.springframework.stereotype.Service
;
import
com.ibiz.util.feign.suport.SearchContextFeignEncode
;
import
com.ibiz.web.ht.domain.IM
;
import
com.ibiz.web.ht.filter.*
;
import
com.ibiz.web.ht.feign.IMFeignClient
;
import
com.ibiz.web.WebApplication.WebClientProperties
;
import
com.ibiz.util.feign.FeignRequestInterceptor
;
import
com.ibiz.util.config.UniWFClientProperties
;
import
com.ibiz.util.feign.UniWFFeignClient
;
import
com.ibiz.util.config.SysInfoProperties
;
import
com.ibiz.util.domain.*
;
@Service
public
class
IMService
{
IMFeignClient
client
;
@Autowired
SysInfoProperties
sysInfoProperties
;
UniWFClientProperties
uniWFClientProperties
;
UniWFFeignClient
uniWFFeignClient
;
@Autowired
public
IMService
(
Decoder
decoder
,
Encoder
encoder
,
Client
client
,
Contract
contract
,
FeignRequestInterceptor
feignRequestInterceptor
,
WebClientProperties
webClientProperties
,
UniWFClientProperties
uniWFClientProperties
)
{
if
(
webClientProperties
.
getServiceId
()!=
null
)
{
Feign
.
Builder
nameBuilder
=
Feign
.
builder
()
.
client
(
client
)
.
encoder
(
new
SearchContextFeignEncode
(
encoder
))
.
decoder
(
decoder
)
.
contract
(
contract
)
.
requestInterceptor
(
feignRequestInterceptor
)
;
this
.
client
=
nameBuilder
.
target
(
IMFeignClient
.
class
,
"http://"
+
webClientProperties
.
getServiceId
()
+
"/"
)
;
}
else
if
(
webClientProperties
.
getServiceUrl
()!=
null
)
{
if
(
client
instanceof
LoadBalancerFeignClient
)
{
client
=
((
LoadBalancerFeignClient
)
client
).
getDelegate
();
}
Feign
.
Builder
nameBuilder
=
Feign
.
builder
()
.
client
(
client
)
.
encoder
(
new
SearchContextFeignEncode
(
encoder
))
.
decoder
(
decoder
)
.
contract
(
contract
)
.
requestInterceptor
(
feignRequestInterceptor
)
;
this
.
client
=
nameBuilder
.
target
(
IMFeignClient
.
class
,
"http://"
+
webClientProperties
.
getServiceUrl
()
+
"/"
)
;
}
this
.
uniWFClientProperties
=
uniWFClientProperties
;
if
(
uniWFClientProperties
.
getServiceId
()!=
null
)
{
Feign
.
Builder
nameBuilder
=
Feign
.
builder
()
.
client
(
client
)
.
encoder
(
encoder
)
.
decoder
(
decoder
)
.
contract
(
contract
)
.
requestInterceptor
(
feignRequestInterceptor
)
;
this
.
uniWFFeignClient
=
nameBuilder
.
target
(
UniWFFeignClient
.
class
,
"http://"
+
uniWFClientProperties
.
getServiceId
()
+
"/"
)
;
}
else
if
(
uniWFClientProperties
.
getServiceUrl
()!=
null
)
{
if
(
client
instanceof
LoadBalancerFeignClient
)
{
client
=
((
LoadBalancerFeignClient
)
client
).
getDelegate
();
}
Feign
.
Builder
nameBuilder
=
Feign
.
builder
()
.
client
(
client
)
.
encoder
(
encoder
)
.
decoder
(
decoder
)
.
contract
(
contract
)
.
requestInterceptor
(
feignRequestInterceptor
)
;
this
.
uniWFFeignClient
=
nameBuilder
.
target
(
UniWFFeignClient
.
class
,
"http://"
+
uniWFClientProperties
.
getServiceUrl
()
+
"/"
)
;
}
}
public
IM
update
(
String
im_id
,
IM
im
)
{
return
client
.
update
(
im_id
,
im
);
}
public
IM
hD
(
String
im_id
,
IM
im
)
{
return
client
.
hD
(
im_id
,
im
);
}
public
IM
getDraft
(
String
im_id
,
IM
im
)
{
return
client
.
getDraft
(
im_id
,
im
);
}
public
IM
create
(
IM
im
)
{
return
client
.
create
(
im
);
}
public
boolean
remove
(
String
im_id
)
{
return
client
.
remove
(
im_id
);
}
public
IM
save
(
String
im_id
,
IM
im
)
{
return
client
.
save
(
im_id
,
im
);
}
public
IM
get
(
String
im_id
)
{
return
client
.
get
(
im_id
);
}
public
boolean
checkKey
(
IM
im
)
{
return
client
.
checkKey
(
im
);
}
public
IM
getMP
(
String
im_id
,
IM
im
)
{
return
client
.
getMP
(
im_id
,
im
);
}
public
IM
createAndStart
(
String
im_id
,
IM
im
)
{
return
client
.
createAndStart
(
im_id
,
im
);
}
public
Page
<
IM
>
fetchDefault
(
IMSearchContext
searchContext
)
{
return
client
.
fetchDefault
(
searchContext
);
}
public
JSONObject
wfStart
(
String
im_id
)
{
PSDataEntity
psdataentity
=
new
PSDataEntity
();
psdataentity
.
setPsdataentityid
(
"6ebc01c300b54d50486ccff26162752b"
);
psdataentity
.
setWorkflowid
(
sysInfoProperties
.
getDomainid
());
psdataentity
.
setPssystemid
(
sysInfoProperties
.
getSystemid
());
String
uniwfUrl
=
"http://localhost:8111/"
;
if
(
uniWFClientProperties
.
getAppUrl
()
!=
null
&&
!
uniWFClientProperties
.
getAppUrl
().
isEmpty
())
{
uniwfUrl
=
uniWFClientProperties
.
getAppUrl
();
}
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"url"
,
uniwfUrl
+
"#/selectindexview/null/pswfversions/null/dataview?customParams=dataentityid:"
+
psdataentity
.
getPsdataentityid
()
+
","
+
"proxydataid:"
+
im_id
+
","
+
"proxymoduleid:IM"
);
return
json
;
}
/**
* 流程业务数据行为【WFAction】
*/
public
JSONObject
wfAction
(
String
im_id
,
JSONObject
data
)
{
if
(
data
==
null
||
data
.
getString
(
"type"
)
==
null
||
data
.
getString
(
"wfinstanceid"
)
==
null
)
{
System
.
err
.
println
(
"传入参数缺失"
);
data
.
put
(
"rst"
,
"0"
);
data
.
put
(
"msg"
,
"传入参数缺失"
);
return
data
;
}
String
type
=
data
.
getString
(
"type"
);
String
wfinstanceid
=
data
.
getString
(
"wfinstanceid"
);
String
wfstep
=
data
.
getString
(
"wfstep"
);
// 业务实体
IM
im
=
this
.
get
(
im_id
);
WFInstance
wfinstance
=
this
.
uniWFFeignClient
.
getWFInstance
(
wfinstanceid
);
if
(
wfinstance
==
null
)
{
System
.
err
.
println
(
"查询不到流程实例"
);
data
.
put
(
"rst"
,
"0"
);
data
.
put
(
"msg"
,
"查询不到流程实例"
);
return
data
;
}
JSONObject
psdewfCond
=
new
JSONObject
();
psdewfCond
.
put
(
"n_psworkflowid_eq"
,
wfinstance
.
getPsworkflowid
());
psdewfCond
.
put
(
"n_psdataentityid_eq"
,
"6ebc01c300b54d50486ccff26162752b"
);
Page
<
PSDEWF
>
psdewfs
=
this
.
uniWFFeignClient
.
getPSDEWFByCondition
(
psdewfCond
);
if
(
psdewfs
==
null
||
psdewfs
.
getContent
().
size
()
==
0
)
{
data
.
put
(
"rst"
,
"0"
);
data
.
put
(
"msg"
,
"未查到流程实体"
);
return
data
;
}
PSDEWF
psdewf
=
psdewfs
.
getContent
().
get
(
0
);
// 业务状态
String
status
=
null
;
if
(
"start"
.
equals
(
type
))
{
status
=
psdewf
.
getProcessvalue
();
}
else
if
(
"gotostep"
.
equals
(
type
))
{
status
=
psdewf
.
getProcessvalue
();
}
else
if
(
"finish"
.
equals
(
type
))
{
status
=
psdewf
.
getFinishvalue
();
}
else
if
(
"cancel"
.
equals
(
type
))
{
}
else
if
(
"error"
.
equals
(
type
))
{
status
=
psdewf
.
getErrorvalue
();
}
// 保存当前数据
if
(
status
!=
null
&&
!
status
.
isEmpty
())
{
im
.
setImwfstate
(
status
);
}
if
(
wfstep
!=
null
&&
!
wfstep
.
isEmpty
())
{
}
// 保存业务数据
this
.
update
(
im_id
,
im
);
data
.
put
(
"rst"
,
"1"
);
return
data
;
}
}
im-app/im-app-wfweb2/src/main/resources/application-wfweb2.yml
浏览文件 @
c3dab18a
server
:
devmode
:
fals
e
port
:
8
203
devmode
:
tru
e
port
:
8
080
servlet
:
session
:
cookie
:
...
...
@@ -17,11 +17,11 @@ spring:
security
:
cas
:
server
:
host
:
http
s://passport
.ibizlab.cn
host
:
http
://passportcs
.ibizlab.cn
login
:
${security.cas.server.host}/login
logout
:
${security.cas.server.host}/logout
service
:
host
:
http://
172.16.102.61
:${server.port}
host
:
http://
localhost
:${server.port}
login
:
/login/cas
logout
:
/logout
...
...
@@ -36,7 +36,7 @@ logging:
app
:
web
:
url
:
http://
172.16.102.61
:${server.port}
url
:
http://
localhost
:${server.port}
wfstarturl
:
/#/%s/null/editview
# wfviewurl: /#/dewfdataredirectview
wfviewurl
:
/#/appwfdataredirectview
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录