Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
fhjw
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
mengmeng
fhjw
Commits
2b0b5ddc
Commit
2b0b5ddc
authored
Nov 05, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
当事人评价唯一性优化
parent
125f2074
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
7 deletions
+27
-7
FhjwCaseController.java
...a/io/hmit/modules/fhjw/controller/FhjwCaseController.java
+2
-2
FhiwFunctionServiceImpl.java
...it/modules/fhjw/service/impl/FhiwFunctionServiceImpl.java
+19
-3
FhjwCommentServiceImpl.java
...mit/modules/fhjw/service/impl/FhjwCommentServiceImpl.java
+6
-2
No files found.
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhjwCaseController.java
View file @
2b0b5ddc
...
...
@@ -54,7 +54,7 @@ public class FhjwCaseController {
return
new
Result
<
PageData
<
FhjwCaseDTO
>>().
ok
(
page
);
}
//
@Login
@Login
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhjwCaseDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
...
@@ -74,7 +74,7 @@ public class FhjwCaseController {
return
new
Result
<
FhjwCaseDTO
>().
ok
(
data
);
}
//
@Login
@Login
@PostMapping
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
Map
<
String
,
Object
>
params
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhiwFunctionServiceImpl.java
View file @
2b0b5ddc
...
...
@@ -10,12 +10,15 @@ import io.hmit.entity.UserEntity;
import
io.hmit.modules.fhjw.dao.FhiwFunctionDao
;
import
io.hmit.modules.fhjw.dto.FhiwFunctionDTO
;
import
io.hmit.modules.fhjw.dto.FhjwCaseDTO
;
import
io.hmit.modules.fhjw.dto.FhjwCommentDTO
;
import
io.hmit.modules.fhjw.dto.FhjwRoleFunctionDTO
;
import
io.hmit.modules.fhjw.dto.UserCaseDTO
;
import
io.hmit.modules.fhjw.entity.FhiwFunctionEntity
;
import
io.hmit.modules.fhjw.entity.FhjwCommentEntity
;
import
io.hmit.modules.fhjw.entity.UserCaseEntity
;
import
io.hmit.modules.fhjw.service.FhiwFunctionService
;
import
io.hmit.modules.fhjw.service.FhjwCaseService
;
import
io.hmit.modules.fhjw.service.FhjwCommentService
;
import
io.hmit.modules.fhjw.service.FhjwRoleFunctionService
;
import
io.hmit.modules.fhjw.service.UserCaseService
;
import
io.hmit.modules.user.dto.UserRoleDTO
;
...
...
@@ -66,6 +69,9 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
@Autowired
private
RoleService
roleService
;
@Autowired
private
FhjwCommentService
fhjwCommentService
;
@Autowired
private
UserRoleService
userRoleService
;
...
...
@@ -100,6 +106,8 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
boolean
flag
=
false
;
//判断是否有评价权限
boolean
ifComment
=
false
;
//判断是否已经评价过
boolean
isExict
=
false
;
//判断人员和案件是否已经绑定,当事人、代理人需要和案件关联后才能进行操作,否则显示无权限
//律师、代表委员、监督听证则无需和案件关联也可进行评价
...
...
@@ -109,9 +117,15 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
Map
<
String
,
Object
>
query
=
new
HashMap
<>();
query
.
put
(
"caseId"
,
caseId
);
query
.
put
(
"userId"
,
userId
);
List
<
UserCaseDTO
>
userCases
=
userCaseService
.
list
(
query
);
//当事人权限,则需要判断此案件是否有代理人,有代理人则不允许评价,无代理人则可以评价
if
(
userCases
.
size
()>
0
){
List
<
FhjwCommentDTO
>
commentLists
=
fhjwCommentService
.
list
(
query
);
if
(
commentLists
.
size
()>
0
){
isExict
=
true
;
}
ifComment
=
true
;
if
(
"当事人"
.
equals
(
roleName
)){
String
agentName
=
fhjwCaseService
.
get
(
caseId
).
getAgentName
();
...
...
@@ -153,13 +167,15 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
//根据是否存在代理人,判断是否添加 "我要填写测评" 的权限!
Long
funcId
=
baseDao
.
selectOne
(
new
QueryWrapper
<
FhiwFunctionEntity
>().
eq
(
"name"
,
"我要填写测评"
)).
getId
();
List
<
Long
>
funIds
=
new
ArrayList
<>();
if
(
flag
){
logger
.
info
(
"存在代理人"
);
System
.
out
.
println
(
"isExict: "
+
isExict
);
System
.
out
.
println
(
"flag: "
+
flag
);
if
(
flag
||
isExict
){
logger
.
info
(
"存在代理人或已经评价过"
);
funIds
=
fhjwRoleFunctionService
.
list
(
params
).
stream
()
.
filter
(
roleFunc
->
!
roleFunc
.
getFunctionId
().
equals
(
funcId
))
.
map
(
FhjwRoleFunctionDTO:
:
getFunctionId
).
collect
(
Collectors
.
toList
());
}
else
{
logger
.
info
(
"不存在代理人"
);
logger
.
info
(
"不存在代理人
或未进行评价
"
);
funIds
=
fhjwRoleFunctionService
.
list
(
params
).
stream
()
.
map
(
FhjwRoleFunctionDTO:
:
getFunctionId
).
collect
(
Collectors
.
toList
());
}
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhjwCommentServiceImpl.java
View file @
2b0b5ddc
...
...
@@ -48,9 +48,13 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
@Override
public
QueryWrapper
<
FhjwCommentEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
caseId
=
params
.
get
(
"caseId"
)==
null
?
""
:
params
.
get
(
"caseId"
).
toString
();
String
userId
=
params
.
get
(
"userId"
)==
null
?
""
:
params
.
get
(
"userId"
).
toString
();
QueryWrapper
<
FhjwCommentEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
caseId
),
"case_id"
,
caseId
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
userId
),
"user_id"
,
userId
);
return
wrapper
;
}
...
...
@@ -69,9 +73,9 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
//设置案件所属部门(根据承办人确定)
dto
.
setDeptId
(
caseDto
.
get
(
0
).
getDeptId
());
//设置案件ID--律师、代表委员、监督听证权限和案件没有绑定
了
人员则根据案件号获取第一个caseID
//设置案件ID--律师、代表委员、监督听证权限和案件没有绑定人员则根据案件号获取第一个caseID
dto
.
setCaseId
(
caseDto
.
get
(
0
).
getId
());
//设置人员对应的caseID(存在相同受案号,不同当事人的情况,需要
人员匹配caseID
)
//设置人员对应的caseID(存在相同受案号,不同当事人的情况,需要
将人员--caseID进行匹配
)
List
<
Long
>
ids
=
caseDto
.
stream
().
map
(
FhjwCaseDTO:
:
getId
).
collect
(
Collectors
.
toList
());
for
(
Long
id
:
ids
){
UserCaseDTO
userCaseDTO
=
userCaseService
.
getByUserACase
(
dto
.
getUserId
(),
id
);
...
...
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