Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_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
赵啸非
smart_gov_platform
Commits
ad414632
Commit
ad414632
authored
Jul 12, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加材料列表根据材料名称去重
parent
59e1b4ff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
base-manager/src/main/java/com/mortals/xhx/module/matter/model/MatterDatumEntity.java
...om/mortals/xhx/module/matter/model/MatterDatumEntity.java
+2
-2
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterDatumController.java
.../mortals/xhx/module/matter/web/MatterDatumController.java
+18
-0
No files found.
base-manager/src/main/java/com/mortals/xhx/module/matter/model/MatterDatumEntity.java
View file @
ad414632
...
...
@@ -434,14 +434,14 @@ public class MatterDatumEntity extends MatterDatumVo {
@Override
public
int
hashCode
()
{
return
this
.
get
Id
().
hashCode
();
return
this
.
get
MaterialName
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
if
(
obj
instanceof
MatterDatumEntity
)
{
MatterDatumEntity
tmp
=
(
MatterDatumEntity
)
obj
;
if
(
this
.
get
Id
()
==
tmp
.
getId
())
{
if
(
this
.
get
MaterialName
()
==
tmp
.
getMaterialName
())
{
return
true
;
}
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterDatumController.java
View file @
ad414632
...
...
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 事项申请材料
...
...
@@ -58,4 +59,21 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
entity
.
setDatumFileList
(
matterDatumFileEntities
);
return
super
.
viewAfter
(
id
,
model
,
entity
,
context
);
}
/**
* @param query
* @param model
* @param context
* @return
* @throws AppException
*/
@Override
protected
int
doListAfter
(
MatterDatumEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
List
<
MatterDatumEntity
>
matterDatumEntities
=
(
List
<
MatterDatumEntity
>)
model
.
get
(
KEY_RESULT_DATA
);
//去重复
List
<
MatterDatumEntity
>
collect
=
matterDatumEntities
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
model
.
put
(
KEY_RESULT_DATA
,
collect
);
return
super
.
doListAfter
(
query
,
model
,
context
);
}
}
\ No newline at end of file
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