Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
3a19011c
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1173
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3a19011c
编写于
12月 05, 2021
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
动态表单整合工作流完成
上级
15c6c585
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
106 addition
and
170 deletion
+106
-170
skyeye-activiti/src/main/java/com/skyeye/activiti/controller/ActivitiModelController.java
...m/skyeye/activiti/controller/ActivitiModelController.java
+0
-16
skyeye-activiti/src/main/java/com/skyeye/activiti/service/ActivitiModelService.java
...ava/com/skyeye/activiti/service/ActivitiModelService.java
+0
-2
skyeye-activiti/src/main/java/com/skyeye/activiti/service/impl/ActivitiModelServiceImpl.java
...kyeye/activiti/service/impl/ActivitiModelServiceImpl.java
+11
-61
skyeye-activiti/src/main/java/com/skyeye/activiti/service/impl/DsFormActivitiServiceImpl.java
...yeye/activiti/service/impl/DsFormActivitiServiceImpl.java
+48
-38
skyeye-activiti/src/main/java/com/skyeye/eve/service/impl/ActModleTypeServiceImpl.java
.../com/skyeye/eve/service/impl/ActModleTypeServiceImpl.java
+15
-19
skyeye-activiti/src/main/java/com/skyeye/eve/service/impl/PageSequenceServiceImpl.java
.../com/skyeye/eve/service/impl/PageSequenceServiceImpl.java
+5
-8
skyeye-activiti/src/main/resources/mapper/activiti/ActModelMapper.xml
...iti/src/main/resources/mapper/activiti/ActModelMapper.xml
+2
-2
skyeye-activiti/src/main/resources/mapper/activiti/ActUserProcessInstanceIdMapper.xml
...ources/mapper/activiti/ActUserProcessInstanceIdMapper.xml
+2
-2
skyeye-activiti/src/main/resources/reqmapping/mapping/activiti.xml
...tiviti/src/main/resources/reqmapping/mapping/activiti.xml
+4
-7
skyeye-dsform/src/main/java/com/skyeye/eve/dao/DsFormPageSequenceDao.java
...c/main/java/com/skyeye/eve/dao/DsFormPageSequenceDao.java
+1
-1
skyeye-dsform/src/main/java/com/skyeye/eve/service/impl/DsFormPageServiceImpl.java
...va/com/skyeye/eve/service/impl/DsFormPageServiceImpl.java
+17
-13
skyeye-dsform/src/main/resources/mapper/dsform/DsFormPageSequenceMapper.xml
...main/resources/mapper/dsform/DsFormPageSequenceMapper.xml
+1
-1
未找到文件。
skyeye-activiti/src/main/java/com/skyeye/activiti/controller/ActivitiModelController.java
浏览文件 @
3a19011c
...
@@ -77,22 +77,6 @@ public class ActivitiModelController {
...
@@ -77,22 +77,6 @@ public class ActivitiModelController {
activitiModelService
.
editActivitiModelToDeploy
(
inputObject
,
outputObject
);
activitiModelService
.
editActivitiModelToDeploy
(
inputObject
,
outputObject
);
}
}
/**
*
* @Title: editActivitiModelToStartProcess
* @Description: 启动流程
* @param inputObject
* @param outputObject
* @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/ActivitiModelController/editActivitiModelToStartProcess"
)
@ResponseBody
public
void
editActivitiModelToStartProcess
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
activitiModelService
.
editActivitiModelToStartProcess
(
inputObject
,
outputObject
);
}
/**
/**
*
*
* @Title: deleteActivitiModelById
* @Title: deleteActivitiModelById
...
...
skyeye-activiti/src/main/java/com/skyeye/activiti/service/ActivitiModelService.java
浏览文件 @
3a19011c
...
@@ -29,8 +29,6 @@ public interface ActivitiModelService {
...
@@ -29,8 +29,6 @@ public interface ActivitiModelService {
public
void
editActivitiModelToDeploy
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
editActivitiModelToDeploy
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
editActivitiModelToStartProcess
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
deleteActivitiModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
deleteActivitiModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
deleteReleasedActivitiModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
deleteReleasedActivitiModelById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
...
...
skyeye-activiti/src/main/java/com/skyeye/activiti/service/impl/ActivitiModelServiceImpl.java
浏览文件 @
3a19011c
...
@@ -254,55 +254,6 @@ public class ActivitiModelServiceImpl implements ActivitiModelService{
...
@@ -254,55 +254,6 @@ public class ActivitiModelServiceImpl implements ActivitiModelService{
LOGGER
.
info
(
"流程【{}】成功发布"
,
processName
);
LOGGER
.
info
(
"流程【{}】成功发布"
,
processName
);
}
}
/**
* @Title: editActivitiModelToStartProcess
* @Description: 启动流程
* @param inputObject
* @param outputObject
* @throws Exception 参数
* @return void 返回类型
* @throws
*/
@Override
@ActivitiAndBaseTransaction
(
value
=
{
"activitiTransactionManager"
,
"transactionManager"
})
public
void
editActivitiModelToStartProcess
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
// 流程定义的key
String
keyName
=
map
.
get
(
"keyName"
).
toString
();
/**
* jsonStr参数介绍
* name: "",----标题
* value: "",----值
* orderBy: 1,----排序,值越大越往后
* showType: 1----展示类型:1.文本展示;2.附件展示;3.富文本展示;4.图片上传;5.表格展示
* proportion: 6----展示比例,前端界面百分比分为12份
* editableNodeId:可编辑节点Id
* editableNodeName:可编辑节点名称
* formItemType: 原始表单类型
* formItem:表单内容
*/
String
str
=
map
.
get
(
"jsonStr"
).
toString
();
if
(
ToolUtil
.
isBlank
(
str
)){
outputObject
.
setreturnMessage
(
"数据不能为空."
);
}
else
{
try
{
// 流程存在的时候才能执行
if
(
judgeProcessKeyIsLive
(
keyName
)){
// 启动流程
startProcess
(
str
,
user
,
keyName
,
""
);
outputObject
.
setBean
(
map
);
}
else
{
LOGGER
.
info
(
"this processDefinitionKey's [{}] process is non-exits"
,
keyName
);
outputObject
.
setreturnMessage
(
"任务发起失败,不存在该流程模型."
);
}
}
catch
(
Exception
e
){
LOGGER
.
warn
(
"start Process failed"
,
e
);
outputObject
.
setreturnMessage
(
"任务发起失败."
);
}
}
}
/**
/**
* 启动流程
* 启动流程
*
*
...
@@ -438,6 +389,17 @@ public class ActivitiModelServiceImpl implements ActivitiModelService{
...
@@ -438,6 +389,17 @@ public class ActivitiModelServiceImpl implements ActivitiModelService{
/**
/**
* 启动流程--其他方法调用
* 启动流程--其他方法调用
*
*
* jsonStr参数介绍
* * name: "",----标题
* * value: "",----值
* * orderBy: 1,----排序,值越大越往后
* * showType: 1----展示类型:1.文本展示;2.附件展示;3.富文本展示;4.图片上传;5.表格展示
* * proportion: 6----展示比例,前端界面百分比分为12份
* * editableNodeId:可编辑节点Id
* * editableNodeName:可编辑节点名称
* * formItemType: 原始表单类型
* * formItem:表单内容
*
* @param map
* @param map
* @param user 用户信息
* @param user 用户信息
* @param id 数据id
* @param id 数据id
...
@@ -449,18 +411,6 @@ public class ActivitiModelServiceImpl implements ActivitiModelService{
...
@@ -449,18 +411,6 @@ public class ActivitiModelServiceImpl implements ActivitiModelService{
String
keyName
=
map
.
get
(
"keyName"
).
toString
();
String
keyName
=
map
.
get
(
"keyName"
).
toString
();
map
.
put
(
"code"
,
"-1"
);
map
.
put
(
"code"
,
"-1"
);
String
message
=
""
;
String
message
=
""
;
/**
* jsonStr参数介绍
* name: "",----标题
* value: "",----值
* orderBy: 1,----排序,值越大越往后
* showType: 1----展示类型:1.文本展示;2.附件展示;3.富文本展示;4.图片上传;5.表格展示
* proportion: 6----展示比例,前端界面百分比分为12份
* editableNodeId:可编辑节点Id
* editableNodeName:可编辑节点名称
* formItemType: 原始表单类型
* formItem:表单内容
*/
String
str
=
JSONUtil
.
toJsonStr
(
map
.
get
(
"jsonStr"
));
//前端传来的数据json串
String
str
=
JSONUtil
.
toJsonStr
(
map
.
get
(
"jsonStr"
));
//前端传来的数据json串
if
(
ToolUtil
.
isBlank
(
str
)){
//如果数据为空
if
(
ToolUtil
.
isBlank
(
str
)){
//如果数据为空
message
=
"数据不能为空."
;
message
=
"数据不能为空."
;
...
...
skyeye-activiti/src/main/java/com/skyeye/activiti/service/impl/DsFormActivitiServiceImpl.java
浏览文件 @
3a19011c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
package
com.skyeye.activiti.service.impl
;
package
com.skyeye.activiti.service.impl
;
import
c
n.hutool.json.JSONUtil
;
import
c
om.gexin.fastjson.JSON
;
import
com.skyeye.activiti.service.ActivitiModelService
;
import
com.skyeye.activiti.service.ActivitiModelService
;
import
com.skyeye.activiti.service.DsFormActivitiService
;
import
com.skyeye.activiti.service.DsFormActivitiService
;
import
com.skyeye.annotation.transaction.ActivitiAndBaseTransaction
;
import
com.skyeye.annotation.transaction.ActivitiAndBaseTransaction
;
...
@@ -15,14 +15,12 @@ import com.skyeye.eve.dao.ActUserProcessInstanceIdDao;
...
@@ -15,14 +15,12 @@ import com.skyeye.eve.dao.ActUserProcessInstanceIdDao;
import
com.skyeye.eve.dao.DsFormPageDataDao
;
import
com.skyeye.eve.dao.DsFormPageDataDao
;
import
com.skyeye.eve.dao.DsFormPageSequenceDao
;
import
com.skyeye.eve.dao.DsFormPageSequenceDao
;
import
com.skyeye.eve.service.DsFormPageService
;
import
com.skyeye.eve.service.DsFormPageService
;
import
net.sf.json.JSONArray
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @ClassName: DsFormActivitiServiceImpl
* @ClassName: DsFormActivitiServiceImpl
...
@@ -68,32 +66,20 @@ public class DsFormActivitiServiceImpl implements DsFormActivitiService {
...
@@ -68,32 +66,20 @@ public class DsFormActivitiServiceImpl implements DsFormActivitiService {
public
void
insertDSFormProcess
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
public
void
insertDSFormProcess
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
String
userId
=
user
.
get
(
"id"
).
toString
();
String
str
=
map
.
get
(
"jsonStr"
).
toString
();
//前端传来的数据json串
String
str
=
map
.
get
(
"jsonStr"
).
toString
();
//前端传来的数据json串
if
(
ToolUtil
.
isBlank
(
str
)){
//如果数据为空
String
pageId
=
map
.
get
(
"pageId"
).
toString
();
outputObject
.
setreturnMessage
(
"数据不能为空."
);
}
else
{
try
{
try
{
List
<
Map
<
String
,
Object
>>
beans
=
new
ArrayList
<
Map
<
String
,
Object
>>();
// 1.构造动态表单的数据
List
<
Map
<
String
,
Object
>>
jsonArray
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
jsonArray
=
JSONArray
.
fromObject
(
str
);
Map
<
String
,
Map
<
String
,
Object
>>
jOb
=
JSONUtil
.
toBean
(
str
,
null
);
//遍历数据存入JSONArray集合
for
(
String
key
:
jOb
.
keySet
()){
jsonArray
.
add
(
jOb
.
get
(
key
));
}
String
sequenceId
=
ToolUtil
.
getSurFaceId
();
String
sequenceId
=
ToolUtil
.
getSurFaceId
();
String
userId
=
user
.
get
(
"id"
).
toString
();
List
<
Map
<
String
,
Object
>>
pageDatas
=
getDsFormPageData
(
jsonArray
,
sequenceId
,
userId
);
String
pageId
=
""
;
// 2.将动态表单的数据构造成工作流需要的数据
for
(
Map
<
String
,
Object
>
item
:
jsonArray
)
{
String
actData
=
getActDataByDsFormData
(
pageDatas
);
String
pageContentId
=
item
.
get
(
"rowId"
).
toString
();
map
.
put
(
"jsonStr"
,
actData
);
String
value
=
item
.
containsKey
(
"value"
)
==
true
?
item
.
get
(
"value"
).
toString
()
:
""
;
String
text
=
item
.
containsKey
(
"text"
)
==
true
?
item
.
get
(
"text"
).
toString
()
:
""
;
Map
<
String
,
Object
>
m
=
dsFormPageService
.
getDsFormPageData
(
pageContentId
,
value
,
text
,
item
.
get
(
"showType"
).
toString
(),
sequenceId
,
userId
);
pageId
=
m
.
get
(
"pageId"
).
toString
();
beans
.
add
(
m
);
}
activitiModelService
.
editActivitiModelToStartProcessByMap
(
map
,
user
,
sequenceId
);
activitiModelService
.
editActivitiModelToStartProcessByMap
(
map
,
user
,
sequenceId
);
if
(
"0"
.
equals
(
map
.
get
(
"code"
).
toString
())){
//启动流程成功
if
(
"0"
.
equals
(
map
.
get
(
"code"
).
toString
())){
//启动流程成功
dsFormPageDataDao
.
insertDsFormPageData
(
bean
s
);
//插入DsFormPageData表
dsFormPageDataDao
.
insertDsFormPageData
(
pageData
s
);
//插入DsFormPageData表
Map
<
String
,
Object
>
entity
=
dsFormPageService
.
getDsFormPageSequence
(
userId
,
pageId
,
map
.
get
(
"message"
).
toString
(),
StringUtils
.
EMPTY
);
Map
<
String
,
Object
>
entity
=
dsFormPageService
.
getDsFormPageSequence
(
userId
,
pageId
,
map
.
get
(
"message"
).
toString
(),
StringUtils
.
EMPTY
);
entity
.
put
(
"sequenceId"
,
sequenceId
);
entity
.
put
(
"sequenceId"
,
sequenceId
);
dsFormPageSequenceDao
.
insertDsFormPageSequence
(
Arrays
.
asList
(
entity
));
dsFormPageSequenceDao
.
insertDsFormPageSequence
(
Arrays
.
asList
(
entity
));
...
@@ -104,6 +90,30 @@ public class DsFormActivitiServiceImpl implements DsFormActivitiService {
...
@@ -104,6 +90,30 @@ public class DsFormActivitiServiceImpl implements DsFormActivitiService {
outputObject
.
setreturnMessage
(
"任务发起失败."
);
outputObject
.
setreturnMessage
(
"任务发起失败."
);
}
}
}
}
private
String
getActDataByDsFormData
(
List
<
Map
<
String
,
Object
>>
pageDatas
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
bean:
pageDatas
){
bean
.
put
(
"formItem"
,
bean
);
bean
.
put
(
"name"
,
bean
.
get
(
"title"
));
bean
.
put
(
"proportion"
,
bean
.
get
(
"defaultWidth"
));
bean
.
put
(
"rowId"
,
bean
.
get
(
"contentId"
));
result
.
put
(
bean
.
get
(
"contentId"
).
toString
(),
bean
);
}
return
JSON
.
toJSONString
(
result
);
}
private
List
<
Map
<
String
,
Object
>>
getDsFormPageData
(
List
<
Map
<
String
,
Object
>>
jsonArray
,
String
sequenceId
,
String
userId
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
pageDatas
=
new
ArrayList
<>();
for
(
Map
<
String
,
Object
>
item
:
jsonArray
)
{
String
pageContentId
=
item
.
get
(
"rowId"
).
toString
();
String
value
=
item
.
containsKey
(
"value"
)
==
true
?
item
.
get
(
"value"
).
toString
()
:
""
;
String
text
=
item
.
containsKey
(
"text"
)
==
true
?
item
.
get
(
"text"
).
toString
()
:
""
;
Map
<
String
,
Object
>
pageData
=
dsFormPageService
.
getDsFormPageData
(
pageContentId
,
value
,
text
,
item
.
get
(
"showType"
).
toString
(),
sequenceId
,
userId
);
pageData
.
put
(
"formItemType"
,
item
.
get
(
"controlType"
));
pageDatas
.
add
(
pageData
);
}
return
pageDatas
;
}
}
/**
/**
...
...
skyeye-activiti/src/main/java/com/skyeye/eve/service/impl/ActModleTypeServiceImpl.java
浏览文件 @
3a19011c
...
@@ -650,29 +650,25 @@ public class ActModleTypeServiceImpl implements ActModleTypeService {
...
@@ -650,29 +650,25 @@ public class ActModleTypeServiceImpl implements ActModleTypeService {
@Transactional
(
value
=
"transactionManager"
)
@Transactional
(
value
=
"transactionManager"
)
public
void
editDsFormMationBySequenceId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
public
void
editDsFormMationBySequenceId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
String
str
=
map
.
get
(
"jsonStr"
).
toString
();
//前端传来的数据json串
String
taskId
=
map
.
get
(
"taskId"
).
toString
();
//任务id
String
taskId
=
map
.
get
(
"taskId"
).
toString
();
//任务id
String
processInstanceId
=
map
.
get
(
"processInstanceId"
).
toString
();
//流程id
String
processInstanceId
=
map
.
get
(
"processInstanceId"
).
toString
();
//流程id
if
(
ToolUtil
.
isJson
(
str
)){
List
<
Map
<
String
,
Object
>>
json
=
JSONUtil
.
toList
(
map
.
get
(
"jsonStr"
).
toString
(),
null
);
List
<
Map
<
String
,
Object
>>
json
=
JSONUtil
.
toList
(
str
,
null
);
Map
<
String
,
Object
>
params
=
(
Map
<
String
,
Object
>)
taskService
.
getVariable
(
taskId
,
"baseTask"
);
Map
<
String
,
Object
>
params
=
(
Map
<
String
,
Object
>)
taskService
.
getVariable
(
taskId
,
"baseTask"
);
String
contentId
=
""
;
Map
<
String
,
Object
>
cenBean
;
for
(
int
i
=
0
;
i
<
json
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
json
.
size
();
i
++){
Map
<
String
,
Object
>
jObject
=
json
.
get
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
Map
<
String
,
Object
>
jObject
=
json
.
get
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
actModleTypeDao
.
editDsFormMationBySequenceId
(
jObject
);
actModleTypeDao
.
editDsFormMationBySequenceId
(
jObject
);
contentId
=
jObject
.
get
(
"contentId"
).
toString
();
String
pageDataId
=
jObject
.
get
(
"rowId"
).
toString
();
System
.
out
.
println
(
contentId
);
if
(
params
.
containsKey
(
pageDataId
)){
if
(
params
.
containsKey
(
contentId
)){
Map
<
String
,
Object
>
cenBean
=
(
Map
<
String
,
Object
>)
params
.
get
(
pageDataId
);
cenBean
=
(
Map
<
String
,
Object
>)
params
.
get
(
contentId
);
cenBean
.
put
(
"text"
,
jObject
.
get
(
"text"
));
cenBean
.
put
(
"text"
,
jObject
.
get
(
"text"
));
cenBean
.
put
(
"value"
,
jObject
.
get
(
"value"
));
cenBean
.
put
(
"value"
,
jObject
.
get
(
"value"
));
params
.
put
(
content
Id
,
cenBean
);
params
.
put
(
pageData
Id
,
cenBean
);
}
}
}
}
runtimeService
.
setVariable
(
processInstanceId
,
"baseTask"
,
params
);
runtimeService
.
setVariable
(
processInstanceId
,
"baseTask"
,
params
);
}
}
}
/**
/**
* 通过id获取流程任务配置详情
* 通过id获取流程任务配置详情
...
...
skyeye-activiti/src/main/java/com/skyeye/eve/service/impl/PageSequenceServiceImpl.java
浏览文件 @
3a19011c
...
@@ -132,13 +132,10 @@ public class PageSequenceServiceImpl implements PageSequenceService{
...
@@ -132,13 +132,10 @@ public class PageSequenceServiceImpl implements PageSequenceService{
public
void
editDsFormISDraftById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
public
void
editDsFormISDraftById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
String
str
=
map
.
get
(
"jsonStr"
).
toString
();
//前端传来的数据json串
String
str
=
map
.
get
(
"jsonStr"
).
toString
();
//前端传来的数据json串
if
(
ToolUtil
.
isJson
(
str
)){
List
<
Map
<
String
,
Object
>>
json
=
JSONUtil
.
toList
(
str
,
null
);
List
<
Map
<
String
,
Object
>>
json
=
JSONUtil
.
toList
(
str
,
null
);
for
(
int
i
=
0
;
i
<
json
.
size
();
i
++){
json
.
forEach
(
bean
->
{
Map
<
String
,
Object
>
jObject
=
json
.
get
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
dsFormPageSequenceDao
.
editDsFormISDraftById
(
bean
);
dsFormPageSequenceDao
.
editDsFormISDraftById
(
jObject
);
});
}
}
}
}
/**
/**
...
@@ -156,7 +153,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
...
@@ -156,7 +153,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"userId"
,
user
.
get
(
"id"
));
map
.
put
(
"userId"
,
user
.
get
(
"id"
));
//查询为草稿状态的提交项
//
查询为草稿状态的提交项
Map
<
String
,
Object
>
bean
=
dsFormPageSequenceDao
.
queryDsFormStateById
(
map
);
Map
<
String
,
Object
>
bean
=
dsFormPageSequenceDao
.
queryDsFormStateById
(
map
);
if
(
bean
!=
null
&&
!
bean
.
isEmpty
()){
if
(
bean
!=
null
&&
!
bean
.
isEmpty
()){
if
(!
bean
.
containsKey
(
"actKey"
)
||
ToolUtil
.
isBlank
(
bean
.
get
(
"actKey"
).
toString
())){
if
(!
bean
.
containsKey
(
"actKey"
)
||
ToolUtil
.
isBlank
(
bean
.
get
(
"actKey"
).
toString
())){
...
...
skyeye-activiti/src/main/resources/mapper/activiti/ActModelMapper.xml
浏览文件 @
3a19011c
...
@@ -190,7 +190,7 @@
...
@@ -190,7 +190,7 @@
a.id,
a.id,
a.title,
a.title,
a.act_id actId,
a.act_id actId,
IF ( IFNULL( a.page_url, '' ) = '', '../../tpl/
actmodelpage/dsFormPageModel
.html', a.page_url ) pageUrl,
IF ( IFNULL( a.page_url, '' ) = '', '../../tpl/
dsFormPageSequence/dsFormPageSequenceDraftProcessAdd
.html', a.page_url ) pageUrl,
a.background_color backgroundColor,
a.background_color backgroundColor,
IFNULL(a.ds_form_id, '') dsFormId,
IFNULL(a.ds_form_id, '') dsFormId,
a.menu_icon_type menuIconType,
a.menu_icon_type menuIconType,
...
@@ -242,7 +242,7 @@
...
@@ -242,7 +242,7 @@
a.id,
a.id,
a.title,
a.title,
a.act_id actId,
a.act_id actId,
IF ( IFNULL( a.page_url, '' ) = '', '../../tpl/
actmodelpage/dsFormPageModel
.html', a.page_url ) pageUrl,
IF ( IFNULL( a.page_url, '' ) = '', '../../tpl/
dsFormPageSequence/dsFormPageSequenceDraftProcessAdd
.html', a.page_url ) pageUrl,
a.background_color backgroundColor,
a.background_color backgroundColor,
IFNULL(a.ds_form_id, '') dsFormId,
IFNULL(a.ds_form_id, '') dsFormId,
a.menu_icon_type menuIconType,
a.menu_icon_type menuIconType,
...
...
skyeye-activiti/src/main/resources/mapper/activiti/ActUserProcessInstanceIdMapper.xml
浏览文件 @
3a19011c
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
<select
id=
"queryStartProcessNotSubByUserId"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
<select
id=
"queryStartProcessNotSubByUserId"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
SELECT
a.process_instance_id processInstanceId,
a.process_instance_id processInstanceId,
IFNULL(b.id,
""
) sequenceId,
IFNULL(b.id,
''
) sequenceId,
a.create_time createTime,
a.create_time createTime,
a.data_id dataId,
a.data_id dataId,
IF(IFNULL(c.edit_page_url, '') = '', '../../tpl/
myactiviti/myactivitiedi
t.html', c.edit_page_url) pageUrl,
IF(IFNULL(c.edit_page_url, '') = '', '../../tpl/
dsFormPageSequence/dsFormPageSequenceDraftProcessEditToAc
t.html', c.edit_page_url) pageUrl,
c.title taskType,
c.title taskType,
IF(IFNULL(c.revoke_mapping, '') = '', 'dsformrevoke001', c.revoke_mapping) revokeMapping
IF(IFNULL(c.revoke_mapping, '') = '', 'dsformrevoke001', c.revoke_mapping) revokeMapping
FROM
FROM
...
...
skyeye-activiti/src/main/resources/reqmapping/mapping/activiti.xml
浏览文件 @
3a19011c
...
@@ -16,10 +16,6 @@
...
@@ -16,10 +16,6 @@
<url
id=
"activitimode003"
path=
"/post/ActivitiModelController/editActivitiModelToDeploy"
val=
"发布模型为流程定义"
allUse=
"1"
groupName=
"工作流操作"
>
<url
id=
"activitimode003"
path=
"/post/ActivitiModelController/editActivitiModelToDeploy"
val=
"发布模型为流程定义"
allUse=
"1"
groupName=
"工作流操作"
>
<property
id=
"modelId"
name=
"modelId"
ref=
"required"
var=
"模型id"
/>
<property
id=
"modelId"
name=
"modelId"
ref=
"required"
var=
"模型id"
/>
</url>
</url>
<url
id=
"activitimode004"
path=
"/post/ActivitiModelController/editActivitiModelToStartProcess"
val=
"启动流程"
allUse=
"2"
groupName=
"工作流操作"
>
<property
id=
"keyName"
name=
"keyName"
ref=
"required"
var=
"模型key"
/>
<property
id=
"jsonStr"
name=
"jsonStr"
ref=
"required"
var=
"form表单数据json串"
/>
</url>
<url
id=
"activitimode006"
path=
"/post/ActivitiModelController/deleteActivitiModelById"
val=
"删除模型"
allUse=
"1"
groupName=
"工作流操作"
>
<url
id=
"activitimode006"
path=
"/post/ActivitiModelController/deleteActivitiModelById"
val=
"删除模型"
allUse=
"1"
groupName=
"工作流操作"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"模型id"
/>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"模型id"
/>
</url>
</url>
...
@@ -123,15 +119,16 @@
...
@@ -123,15 +119,16 @@
</url>
</url>
<!-- 工作流用户相关操作结束 -->
<!-- 工作流用户相关操作结束 -->
<!-- 动态表单
审核中撤销
开始 -->
<!-- 动态表单
工作流
开始 -->
<url
id=
"activitimode022"
path=
"/post/DsFormActivitiController/insertDSFormProcess"
val=
"动态表单类型的工作流提交审批"
allUse=
"2"
groupName=
"动态表单工作流操作"
>
<url
id=
"activitimode022"
path=
"/post/DsFormActivitiController/insertDSFormProcess"
val=
"动态表单类型的工作流提交审批"
allUse=
"2"
groupName=
"动态表单工作流操作"
>
<property
id=
"keyName"
name=
"keyName"
ref=
"required"
var=
"模型key"
/>
<property
id=
"keyName"
name=
"keyName"
ref=
"required"
var=
"模型key"
/>
<property
id=
"pageId"
name=
"pageId"
ref=
"required"
var=
"页面id"
/>
<property
id=
"jsonStr"
name=
"jsonStr"
ref=
"required"
var=
"form表单数据json串"
/>
<property
id=
"jsonStr"
name=
"jsonStr"
ref=
"required"
var=
"form表单数据json串"
/>
</url>
</url>
<url
id=
"dsformrevoke001"
path=
"/post/DsFormActivitiController/editDsFormContentToRevokeByProcessInstanceId"
val=
"动态表单类型的工作流进行撤销操作"
allUse=
"2"
groupName=
"动态表单工作流操作"
>
<url
id=
"dsformrevoke001"
path=
"/post/DsFormActivitiController/editDsFormContentToRevokeByProcessInstanceId"
val=
"动态表单类型的工作流进行撤销操作"
allUse=
"2"
groupName=
"动态表单工作流操作"
>
<property
id=
"processInstanceId"
name=
"processInstanceId"
ref=
"required"
var=
"流程id"
/>
<property
id=
"processInstanceId"
name=
"processInstanceId"
ref=
"required"
var=
"流程id"
/>
</url>
</url>
<!-- 动态表单
审核中撤销
结束 -->
<!-- 动态表单
工作流
结束 -->
<!-- 动态表单草稿操作开始 -->
<!-- 动态表单草稿操作开始 -->
<url
id=
"pagesequence001"
path=
"/post/PageSequenceController/queryDsFormISDraftListByUser"
val=
"获取所有草稿状态的动态表单提交项"
allUse=
"2"
>
<url
id=
"pagesequence001"
path=
"/post/PageSequenceController/queryDsFormISDraftListByUser"
val=
"获取所有草稿状态的动态表单提交项"
allUse=
"2"
>
...
@@ -147,7 +144,7 @@
...
@@ -147,7 +144,7 @@
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"表单提交序列id"
/>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"表单提交序列id"
/>
</url>
</url>
<url
id=
"pagesequence004"
path=
"/post/PageSequenceController/editDsFormISDraftById"
val=
"编辑动态表单(无工作流)"
allUse=
"2"
>
<url
id=
"pagesequence004"
path=
"/post/PageSequenceController/editDsFormISDraftById"
val=
"编辑动态表单(无工作流)"
allUse=
"2"
>
<property
id=
"jsonStr"
name=
"jsonStr"
ref=
"required"
var=
"form表单数据json串"
/>
<property
id=
"jsonStr"
name=
"jsonStr"
ref=
"required
,json
"
var=
"form表单数据json串"
/>
</url>
</url>
<url
id=
"pagesequence005"
path=
"/post/PageSequenceController/editDsFormISDraftToSubApprovalById"
val=
"按钮直接提交审批"
allUse=
"2"
>
<url
id=
"pagesequence005"
path=
"/post/PageSequenceController/editDsFormISDraftToSubApprovalById"
val=
"按钮直接提交审批"
allUse=
"2"
>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"表单提交序列id"
/>
<property
id=
"rowId"
name=
"id"
ref=
"required"
var=
"表单提交序列id"
/>
...
...
skyeye-dsform/src/main/java/com/skyeye/eve/dao/DsFormPageSequenceDao.java
浏览文件 @
3a19011c
...
@@ -29,7 +29,7 @@ public interface DsFormPageSequenceDao {
...
@@ -29,7 +29,7 @@ public interface DsFormPageSequenceDao {
List
<
Map
<
String
,
Object
>>
queryDsFormISDraftToEditById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
List
<
Map
<
String
,
Object
>>
queryDsFormISDraftToEditById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
int
editDsFormISDraftById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
int
editDsFormISDraftById
(
Map
<
String
,
Object
>
map
);
int
editDsFormISDraftToSubApprovalById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
int
editDsFormISDraftToSubApprovalById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
...
...
skyeye-dsform/src/main/java/com/skyeye/eve/service/impl/DsFormPageServiceImpl.java
浏览文件 @
3a19011c
...
@@ -8,7 +8,9 @@ import cn.hutool.json.JSONUtil;
...
@@ -8,7 +8,9 @@ import cn.hutool.json.JSONUtil;
import
com.gexin.fastjson.JSONObject
;
import
com.gexin.fastjson.JSONObject
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.skyeye.cache.redis.RedisCache
;
import
com.skyeye.common.constans.Constants
;
import
com.skyeye.common.constans.Constants
;
import
com.skyeye.common.constans.RedisConstants
;
import
com.skyeye.common.constans.SystemFoundationSettingsConstants
;
import
com.skyeye.common.constans.SystemFoundationSettingsConstants
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
import
com.skyeye.common.object.OutputObject
;
...
@@ -51,11 +53,14 @@ public class DsFormPageServiceImpl implements DsFormPageService {
...
@@ -51,11 +53,14 @@ public class DsFormPageServiceImpl implements DsFormPageService {
private
DsFormPageDataDao
dsFormPageDataDao
;
private
DsFormPageDataDao
dsFormPageDataDao
;
@Autowired
@Autowired
p
ublic
JedisClientService
jedisClient
;
p
rivate
JedisClientService
jedisClient
;
@Autowired
@Autowired
private
DsFormPageSequenceDao
dsFormPageSequenceDao
;
private
DsFormPageSequenceDao
dsFormPageSequenceDao
;
@Autowired
private
RedisCache
redisCache
;
/**
/**
*
*
* @Title: queryDsFormPageList
* @Title: queryDsFormPageList
...
@@ -330,8 +335,8 @@ public class DsFormPageServiceImpl implements DsFormPageService {
...
@@ -330,8 +335,8 @@ public class DsFormPageServiceImpl implements DsFormPageService {
@Override
@Override
public
void
queryDsFormContentListByPageId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
public
void
queryDsFormContentListByPageId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
String
pageId
=
map
.
get
(
""
).
toString
();
String
pageId
=
map
.
get
(
"
pageId
"
).
toString
();
List
<
Map
<
String
,
Object
>>
beans
=
getDsFormPageContentByFormId
(
pageId
);
List
<
Map
<
String
,
Object
>>
beans
=
this
.
getDsFormPageContentByFormId
(
pageId
);
if
(!
beans
.
isEmpty
()){
if
(!
beans
.
isEmpty
()){
outputObject
.
setBeans
(
beans
);
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
beans
.
size
());
outputObject
.
settotal
(
beans
.
size
());
...
@@ -340,16 +345,15 @@ public class DsFormPageServiceImpl implements DsFormPageService {
...
@@ -340,16 +345,15 @@ public class DsFormPageServiceImpl implements DsFormPageService {
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getDsFormPageContentByFormId
(
String
dsFormPageId
)
throws
Exception
{
public
List
<
Map
<
String
,
Object
>>
getDsFormPageContentByFormId
(
String
dsFormPageId
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
beans
;
String
cacheKey
=
Constants
.
dsFormContentListByPageId
(
dsFormPageId
);
if
(
ToolUtil
.
isBlank
(
jedisClient
.
get
(
Constants
.
dsFormContentListByPageId
(
dsFormPageId
)))){
return
redisCache
.
getList
(
cacheKey
,
key
->
{
// 若缓存中无值,从数据库中查询
try
{
beans
=
dsFormPageDao
.
queryDsFormContentListByPageId
(
dsFormPageId
);
return
dsFormPageDao
.
queryDsFormContentListByPageId
(
dsFormPageId
);
// 将从数据库中查来的内容存到缓存中
}
catch
(
Exception
ee
)
{
jedisClient
.
set
(
Constants
.
dsFormContentListByPageId
(
dsFormPageId
),
JSONUtil
.
toJsonStr
(
beans
));
LOGGER
.
warn
(
"getDsFormPageContentByFormId failed, dsFormPageId is {}."
,
dsFormPageId
,
ee
);
}
else
{
}
beans
=
JSONUtil
.
toList
(
jedisClient
.
get
(
Constants
.
dsFormContentListByPageId
(
dsFormPageId
)),
null
);
return
null
;
}
},
RedisConstants
.
THIRTY_DAY_SECONDS
);
return
beans
;
}
}
/**
/**
...
...
skyeye-dsform/src/main/resources/mapper/dsform/DsFormPageSequenceMapper.xml
浏览文件 @
3a19011c
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
a.editable_node_name editableNodeName,
a.editable_node_name editableNodeName,
'' formItemType,
'' formItemType,
a.order_by orderBy,
a.order_by orderBy,
IF(IFNULL(a.key_id, '') = '', a.content_id, a.key_id)
keyId
a.content_id
keyId
FROM
FROM
ds_form_page_data a
ds_form_page_data a
WHERE
WHERE
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录