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
7fc025f8
Commit
7fc025f8
authored
Apr 24, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加解析表单参数数据
parent
96230503
Pipeline
#2789
failed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
124 additions
and
95 deletions
+124
-95
fill-manager/src/main/java/com/mortals/xhx/module/datum/service/impl/DatumInfoFieldServiceImpl.java
.../module/datum/service/impl/DatumInfoFieldServiceImpl.java
+122
-94
fill-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+2
-1
No files found.
fill-manager/src/main/java/com/mortals/xhx/module/datum/service/impl/DatumInfoFieldServiceImpl.java
View file @
7fc025f8
...
...
@@ -2,6 +2,7 @@ package com.mortals.xhx.module.datum.service.impl;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.OrderCol
;
...
...
@@ -120,23 +121,44 @@ public class DatumInfoFieldServiceImpl extends AbstractCRUDServiceImpl<DatumInfo
infoField
.
setFieldCode
(
split
.
get
(
2
));
infoField
.
setFieldName
(
split
.
get
(
2
));
infoField
.
setFieldType
(
FieldTypeEnum
.
表格
.
getDesc
());
infoField
.
setFieldValue
(
value
);
//重新构建值
infoField
.
setFieldValue
(
buildTableStr
(
value
));
infoField
.
setDataType
(
DataTypeEnum
.
数组
.
getDesc
());
}
if
(
ObjectUtils
.
isEmpty
(
infoField
.
getFieldCode
()))
{
log
.
info
(
"未识别类型,key:{},json:"
,
key
,
matterDatumPrintEntity
.
getFormContent
());
if
(
ObjectUtils
.
isEmpty
(
infoField
.
getFieldCode
()))
{
log
.
info
(
"未识别类型,key:{},json:"
,
key
,
matterDatumPrintEntity
.
getFormContent
());
continue
;
}
infoFieldlist
.
add
(
infoField
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"解析json错误,json=====>{}"
,
matterDatumPrintEntity
.
getFormContent
());
}
catch
(
Exception
e
)
{
log
.
error
(
"解析json错误,json=====>{}"
,
matterDatumPrintEntity
.
getFormContent
());
}
return
Rest
.
ok
(
"解析保存成功!"
,
infoFieldlist
);
}
private
String
buildTableStr
(
String
value
)
{
JSONArray
jsonArray
=
new
JSONArray
();
JSONArray
array
=
JSON
.
parseArray
(
value
);
for
(
int
i
=
0
;
i
<
array
.
size
();
i
++)
{
JSONObject
jsonObject
=
array
.
getJSONObject
(
i
);
JSONObject
json
=
new
JSONObject
();
jsonObject
.
entrySet
().
stream
().
forEach
(
item
->{
String
key
=
item
.
getKey
();
String
targetKey
=
StrUtil
.
subAfter
(
key
,
"_"
,
true
);
json
.
put
(
targetKey
,
item
.
getValue
());
});
jsonArray
.
add
(
json
);
}
return
jsonArray
.
toJSONString
();
}
@Override
public
Rest
<
List
<
DatumInfoFieldEntity
>>
distinctList
(
DatumInfoFieldQuery
datumInfoFieldQuery
,
Context
context
)
{
datumInfoFieldQuery
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"createTime"
,
OrderCol
.
DESCENDING
)));
...
...
@@ -150,7 +172,7 @@ public class DatumInfoFieldServiceImpl extends AbstractCRUDServiceImpl<DatumInfo
return
null
;
}
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
return
Rest
.
ok
(
"获取列表成功!"
,
distiinctList
);
return
Rest
.
ok
(
"获取列表成功!"
,
distiinctList
);
}
...
...
@@ -184,6 +206,12 @@ public class DatumInfoFieldServiceImpl extends AbstractCRUDServiceImpl<DatumInfo
String
string
=
jsonObject
.
getString
(
"ck_13_参保险种_<职工基本医疗保险-生育保险-补充医疗保险->其他(___________)"
);
String
str2
=
"本人简历_i_3_职务"
;
System
.
out
.
println
(
StrUtil
.
subAfter
(
str2
,
"_"
,
true
));
System
.
out
.
println
(
string
);
}
...
...
fill-manager/src/test/java/com/mortals/httpclient/system.http
View file @
7fc025f8
...
...
@@ -67,7 +67,8 @@ POST {{baseUrl}}/datum/info/field/distinctList
Content-Type: application/json
{
"datum_print_id": 8,
"datumPrintId": 8,
"idCard":"",
"size": -1
}
...
...
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