Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
fill-system
Commits
ab0e378b
Commit
ab0e378b
authored
Apr 24, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加解析表单参数数据
parent
095a809e
Pipeline
#2780
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
29 deletions
+5
-29
fill-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumPrintServiceImpl.java
...dule/matter/service/impl/MatterDatumPrintServiceImpl.java
+5
-29
No files found.
fill-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumPrintServiceImpl.java
View file @
ab0e378b
...
...
@@ -4,10 +4,12 @@ import cn.hutool.core.util.IdUtil;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.xhx.base.system.upload.service.UploadService
;
import
com.mortals.xhx.common.code.DataTypeEnum
;
import
com.mortals.xhx.common.code.FieldTypeEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.utils.WordUtil
;
import
com.mortals.xhx.module.datum.model.DatumInfoFieldEntity
;
import
com.mortals.xhx.module.datum.service.DatumInfoFieldService
;
...
...
@@ -104,37 +106,11 @@ public class MatterDatumPrintServiceImpl extends AbstractCRUDServiceImpl<MatterD
super
.
saveAfter
(
entity
,
context
);
//拆解数据
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getFormContent
()))
{
JSONObject
json
=
JSON
.
parseObject
(
entity
.
getFormContent
());
List
<
DatumInfoFieldEntity
>
infoFieldlist
=
new
ArrayList
<
DatumInfoFieldEntity
>();
for
(
String
key
:
json
.
keySet
())
{
DatumInfoFieldEntity
infoField
=
new
DatumInfoFieldEntity
();
infoField
.
setDatumPrintId
(
entity
.
getId
());
infoField
.
setIdCard
(
entity
.
getIdCard
());
//通过key类型判断属性类型
boolean
input
=
StrUtil
.
startWith
(
key
,
"i_"
);
List
<
String
>
split
=
StrUtil
.
split
(
key
,
"_"
);
if
(
input
)
{
if
(
split
.
size
()>
2
){
String
value
=
json
.
getString
(
key
);
infoField
.
setFieldCode
(
split
.
get
(
2
));
infoField
.
setFieldName
(
split
.
get
(
2
));
infoField
.
setFieldType
(
FieldTypeEnum
.
单行输入框
.
getDesc
());
infoField
.
setFieldValue
(
value
);
infoField
.
setDataType
(
DataTypeEnum
.
字符串
.
getDesc
());
}
infoFieldlist
.
add
(
infoField
);
}
Rest
<
List
<
DatumInfoFieldEntity
>>
rest
=
datumInfoFieldService
.
parseFormContent
(
entity
,
context
);
if
(
rest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
()
&&
!
ObjectUtils
.
isEmpty
(
rest
.
getData
()))
{
datumInfoFieldService
.
save
(
rest
.
getData
());
}
}
}
...
...
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