Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chuanshan_gov_platform
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
廖旭伟
chuanshan_gov_platform
Commits
f8b08c82
Commit
f8b08c82
authored
Sep 06, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单事项,辅助接件事项材料列表查询方法subList优化;材料附件下载到本地以及转换预览图片方法修改
parent
d87f5b65
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
83 deletions
+5
-83
single-matter/src/main/java/com/mortals/xhx/common/utils/MatterDetailHtmlParseUtil.java
...m/mortals/xhx/common/utils/MatterDetailHtmlParseUtil.java
+2
-81
single-matter/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
...als/xhx/module/matter/service/impl/MatterServiceImpl.java
+2
-1
single-matter/src/main/resources/sqclinfo.setting
single-matter/src/main/resources/sqclinfo.setting
+1
-1
No files found.
single-matter/src/main/java/com/mortals/xhx/common/utils/MatterDetailHtmlParseUtil.java
View file @
f8b08c82
...
...
@@ -449,88 +449,9 @@ public class MatterDetailHtmlParseUtil {
// System.out.println(item.getKey() + "=" + item.getValue());
// });
// List<Map<String, Object>> mapList =
MatterDetailHtmlParseUtil.getsqclInfoMapByHtml(dom);
//
System.out.println(JSON.toJSONString(mapList));
List
<
Map
<
String
,
Object
>>
mapList
=
MatterDetailHtmlParseUtil
.
getsqclInfoMapByHtml
(
dom
);
System
.
out
.
println
(
JSON
.
toJSONString
(
mapList
));
String
blankSampleExp
=
"//div[@id=\"zhezhao\"]//div[@class='zhezhao4']"
;
String
sampleExp
=
"//div[@id=\"zhezhao\"]//div[@class='zhezhao2']"
;
String
baseInfoExp
=
"//div[@id=\"zhezhao\"]//div[@class='zhezhao3']"
;
try
{
Elements
elements
=
dom
.
selectXpath
(
blankSampleExp
);
int
rowNum
=
elements
.
size
();
for
(
int
i
=
1
;
i
<=
rowNum
;
i
++)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
MatterDatumFileEntity
>
datumFileEntities
=
new
ArrayList
<>();
List
<
MatterDatumFileEntity
>
datumSampleFileEntities
=
new
ArrayList
<>();
//查询空白样表数量
String
tempxPath
=
blankSampleExp
+
String
.
format
(
"[%d]//table//tr[position()>1]//td"
,
i
);
Elements
evaluateList
=
dom
.
selectXpath
(
tempxPath
);
for
(
int
j
=
0
;
j
<
evaluateList
.
size
();
j
++)
{
if
(
j
%
2
==
0
)
{
continue
;
}
Element
node
=
evaluateList
.
get
(
j
);
System
.
out
.
println
(
j
);
System
.
out
.
println
(
JSON
.
toJSONString
(
node
));
if
(
j
>
0
)
{
Element
prenode
=
evaluateList
.
get
(
j
-
1
);
MatterDatumFileEntity
fileEntity
=
new
MatterDatumFileEntity
();
fileEntity
.
setCreateTime
(
new
Date
());
fileEntity
.
setCreateUser
(
"system"
);
fileEntity
.
setSource
(
SourceEnum
.
政务网
.
getValue
());
fileEntity
.
setFiletype
(
FiletypeEnum
.
空白表格
.
getValue
());
fileEntity
.
setFileName
(
prenode
.
text
().
trim
());
fileEntity
.
setFileUrl
(
node
.
firstChild
().
attr
(
"onclick"
).
trim
());
datumFileEntities
.
add
(
fileEntity
);
}
}
map
.
put
(
"blankList"
,
datumFileEntities
);
//查询样表
String
tempxPath1
=
sampleExp
+
String
.
format
(
"[%d]//table//tr[position()>1]//td"
,
i
);
Elements
sampleList
=
dom
.
selectXpath
(
tempxPath1
);
for
(
int
j
=
0
;
j
<
sampleList
.
size
();
j
++)
{
if
(
j
%
2
==
0
)
{
continue
;
}
Element
node
=
sampleList
.
get
(
j
);
if
(
j
>
0
)
{
Element
prenode
=
sampleList
.
get
(
j
-
1
);
MatterDatumFileEntity
fileEntity
=
new
MatterDatumFileEntity
();
fileEntity
.
setCreateTime
(
new
Date
());
fileEntity
.
setCreateUser
(
"system"
);
fileEntity
.
setSource
(
SourceEnum
.
政务网
.
getValue
());
fileEntity
.
setFiletype
(
FiletypeEnum
.
示例样表
.
getValue
());
fileEntity
.
setFileName
(
prenode
.
text
().
trim
());
fileEntity
.
setFileUrl
(
node
.
firstChild
().
attr
(
"onclick"
).
trim
());
System
.
out
.
println
(
JSON
.
toJSONString
(
fileEntity
));
datumSampleFileEntities
.
add
(
fileEntity
);
}
map
.
put
(
"sampleList"
,
datumSampleFileEntities
);
}
//查询基本信息
String
tempxPath2
=
baseInfoExp
+
String
.
format
(
"[%d]//table//tr//td"
,
i
);
Elements
baseinfoList
=
dom
.
selectXpath
(
tempxPath2
);
HashMap
<
String
,
String
>
baseInfoMap
=
new
HashMap
<>();
for
(
int
j
=
0
;
j
<
baseinfoList
.
size
();
j
++)
{
if
(
j
%
2
==
0
)
{
continue
;
}
Element
node
=
baseinfoList
.
get
(
j
);
if
(
j
>
0
)
{
Element
prenode
=
baseinfoList
.
get
(
j
-
1
);
baseInfoMap
.
put
(
prenode
.
text
().
trim
(),
node
.
text
().
trim
());
}
}
map
.
put
(
"baseinfo"
,
baseInfoMap
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"申请材料表格解析xpath解析异常:"
,
e
);
}
// Map<String, String> sltjMapByHtml = MatterDetailHtmlParseUtil.getSltjMapByHtml(dom);
// System.out.println("==============受理条件==============");
...
...
single-matter/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
View file @
f8b08c82
...
...
@@ -1256,7 +1256,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
matterDatumService
.
remove
(
datumIds
,
context
);
Long
[]
datumFileIds
=
matterDatumFileService
.
find
(
new
MatterDatumFileQuery
().
datumIdList
(
Arrays
.
asList
(
datumIds
))).
stream
().
map
(
item
->
item
.
getId
()).
toArray
(
Long
[]::
new
);
if
(!
ObjectUtils
.
isEmpty
(
datumFileIds
))
{
matterDatumService
.
remove
(
datumFileIds
,
context
);
matterDatum
File
Service
.
remove
(
datumFileIds
,
context
);
}
}
...
...
@@ -1270,6 +1270,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
datumEntity
.
initAttrValue
();
datumEntity
.
setMatterId
(
matterEntity
.
getId
());
datumEntity
.
setMatterCode
(
matterEntity
.
getMatterNo
());
datumEntity
.
setMatterName
(
matterEntity
.
getMatterName
());
datumEntity
.
setMaterialName
(
matterEntity
.
getMatterName
());
datumEntity
.
setSource
(
SourceEnum
.
政务网
.
getValue
());
datumEntity
.
setCreateTime
(
new
Date
());
...
...
single-matter/src/main/resources/sqclinfo.setting
View file @
f8b08c82
...
...
@@ -8,7 +8,7 @@
备注 = remark
是否减免 = isjianm
纸质材料份数 = paperNum
材料名称 = mat
ter
Name
材料名称 = mat
erial
Name
填报须知 = remarkSub
受理标准 = summary
来源渠道 = materialSource
...
...
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