Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
test
Project
Project
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
邬友楠
test
Commits
5c31b139
Commit
5c31b139
authored
Oct 29, 2020
by
雍欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将表单设计器前端资源整合进平台
parent
4a3df56d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
2584 additions
and
2021 deletions
+2584
-2021
BuildPageDetailFile.java
...va/com/huigou/uasp/builder/filer/BuildPageDetailFile.java
+4
-2
BuildPageJSFile.java
...n/java/com/huigou/uasp/builder/filer/BuildPageJSFile.java
+6
-2
DeleteRowButtonResult.java
...m/huigou/uasp/builder/jsbutton/DeleteRowButtonResult.java
+1
-1
SaveRowButtonResult.java
...com/huigou/uasp/builder/jsbutton/SaveRowButtonResult.java
+46
-6
UpdateButtonResult.java
.../com/huigou/uasp/builder/jsbutton/UpdateButtonResult.java
+2
-2
DataRecordApplication.java
...m/huigou/uasp/data/application/DataRecordApplication.java
+1
-1
DataRecordByFlowApplication.java
...ou/uasp/data/application/DataRecordByFlowApplication.java
+12
-0
DataRecordApplicationImpl.java
...uasp/data/application/impl/DataRecordApplicationImpl.java
+20
-8
DataRecordByFlowApplicationImpl.java
...ata/application/impl/DataRecordByFlowApplicationImpl.java
+303
-0
DataManageController.java
...com/huigou/uasp/data/controller/DataManageController.java
+6
-4
SafFormslistApplication.java
...huigou/uasp/form/application/SafFormslistApplication.java
+1
-1
SafFormslistApplicationImpl.java
...sp/form/application/impl/SafFormslistApplicationImpl.java
+31
-19
FormDesignController.java
...com/huigou/uasp/form/controller/FormDesignController.java
+296
-482
SafFormslistController.java
...m/huigou/uasp/form/controller/SafFormslistController.java
+6
-4
SafFormslist.java
.../java/com/huigou/uasp/form/domain/model/SafFormslist.java
+10
-0
DbTablesApplication.java
...om/huigou/uasp/model/application/DbTablesApplication.java
+1
-1
DbTableService.java
...om/huigou/uasp/model/application/impl/DbTableService.java
+207
-127
DbTablesApplicationImpl.java
.../uasp/model/application/impl/DbTablesApplicationImpl.java
+12
-5
DataBaseSettingsController.java
...gou/uasp/model/controller/DataBaseSettingsController.java
+4
-4
DbTablesQueryRequest.java
.../huigou/uasp/model/domain/query/DbTablesQueryRequest.java
+10
-3
ComUtils.java
huigou-form/src/main/java/com/huigou/uasp/util/ComUtils.java
+20
-17
decorators.xml
huigou-xt/src/main/webapp/WEB-INF/decorators.xml
+1
-1
formMaking.jsp
huigou-xt/src/main/webapp/formdesign/formMaking.jsp
+190
-0
syfFormsList.js
huigou-xt/src/main/webapp/formdesign/forms/syfFormsList.js
+2
-1
UICtrl.js
huigou-xt/src/main/webapp/javaScript/UICtrl.js
+1392
-1330
No files found.
huigou-form/src/main/java/com/huigou/uasp/builder/filer/BuildPageDetailFile.java
View file @
5c31b139
...
@@ -251,8 +251,10 @@ public class BuildPageDetailFile implements BuildFilerInter {
...
@@ -251,8 +251,10 @@ public class BuildPageDetailFile implements BuildFilerInter {
//生成js文件
//生成js文件
String
detailTableName
=
paraDetail
.
getTableName
();
String
detailTableName
=
paraDetail
.
getTableName
();
paraDetail
.
setTableName
(
detailTableName
.
toLowerCase
());
paraDetail
.
setTableName
(
detailTableName
.
toLowerCase
());
paraDetail
.
setBtnNames
(
new
String
[]{
"新增行"
,
"删除行"
,
"保存行"
,
"启用行"
,
"禁用行"
});
//paraDetail.setBtnNames(new String[]{"新增行","删除行","保存行","启用行","禁用行"});
paraDetail
.
setBtnMethodNames
(
new
String
[]{
"addRow"
,
"deleteRow"
,
"saveRow"
,
"enableRow"
,
"disableRow"
});
//paraDetail.setBtnMethodNames(new String[]{"addRow","deleteRow","saveRow","enableRow","disableRow"});
paraDetail
.
setBtnNames
(
new
String
[]{
"新增行"
,
"删除行"
,
"保存行"
});
paraDetail
.
setBtnMethodNames
(
new
String
[]{
"addRow"
,
"deleteRow"
,
"saveRow"
});
// BuildPageJSFile buildStringBuffer=new BuildPageJSFile(paraDetail);
// BuildPageJSFile buildStringBuffer=new BuildPageJSFile(paraDetail);
if
(
buildPageJSFile
==
null
){
if
(
buildPageJSFile
==
null
){
buildPageJSFile
=
new
BuildPageJSFile
();
buildPageJSFile
=
new
BuildPageJSFile
();
...
...
huigou-form/src/main/java/com/huigou/uasp/builder/filer/BuildPageJSFile.java
View file @
5c31b139
...
@@ -174,7 +174,7 @@ public class BuildPageJSFile implements BuildFilerInter {
...
@@ -174,7 +174,7 @@ public class BuildPageJSFile implements BuildFilerInter {
sb
.
append
(
" }"
);
sb
.
append
(
" }"
);
sb
.
append
(
Constant
.
SYSMBOL_LINE
);
sb
.
append
(
Constant
.
SYSMBOL_LINE
);
if
(
isDetail
){
//是明细页面的js
if
(
isDetail
){
//是明细页面的js
添加字段效验的
Utils
.
composeDetailCheckFunction
(
paraForm
,
mainTableFields
,
sb
);
Utils
.
composeDetailCheckFunction
(
paraForm
,
mainTableFields
,
sb
);
}
}
...
@@ -457,7 +457,11 @@ public class BuildPageJSFile implements BuildFilerInter {
...
@@ -457,7 +457,11 @@ public class BuildPageJSFile implements BuildFilerInter {
sb
.
append
(
"},"
);
sb
.
append
(
"},"
);
}
}
sb
.
append
(
"{display: '状态', name: 'status', width: 50, minWidth: 40, align:\"left\","
)
sb
.
append
(
"{display: '状态', name: 'status', width: 50, minWidth: 40, align:\"left\","
)
.
append
(
"render: function (item) {return UICtrl.getStatusInfo(item.status);}}"
);
.
append
(
"render: function (item) { "
)
.
append
(
" if ($('#procId').val()!=\"\") { "
)
.
append
(
" return UICtrl.getApproveStatusInfo(item.status);"
)
.
append
(
" } else { "
)
.
append
(
" return UICtrl.getStatusInfo(item.status);} } }"
);
if
(
hideCols
.
size
()>
0
){
if
(
hideCols
.
size
()>
0
){
sb
.
append
(
","
);
sb
.
append
(
","
);
}
}
...
...
huigou-form/src/main/java/com/huigou/uasp/builder/jsbutton/DeleteRowButtonResult.java
View file @
5c31b139
...
@@ -53,7 +53,7 @@ public class DeleteRowButtonResult implements ButtonTypeInter {
...
@@ -53,7 +53,7 @@ public class DeleteRowButtonResult implements ButtonTypeInter {
.
append
(
" }"
);
.
append
(
" }"
);
sb
.
append
(
" if (ids!=''){"
)
sb
.
append
(
" if (ids!=''){"
)
.
append
(
" param={ids:ids};"
)
.
append
(
" param={ids:ids};"
)
.
append
(
" $('#
"
).
append
(
btnAttr
.
getParentEntityName
()).
append
(
"
Form').ajaxSubmit({ "
)
.
append
(
" $('#
#submit
Form').ajaxSubmit({ "
)
.
append
(
" url: web_app.name + (url),"
)
.
append
(
" url: web_app.name + (url),"
)
.
append
(
" param:param, "
)
.
append
(
" param:param, "
)
.
append
(
" success: function (data) {"
)
.
append
(
" success: function (data) {"
)
...
...
huigou-form/src/main/java/com/huigou/uasp/builder/jsbutton/SaveRowButtonResult.java
View file @
5c31b139
...
@@ -48,7 +48,7 @@ public class SaveRowButtonResult implements ButtonTypeInter {
...
@@ -48,7 +48,7 @@ public class SaveRowButtonResult implements ButtonTypeInter {
sb
.
append
(
"?maiTab="
).
append
(
btnAttr
.
getParentEntityName
())
sb
.
append
(
"?maiTab="
).
append
(
btnAttr
.
getParentEntityName
())
.
append
(
"&subTab="
).
append
(
btnAttr
.
getEntityName
())
.
append
(
"&subTab="
).
append
(
btnAttr
.
getEntityName
())
.
append
(
"&formId='+"
+
"$(\"#formId\").val()"
)
.
append
(
"&formId='+"
+
"$(\"#formId\").val()"
)
.
append
(
"+'&id='+"
+
"$(\"#id\").val()"
);
.
append
(
"+'&
m
id='+"
+
"$(\"#id\").val()"
);
sb
.
append
(
";"
);
sb
.
append
(
";"
);
//sb.append(" if (id && id.length > 0) ");
//sb.append(" if (id && id.length > 0) ");
...
@@ -61,7 +61,8 @@ public class SaveRowButtonResult implements ButtonTypeInter {
...
@@ -61,7 +61,8 @@ public class SaveRowButtonResult implements ButtonTypeInter {
sb.append(";");
sb.append(";");
*/
*/
sb
.
append
(
" $('#"
).
append
(
btnAttr
.
getParentEntityName
()).
append
(
"Form').ajaxSubmit({ "
)
// sb.append(" $('#").append(btnAttr.getParentEntityName()).append("Form').ajaxSubmit({ ")
sb
.
append
(
" $('#submitForm').ajaxSubmit({ "
)
//表单有流程 则formName只能是submitForm
.
append
(
" url: web_app.name + (url),"
);
.
append
(
" url: web_app.name + (url),"
);
sb
.
append
(
" param:param, "
);
sb
.
append
(
" param:param, "
);
sb
.
append
(
" success: function (data) {"
)
sb
.
append
(
" success: function (data) {"
)
...
@@ -69,16 +70,55 @@ public class SaveRowButtonResult implements ButtonTypeInter {
...
@@ -69,16 +70,55 @@ public class SaveRowButtonResult implements ButtonTypeInter {
.
append
(
" refreshFlag = true;"
)
.
append
(
" refreshFlag = true;"
)
//避免明细表修改后保存后提示 数据已经改变,关闭后数据丢失的提示
//避免明细表修改后保存后提示 数据已经改变,关闭后数据丢失的提示
.
append
(
" "
).
append
(
btnAttr
.
getEntityName
()).
append
(
"GridManager.isDataChanged=false;"
)
.
append
(
" "
).
append
(
btnAttr
.
getEntityName
()).
append
(
"GridManager.isDataChanged=false;"
)
.
append
(
" if (data.result==\"success\") { "
)
.
append
(
" if (data.result==\"success\") { "
)
;
//.append(" reload").append(Utils.toUpperCaseFirstOne(btnAttr.getEntityName())).append("Grid();")
//.append(" reload").append(Utils.toUpperCaseFirstOne(btnAttr.getEntityName())).append("Grid();")
.
append
(
" }"
)
sb
.
append
(
"var ids=data.backIDs; var bid=ids.split(',');"
)
.
append
(
"var rows = smsOrderDetailGridManager.rows;"
)
.
append
(
"for (var i = 0,r = rows.length-1; i < r; i++) {"
)
.
append
(
" rows[i].id = bid[i];"
)
.
append
(
"} "
)
.
append
(
btnAttr
.
getEntityName
()).
append
(
"GridManager.reRender();"
);
sb
.
append
(
" }"
)
// sb.append(" _self.close();");
// sb.append(" _self.close();");
.
append
(
" }"
)
.
append
(
" }"
)
.
append
(
" });"
)
.
append
(
" });"
)
.
append
(
" return true;"
)
.
append
(
" return true;"
)
.
append
(
" }"
);
.
append
(
" } "
);
sb
.
append
(
" "
);
sb
.
append
(
Constant
.
SYSMBOL_LINE
);
sb
.
append
(
Constant
.
SYSMBOL_LINE
);
//如果是表单 带有流程 ,需要重新实现 保存主表的方法
sb
.
append
(
"function doSave"
).
append
(
Utils
.
toUpperCaseFirstOne
(
btnAttr
.
getParentEntityName
())).
append
(
"(grid){"
);
sb
.
append
(
" var _self = this;"
);
sb
.
append
(
" var id = getId();"
);
if
(
btnAttr
.
getIsForm
()==
1
){
//是表单生成器 则调用统一的添加方法
sb
.
append
(
" var url= '/dataManage/saveDataRecord.ajax';"
);
sb
.
append
(
" if (grid==1) { url+='?btntype=1'; } "
);
sb
.
append
(
" $('#submitForm').ajaxSubmit({"
);
//发起流程 必须固定表单名称为submitForm
}
else
{
sb
.
append
(
" var url = '/"
).
append
(
Utils
.
toLowerCaseFirstOne
(
btnAttr
.
getEntityName
()))
.
append
(
"/save"
).
append
(
Utils
.
toUpperCaseFirstOne
(
btnAttr
.
getEntityName
())).
append
(
".ajax';"
);
// sb.append(" $('#").append(Utils.toLowerCaseFirstOne(btnAttr.getEntityName())).append("Form').ajaxSubmit({");
sb
.
append
(
" $('#submitForm').ajaxSubmit({"
);
}
sb
.
append
(
" url: web_app.name +url,"
);
sb
.
append
(
" success: function (data) {"
);
sb
.
append
(
" $(\"#id\").val(data);"
);
sb
.
append
(
" if (grid&&grid!=\"\") {UICtrl.addGridRow(eval(grid),{id:''} );}"
);
//sb.append(" reload").append(Utils.toUpperCaseFirstOne(btnAttr.getEntityName())).append("Grid();");
//sb.append(" refreshFlag = true;");
//sb.append(" _self.close();");
sb
.
append
(
" }"
);
sb
.
append
(
" });"
);
sb
.
append
(
" }"
);
sb
.
append
(
Constant
.
SYSMBOL_LINE
);
list
.
add
(
sb
.
toString
());
list
.
add
(
sb
.
toString
());
// list.add(Integer.toString(fieldAttributes.getCurrCols()));
// list.add(Integer.toString(fieldAttributes.getCurrCols()));
return
list
;
return
list
;
...
...
huigou-form/src/main/java/com/huigou/uasp/builder/jsbutton/UpdateButtonResult.java
View file @
5c31b139
...
@@ -31,10 +31,10 @@ public class UpdateButtonResult implements ButtonTypeInter {
...
@@ -31,10 +31,10 @@ public class UpdateButtonResult implements ButtonTypeInter {
sb
.
append
(
" "
);
sb
.
append
(
" "
);
sb
.
append
(
" function doShowUpdateDialog(id) {"
);
sb
.
append
(
" function doShowUpdateDialog(id) {"
);
Random
random
=
new
Random
(
3
);
//
Random random=new Random(3);
sb
.
append
(
" if ($('#procId').val()!=\"\") { "
);
sb
.
append
(
" if ($('#procId').val()!=\"\") { "
);
sb
.
append
(
"UICtrl.addTabItem({ "
);
sb
.
append
(
"UICtrl.addTabItem({ "
);
sb
.
append
(
" tabid: 'edit"
).
append
(
btnAttributes
.
getEntityName
()).
append
(
random
.
nextInt
()).
append
(
"'
,"
);
sb
.
append
(
" tabid: 'edit"
).
append
(
btnAttributes
.
getEntityName
()).
append
(
"'+id
,"
);
sb
.
append
(
" text: \"编辑"
+
btnAttributes
.
getFormName
()+
"\","
);
sb
.
append
(
" text: \"编辑"
+
btnAttributes
.
getFormName
()+
"\","
);
sb
.
append
(
" url: web_app.name+'/dataManage/addDataRecord.job?procId='+$('#procId').val()"
);
sb
.
append
(
" url: web_app.name+'/dataManage/addDataRecord.job?procId='+$('#procId').val()"
);
sb
.
append
(
"+'&formNo='+$('#formNo').val()"
);
sb
.
append
(
"+'&formNo='+$('#formNo').val()"
);
...
...
huigou-form/src/main/java/com/huigou/uasp/data/application/DataRecordApplication.java
View file @
5c31b139
...
@@ -47,7 +47,7 @@ public interface DataRecordApplication {
...
@@ -47,7 +47,7 @@ public interface DataRecordApplication {
Map
<
String
,
Object
>
queryDataRecordDetail
(
DataRecordQueryRequest
queryRequest
);
Map
<
String
,
Object
>
queryDataRecordDetail
(
DataRecordQueryRequest
queryRequest
);
//保存明细数据
//保存明细数据
String
saveDataRecordDetail
(
DataRecordQueryRequest
queryRequest
,
List
<
String
>
hiddenFieldList
,
List
<
PubDataRecord
>
detailData
);
Map
<
String
,
Object
>
saveDataRecordDetail
(
DataRecordQueryRequest
queryRequest
,
List
<
String
>
hiddenFieldList
,
List
<
PubDataRecord
>
detailData
);
//查询明细表中 检索SQL返回的隐藏字段
//查询明细表中 检索SQL返回的隐藏字段
List
<
Map
<
String
,
Object
>>
queryHiddenFieldBySearchSQL
(
DataRecordQueryRequest
queryRequest
);
List
<
Map
<
String
,
Object
>>
queryHiddenFieldBySearchSQL
(
DataRecordQueryRequest
queryRequest
);
...
...
huigou-form/src/main/java/com/huigou/uasp/data/application/DataRecordByFlowApplication.java
0 → 100644
View file @
5c31b139
package
com
.
huigou
.
uasp
.
data
.
application
;
import
com.huigou.uasp.bpm.managment.domain.model.ProcDefinition
;
public
interface
DataRecordByFlowApplication
{
String
PROCESS_DEFINITION_KEY
=
"leave"
;
// Leave loadLeaveById(String id);
//在审批过程中 根据业务ID 获取流程定义信息(表单编号)
ProcDefinition
getFormNoByBizid
(
String
bizId
);
}
huigou-form/src/main/java/com/huigou/uasp/data/application/impl/DataRecordApplicationImpl.java
View file @
5c31b139
...
@@ -672,12 +672,13 @@ public class DataRecordApplicationImpl extends BaseApplication implements DataRe
...
@@ -672,12 +672,13 @@ public class DataRecordApplicationImpl extends BaseApplication implements DataRe
//保存明细数据
//保存明细数据
@Override
@Override
@Transactional
@Transactional
public
String
saveDataRecordDetail
(
DataRecordQueryRequest
queryRequest
,
List
<
String
>
hiddenFieldList
,
List
<
PubDataRecord
>
detailData
)
{
public
Map
<
String
,
Object
>
saveDataRecordDetail
(
DataRecordQueryRequest
queryRequest
,
List
<
String
>
hiddenFieldList
,
List
<
PubDataRecord
>
detailData
)
{
Assert
.
hasText
(
queryRequest
.
getId
(),
Constant
.
ID_NOT_BLANK
);
Assert
.
hasText
(
queryRequest
.
getId
(),
Constant
.
ID_NOT_BLANK
);
// String mainTable = queryRequest.getMaiTab();//commonDataService.getTableName(queryRequest.getFormId());
// String mainTable = queryRequest.getMaiTab();//commonDataService.getTableName(queryRequest.getFormId());
String
maiTable
=
CaseFormat
.
UPPER_CAMEL
.
to
(
CaseFormat
.
LOWER_UNDERSCORE
,
queryRequest
.
getMaiTab
());
//转成下划线
String
maiTable
=
CaseFormat
.
UPPER_CAMEL
.
to
(
CaseFormat
.
LOWER_UNDERSCORE
,
queryRequest
.
getMaiTab
());
//转成下划线
String
subTable
=
CaseFormat
.
UPPER_CAMEL
.
to
(
CaseFormat
.
LOWER_UNDERSCORE
,
queryRequest
.
getSubTab
());
//转成下划线
String
subTable
=
CaseFormat
.
UPPER_CAMEL
.
to
(
CaseFormat
.
LOWER_UNDERSCORE
,
queryRequest
.
getSubTab
());
//转成下划线
String
sql
=
""
,
backStr
=
"success"
;
String
sql
=
""
,
backStr
=
"success"
,
backIDs
=
""
;
Map
<
String
,
Object
>
backmap
=
new
HashMap
<
String
,
Object
>();
try
{
try
{
//查询字段名称
//查询字段名称
queryRequest
.
setMaiTab
(
maiTable
);
//带下划线
queryRequest
.
setMaiTab
(
maiTable
);
//带下划线
...
@@ -693,7 +694,7 @@ public class DataRecordApplicationImpl extends BaseApplication implements DataRe
...
@@ -693,7 +694,7 @@ public class DataRecordApplicationImpl extends BaseApplication implements DataRe
List
<
Map
<
String
,
Object
>>
datas
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
datas
=
new
ArrayList
<
Map
<
String
,
Object
>>();
String
parentId
=
queryRequest
.
getId
();
String
parentId
=
queryRequest
.
getId
();
String
columns
=
Utils
.
getDataFields
(
fieldList
,
"fieldCode"
);
String
columns
=
Utils
.
getDataFields
(
fieldList
,
"fieldCode"
);
//System.out.println("parentId==============="+queryRequest.getId());
//添加隐藏的列(获取第一列的)
//添加隐藏的列(获取第一列的)
// Map <String,Object>hiddMap=detailData.get(0).getHiddField();//如果是第一行乌
// Map <String,Object>hiddMap=detailData.get(0).getHiddField();//如果是第一行乌
//for (Map.Entry<String,Object> entry:hiddMap.entrySet()) {
//for (Map.Entry<String,Object> entry:hiddMap.entrySet()) {
...
@@ -718,12 +719,13 @@ public class DataRecordApplicationImpl extends BaseApplication implements DataRe
...
@@ -718,12 +719,13 @@ public class DataRecordApplicationImpl extends BaseApplication implements DataRe
String
dbrq
=
this
.
commonUtilApplication
.
queryDBCurrentDate
();
String
dbrq
=
this
.
commonUtilApplication
.
queryDBCurrentDate
();
String
id
=
""
,
back
=
""
;
String
id
=
""
,
back
=
""
;
boolean
isAdded
=
false
;
boolean
isAdded
=
false
;
for
(
PubDataRecord
detail
:
detailData
)
{
for
(
PubDataRecord
detail
:
detailData
)
{
map
=
Utils
.
dataValueTransfer
(
fieldList
,
detail
);
map
=
Utils
.
dataValueTransfer
(
fieldList
,
detail
);
map
.
putAll
(
detail
.
getHiddField
());
//添加隐藏列的值
map
.
putAll
(
detail
.
getHiddField
());
//添加隐藏列的值
datas
=
new
ArrayList
<
Map
<
String
,
Object
>>();
datas
=
new
ArrayList
<
Map
<
String
,
Object
>>();
id
=
Utils
.
createUuid
();
id
=
Utils
.
createUuid
();
if
(
"2"
.
equals
(
queryRequest
.
getSaveMode
())){
//是存储过程方式 只将明细数据存入临时表
if
(
"2"
.
equals
(
queryRequest
.
getSaveMode
())){
//是存储过程方式 只将明细数据存入临时表
// back=callDetailProcedure(subTable,parentId,id);
// back=callDetailProcedure(subTable,parentId,id);
map
.
put
(
"parentId"
,
parentId
);
map
.
put
(
"parentId"
,
parentId
);
...
@@ -750,30 +752,40 @@ public class DataRecordApplicationImpl extends BaseApplication implements DataRe
...
@@ -750,30 +752,40 @@ public class DataRecordApplicationImpl extends BaseApplication implements DataRe
if
(
hiddenFieldList
.
contains
(
"created_by_name"
)){
if
(
hiddenFieldList
.
contains
(
"created_by_name"
)){
map
.
put
(
"created_by_name"
,
operator
.
getPersonMemberName
());
map
.
put
(
"created_by_name"
,
operator
.
getPersonMemberName
());
}
}
//System.out.println("ss==detail=size======"+detailData.size()+"==="+detail.getId());
map
.
put
(
"parent_id"
,
parentId
);
if
(!
StringUtils
.
isEmpty
(
detail
.
getId
()))
{
//更新明细
if
(!
StringUtils
.
isEmpty
(
detail
.
getId
()))
{
//更新明细
id
=
detail
.
getId
();
id
=
detail
.
getId
();
map
.
put
(
"id"
,
detail
.
getId
());
map
.
put
(
"id"
,
detail
.
getId
());
datas
.
add
(
map
);
datas
.
add
(
map
);
sql
=
String
.
format
(
"update %s set %s where id = ?"
,
subTable
,
ComUtils
.
getMultiUpdateColumnSqlByList
(
fieldList
,
columns
));
sql
=
String
.
format
(
"update %s set %s where id = ?"
,
subTable
,
ComUtils
.
getMultiUpdateColumnSqlByList
(
fieldList
,
columns
));
//System.out.println("ss==update detail======="+sql);
this
.
sqlExecutorDao
.
batchUpdate
(
sql
,
ComUtils
.
convertListMapToListObjects
(
datas
,
columns
+
",id"
));
this
.
sqlExecutorDao
.
batchUpdate
(
sql
,
ComUtils
.
convertListMapToListObjects
(
datas
,
columns
+
",id"
));
}
else
{
//新增明细
}
else
{
//新增明细
map
.
put
(
"parent_id"
,
parentId
);
//
map.put("parent_id", parentId);
map
.
put
(
"status"
,
1
);
map
.
put
(
"status"
,
1
);
map
.
put
(
"id"
,
id
);
map
.
put
(
"id"
,
id
);
//System.out.println("ss==detail=add======"+parentId);
// datas.add(map);
// datas.add(map);
sql
=
ComUtils
.
getMultiInsertSqlByList
(
subTable
,
map
,
columns
+
",status,id,parent_id"
);
sql
=
ComUtils
.
getMultiInsertSqlByList
(
subTable
,
map
,
columns
+
",status,id,parent_id"
);
//System.out.println("ss==detail=add======"+sql);
this
.
sqlExecutorDao
.
executeUpdate
(
sql
);
this
.
sqlExecutorDao
.
executeUpdate
(
sql
);
}
}
if
(!
""
.
equals
(
backIDs
)){
backIDs
+=
","
;
}
backIDs
+=
id
;
}
}
}
}
backmap
.
put
(
"backIDs"
,
backIDs
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
System
.
out
.
println
(
"sql:="
+
sql
);
backStr
=
"failure
"
;
System
.
out
.
println
(
"sql:="
+
sql
);
backStr
=
"failure
:"
+
ex
.
getMessage
()
;
throw
new
ApplicationException
(
"保存明细表数据错误:"
+
ex
.
getMessage
());
throw
new
ApplicationException
(
"保存明细表数据错误:"
+
ex
.
getMessage
());
// ex.printStackTrace();
// ex.printStackTrace();
}
}
return
backStr
;
backmap
.
put
(
"result"
,
backStr
);
return
backmap
;
}
}
//如果配置了存储过程方式,调用明细表存储过程处理
//如果配置了存储过程方式,调用明细表存储过程处理
...
...
huigou-form/src/main/java/com/huigou/uasp/data/application/impl/DataRecordByFlowApplicationImpl.java
0 → 100644
View file @
5c31b139
This diff is collapsed.
Click to expand it.
huigou-form/src/main/java/com/huigou/uasp/data/controller/DataManageController.java
View file @
5c31b139
...
@@ -387,7 +387,8 @@ public class DataManageController extends CommonController {
...
@@ -387,7 +387,8 @@ public class DataManageController extends CommonController {
SafFormslist
form
=
this
.
safFormslistRepository
.
findOne
(
queryRequest
.
getFormId
());
SafFormslist
form
=
this
.
safFormslistRepository
.
findOne
(
queryRequest
.
getFormId
());
List
<
PubDataRecord
>
detailData
=
sdo
.
getList
(
"detailData"
,
PubDataRecord
.
class
);
List
<
PubDataRecord
>
detailData
=
sdo
.
getList
(
"detailData"
,
PubDataRecord
.
class
);
queryRequest
.
setId
(
sdo
.
getString
(
"mid"
).
toString
());
//主表ID
//System.out.println("saveRowDetail================="+detailData.get(0).getField1()+"=pid="+sdo.getString("mid").toString()+"==="+detailData.get(0).getId());
// 存在数据字典的 将值字段 转换到保存的字段
// 存在数据字典的 将值字段 转换到保存的字段
List
<
PubDataRecord
>
newDetailData
=
new
ArrayList
<
PubDataRecord
>();
List
<
PubDataRecord
>
newDetailData
=
new
ArrayList
<
PubDataRecord
>();
List
<
Object
>
listold
=
sdo
.
getList
(
"detailData"
);
List
<
Object
>
listold
=
sdo
.
getList
(
"detailData"
);
...
@@ -451,9 +452,10 @@ public class DataManageController extends CommonController {
...
@@ -451,9 +452,10 @@ public class DataManageController extends CommonController {
}
}
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
if
(!
StringUtils
.
isEmpty
(
sdo
.
getString
(
"id"
)))
{
//主表ID存在
if
(!
StringUtils
.
isEmpty
(
sdo
.
getString
(
"id"
))&&
newDetailData
.
size
()>
0
)
{
//主表ID存在
String
backStr
=
this
.
dataRecordApplication
.
saveDataRecordDetail
(
queryRequest
,
hiddenFieldList
,
newDetailData
);
//System.out.println("s-====================="+newDetailData.size()+"=="+newDetailData.get(0).getId());
data
.
put
(
"result"
,
backStr
);
data
=
this
.
dataRecordApplication
.
saveDataRecordDetail
(
queryRequest
,
hiddenFieldList
,
newDetailData
);
//data.put("result", backStr);
}
}
return
toResult
(
data
);
return
toResult
(
data
);
}
}
...
...
huigou-form/src/main/java/com/huigou/uasp/form/application/SafFormslistApplication.java
View file @
5c31b139
...
@@ -60,7 +60,7 @@ public interface SafFormslistApplication {
...
@@ -60,7 +60,7 @@ public interface SafFormslistApplication {
/*
/*
* 是否生成页面文件
* 是否生成页面文件
*/
*/
void
needGenerateFile
(
SafFormsQueryRequest
queryRequest
);
String
needGenerateFile
(
String
formNo
);
//查询单值的属性
//查询单值的属性
// List<Map<String, Object>> queryDataRecordSingleFields(SafFormsQueryRequest queryRequest);
// List<Map<String, Object>> queryDataRecordSingleFields(SafFormsQueryRequest queryRequest);
...
...
huigou-form/src/main/java/com/huigou/uasp/form/application/impl/SafFormslistApplicationImpl.java
View file @
5c31b139
...
@@ -19,6 +19,7 @@ import com.huigou.uasp.form.domain.query.SafFormsQueryRequest;
...
@@ -19,6 +19,7 @@ import com.huigou.uasp.form.domain.query.SafFormsQueryRequest;
import
com.huigou.uasp.form.repository.*
;
import
com.huigou.uasp.form.repository.*
;
import
com.huigou.uasp.meta.domain.model.MetaData
;
import
com.huigou.uasp.meta.domain.model.MetaData
;
import
com.huigou.uasp.meta.repository.MetaDataRepository
;
import
com.huigou.uasp.meta.repository.MetaDataRepository
;
import
com.huigou.uasp.model.application.impl.DbTableService
;
import
com.huigou.uasp.model.domain.query.DbTablesQueryRequest
;
import
com.huigou.uasp.model.domain.query.DbTablesQueryRequest
;
import
com.huigou.uasp.util.Constant
;
import
com.huigou.uasp.util.Constant
;
import
com.huigou.uasp.util.Utils
;
import
com.huigou.uasp.util.Utils
;
...
@@ -57,8 +58,8 @@ private FormButtonsRepository formButtonsRepository;
...
@@ -57,8 +58,8 @@ private FormButtonsRepository formButtonsRepository;
@Autowired
@Autowired
private
FormAttributeRepository
formAttributeRepository
;
private
FormAttributeRepository
formAttributeRepository
;
//
@Autowired
@Autowired
//private ProcDefinitionRespository procDefinitionRespository
;
private
DbTableService
dbTableService
;
@Autowired
@Autowired
private
MetaDataRepository
metaDataRepository
;
private
MetaDataRepository
metaDataRepository
;
...
@@ -760,12 +761,14 @@ public void deleteSyfFormsByIds(List<String> ids) {
...
@@ -760,12 +761,14 @@ public void deleteSyfFormsByIds(List<String> ids) {
}
}
return
map
;
return
map
;
}
}
/*
/*
* 生成页面文件
* 生成页面文件
* queryRequest:需要参数formNo
*/
*/
public
void
needGenerateFile
(
SafFormsQueryRequest
queryRequest
)
{
public
String
needGenerateFile
(
String
formNo
)
{
String
backStr
=
""
;
String
webPath
=
this
.
getClass
().
getClassLoader
().
getResource
(
"/"
).
getPath
();
String
webPath
=
this
.
getClass
().
getClassLoader
().
getResource
(
"/"
).
getPath
();
webPath
=
webPath
.
substring
(
1
,
webPath
.
length
()
-
16
);
webPath
=
webPath
.
substring
(
1
,
webPath
.
length
()
-
16
);
webPath
+=
pagePath
;
webPath
+=
pagePath
;
...
@@ -773,7 +776,7 @@ public void deleteSyfFormsByIds(List<String> ids) {
...
@@ -773,7 +776,7 @@ public void deleteSyfFormsByIds(List<String> ids) {
if
(!
file
.
exists
()){
if
(!
file
.
exists
()){
file
.
mkdir
();
file
.
mkdir
();
}
}
SafFormslist
safFormslist
=
this
.
safFormslistRepository
.
find
One
(
queryRequest
.
getId
()
);
SafFormslist
safFormslist
=
this
.
safFormslistRepository
.
find
ByFormNo
(
formNo
).
get
(
0
);
webPath
+=
safFormslist
.
getFormNo
();
webPath
+=
safFormslist
.
getFormNo
();
file
=
new
File
(
webPath
);
file
=
new
File
(
webPath
);
if
(!
file
.
exists
()){
if
(!
file
.
exists
()){
...
@@ -781,8 +784,13 @@ public void deleteSyfFormsByIds(List<String> ids) {
...
@@ -781,8 +784,13 @@ public void deleteSyfFormsByIds(List<String> ids) {
}
}
String
tableName
=
commonUtilApplication
.
getTablesByFormId
(
safFormslist
.
getId
(),
1
);
String
tableName
=
commonUtilApplication
.
getTablesByFormId
(
safFormslist
.
getId
(),
1
);
tableName
=
tableName
.
split
(
","
)[
0
];
//取第一个主表
tableName
=
tableName
.
split
(
","
)[
0
];
//取第一个主表
queryRequest
.
setTableName
(
tableName
.
toUpperCase
());
// queryRequest.setTableName(tableName.toUpperCase());
String
pageName
=
CaseFormat
.
LOWER_UNDERSCORE
.
to
(
CaseFormat
.
LOWER_CAMEL
,
queryRequest
.
getTableName
());
//转驼峰法
SafFormsQueryRequest
queryRequest
=
new
SafFormsQueryRequest
();
queryRequest
.
setId
(
safFormslist
.
getId
());
queryRequest
.
setTableName
(
tableName
.
toUpperCase
());
queryRequest
.
setFormNo
(
formNo
);
String
pageName
=
CaseFormat
.
LOWER_UNDERSCORE
.
to
(
CaseFormat
.
LOWER_CAMEL
,
tableName
);
//转驼峰法
String
filePathName
=
webPath
+
"/"
+
pageName
+
".jsp"
;
String
filePathName
=
webPath
+
"/"
+
pageName
+
".jsp"
;
file
=
new
File
(
filePathName
);
file
=
new
File
(
filePathName
);
...
@@ -792,10 +800,14 @@ public void deleteSyfFormsByIds(List<String> ids) {
...
@@ -792,10 +800,14 @@ public void deleteSyfFormsByIds(List<String> ids) {
}
}
if
(!
file
.
exists
())
{
if
(!
file
.
exists
())
{
StringBuffer
sb
=
new
StringBuffer
(
""
);
List
<
String
>
hiddenField
=
new
ArrayList
<
String
>();
//默认隐藏字段
List
<
String
>
hiddenField
=
new
ArrayList
<
String
>();
//默认隐藏字段
// hiddenField.add("id");
// hiddenField.add("id");
// hiddenField.add("formId");
// hiddenField.add("formId");
System
.
out
.
println
(
"safFormslist.getPublished()==="
+
safFormslist
.
getPublished
());
//主表添加流程所需要的字段
if
(
safFormslist
.
getPublished
()==
null
||(
safFormslist
.
getPublished
()!=
null
&&
safFormslist
.
getPublished
()==
0
))
{
dbTableService
.
addProcessFields
(
tableName
);
}
ParamFormVO
paraForm
=
this
.
getFieldAttributes
(
queryRequest
);
ParamFormVO
paraForm
=
this
.
getFieldAttributes
(
queryRequest
);
DbTablesQueryRequest
dbqueryRequest
=
new
DbTablesQueryRequest
();
DbTablesQueryRequest
dbqueryRequest
=
new
DbTablesQueryRequest
();
...
@@ -834,16 +846,9 @@ public void deleteSyfFormsByIds(List<String> ids) {
...
@@ -834,16 +846,9 @@ public void deleteSyfFormsByIds(List<String> ids) {
paraForm
.
setBtnMethodNames
(
btnMethodNames
);
paraForm
.
setBtnMethodNames
(
btnMethodNames
);
}
}
// 查询当前表单是否挂流程
// 查询当前表单是否挂流程
// String sql="select * from WF_PROCDEF t where t.node_kind_id='proc' and t.form_no='"+safFormslist.getFormNo()+"'";
// List<?> proclist=this.generalRepository.queryByNativeSql(sql,new HashMap<String, Object>());
/* ProcDefinition procDefinition = this.procDefinitionRespository.findOne(((root, query, cb) ->
cb.and(cb.equal(root.get("formNo"), safFormslist.getFormNo()),
cb.equal(root.get("nodeKindId"), "proc"))
));
if (procDefinition!=null){
paraForm.setProcDefinition(procDefinition);
}*/
try
{
try
{
StringBuffer
sb
=
new
StringBuffer
(
""
);
BuildPageDetailFile
buildPageDetailFile
=
new
BuildPageDetailFile
();
BuildPageDetailFile
buildPageDetailFile
=
new
BuildPageDetailFile
();
sb
=
buildPageDetailFile
.
generateContents
(
paraForm
,
tableName
);
sb
=
buildPageDetailFile
.
generateContents
(
paraForm
,
tableName
);
buildPageDetailFile
.
generateFile
(
filePathName
,
sb
);
buildPageDetailFile
.
generateFile
(
filePathName
,
sb
);
...
@@ -855,17 +860,24 @@ public void deleteSyfFormsByIds(List<String> ids) {
...
@@ -855,17 +860,24 @@ public void deleteSyfFormsByIds(List<String> ids) {
buildTypeClass
.
getBuildClass
(
Constant
.
BUILD_PAGEJS
).
generateFile
(
paraForm
,
null
);
buildTypeClass
.
getBuildClass
(
Constant
.
BUILD_PAGEJS
).
generateFile
(
paraForm
,
null
);
Thread
.
sleep
(
1000
);
Thread
.
sleep
(
1000
);
if
(
safFormslist
.
getPublished
()==
null
||(
safFormslist
.
getPublished
()!=
null
&&
safFormslist
.
getPublished
()==
0
))
{
safFormslist
.
setPublished
(
1
);
this
.
safFormslistRepository
.
saveAndFlush
(
safFormslist
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
backStr
=
e
.
getMessage
();
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
return
backStr
;
}
}
/**
/**
* 拼装数据对象属性
* 拼装数据对象属性
*
*
* @param queryRequest
* @param queryRequest
: formId、formNo 、tableName
* @return
* @return
*/
*/
public
ParamFormVO
getFieldAttributes
(
SafFormsQueryRequest
queryRequest
)
{
public
ParamFormVO
getFieldAttributes
(
SafFormsQueryRequest
queryRequest
)
{
...
...
huigou-form/src/main/java/com/huigou/uasp/form/controller/FormDesignController.java
View file @
5c31b139
This diff is collapsed.
Click to expand it.
huigou-form/src/main/java/com/huigou/uasp/form/controller/SafFormslistController.java
View file @
5c31b139
...
@@ -192,6 +192,7 @@ public String previewEditForm(){
...
@@ -192,6 +192,7 @@ public String previewEditForm(){
//加载表单编辑页面
//加载表单编辑页面
public
String
loadSyfFormsDetail
()
{
public
String
loadSyfFormsDetail
()
{
String
id
=
getSDO
().
getString
(
"id"
);
String
id
=
getSDO
().
getString
(
"id"
);
this
.
putAttribute
(
"openval"
,
1
);
if
(
StringUtils
.
isEmpty
(
id
))
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
forward
(
"syfFormsDetail"
);
return
forward
(
"syfFormsDetail"
);
}
else
{
}
else
{
...
@@ -875,10 +876,11 @@ public String queryTableProperty(){
...
@@ -875,10 +876,11 @@ public String queryTableProperty(){
String
tableName
=
sdo
.
getString
(
"tableName"
);
//主表名称
String
tableName
=
sdo
.
getString
(
"tableName"
);
//主表名称
SafFormsQueryRequest
formQueryRequest
=
sdo
.
toQueryRequest
(
SafFormsQueryRequest
.
class
);;
SafFormsQueryRequest
formQueryRequest
=
sdo
.
toQueryRequest
(
SafFormsQueryRequest
.
class
);;
// String pageName=CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,tableName);
// String pageName=CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,tableName);
//formQueryRequest.setTableName(tableName);
formQueryRequest
.
setTableName
(
tableName
);
backStr
=
safFormsApplication
.
needGenerateFile
(
formQueryRequest
.
getFormNo
());
safFormsApplication
.
needGenerateFile
(
formQueryRequest
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
return
toResult
(
backStr
);
map
.
put
(
"result"
,
backStr
);
return
toResult
(
map
);
}
}
//代码生成器-->组装参数对象
//代码生成器-->组装参数对象
...
...
huigou-form/src/main/java/com/huigou/uasp/form/domain/model/SafFormslist.java
View file @
5c31b139
...
@@ -102,6 +102,16 @@ public class SafFormslist extends AbstractEntity {
...
@@ -102,6 +102,16 @@ public class SafFormslist extends AbstractEntity {
this
.
saveMode
=
saveMode
;
this
.
saveMode
=
saveMode
;
}
}
@Column
(
name
=
"published"
,
length
=
10
)
public
Integer
published
;
public
Integer
getPublished
()
{
return
published
;
}
public
void
setPublished
(
Integer
published
)
{
this
.
published
=
published
;
}
/**
/**
* 模板内容clob
* 模板内容clob
*/
*/
...
...
huigou-form/src/main/java/com/huigou/uasp/model/application/DbTablesApplication.java
View file @
5c31b139
...
@@ -61,7 +61,7 @@ public interface DbTablesApplication {
...
@@ -61,7 +61,7 @@ public interface DbTablesApplication {
List
<
Map
<
String
,
Object
>>
querySelectedMetaLists
(
DbTablesQueryRequest
queryRequest
);
List
<
Map
<
String
,
Object
>>
querySelectedMetaLists
(
DbTablesQueryRequest
queryRequest
);
//模型发布
//模型发布
Map
<
String
,
Object
>
publishToModelRecordTable
(
DbTablesQueryRequest
queryRequest
);
Map
<
String
,
Object
>
publishToModelRecordTable
(
String
tableId
,
String
hasProcess
);
/**
/**
* 删除模型分类
* 删除模型分类
...
...
huigou-form/src/main/java/com/huigou/uasp/model/application/impl/DbTableService.java
View file @
5c31b139
This diff is collapsed.
Click to expand it.
huigou-form/src/main/java/com/huigou/uasp/model/application/impl/DbTablesApplicationImpl.java
View file @
5c31b139
...
@@ -268,18 +268,25 @@ public class DbTablesApplicationImpl extends BaseApplication implements DbTables
...
@@ -268,18 +268,25 @@ public class DbTablesApplicationImpl extends BaseApplication implements DbTables
*/
*/
@Override
@Override
@Transactional
@Transactional
public
Map
<
String
,
Object
>
publishToModelRecordTable
(
DbTablesQueryRequest
queryRequest
)
{
//parameter: tableId 、 (hasProcess=1表示有流程的)
public
Map
<
String
,
Object
>
publishToModelRecordTable
(
String
tableId
,
String
hasProcess
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
String
backStr
=
""
;
String
backStr
=
""
;
String
tableName
=
this
.
dbTableService
.
getTableName
(
queryRequest
.
getTableId
()
);
String
tableName
=
this
.
dbTableService
.
getTableName
(
tableId
);
try
{
try
{
DbTablesQueryRequest
queryRequest
=
new
DbTablesQueryRequest
();
queryRequest
.
setId
(
tableId
);
queryRequest
.
setTableId
(
tableId
);
queryRequest
.
setTableName
(
tableName
);
queryRequest
.
setHasProcess
(
hasProcess
);
List
<
Map
<
String
,
Object
>>
fieldList
=
this
.
queryModelRecordSingleFields
(
queryRequest
);
List
<
Map
<
String
,
Object
>>
fieldList
=
this
.
queryModelRecordSingleFields
(
queryRequest
);
if
(
fieldList
.
size
()
==
0
)
{
if
(
fieldList
.
size
()
==
0
)
{
map
.
put
(
"result"
,
Constant
.
NOT_ATTRIBUTE_MODEL
);
map
.
put
(
"result"
,
Constant
.
NOT_ATTRIBUTE_MODEL
);
return
map
;
return
map
;
}
}
String
[]
fieldContent
=
dbTableService
.
composizeFieldContent
(
fieldList
,
"1"
);
//组装主表
String
[]
fieldContent
=
dbTableService
.
composizeFieldContent
(
fieldList
,
queryRequest
.
getHasProcess
());
backStr
=
this
.
dbTableService
.
createTable
(
tableName
,
fieldContent
[
0
],
fieldContent
[
1
]);
backStr
=
this
.
dbTableService
.
createTable
(
tableName
,
fieldContent
[
0
],
fieldContent
[
1
]);
if
(!
""
.
equals
(
backStr
))
{
if
(!
""
.
equals
(
backStr
))
{
map
.
put
(
"result"
,
backStr
);
map
.
put
(
"result"
,
backStr
);
...
@@ -338,14 +345,14 @@ public class DbTablesApplicationImpl extends BaseApplication implements DbTables
...
@@ -338,14 +345,14 @@ public class DbTablesApplicationImpl extends BaseApplication implements DbTables
// backStr=synchrionData(queryRequest.getModelId(),tableName,multsFieldList,attrCodes);
// backStr=synchrionData(queryRequest.getModelId(),tableName,multsFieldList,attrCodes);
//}
//}
map
.
put
(
"result"
,
backStr
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
backStr
=
ex
.
getMessage
();
backStr
=
ex
.
getMessage
();
ex
.
printStackTrace
();
ex
.
printStackTrace
();
}
}
map
.
put
(
"result"
,
backStr
);
return
map
;
return
map
;
}
}
//
//
para :tableName
//@Override
//@Override
public
List
<
Map
<
String
,
Object
>>
queryModelRecordSingleFields
(
DbTablesQueryRequest
queryRequest
)
{
public
List
<
Map
<
String
,
Object
>>
queryModelRecordSingleFields
(
DbTablesQueryRequest
queryRequest
)
{
Map
<
String
,
Object
>
mapData
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
mapData
=
new
HashMap
<
String
,
Object
>();
...
...
huigou-form/src/main/java/com/huigou/uasp/model/controller/DataBaseSettingsController.java
View file @
5c31b139
...
@@ -289,11 +289,11 @@ public class DataBaseSettingsController extends CommonController{
...
@@ -289,11 +289,11 @@ public class DataBaseSettingsController extends CommonController{
public
String
publishToModelRecordTable
(){
public
String
publishToModelRecordTable
(){
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
modelId
=
sdo
.
getString
(
"tableId"
);
String
tableId
=
sdo
.
getString
(
"tableId"
);
System
.
out
.
println
(
"==tableId========="
+
tableId
);
//List<MdmModelRecord> list=this.mdmModelRecordRepository.findById(modelId);
//List<MdmModelRecord> list=this.
d
mdmModelRecordRepository.findById(modelId);
DbTablesQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
DbTablesQueryRequest
.
class
);
DbTablesQueryRequest
queryRequest
=
sdo
.
toQueryRequest
(
DbTablesQueryRequest
.
class
);
data
=
this
.
dbTablesApplication
.
publishToModelRecordTable
(
queryRequest
);
data
=
this
.
dbTablesApplication
.
publishToModelRecordTable
(
tableId
,
"0"
);
Object
map
=
data
.
get
(
"result"
);
//
Object map = data.get("result");
/* if (map == null || "".equals(map)) {
/* if (map == null || "".equals(map)) {
MdmModelRecord mdmModelRecord = this.mdmModelRecordApplication.loadMdmModelRecord(modelId);
MdmModelRecord mdmModelRecord = this.mdmModelRecordApplication.loadMdmModelRecord(modelId);
mdmModelRecord.setPublished(1);
mdmModelRecord.setPublished(1);
...
...
huigou-form/src/main/java/com/huigou/uasp/model/domain/query/DbTablesQueryRequest.java
View file @
5c31b139
...
@@ -28,6 +28,8 @@ public class DbTablesQueryRequest extends CodeAndNameQueryRequest{
...
@@ -28,6 +28,8 @@ public class DbTablesQueryRequest extends CodeAndNameQueryRequest{
private
Integer
isHidden
;
private
Integer
isHidden
;
private
String
hasProcess
;
//启用流程的
public
String
getId
()
{
public
String
getId
()
{
return
id
;
return
id
;
}
}
...
@@ -101,8 +103,13 @@ public class DbTablesQueryRequest extends CodeAndNameQueryRequest{
...
@@ -101,8 +103,13 @@ public class DbTablesQueryRequest extends CodeAndNameQueryRequest{
public
void
setIsHidden
(
Integer
isHidden
)
{
public
void
setIsHidden
(
Integer
isHidden
)
{
this
.
isHidden
=
isHidden
;
this
.
isHidden
=
isHidden
;
}
}
public
String
getHasProcess
()
{
return
hasProcess
;
}
public
void
setHasProcess
(
String
hasProcess
)
{
this
.
hasProcess
=
hasProcess
;
}
}
}
huigou-form/src/main/java/com/huigou/uasp/util/ComUtils.java
View file @
5c31b139
...
@@ -598,33 +598,36 @@ public class ComUtils {
...
@@ -598,33 +598,36 @@ public class ComUtils {
String
itStr
=
String
.
format
(
" into %s(%s) values (%s)"
,
tableName
,
columns
,
"%s"
);
String
itStr
=
String
.
format
(
" into %s(%s) values (%s)"
,
tableName
,
columns
,
"%s"
);
StringBuffer
intoSql
=
new
StringBuffer
();
StringBuffer
intoSql
=
new
StringBuffer
();
String
[]
columnNames
=
columns
.
split
(
","
);
String
[]
columnNames
=
columns
.
split
(
","
);
String
sql
=
""
;
//for(Map<String,Object> map : datas){
try
{
//for(Map<String,Object> map : datas){
StringBuffer
valuesSql
=
new
StringBuffer
();
StringBuffer
valuesSql
=
new
StringBuffer
();
for
(
String
key
:
columnNames
)
{
for
(
String
key
:
columnNames
)
{
// String realKey = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, key);
// String realKey = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, key);
//String realKey = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, key).toUpperCase();
//String realKey = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, key).toUpperCase();
String
value
=
MapUtils
.
getString
(
map
,
key
,
""
);
String
value
=
MapUtils
.
getString
(
map
,
key
,
""
);
if
(
key
.
equalsIgnoreCase
(
"id"
))
{
if
(
key
.
equalsIgnoreCase
(
"id"
))
{
if
(
map
.
get
(
"id"
)
!=
null
&&!
""
.
equals
(
map
.
get
(
"id"
).
toString
()))
{
if
(
map
.
get
(
"id"
)
!=
null
&&
!
""
.
equals
(
map
.
get
(
"id"
).
toString
()))
{
valuesSql
.
append
(
String
.
format
(
",'%s'"
,
value
));
valuesSql
.
append
(
String
.
format
(
",'%s'"
,
value
));
}
else
{
}
else
{
valuesSql
.
append
(
",sys_guid()"
);
valuesSql
.
append
(
",sys_guid()"
);
}
}
}
else
if
(
key
.
equalsIgnoreCase
(
"created_date"
)||
key
.
equalsIgnoreCase
(
"fillin_date"
))
{
}
else
if
(
key
.
equalsIgnoreCase
(
"created_date"
)
||
key
.
equalsIgnoreCase
(
"fillin_date"
))
{
valuesSql
.
append
(
",sysdate"
);
valuesSql
.
append
(
",sysdate"
);
}
else
if
(
value
.
startsWith
(
"to_date("
))
{
//日期格式值 去掉单引号
}
else
if
(
value
.
startsWith
(
"to_date("
))
{
//日期格式值 去掉单引号
valuesSql
.
append
(
String
.
format
(
",%s"
,
value
));
valuesSql
.
append
(
String
.
format
(
",%s"
,
value
));
}
else
{
}
else
{
value
=
value
.
replace
(
"'"
,
"''"
);
value
=
value
.
replace
(
"'"
,
"''"
);
valuesSql
.
append
(
String
.
format
(
",'%s'"
,
value
));
valuesSql
.
append
(
String
.
format
(
",'%s'"
,
value
));
}
}
}
}
intoSql
.
append
(
String
.
format
(
itStr
,
valuesSql
.
substring
(
1
)));
intoSql
.
append
(
String
.
format
(
itStr
,
valuesSql
.
substring
(
1
)));
//}
//}
String
sql
=
String
.
format
(
"insert all %s select * from dual"
,
intoSql
.
toString
());
sql
=
String
.
format
(
"insert all %s select * from dual"
,
intoSql
.
toString
());
}
catch
(
Exception
ex
){
ex
.
printStackTrace
();
}
return
sql
.
toString
();
return
sql
.
toString
();
}
}
...
...
huigou-xt/src/main/webapp/WEB-INF/decorators.xml
View file @
5c31b139
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<pattern>
/common/OPpermission.jsp*
</pattern>
<pattern>
/common/OPpermission.jsp*
</pattern>
<pattern>
/common/TaskExecutionList.jsp*
</pattern>
<pattern>
/common/TaskExecutionList.jsp*
</pattern>
<pattern>
/common/TaskContext.jsp*
</pattern>
<pattern>
/common/TaskContext.jsp*
</pattern>
<pattern>
/form
design/form-making/index.html
*
</pattern>
<pattern>
/form
Design/forwardFormMaking.do
*
</pattern>
</excludes>
</excludes>
<decorator
name=
"printable"
page=
"printable.jsp"
/>
<decorator
name=
"printable"
page=
"printable.jsp"
/>
<!-- 创建一个名为main的装饰器,该装饰器页面为main.jsp,用于装饰pattern指定的URL的所有页面-->
<!-- 创建一个名为main的装饰器,该装饰器页面为main.jsp,用于装饰pattern指定的URL的所有页面-->
...
...
huigou-xt/src/main/webapp/formdesign/formMaking.jsp
0 → 100644
View file @
5c31b139
<%@ page
contentType=
"text/html; charset=UTF-8"
%>
<%@ page
import=
"com.huigou.context.ContextUtil"
%>
<%@ page
import=
"com.huigou.util.Constants"
%>
<%@ taglib
uri=
"http://www.opensymphony.com/sitemesh/decorator"
prefix=
"decorator"
%>
<%@ taglib
uri=
"http://www.opensymphony.com/sitemesh/page"
prefix=
"page"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<%@ taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"/WEB-INF/JSTLFunction.tld"
prefix=
"f"
%>
<%
String
token
=
(
String
)
ContextUtil
.
getSession
().
getAttribute
(
Constants
.
CSRF_TOKEN
);
response
.
setHeader
(
"Pragma"
,
"No-cache"
);
response
.
setHeader
(
"Cache-Control"
,
"No-cache"
);
response
.
setDateHeader
(
"Expires"
,
-
1
);
response
.
setHeader
(
"Cache-Control"
,
"No-store"
);
String
serverHost
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
();
String
basePath
=
serverHost
+
request
.
getContextPath
();
request
.
setAttribute
(
"basePath"
,
basePath
);
%>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
utf-8
>
<meta
http-equiv=
X-UA-Compatible
content=
"IE=edge"
>
<meta
name=
viewport
content=
"width=device-width,initial-scale=1"
>
<link
rel=
"shortcut icon"
href=
favicon.ico
>
<link
rel=
stylesheet
href=
http://at.alicdn.com/t/font_1869570_2qzt87owi9d.css
>
<title></title>
<meta
name=
description
content=
"Form designer based on Vue, makes form development simple and efficient"
>
<script
type=
"application/javascript"
>
var
basePath
=
'${basePath}'
;
</script>
<style>html
,
body
{
height
:
100%
;
}
#app
{
height
:
100%
;
position
:
relative
;
}
.iconfont
{
font-family
:
"iconfont"
!important
;
font-size
:
16px
;
font-style
:
normal
;
-webkit-font-smoothing
:
antialiased
;
-moz-osx-font-smoothing
:
grayscale
;
}
.lds-roller
{
display
:
inline-block
;
position
:
relative
;
width
:
64px
;
height
:
64px
;
}
.lds-roller
div
{
animation
:
lds-roller
1.2s
cubic-bezier
(
0.5
,
0
,
0.5
,
1
)
infinite
;
transform-origin
:
32px
32px
;
}
.lds-roller
div
:after
{
content
:
" "
;
display
:
block
;
position
:
absolute
;
width
:
6px
;
height
:
6px
;
border-radius
:
50%
;
background
:
#409EFF
;
margin
:
-3px
0
0
-3px
;
}
.lds-roller
div
:nth-child
(
1
)
{
animation-delay
:
-0.036s
;
}
.lds-roller
div
:nth-child
(
1
)
:after
{
top
:
50px
;
left
:
50px
;
}
.lds-roller
div
:nth-child
(
2
)
{
animation-delay
:
-0.072s
;
}
.lds-roller
div
:nth-child
(
2
)
:after
{
top
:
54px
;
left
:
45px
;
}
.lds-roller
div
:nth-child
(
3
)
{
animation-delay
:
-0.108s
;
}
.lds-roller
div
:nth-child
(
3
)
:after
{
top
:
57px
;
left
:
39px
;
}
.lds-roller
div
:nth-child
(
4
)
{
animation-delay
:
-0.144s
;
}
.lds-roller
div
:nth-child
(
4
)
:after
{
top
:
58px
;
left
:
32px
;
}
.lds-roller
div
:nth-child
(
5
)
{
animation-delay
:
-0.18s
;
}
.lds-roller
div
:nth-child
(
5
)
:after
{
top
:
57px
;
left
:
25px
;
}
.lds-roller
div
:nth-child
(
6
)
{
animation-delay
:
-0.216s
;
}
.lds-roller
div
:nth-child
(
6
)
:after
{
top
:
54px
;
left
:
19px
;
}
.lds-roller
div
:nth-child
(
7
)
{
animation-delay
:
-0.252s
;
}
.lds-roller
div
:nth-child
(
7
)
:after
{
top
:
50px
;
left
:
14px
;
}
.lds-roller
div
:nth-child
(
8
)
{
animation-delay
:
-0.288s
;
}
.lds-roller
div
:nth-child
(
8
)
:after
{
top
:
45px
;
left
:
10px
;
}
@keyframes
lds-roller
{
0
%
{
transform
:
rotate
(
0deg
);
}
100
%
{
transform
:
rotate
(
360deg
);
}
}
</style>
<script>
window
.
dataLayer
=
window
.
dataLayer
||
[];
function
gtag
()
{
dataLayer
.
push
(
arguments
);
}
gtag
(
'js'
,
new
Date
());
gtag
(
'config'
,
'UA-145160307-3'
);
</script>
<link
href=
${basePath}/formdesign/form-making/css/app.css
rel=
preload
as=
style
>
<link
href=
${basePath}/formdesign/form-making/css/chunk-vendors.css
rel=
preload
as=
style
>
<link
href=
${basePath}/formdesign/form-making/js/app.js
rel=
preload
as=
script
>
<link
href=
${basePath}/formdesign/form-making/js/chunk-vendors.js
rel=
preload
as=
script
>
<link
href=
${basePath}/formdesign/form-making/css/chunk-vendors.css
rel=
stylesheet
>
<link
href=
${basePath}/formdesign/form-making/css/app.css
rel=
stylesheet
>
</head>
<body>
<input
type=
"hidden"
id=
"csrfTokenElement"
value=
"
<%=
token
%>
"
/>
<input
type=
"hidden"
id=
"formNo"
value=
"
<%=
request
.
getParameter
(
"formno"
)
%>
"
>
<div
id=
app
>
<div
style=
"height: 100%; width: 100%; display: flex; justify-content: center; align-items: center;"
>
<div
class=
lds-roller
>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
</div>
<script
src=
${basePath}/formdesign/form-making/js/chunk-vendors.js
></script>
<script
src=
${basePath}/formdesign/form-making/js/app.js
></script>
</body>
</html>
\ No newline at end of file
huigou-xt/src/main/webapp/formdesign/forms/syfFormsList.js
View file @
5c31b139
...
@@ -246,7 +246,8 @@ function doSaveFormData() {
...
@@ -246,7 +246,8 @@ function doSaveFormData() {
//跳转表单设计 页面
//跳转表单设计 页面
function
formDesign
(
id
,
formno
,
name
)
{
function
formDesign
(
id
,
formno
,
name
)
{
var
_url
=
"http://localhost:8088/huigou/formdesign/form-making/index.html?formno="
+
formno
;
var
_url
=
web_app
.
name
+
"/formDesign/forwardFormMaking.do?formno="
+
formno
;
//var _url = 'http://127.0.0.1:8080/index.html?formno=' + formno;
// _url="http://www.baidu.com";
// _url="http://www.baidu.com";
//document.getElementById('frame_form_edit').src = _url;
//document.getElementById('frame_form_edit').src = _url;
//alert(_url);
//alert(_url);
...
...
huigou-xt/src/main/webapp/javaScript/UICtrl.js
View file @
5c31b139
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment