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
ae28908a
Commit
ae28908a
authored
Jul 12, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上架浙里办前版本
parent
88bc413e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
18 deletions
+47
-18
application-dev.yml
hmit-admin/src/main/resources/application-dev.yml
+2
-2
application-prod.yml
hmit-admin/src/main/resources/application-prod.yml
+2
-2
FhiwFunctionServiceImpl.java
...it/modules/fhjw/service/impl/FhiwFunctionServiceImpl.java
+15
-6
FhjwCaseServiceImpl.java
...o/hmit/modules/fhjw/service/impl/FhjwCaseServiceImpl.java
+15
-8
FhjwCommentServiceImpl.java
...mit/modules/fhjw/service/impl/FhjwCommentServiceImpl.java
+11
-0
application-dev.yml
hmit-api/src/main/resources/application-dev.yml
+1
-0
application-prod.yml
hmit-api/src/main/resources/application-prod.yml
+1
-0
No files found.
hmit-admin/src/main/resources/application-dev.yml
View file @
ae28908a
...
...
@@ -5,8 +5,8 @@ spring:
# driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
# url: jdbc:mysql://112.51.130.215:3306/security_enterprise?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
#
url: jdbc:mysql://119.3.143.77:3306/fhjw?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url
:
jdbc:mysql://119.3.143.77:3306/fhjw_local?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url
:
jdbc:mysql://119.3.143.77:3306/fhjw?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
#
url: jdbc:mysql://119.3.143.77:3306/fhjw_local?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
username
:
hmit_user
password
:
HmitUser@1234
# #Oracle
...
...
hmit-admin/src/main/resources/application-prod.yml
View file @
ae28908a
...
...
@@ -5,8 +5,8 @@ spring:
# driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
# url: jdbc:mysql://122.51.130.215:3306/security_enterprise?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
#
url: jdbc:mysql://119.3.143.77:3306/fhjw?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url
:
jdbc:mysql://119.3.143.77:3306/fhjw_local?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url
:
jdbc:mysql://119.3.143.77:3306/fhjw?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
#
url: jdbc:mysql://119.3.143.77:3306/fhjw_local?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
username
:
hmit_user
password
:
HmitUser@1234
initial-size
:
10
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhiwFunctionServiceImpl.java
View file @
ae28908a
...
...
@@ -2,6 +2,7 @@ package io.hmit.modules.fhjw.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.utils.ConvertUtils
;
import
io.hmit.modules.fhjw.dao.FhiwFunctionDao
;
import
io.hmit.modules.fhjw.dto.FhiwFunctionDTO
;
import
io.hmit.modules.fhjw.dto.FhjwCaseDTO
;
...
...
@@ -17,6 +18,8 @@ import io.hmit.modules.user.dto.UserRoleDTO;
import
io.hmit.modules.user.service.RoleService
;
import
io.hmit.modules.user.service.UserRoleService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -35,6 +38,8 @@ import java.util.stream.Collectors;
*/
@Service
public
class
FhiwFunctionServiceImpl
extends
CrudServiceImpl
<
FhiwFunctionDao
,
FhiwFunctionEntity
,
FhiwFunctionDTO
>
implements
FhiwFunctionService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
FhiwFunctionServiceImpl
.
class
);
@Autowired
private
FhjwRoleFunctionService
fhjwRoleFunctionService
;
...
...
@@ -78,17 +83,17 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
//当事人权限,则需要判断此案件是否有代理人,有代理人则不允许评价,无代理人则可以评价
if
(
"当事人"
.
equals
(
roleService
.
get
(
roleId
).
getName
())){
for
(
Long
caseId:
caseIds
)
{
System
.
out
.
println
(
"caseId:"
+
caseId
);
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
){
if
(!
""
.
equals
(
fhjwCaseService
.
get
(
caseId
).
getAgentName
())){
System
.
out
.
println
(
"代理人:"
+
fhjwCaseService
.
get
(
caseId
).
getAgentName
());
if
(!
""
.
equals
(
fhjwCaseService
.
get
(
caseId
).
getAgentName
())
&&
fhjwCaseService
.
get
(
caseId
).
getAgentName
()
!=
null
){
flag
=
true
;
break
;
}
}
/*
List<Long> userIds = new ArrayList<>();
...
...
@@ -106,26 +111,30 @@ 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
(
"存在代理人"
);
funIds
=
fhjwRoleFunctionService
.
list
(
params
).
stream
()
.
filter
(
roleFunc
->
!
funcId
.
equals
(
roleFunc
.
getFunctionId
()
))
.
filter
(
roleFunc
->
!
roleFunc
.
getFunctionId
().
equals
(
funcId
))
.
map
(
FhjwRoleFunctionDTO:
:
getFunctionId
).
collect
(
Collectors
.
toList
());
}
else
{
logger
.
info
(
"不存在代理人"
);
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
());
dtos
.
add
(
dto
);
});
return
dtos
;
}
}
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhjwCaseServiceImpl.java
View file @
ae28908a
...
...
@@ -84,14 +84,17 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
.
eq
(
StringUtils
.
isNotBlank
(
caseNum
),
"case_num"
,
caseNum
)
.
eq
(
"people_name"
,
dto
.
getPeopleName
()));
//设置更新标志(默认未更新:2)用来更新承办人所属部门
dto
.
setFlag
(
"2"
);
//案件信息保存或更新
if
(
entity
!=
null
){
dto
.
setId
(
entity
.
getId
());
dto
.
setUpdateDate
(
new
Date
());
//设置更新标志(默认未更新:2)用来更新承办人所属部门
if
(
entity
.
getDeptId
()
==
null
){
dto
.
setFlag
(
"2"
);
}
update
(
dto
);
}
else
{
dto
.
setFlag
(
"2"
);
dto
.
setCreator
(
undertakerId
);
dto
.
setCreateDate
(
new
Date
());
super
.
save
(
dto
);
...
...
@@ -105,7 +108,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
//保存案件相关人员关联信息(不包含承办人)
if
(
dto
.
getPeopleInfo
()!=
null
&&
dto
.
getPeopleInfo
().
size
()>
0
){
dto
.
getPeopleInfo
().
stream
().
forEach
(
item
->{
UserEntity
userEntity
=
n
ew
UserEntity
()
;
UserEntity
userEntity
=
n
ull
;
if
(!
""
.
equals
(
item
.
getUserMobile
())
){
userEntity
=
userService
.
getByMobile
(
item
.
getUserMobile
());
}
...
...
@@ -115,7 +118,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
if
(
"嫌疑人"
.
equals
(
item
.
getUserRole
())
||
"被害人"
.
equals
(
item
.
getUserRole
())){
actRoleName
=
"当事人"
;
if
(!
""
.
equals
(
item
.
getUserName
())
&&
!
""
.
equals
(
item
.
getUserMobile
())
){
if
(!
""
.
equals
(
item
.
getUserName
())
){
Map
<
String
,
Object
>
query
=
new
HashMap
<>();
query
.
put
(
"username"
,
item
.
getUserName
());
userEntity
=
userService
.
getByParams
(
query
);
...
...
@@ -123,11 +126,14 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
}
//案件相关人员不存在人员表中则插入
if
(
userEntity
==
null
){
if
(
userEntity
==
null
){
if
(
""
.
equals
(
item
.
getUserName
())){
return
;
}
//tb_user中添加人员
UserEntity
user
=
new
UserEntity
();
user
.
setUsername
(
item
.
getUserName
());
user
.
setMobile
(
""
.
equals
(
item
.
getUserMobile
())?
null
:
item
.
getUserMobile
());
user
.
setMobile
(
""
.
equals
(
item
.
getUserMobile
())?
""
:
item
.
getUserMobile
());
user
.
setCreateDate
(
new
Date
());
user
.
setUserIdno
(
item
.
getUserIdNo
());
user
.
setIdentity
(
item
.
getUserRole
());
...
...
@@ -150,9 +156,9 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
Long
userId
=
userEntity
.
getId
();
//人员信息更新
userEntity
.
setMobile
(
item
.
getUserMobile
());
userEntity
.
setMobile
(
""
.
equals
(
item
.
getUserMobile
())?
userEntity
.
getMobile
():
item
.
getUserMobile
());
userEntity
.
setUsername
(
item
.
getUserName
());
userEntity
.
setUserIdno
(
item
.
getUserIdNo
());
userEntity
.
setUserIdno
(
""
.
equals
(
item
.
getUserIdNo
())?
userEntity
.
getUserIdno
():
item
.
getUserIdNo
());
userEntity
.
setIdentity
(
item
.
getUserRole
());
userService
.
updateById
(
userEntity
);
...
...
@@ -203,4 +209,5 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
}
return
false
;
}
}
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhjwCommentServiceImpl.java
View file @
ae28908a
...
...
@@ -16,6 +16,7 @@ import io.hmit.modules.fhjw.service.UserCaseService;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -56,11 +57,13 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
save
(
FhjwCommentDTO
dto
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"caseNum"
,
dto
.
getCaseNum
());
//根据受案号查出caseID
List
<
FhjwCaseDTO
>
caseDto
=
fhjwCaseService
.
list
(
params
);
...
...
@@ -71,7 +74,15 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
for
(
Long
id
:
ids
){
UserCaseDTO
userCaseDTO
=
userCaseService
.
getByUserACase
(
dto
.
getUserId
(),
id
);
if
(
userCaseDTO
!=
null
){
dto
.
setCaseId
(
id
);
List
<
Long
>
lists
=
baseDao
.
selectList
(
new
QueryWrapper
<
FhjwCommentEntity
>()
.
eq
(
"user_id"
,
dto
.
getUserId
()).
eq
(
"case_id"
,
id
))
.
stream
().
map
(
FhjwCommentEntity:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
lists
.
size
()>
0
){
deleteBatchIds
(
lists
);
}
}
}
dto
.
getQuestionAnswerList
().
stream
().
forEach
(
item
->{
...
...
hmit-api/src/main/resources/application-dev.yml
View file @
ae28908a
...
...
@@ -5,6 +5,7 @@ spring:
driver-class-name
:
com.mysql.jdbc.Driver
# url: jdbc:mysql://112.51.130.215:3306/security_enterprise?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
url
:
jdbc:mysql://119.3.143.77:3306/fhjw?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
# url: jdbc:mysql://119.3.143.77:3306/fhjw_local?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
username
:
hmit_user
password
:
HmitUser@1234
initial-size
:
10
...
...
hmit-api/src/main/resources/application-prod.yml
View file @
ae28908a
...
...
@@ -5,6 +5,7 @@ spring:
driver-class-name
:
com.mysql.jdbc.Driver
# url: jdbc:mysql://localhost:3306/security_enterprise?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
url
:
jdbc:mysql://119.3.143.77:3306/fhjw?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
# url: jdbc:mysql://119.3.143.77:3306/fhjw_local?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
username
:
hmit_user
password
:
HmitUser@1234
initial-size
:
10
...
...
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