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
ea642215
Commit
ea642215
authored
Nov 04, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
线上版本--唯一性修改之前
parent
7f934a84
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
29 deletions
+43
-29
FhjwProperties.java
...n/src/main/java/io/hmit/common/config/FhjwProperties.java
+1
-1
CaseInfoUpdateTask.java
...ain/java/io/hmit/modules/job/task/CaseInfoUpdateTask.java
+1
-8
FhiwFunctionServiceImpl.java
...it/modules/fhjw/service/impl/FhiwFunctionServiceImpl.java
+39
-20
FhjwCommentServiceImpl.java
...mit/modules/fhjw/service/impl/FhjwCommentServiceImpl.java
+2
-0
No files found.
hmit-admin/src/main/java/io/hmit/common/config/FhjwProperties.java
View file @
ea642215
...
...
@@ -5,7 +5,7 @@ import org.springframework.stereotype.Component;
/**
*
cjrone
项目配置
*
Fhjw
项目配置
*
* @author kernespring
* @Date 2019/04/02 15:49
...
...
hmit-admin/src/main/java/io/hmit/modules/job/task/CaseInfoUpdateTask.java
View file @
ea642215
...
...
@@ -18,13 +18,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Optional
;
/**
* 测试定时任务(演示Demo,可删除)
* <p>
* testTask为spring bean的名称
*
* @author zsh 408538940@qq.com
*/
@Component
(
"caseInfoUpdateTask"
)
public
class
CaseInfoUpdateTask
implements
ITask
{
...
...
@@ -40,7 +33,7 @@ public class CaseInfoUpdateTask implements ITask {
@Override
public
void
run
(
String
params
)
{
logger
.
debug
(
"
Test
Task定时任务正在执行,参数为:{}"
,
params
);
logger
.
debug
(
"
caseInfoUpdate
Task定时任务正在执行,参数为:{}"
,
params
);
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"flag"
,
"2"
);
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhiwFunctionServiceImpl.java
View file @
ea642215
...
...
@@ -94,44 +94,63 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
List
<
Long
>
caseIds
=
fhjwCaseService
.
selectByCaseNum
(
caseNum
).
stream
()
.
map
(
FhjwCaseDTO:
:
getId
).
collect
(
Collectors
.
toList
());
// Long caseId = fhjwCaseService.getByCaseNum(caseNum).getId();
String
roleName
=
roleService
.
get
(
roleId
).
getName
();
List
<
FhiwFunctionDTO
>
dtos
=
new
ArrayList
<>();
//判断案件是否存在代理人
boolean
flag
=
false
;
//判断是否有评价权限
boolean
ifComment
=
false
;
//当事人权限,则需要判断此案件是否有代理人,有代理人则不允许评价,无代理人则可以评价
if
(
"当事人"
.
equals
(
roleService
.
get
(
roleId
).
getName
())){
//判断人员和案件是否已经绑定,当事人、代理人需要和案件关联后才能进行操作,否则显示无权限
//律师、代表委员、监督听证则无需和案件关联也可进行评价
if
(
"当事人"
.
equals
(
roleName
)||
"代理人"
.
equals
(
roleName
)){
for
(
Long
caseId:
caseIds
)
{
logger
.
info
(
"caseId:"
+
caseId
);
Map
<
String
,
Object
>
query
=
new
HashMap
<>();
query
.
put
(
"caseId"
,
caseId
);
query
.
put
(
"userId"
,
userId
);
List
<
UserCaseDTO
>
userCases
=
userCaseService
.
list
(
query
);
//当事人权限,则需要判断此案件是否有代理人,有代理人则不允许评价,无代理人则可以评价
if
(
userCases
.
size
()>
0
){
System
.
out
.
println
(
"代理人:"
+
fhjwCaseService
.
get
(
caseId
).
getAgentName
());
if
(!
""
.
equals
(
fhjwCaseService
.
get
(
caseId
).
getAgentName
())
&&
fhjwCaseService
.
get
(
caseId
).
getAgentName
()
!=
null
){
ifComment
=
true
;
if
(
"当事人"
.
equals
(
roleName
)){
String
agentName
=
fhjwCaseService
.
get
(
caseId
).
getAgentName
();
logger
.
info
(
"案件ID:"
+
caseId
+
"的代理人:"
+
agentName
);
if
(
StringUtils
.
isNotBlank
(
agentName
)
&&
agentName
!=
null
){
flag
=
true
;
break
;
}
}
/*
List<Long> userIds = new ArrayList<>();
if(userCases.size()>0){
userIds = userCases.stream()
.map(UserCaseDTO::getUserId).collect(Collectors.toList());
}
}
//人员和案件没有关联信息则返回权限为空
if
(!
ifComment
){
return
dtos
;
}
}
for (Long Id:userIds) {
Optional<UserRoleDTO> userRole = Optional.ofNullable(userRoleService.getRoleByUser(Id));
Long role = userRoleService.getRoleByUser(Id).getRoleId();
if("代理人".equals(roleService.get(role).getName())){
/*
// 0827版本(修改多用户评价BUG)--最后改一次系列
if("当事人".equals(roleService.get(roleId).getName())){
for (Long caseId:caseIds) {
logger.info("caseId:"+caseId);
Map<String, Object> query = new HashMap<>();
query.put("caseId",caseId);
query.put("userId",userId);
List<UserCaseDTO> userCases = userCaseService.list(query);
if(userCases.size()>0){
logger.info("代理人:"+fhjwCaseService.get(caseId).getAgentName());
if(StringUtils.isNotBlank(fhjwCaseService.get(caseId).getAgentName())
&& fhjwCaseService.get(caseId).getAgentName() !=null){
flag = true;
break;
}
}
*/
}
}
*/
//根据是否存在代理人,判断是否添加 "我要填写
评测
" 的权限!
//根据是否存在代理人,判断是否添加 "我要填写
测评
" 的权限!
Long
funcId
=
baseDao
.
selectOne
(
new
QueryWrapper
<
FhiwFunctionEntity
>().
eq
(
"name"
,
"我要填写测评"
)).
getId
();
List
<
Long
>
funIds
=
new
ArrayList
<>();
if
(
flag
){
...
...
@@ -144,7 +163,7 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
funIds
=
fhjwRoleFunctionService
.
list
(
params
).
stream
()
.
map
(
FhjwRoleFunctionDTO:
:
getFunctionId
).
collect
(
Collectors
.
toList
());
}
List
<
FhiwFunctionDTO
>
dtos
=
new
ArrayList
<>();
funIds
.
stream
().
forEach
(
id
->{
FhiwFunctionDTO
dto
=
get
(
id
);
logger
.
info
(
"拥有的权限名称:"
+
dto
.
getName
());
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhjwCommentServiceImpl.java
View file @
ea642215
...
...
@@ -69,6 +69,8 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
//设置案件所属部门(根据承办人确定)
dto
.
setDeptId
(
caseDto
.
get
(
0
).
getDeptId
());
//设置案件ID--律师、代表委员、监督听证权限和案件没有绑定了人员则根据案件号获取第一个caseID
dto
.
setCaseId
(
caseDto
.
get
(
0
).
getId
());
//设置人员对应的caseID(存在相同受案号,不同当事人的情况,需要人员匹配caseID)
List
<
Long
>
ids
=
caseDto
.
stream
().
map
(
FhjwCaseDTO:
:
getId
).
collect
(
Collectors
.
toList
());
for
(
Long
id
:
ids
){
...
...
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