Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
d3ca087f
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看板
提交
d3ca087f
编写于
11月 18, 2021
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增根据objectId获取动态表单信息的接口
上级
169631dc
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
135 addition
and
65 deletion
+135
-65
skyeye-activiti/src/main/java/com/skyeye/activiti/service/impl/ActivitiModelServiceImpl.java
...kyeye/activiti/service/impl/ActivitiModelServiceImpl.java
+4
-1
skyeye-activiti/src/main/java/com/skyeye/eve/controller/PageSequenceController.java
...ava/com/skyeye/eve/controller/PageSequenceController.java
+1
-0
skyeye-activiti/src/main/java/com/skyeye/eve/dao/ActModleTypeDao.java
...iti/src/main/java/com/skyeye/eve/dao/ActModleTypeDao.java
+0
-2
skyeye-activiti/src/main/java/com/skyeye/eve/service/impl/ActModleTypeServiceImpl.java
.../com/skyeye/eve/service/impl/ActModleTypeServiceImpl.java
+7
-3
skyeye-activiti/src/main/java/com/skyeye/eve/service/impl/PageSequenceServiceImpl.java
.../com/skyeye/eve/service/impl/PageSequenceServiceImpl.java
+12
-12
skyeye-activiti/src/main/resources/mapper/activiti/ActModleTypeMapper.xml
...src/main/resources/mapper/activiti/ActModleTypeMapper.xml
+1
-27
skyeye-dsform/src/main/java/com/skyeye/eve/controller/DsFormPageController.java
.../java/com/skyeye/eve/controller/DsFormPageController.java
+13
-1
skyeye-dsform/src/main/java/com/skyeye/eve/dao/DsFormPageDao.java
...sform/src/main/java/com/skyeye/eve/dao/DsFormPageDao.java
+2
-2
skyeye-dsform/src/main/java/com/skyeye/eve/dao/DsFormPageSequenceDao.java
...c/main/java/com/skyeye/eve/dao/DsFormPageSequenceDao.java
+7
-1
skyeye-dsform/src/main/java/com/skyeye/eve/service/DsFormPageService.java
...c/main/java/com/skyeye/eve/service/DsFormPageService.java
+1
-0
skyeye-dsform/src/main/java/com/skyeye/eve/service/impl/DsFormPageServiceImpl.java
...va/com/skyeye/eve/service/impl/DsFormPageServiceImpl.java
+27
-6
skyeye-dsform/src/main/resources/mapper/dsform/DsFormPageMapper.xml
...orm/src/main/resources/mapper/dsform/DsFormPageMapper.xml
+34
-9
skyeye-dsform/src/main/resources/mapper/dsform/DsFormPageSequenceMapper.xml
...main/resources/mapper/dsform/DsFormPageSequenceMapper.xml
+23
-1
skyeye-dsform/src/main/resources/reqmapping/mapping/reqdsform.xml
...sform/src/main/resources/reqmapping/mapping/reqdsform.xml
+3
-0
未找到文件。
skyeye-activiti/src/main/java/com/skyeye/activiti/service/impl/ActivitiModelServiceImpl.java
浏览文件 @
d3ca087f
...
...
@@ -134,6 +134,9 @@ public class ActivitiModelServiceImpl implements ActivitiModelService{
@Autowired
private
DsFormPageDao
dsFormPageDao
;
@Autowired
private
DsFormPageSequenceDao
dsFormPageSequenceDao
;
@Autowired
public
JedisClientService
jedisClient
;
...
...
@@ -1790,7 +1793,7 @@ public class ActivitiModelServiceImpl implements ActivitiModelService{
dsFormPageDao
.
insertDsFormPageData
(
beans
);
//插入DsFormPageData表
Map
<
String
,
Object
>
entity
=
dsFormPageService
.
getDsFormPageSequence
(
userId
,
pageId
,
map
.
get
(
"message"
).
toString
(),
StringUtils
.
EMPTY
);
entity
.
put
(
"sequenceId"
,
sequenceId
);
dsFormPageDao
.
insertDsFormPageSequence
(
Arrays
.
asList
(
entity
));
dsFormPage
Sequence
Dao
.
insertDsFormPageSequence
(
Arrays
.
asList
(
entity
));
}
else
{
outputObject
.
setreturnMessage
(
map
.
get
(
"message"
).
toString
());
}
...
...
skyeye-activiti/src/main/java/com/skyeye/eve/controller/PageSequenceController.java
浏览文件 @
d3ca087f
/*******************************************************************************
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
******************************************************************************/
package
com.skyeye.eve.controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
skyeye-activiti/src/main/java/com/skyeye/eve/dao/ActModleTypeDao.java
浏览文件 @
d3ca087f
...
...
@@ -34,8 +34,6 @@ public interface ActModleTypeDao {
public
List
<
Map
<
String
,
Object
>>
queryAllDsForm
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
queryDsFormMationToEdit
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
editDsFormMationBySequenceId
(
Map
<
String
,
Object
>
m
)
throws
Exception
;
public
void
editDsFormMationBySequenceIdAndProcessInstanceId
(
Map
<
String
,
Object
>
job
)
throws
Exception
;
...
...
skyeye-activiti/src/main/java/com/skyeye/eve/service/impl/ActModleTypeServiceImpl.java
浏览文件 @
d3ca087f
...
...
@@ -14,6 +14,7 @@ import com.skyeye.common.util.DateUtil;
import
com.skyeye.common.util.ToolUtil
;
import
com.skyeye.eve.dao.ActModelDao
;
import
com.skyeye.eve.dao.ActModleTypeDao
;
import
com.skyeye.eve.dao.DsFormPageDao
;
import
com.skyeye.eve.service.ActModleTypeService
;
import
com.skyeye.jedis.JedisClientService
;
import
org.activiti.engine.RepositoryService
;
...
...
@@ -26,6 +27,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -60,6 +62,9 @@ public class ActModleTypeServiceImpl implements ActModleTypeService {
@Autowired
private
RuntimeService
runtimeService
;
@Autowired
private
DsFormPageDao
dsFormPageDao
;
public
static
enum
ActModelTypeState
{
START_NEW
(
1
,
"新建"
),
START_UP
(
2
,
"上线"
),
...
...
@@ -574,7 +579,6 @@ public class ActModleTypeServiceImpl implements ActModleTypeService {
* @return void 返回类型
* @throws
*/
@SuppressWarnings
(
"unchecked"
)
@Override
public
void
queryActModleUpStateByUpStateType
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
...
...
@@ -626,7 +630,8 @@ public class ActModleTypeServiceImpl implements ActModleTypeService {
@Override
public
void
queryDsFormMationToEdit
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
actModleTypeDao
.
queryDsFormMationToEdit
(
map
);
String
id
=
map
.
get
(
"id"
).
toString
();
List
<
Map
<
String
,
Object
>>
beans
=
dsFormPageDao
.
queryDsFormPageDataListBySequenceId
(
Arrays
.
asList
(
id
));
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
beans
.
size
());
}
...
...
@@ -641,7 +646,6 @@ public class ActModleTypeServiceImpl implements ActModleTypeService {
* @return void 返回类型
* @throws
*/
@SuppressWarnings
(
"unchecked"
)
@Override
@Transactional
(
value
=
"transactionManager"
)
public
void
editDsFormMationBySequenceId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
...
...
skyeye-activiti/src/main/java/com/skyeye/eve/service/impl/PageSequenceServiceImpl.java
浏览文件 @
d3ca087f
...
...
@@ -11,7 +11,7 @@ import com.skyeye.activiti.service.ActivitiModelService;
import
com.skyeye.common.object.InputObject
;
import
com.skyeye.common.object.OutputObject
;
import
com.skyeye.common.util.ToolUtil
;
import
com.skyeye.eve.dao.PageSequenceDao
;
import
com.skyeye.eve.dao.
DsForm
PageSequenceDao
;
import
com.skyeye.eve.service.DsFormPageService
;
import
com.skyeye.eve.service.PageSequenceService
;
import
com.skyeye.jedis.JedisClientService
;
...
...
@@ -37,7 +37,7 @@ import java.util.Map;
public
class
PageSequenceServiceImpl
implements
PageSequenceService
{
@Autowired
private
PageSequenceDao
p
ageSequenceDao
;
private
DsFormPageSequenceDao
dsFormP
ageSequenceDao
;
@Autowired
private
ActivitiModelService
activitiModelService
;
...
...
@@ -63,7 +63,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
map
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
Page
pages
=
PageHelper
.
startPage
(
Integer
.
parseInt
(
map
.
get
(
"page"
).
toString
()),
Integer
.
parseInt
(
map
.
get
(
"limit"
).
toString
()));
List
<
Map
<
String
,
Object
>>
beans
=
p
ageSequenceDao
.
queryDsFormISDraftListByUser
(
map
);
List
<
Map
<
String
,
Object
>>
beans
=
dsFormP
ageSequenceDao
.
queryDsFormISDraftListByUser
(
map
);
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
pages
.
getTotal
());
}
...
...
@@ -83,12 +83,12 @@ public class PageSequenceServiceImpl implements PageSequenceService{
public
void
deleteDsFormISDraftByUser
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
map
.
put
(
"userId"
,
inputObject
.
getLogParams
().
get
(
"id"
));
Map
<
String
,
Object
>
bean
=
p
ageSequenceDao
.
queryDsFormStateById
(
map
);
Map
<
String
,
Object
>
bean
=
dsFormP
ageSequenceDao
.
queryDsFormStateById
(
map
);
if
(
bean
!=
null
&&
!
bean
.
isEmpty
()){
//删除表单提交序列表数据
p
ageSequenceDao
.
deleteDsFormISDraftByUser
(
map
);
dsFormP
ageSequenceDao
.
deleteDsFormISDraftByUser
(
map
);
//删除表单数据提交数据
p
ageSequenceDao
.
deleteDsFormContentISDraftByUser
(
map
);
dsFormP
ageSequenceDao
.
deleteDsFormContentISDraftByUser
(
map
);
}
else
{
outputObject
.
setreturnMessage
(
"该数据状态已改变或不属于当前登录账号."
);
}
...
...
@@ -107,7 +107,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
@Override
public
void
queryDsFormISDraftToEditById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
p
ageSequenceDao
.
queryDsFormISDraftToEditById
(
map
);
List
<
Map
<
String
,
Object
>>
beans
=
dsFormP
ageSequenceDao
.
queryDsFormISDraftToEditById
(
map
);
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
beans
.
size
());
}
...
...
@@ -130,7 +130,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
List
<
Map
<
String
,
Object
>>
json
=
JSONUtil
.
toList
(
str
,
null
);
for
(
int
i
=
0
;
i
<
json
.
size
();
i
++){
Map
<
String
,
Object
>
jObject
=
json
.
get
(
i
);
// 遍历 jsonarray 数组,把每一个对象转成 json 对象
p
ageSequenceDao
.
editDsFormISDraftById
(
jObject
);
dsFormP
ageSequenceDao
.
editDsFormISDraftById
(
jObject
);
}
}
}
...
...
@@ -151,7 +151,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
map
.
put
(
"userId"
,
user
.
get
(
"id"
));
//查询为草稿状态的提交项
Map
<
String
,
Object
>
bean
=
p
ageSequenceDao
.
queryDsFormStateById
(
map
);
Map
<
String
,
Object
>
bean
=
dsFormP
ageSequenceDao
.
queryDsFormStateById
(
map
);
if
(
bean
!=
null
&&
!
bean
.
isEmpty
()){
if
(!
bean
.
containsKey
(
"actKey"
)
||
ToolUtil
.
isBlank
(
bean
.
get
(
"actKey"
).
toString
())){
outputObject
.
setreturnMessage
(
"该表单还未绑定工作流,请联系管理员."
);
...
...
@@ -161,7 +161,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
List
<
Map
<
String
,
Object
>>
items
=
dsFormPageService
.
getDsFormPageContentByFormId
(
map
.
get
(
"pageId"
).
toString
());
// 获取数据
Map
<
String
,
Object
>
subFormData
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
rows
=
p
ageSequenceDao
.
queryDsFormContentBySequenceId
(
map
);
List
<
Map
<
String
,
Object
>>
rows
=
dsFormP
ageSequenceDao
.
queryDsFormContentBySequenceId
(
map
);
for
(
Map
<
String
,
Object
>
row
:
rows
){
for
(
Map
<
String
,
Object
>
item
:
items
){
if
(
row
.
get
(
"rowId"
).
toString
().
equals
(
item
.
get
(
"id"
).
toString
())){
...
...
@@ -178,7 +178,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
if
(
"0"
.
equals
(
map
.
get
(
"code"
).
toString
())){
//请求成功
map
.
put
(
"processInId"
,
map
.
get
(
"message"
));
p
ageSequenceDao
.
editDsFormISDraftToSubApprovalById
(
map
);
dsFormP
ageSequenceDao
.
editDsFormISDraftToSubApprovalById
(
map
);
}
else
{
outputObject
.
setreturnMessage
(
map
.
get
(
"message"
).
toString
());
}
...
...
@@ -200,7 +200,7 @@ public class PageSequenceServiceImpl implements PageSequenceService{
@Override
public
void
queryDsFormISDraftDetailsById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
rows
=
p
ageSequenceDao
.
queryDsFormISDraftDetailsById
(
map
);
List
<
Map
<
String
,
Object
>>
rows
=
dsFormP
ageSequenceDao
.
queryDsFormISDraftDetailsById
(
map
);
outputObject
.
setBeans
(
rows
);
outputObject
.
settotal
(
rows
.
size
());
}
...
...
skyeye-activiti/src/main/resources/mapper/activiti/ActModleTypeMapper.xml
浏览文件 @
d3ca087f
...
...
@@ -125,33 +125,7 @@
FROM
ds_form_page a
</select>
<select
id=
"queryDsFormMationToEdit"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.content_id contentId,
a.id `name`,
a.title labelContent,
a.placeholder,
a.`value`,
a.text,
CONCAT('layui-col-xs', a.default_width) defaultWidth,
a.page_id pageId,
a.html_content htmlContent,
a.js_content jsContent,
a.order_by orderBy,
IFNULL(a.key_id, '') keyId,
IFNULL(a.associated_data_types,'') associatedDataTypes,
IFNULL(a.a_data,'') aData,
IFNULL(a.display_template,'') templateContent,
a.`require`
FROM
ds_form_page_data a
WHERE a.sequence_id = #{id}
ORDER BY
a.order_by ASC
</select>
<update
id=
"editDsFormMationBySequenceId"
parameterType=
"java.util.Map"
>
UPDATE ds_form_page_data
<set>
...
...
skyeye-dsform/src/main/java/com/skyeye/eve/controller/DsFormPageController.java
浏览文件 @
d3ca087f
...
...
@@ -237,5 +237,17 @@ public class DsFormPageController {
dsFormPageService
.
saveDsFormDataList
(
inputObject
,
outputObject
);
}
/**
* 根据objectId获取动态表单信息
*
* @param inputObject
* @param outputObject
* @throws Exception
*/
@RequestMapping
(
"/post/DsFormPageController/queryDsFormDataListByObjectId"
)
@ResponseBody
public
void
queryDsFormDataListByObjectId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
dsFormPageService
.
queryDsFormDataListByObjectId
(
inputObject
,
outputObject
);
}
}
skyeye-dsform/src/main/java/com/skyeye/eve/dao/DsFormPageDao.java
浏览文件 @
d3ca087f
...
...
@@ -51,8 +51,8 @@ public interface DsFormPageDao {
public
Map
<
String
,
Object
>
queryFromDsFormPageContent
(
@Param
(
"pageContentId"
)
String
pageContentId
)
throws
Exception
;
public
int
insertDsFormPageSequence
(
List
<
Map
<
String
,
Object
>>
pageSequence
)
throws
Exception
;
public
int
insertDsFormPageData
(
List
<
Map
<
String
,
Object
>>
beans
)
throws
Exception
;
List
<
Map
<
String
,
Object
>>
queryDsFormPageDataListBySequenceId
(
@Param
(
"sequenceIds"
)
List
<
String
>
sequenceIds
)
throws
Exception
;
}
skyeye-
activiti/src/main/java/com/skyeye/eve/dao/
PageSequenceDao.java
→
skyeye-
dsform/src/main/java/com/skyeye/eve/dao/DsForm
PageSequenceDao.java
浏览文件 @
d3ca087f
...
...
@@ -4,6 +4,8 @@
package
com.skyeye.eve.dao
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -17,7 +19,7 @@ import java.util.Map;
* @Copyright: 2021 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
*/
public
interface
PageSequenceDao
{
public
interface
DsForm
PageSequenceDao
{
public
List
<
Map
<
String
,
Object
>>
queryDsFormISDraftListByUser
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
...
...
@@ -37,4 +39,8 @@ public interface PageSequenceDao {
public
List
<
Map
<
String
,
Object
>>
queryDsFormISDraftDetailsById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
int
insertDsFormPageSequence
(
List
<
Map
<
String
,
Object
>>
pageSequence
)
throws
Exception
;
List
<
Map
<
String
,
Object
>>
queryDsFormPageSequenceListByObjectId
(
@Param
(
"objectId"
)
String
objectId
)
throws
Exception
;
}
skyeye-dsform/src/main/java/com/skyeye/eve/service/DsFormPageService.java
浏览文件 @
d3ca087f
...
...
@@ -69,4 +69,5 @@ public interface DsFormPageService {
Map
<
String
,
Object
>
getDsFormPageData
(
String
pageContentId
,
String
value
,
String
text
,
String
showType
,
String
sequenceId
,
String
userId
)
throws
Exception
;
void
queryDsFormDataListByObjectId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-dsform/src/main/java/com/skyeye/eve/service/impl/DsFormPageServiceImpl.java
浏览文件 @
d3ca087f
...
...
@@ -16,6 +16,7 @@ import com.skyeye.common.util.DateUtil;
import
com.skyeye.common.util.HttpClient
;
import
com.skyeye.common.util.ToolUtil
;
import
com.skyeye.eve.dao.DsFormPageDao
;
import
com.skyeye.eve.dao.DsFormPageSequenceDao
;
import
com.skyeye.eve.service.DsFormPageService
;
import
com.skyeye.jedis.JedisClientService
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -25,10 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
*
...
...
@@ -50,6 +48,9 @@ public class DsFormPageServiceImpl implements DsFormPageService {
@Autowired
public
JedisClientService
jedisClient
;
@Autowired
private
DsFormPageSequenceDao
dsFormPageSequenceDao
;
/**
*
...
...
@@ -348,7 +349,7 @@ public class DsFormPageServiceImpl implements DsFormPageService {
}
/**
* 根据code获取动
添
表单信息
* 根据code获取动
态
表单信息
*
* @param inputObject
* @param outputObject
...
...
@@ -403,7 +404,7 @@ public class DsFormPageServiceImpl implements DsFormPageService {
}
// 插入ds_form_page_sequence表
if
(!
pageSequence
.
isEmpty
()){
dsFormPageDao
.
insertDsFormPageSequence
(
pageSequence
);
dsFormPage
Sequence
Dao
.
insertDsFormPageSequence
(
pageSequence
);
}
}
...
...
@@ -417,6 +418,7 @@ public class DsFormPageServiceImpl implements DsFormPageService {
* @return
* @throws Exception
*/
@Override
public
Map
<
String
,
Object
>
getDsFormPageSequence
(
String
userId
,
String
dsFormPageId
,
String
processInstanceId
,
String
objectId
)
{
Map
<
String
,
Object
>
sequence
=
new
HashMap
<>();
sequence
.
put
(
"sequenceId"
,
ToolUtil
.
getSurFaceId
());
...
...
@@ -443,4 +445,23 @@ public class DsFormPageServiceImpl implements DsFormPageService {
return
data
;
}
/**
* 根据objectId获取动态表单信息
*
* @param inputObject
* @param outputObject
* @throws Exception
*/
@Override
public
void
queryDsFormDataListByObjectId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
String
objectId
=
map
.
get
(
"objectId"
).
toString
();
List
<
Map
<
String
,
Object
>>
dsFormList
=
dsFormPageSequenceDao
.
queryDsFormPageSequenceListByObjectId
(
objectId
);
for
(
Map
<
String
,
Object
>
bean:
dsFormList
)
{
bean
.
put
(
"content"
,
dsFormPageDao
.
queryDsFormPageDataListBySequenceId
(
Arrays
.
asList
(
bean
.
get
(
"sequenceId"
).
toString
())));
}
outputObject
.
setBeans
(
dsFormList
);
outputObject
.
settotal
(
dsFormList
.
size
());
}
}
skyeye-dsform/src/main/resources/mapper/dsform/DsFormPageMapper.xml
浏览文件 @
d3ca087f
...
...
@@ -244,15 +244,6 @@
AND b.id = a.form_content_id
</select>
<insert
id=
"insertDsFormPageSequence"
parameterType=
"java.util.Map"
>
INSERT INTO ds_form_page_sequence
(id, page_id, process_instance_id, create_id, create_time, object_id)
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(#{item.sequenceId}, #{item.pageId}, #{item.processInstanceId}, #{item.createId}, #{item.createTime}, #{item.objectId})
</foreach>
</insert>
<insert
id=
"insertDsFormPageData"
parameterType=
"java.util.Map"
>
INSERT INTO ds_form_page_data
(id, content_id, sequence_id, page_id, title, placeholder, `require`, html_content, js_content,
...
...
@@ -266,4 +257,38 @@
</foreach>
</insert>
<select
id=
"queryDsFormPageDataListBySequenceId"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.sequence_id sequenceId,
a.id `name`,
a.title labelContent,
a.content_id contentId,
a.placeholder,
a.`value`,
a.text,
a.show_type showType,
CONCAT('layui-col-xs', a.default_width) defaultWidth,
a.page_id pageId,
a.html_content htmlContent,
a.js_content jsContent,
a.order_by orderBy,
IFNULL(a.key_id, '') keyId,
IFNULL(a.editable_node_id, '') editableNodeId,
IFNULL(a.editable_node_name, '') editableNodeName,
IFNULL(a.associated_data_types,'') associatedDataTypes,
IFNULL(a.a_data,'') aData,
IFNULL(a.display_template,'') templateContent,
a.`require`
FROM
ds_form_page_data a
WHERE 1=1
<if
test=
"sequenceIds != null and sequenceIds.size() > 0"
>
<foreach
collection=
"sequenceIds"
item=
"id"
separator=
","
open=
" AND a.sequence_id in("
close=
")"
>
#{id}
</foreach>
</if>
ORDER BY a.order_by ASC
</select>
</mapper>
\ No newline at end of file
skyeye-
activiti/src/main/resources/mapper/activiti/
PageSequenceMapper.xml
→
skyeye-
dsform/src/main/resources/mapper/dsform/DsForm
PageSequenceMapper.xml
浏览文件 @
d3ca087f
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.skyeye.eve.dao.PageSequenceDao"
>
<mapper
namespace=
"com.skyeye.eve.dao.
DsForm
PageSequenceDao"
>
<select
id=
"queryDsFormISDraftListByUser"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
...
...
@@ -127,5 +127,27 @@
a.sequence_id = #{id}
ORDER BY a.order_by ASC
</select>
<insert
id=
"insertDsFormPageSequence"
parameterType=
"java.util.Map"
>
INSERT INTO ds_form_page_sequence
(id, page_id, process_instance_id, create_id, create_time, object_id)
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(#{item.sequenceId}, #{item.pageId}, #{item.processInstanceId}, #{item.createId}, #{item.createTime}, #{item.objectId})
</foreach>
</insert>
<select
id=
"queryDsFormPageSequenceListByObjectId"
resultType=
"java.util.Map"
>
SELECT
a.id sequenceId,
a.page_id id,
b.page_name pageName,
b.page_num pageNum
FROM
ds_form_page_sequence a,
ds_form_page b
WHERE a.object_id = #{objectId}
AND a.page_id = b.id
</select>
</mapper>
\ No newline at end of file
skyeye-dsform/src/main/resources/reqmapping/mapping/reqdsform.xml
浏览文件 @
d3ca087f
...
...
@@ -164,6 +164,9 @@
<property
id=
"dataJson"
name=
"dataJson"
ref=
"required,json"
var=
"数据"
/>
<property
id=
"objectId"
name=
"objectId"
ref=
"required"
var=
"需要绑定的id"
/>
</url>
<url
id=
"dsformpage015"
path=
"/post/DsFormPageController/queryDsFormDataListByObjectId"
val=
"根据objectId获取动态表单信息"
allUse=
"2"
method=
"GET"
groupName=
"表单页面设计接口"
>
<property
id=
"objectId"
name=
"objectId"
ref=
"required"
var=
"绑定的id"
/>
</url>
<!-- 动态表单页面设计结束 -->
<!-- 动态表单页面分类开始 -->
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录