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
55112575
Commit
55112575
authored
Jul 28, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xmm' into 'master'
Xmm See merge request
!2
parents
ba9ee304
dc944f65
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1353 additions
and
48 deletions
+1353
-48
LoginController.java
.../io/hmit/modules/security/controller/LoginController.java
+2
-2
PasswordUtils.java
...java/io/hmit/modules/security/password/PasswordUtils.java
+31
-1
application-dev.yml
hmit-admin/src/main/resources/application-dev.yml
+4
-3
application-prod.yml
hmit-admin/src/main/resources/application-prod.yml
+4
-3
pom.xml
hmit-api/pom.xml
+13
-0
ZhelibanAPP.java
hmit-api/src/main/java/io/hmit/config/ZhelibanAPP.java
+31
-0
ZhelibanUtils.java
hmit-api/src/main/java/io/hmit/config/ZhelibanUtils.java
+546
-0
ApiLoginController.java
.../src/main/java/io/hmit/controller/ApiLoginController.java
+108
-1
FhiwFunctionController.java
.../hmit/modules/fhjw/controller/FhiwFunctionController.java
+8
-14
FhjwAnswerController.java
...io/hmit/modules/fhjw/controller/FhjwAnswerController.java
+8
-0
FhjwCaseController.java
...a/io/hmit/modules/fhjw/controller/FhjwCaseController.java
+9
-0
FhjwCommentController.java
...o/hmit/modules/fhjw/controller/FhjwCommentController.java
+9
-0
FhjwFeedbackController.java
.../hmit/modules/fhjw/controller/FhjwFeedbackController.java
+9
-0
FhjwQuestionController.java
.../hmit/modules/fhjw/controller/FhjwQuestionController.java
+16
-2
FhjwRoleFunctionController.java
...t/modules/fhjw/controller/FhjwRoleFunctionController.java
+9
-0
FhjwTempController.java
...a/io/hmit/modules/fhjw/controller/FhjwTempController.java
+9
-0
UserCaseController.java
...a/io/hmit/modules/fhjw/controller/UserCaseController.java
+9
-0
FhiwFunctionServiceImpl.java
...it/modules/fhjw/service/impl/FhiwFunctionServiceImpl.java
+33
-7
FhjwCaseServiceImpl.java
...o/hmit/modules/fhjw/service/impl/FhjwCaseServiceImpl.java
+15
-8
FhjwCommentServiceImpl.java
...mit/modules/fhjw/service/impl/FhjwCommentServiceImpl.java
+11
-0
UserRoleDTO.java
...i/src/main/java/io/hmit/modules/user/dto/UserRoleDTO.java
+6
-0
UserRoleService.java
...in/java/io/hmit/modules/user/service/UserRoleService.java
+4
-0
UserRoleServiceImpl.java
...o/hmit/modules/user/service/impl/UserRoleServiceImpl.java
+7
-0
UserService.java
hmit-api/src/main/java/io/hmit/service/UserService.java
+4
-0
UserServiceImpl.java
...i/src/main/java/io/hmit/service/impl/UserServiceImpl.java
+9
-0
application-dev.yml
hmit-api/src/main/resources/application-dev.yml
+5
-3
application-prod.yml
hmit-api/src/main/resources/application-prod.yml
+5
-3
pom.xml
hmit-common/pom.xml
+8
-1
HttpRequestUtil.java
...n/src/main/java/io/hmit/common/utils/HttpRequestUtil.java
+337
-0
MD5.java
hmit-common/src/main/java/io/hmit/common/utils/MD5.java
+61
-0
MyX509TrustManager.java
...rc/main/java/io/hmit/common/utils/MyX509TrustManager.java
+23
-0
No files found.
hmit-admin/src/main/java/io/hmit/modules/security/controller/LoginController.java
View file @
55112575
...
@@ -106,7 +106,7 @@ public class LoginController {
...
@@ -106,7 +106,7 @@ public class LoginController {
}
}
//密码错误
//密码错误
if
(!
PasswordUtils
.
matches
(
login
.
getPassword
(
),
user
.
getPassword
()))
{
if
(!
PasswordUtils
.
matches
(
PasswordUtils
.
JM
(
login
.
getPassword
()
),
user
.
getPassword
()))
{
log
.
setStatus
(
LoginStatusEnum
.
FAIL
.
value
());
log
.
setStatus
(
LoginStatusEnum
.
FAIL
.
value
());
log
.
setCreator
(
user
.
getId
());
log
.
setCreator
(
user
.
getId
());
log
.
setCreatorName
(
user
.
getUsername
());
log
.
setCreatorName
(
user
.
getUsername
());
...
...
hmit-admin/src/main/java/io/hmit/modules/security/password/PasswordUtils.java
View file @
55112575
package
io
.
hmit
.
modules
.
security
.
password
;
package
io
.
hmit
.
modules
.
security
.
password
;
import
sun.misc.BASE64Decoder
;
import
java.io.IOException
;
import
java.security.MessageDigest
;
/**
/**
* 密码工具类
* 密码工具类
*
*
...
@@ -32,12 +37,37 @@ public class PasswordUtils {
...
@@ -32,12 +37,37 @@ public class PasswordUtils {
return
passwordEncoder
.
matches
(
str
,
password
);
return
passwordEncoder
.
matches
(
str
,
password
);
}
}
/**
* Base64 解密
* @param str 明文密码
* @return 返回BASE64解密后的密码
*/
public
static
String
JM
(
String
str
)
{
if
(
str
==
null
)
return
null
;
String
decoderStr
=
""
;
try
{
BASE64Decoder
decoder
=
new
BASE64Decoder
();
byte
[]
b
=
decoder
.
decodeBuffer
(
str
);
decoderStr
=
new
String
(
b
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
return
null
;
}
return
decoderStr
;
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
str
=
"admin"
;
String
str
=
"admin"
;
String
password
=
encode
(
str
);
String
password
=
encode
(
str
);
System
.
out
.
println
(
password
);
System
.
out
.
println
(
JM
(
"bmloYW8="
)
);
System
.
out
.
println
(
matches
(
str
,
password
));
System
.
out
.
println
(
matches
(
str
,
password
));
}
}
...
...
hmit-admin/src/main/resources/application-dev.yml
View file @
55112575
...
@@ -2,11 +2,12 @@ spring:
...
@@ -2,11 +2,12 @@ spring:
datasource
:
datasource
:
druid
:
druid
:
#MySQL
#MySQL
#
driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.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://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?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_local?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url
:
jdbc:mysql://localhost:3306/fhjw?allowPublicKeyRetrieval=true&useSSL=false&autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
username
:
hmit_user
username
:
hmit_user
password
:
HmitUser@1234
password
:
HmitUser@1234
# #Oracle
# #Oracle
...
...
hmit-admin/src/main/resources/application-prod.yml
View file @
55112575
...
@@ -2,11 +2,12 @@ spring:
...
@@ -2,11 +2,12 @@ spring:
datasource
:
datasource
:
druid
:
druid
:
#MySQL
#MySQL
#
driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.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://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?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_local?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
url
:
jdbc:mysql://localhost:3306/fhjw?allowPublicKeyRetrieval=true&useSSL=false&autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
username
:
hmit_user
username
:
hmit_user
password
:
HmitUser@1234
password
:
HmitUser@1234
initial-size
:
10
initial-size
:
10
...
...
hmit-api/pom.xml
View file @
55112575
...
@@ -29,6 +29,19 @@
...
@@ -29,6 +29,19 @@
<groupId>
junit
</groupId>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<artifactId>
junit
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.60
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
net.sf.json-lib
</groupId>
<artifactId>
json-lib
</artifactId>
<version>
2.4
</version>
<classifier>
jdk15
</classifier>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
hmit-api/src/main/java/io/hmit/config/ZhelibanAPP.java
0 → 100644
View file @
55112575
package
io
.
hmit
.
config
;
public
class
ZhelibanAPP
{
// 获取请求app_secret的地址
public
static
final
String
APP_REQUEST_SECRET_URL
=
"http://10.68.138.194/gateway/app/refreshTokenByKey.htm"
;
public
static
final
String
APP_KEY
=
"6465b05327cc4a41897907bf81382c29"
;
public
static
final
String
APP_SECRET
=
"fe07f9be363c46449ffae97ae2ad2bda"
;
public
static
final
String
SIGN
=
""
;
public
static
final
String
APP_ID
=
"4438763045"
;
public
static
final
String
APP_KEY_T
=
"249f09c69fe38bf51fe73976cbed2ead"
;
public
static
final
String
TOKEN_URL
=
""
;
public
static
final
String
BASE_URL
=
"http://a.com/"
;
public
static
final
String
AUTH_LOGIN_URL
=
BASE_URL
+
""
;
public
static
final
String
PUSH_MESSAGE_SIMPLE
=
BASE_URL
+
""
;
public
static
final
String
GET_USER_INFO_BY_MOBILE
=
BASE_URL
+
""
;
public
static
final
String
COMMIT_DATA
=
BASE_URL
+
""
;
//手机
public
static
final
String
SERVICE_CODE
=
"jcygm"
;
public
static
final
String
SERVICE_PASS
=
"jcygmpwd"
;
// public static final String APP_BASE_URL = "https://puser.zjzwfw.gov.cn/sso/servlet/simpleauth?method=";
public
static
final
String
APP_BASE_URL
=
"https://appapi.zjzwfw.gov.cn/sso/servlet/simpleauth?method="
;
public
static
final
String
VALIDATION_TICKET
=
"ticketValidation"
;
public
static
final
String
USER_INFO
=
"getUserInfo"
;
}
hmit-api/src/main/java/io/hmit/config/ZhelibanUtils.java
0 → 100644
View file @
55112575
This diff is collapsed.
Click to expand it.
hmit-api/src/main/java/io/hmit/controller/ApiLoginController.java
View file @
55112575
...
@@ -4,15 +4,32 @@ package io.hmit.controller;
...
@@ -4,15 +4,32 @@ package io.hmit.controller;
import
io.hmit.annotation.Login
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.validator.ValidatorUtils
;
import
io.hmit.common.validator.ValidatorUtils
;
import
io.hmit.config.ZhelibanUtils
;
import
io.hmit.dto.LoginDTO
;
import
io.hmit.dto.LoginDTO
;
import
io.hmit.entity.TokenEntity
;
import
io.hmit.entity.UserEntity
;
import
io.hmit.modules.user.dto.RoleDTO
;
import
io.hmit.modules.user.dto.UserRoleDTO
;
import
io.hmit.modules.user.service.RoleService
;
import
io.hmit.modules.user.service.UserRoleService
;
import
io.hmit.service.TokenService
;
import
io.hmit.service.TokenService
;
import
io.hmit.service.UserService
;
import
io.hmit.service.UserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -30,6 +47,12 @@ public class ApiLoginController {
...
@@ -30,6 +47,12 @@ public class ApiLoginController {
@Autowired
@Autowired
private
TokenService
tokenService
;
private
TokenService
tokenService
;
@Autowired
private
UserRoleService
userRoleService
;
@Autowired
private
RoleService
roleService
;
@PostMapping
(
"login"
)
@PostMapping
(
"login"
)
@ApiOperation
(
"登录"
)
@ApiOperation
(
"登录"
)
...
@@ -53,4 +76,88 @@ public class ApiLoginController {
...
@@ -53,4 +76,88 @@ public class ApiLoginController {
return
new
Result
();
return
new
Result
();
}
}
//个人登录 - 单点登陆
@RequestMapping
(
value
=
"/check_user"
)
@ApiOperation
(
"单点登录"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"ticket"
,
value
=
"票据"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"String"
)
,
})
public
Result
checkUser
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
map
,
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
UnsupportedEncodingException
{
// 获取到票据信息ticket
System
.
out
.
println
(
"开始进入这个checkuser了————————————————————"
);
System
.
out
.
println
(
map
);
Long
userId
;
Map
<
String
,
Object
>
userMap
=
new
HashMap
<>();
if
(
map
.
get
(
"ticket"
)
!=
null
){
System
.
out
.
println
(
"Ticket 是"
+
map
.
get
(
"ticket"
)+
"——————————————————————"
);
Map
<
String
,
Object
>
user_map
=
ZhelibanUtils
.
getUserInfo
(
map
);
System
.
out
.
println
(
"UserMap是——————————————————————————————"
);
System
.
out
.
println
(
user_map
);
if
(
"6001"
.
equals
(
user_map
.
get
(
"result"
))){
return
new
Result
().
error
(
"ticket失效"
);
}
if
(
user_map
.
get
(
"idnum"
)
!=
null
){
//判断是否已经存在了这条信息
UserEntity
oldUser
=
userService
.
getByIdno
(
URLEncoder
.
encode
(
user_map
.
get
(
"idnum"
).
toString
(),
"UTF8"
));
List
<
UserRoleDTO
>
roleList
=
new
ArrayList
<>();
if
(
oldUser
==
null
){
//判断是否已经存在了这条信息
UserEntity
oldUserMobile
=
userService
.
getByMobile
(
URLEncoder
.
encode
(
user_map
.
get
(
"mobile"
).
toString
(),
"UTF8"
));
if
(
oldUserMobile
==
null
){
return
new
Result
().
error
(
"系统中不存在,麻烦联系后台管理员进行添加后再试"
);
}
else
{
userId
=
oldUserMobile
.
getId
();
roleList
=
userRoleService
.
getRoleByUsers
(
userId
);
roleList
.
stream
().
forEach
(
item
->{
RoleDTO
role
=
roleService
.
get
(
item
.
getRoleId
());
item
.
setRoleName
(
role
.
getName
());
item
.
setTempId
(
role
.
getTempId
());
});
userMap
.
put
(
"username"
,
oldUserMobile
.
getUsername
());
userMap
.
put
(
"mobile"
,
oldUserMobile
.
getMobile
());
userMap
.
put
(
"idnum"
,
oldUserMobile
.
getUserIdno
());
userMap
.
put
(
"accountId"
,
user_map
.
get
(
"userid"
).
toString
());
userMap
.
put
(
"userId"
,
userId
);
userMap
.
put
(
"roleList"
,
roleList
);
TokenEntity
tokenEntity
=
tokenService
.
createToken
(
userId
);
userMap
.
put
(
"token"
,
tokenEntity
.
getToken
());
userMap
.
put
(
"expire"
,
tokenEntity
.
getExpireDate
().
getTime
()
-
System
.
currentTimeMillis
());
return
new
Result
().
ok
(
userMap
);
}
}
userId
=
oldUser
.
getId
();
userMap
.
put
(
"username"
,
oldUser
.
getUsername
());
userMap
.
put
(
"mobile"
,
oldUser
.
getMobile
());
userMap
.
put
(
"idnum"
,
oldUser
.
getUserIdno
());
userMap
.
put
(
"accountId"
,
user_map
.
get
(
"userid"
).
toString
());
userMap
.
put
(
"userId"
,
userId
);
//添加用户权限列表(用户权限、权限名称、模版ID)
roleList
=
userRoleService
.
getRoleByUsers
(
userId
);
roleList
.
stream
().
forEach
(
item
->{
RoleDTO
role
=
roleService
.
get
(
item
.
getRoleId
());
item
.
setRoleName
(
role
.
getName
());
item
.
setTempId
(
role
.
getTempId
());
});
userMap
.
put
(
"roleList"
,
roleList
);
TokenEntity
tokenEntity
=
tokenService
.
createToken
(
userId
);
userMap
.
put
(
"token"
,
tokenEntity
.
getToken
());
userMap
.
put
(
"expire"
,
tokenEntity
.
getExpireDate
().
getTime
()
-
System
.
currentTimeMillis
());
}
return
new
Result
().
ok
(
userMap
);
}
else
{
return
new
Result
().
error
(
"票据信息为空"
);
}
}
}
}
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhiwFunctionController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -15,6 +16,7 @@ import io.swagger.annotations.Api;
...
@@ -15,6 +16,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -38,20 +40,7 @@ public class FhiwFunctionController {
...
@@ -38,20 +40,7 @@ public class FhiwFunctionController {
@Autowired
@Autowired
private
FhiwFunctionService
fhiwFunctionService
;
private
FhiwFunctionService
fhiwFunctionService
;
@GetMapping
(
"page"
)
@Login
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
FhiwFunctionDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
FhiwFunctionDTO
>
page
=
fhiwFunctionService
.
page
(
params
);
return
new
Result
<
PageData
<
FhiwFunctionDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhiwFunctionDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
FhiwFunctionDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -60,6 +49,7 @@ public class FhiwFunctionController {
...
@@ -60,6 +49,7 @@ public class FhiwFunctionController {
return
new
Result
<
FhiwFunctionDTO
>().
ok
(
data
);
return
new
Result
<
FhiwFunctionDTO
>().
ok
(
data
);
}
}
@Login
@GetMapping
(
"/getByRole"
)
@GetMapping
(
"/getByRole"
)
@ApiOperation
(
"根据用户权限获取对应的评价模块"
)
@ApiOperation
(
"根据用户权限获取对应的评价模块"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -73,6 +63,7 @@ public class FhiwFunctionController {
...
@@ -73,6 +63,7 @@ public class FhiwFunctionController {
return
new
Result
<
List
<
FhiwFunctionDTO
>>().
ok
(
data
);
return
new
Result
<
List
<
FhiwFunctionDTO
>>().
ok
(
data
);
}
}
@Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
FhiwFunctionDTO
dto
){
public
Result
save
(
@RequestBody
FhiwFunctionDTO
dto
){
...
@@ -84,6 +75,7 @@ public class FhiwFunctionController {
...
@@ -84,6 +75,7 @@ public class FhiwFunctionController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
FhiwFunctionDTO
dto
){
public
Result
update
(
@RequestBody
FhiwFunctionDTO
dto
){
...
@@ -95,6 +87,8 @@ public class FhiwFunctionController {
...
@@ -95,6 +87,8 @@ public class FhiwFunctionController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhjwAnswerController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -36,6 +38,7 @@ public class FhjwAnswerController {
...
@@ -36,6 +38,7 @@ public class FhjwAnswerController {
@Autowired
@Autowired
private
FhjwAnswerService
fhjwAnswerService
;
private
FhjwAnswerService
fhjwAnswerService
;
@Delete
(
"未使用到"
)
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -50,6 +53,7 @@ public class FhjwAnswerController {
...
@@ -50,6 +53,7 @@ public class FhjwAnswerController {
return
new
Result
<
PageData
<
FhjwAnswerDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
FhjwAnswerDTO
>>().
ok
(
page
);
}
}
@Login
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhjwAnswerDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
FhjwAnswerDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -58,6 +62,7 @@ public class FhjwAnswerController {
...
@@ -58,6 +62,7 @@ public class FhjwAnswerController {
return
new
Result
<
FhjwAnswerDTO
>().
ok
(
data
);
return
new
Result
<
FhjwAnswerDTO
>().
ok
(
data
);
}
}
@Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
FhjwAnswerDTO
dto
){
public
Result
save
(
@RequestBody
FhjwAnswerDTO
dto
){
...
@@ -69,6 +74,7 @@ public class FhjwAnswerController {
...
@@ -69,6 +74,7 @@ public class FhjwAnswerController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
FhjwAnswerDTO
dto
){
public
Result
update
(
@RequestBody
FhjwAnswerDTO
dto
){
...
@@ -80,6 +86,8 @@ public class FhjwAnswerController {
...
@@ -80,6 +86,8 @@ public class FhjwAnswerController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhjwCaseController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -37,6 +38,8 @@ public class FhjwCaseController {
...
@@ -37,6 +38,8 @@ public class FhjwCaseController {
@Autowired
@Autowired
private
FhjwCaseService
fhjwCaseService
;
private
FhjwCaseService
fhjwCaseService
;
@Login
@Delete
(
"未使用到"
)
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -51,6 +54,7 @@ public class FhjwCaseController {
...
@@ -51,6 +54,7 @@ public class FhjwCaseController {
return
new
Result
<
PageData
<
FhjwCaseDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
FhjwCaseDTO
>>().
ok
(
page
);
}
}
// @Login
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhjwCaseDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
FhjwCaseDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -59,6 +63,7 @@ public class FhjwCaseController {
...
@@ -59,6 +63,7 @@ public class FhjwCaseController {
return
new
Result
<
FhjwCaseDTO
>().
ok
(
data
);
return
new
Result
<
FhjwCaseDTO
>().
ok
(
data
);
}
}
@Delete
(
"系统变更不使用"
)
@Delete
(
"系统变更不使用"
)
@GetMapping
(
"/getBycaseNum/{caseNum}"
)
@GetMapping
(
"/getBycaseNum/{caseNum}"
)
@ApiOperation
(
"根据案件号caseNum获取案件信息"
)
@ApiOperation
(
"根据案件号caseNum获取案件信息"
)
...
@@ -69,6 +74,7 @@ public class FhjwCaseController {
...
@@ -69,6 +74,7 @@ public class FhjwCaseController {
return
new
Result
<
FhjwCaseDTO
>().
ok
(
data
);
return
new
Result
<
FhjwCaseDTO
>().
ok
(
data
);
}
}
// @Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
Map
<
String
,
Object
>
params
){
public
Result
save
(
@RequestBody
Map
<
String
,
Object
>
params
){
...
@@ -80,6 +86,7 @@ public class FhjwCaseController {
...
@@ -80,6 +86,7 @@ public class FhjwCaseController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
FhjwCaseDTO
dto
){
public
Result
update
(
@RequestBody
FhjwCaseDTO
dto
){
...
@@ -91,6 +98,8 @@ public class FhjwCaseController {
...
@@ -91,6 +98,8 @@ public class FhjwCaseController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhjwCommentController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -36,6 +38,8 @@ public class FhjwCommentController {
...
@@ -36,6 +38,8 @@ public class FhjwCommentController {
@Autowired
@Autowired
private
FhjwCommentService
fhjwCommentService
;
private
FhjwCommentService
fhjwCommentService
;
@Login
@Delete
(
"未使用到"
)
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -50,6 +54,7 @@ public class FhjwCommentController {
...
@@ -50,6 +54,7 @@ public class FhjwCommentController {
return
new
Result
<
PageData
<
FhjwCommentDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
FhjwCommentDTO
>>().
ok
(
page
);
}
}
@Login
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhjwCommentDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
FhjwCommentDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -58,6 +63,7 @@ public class FhjwCommentController {
...
@@ -58,6 +63,7 @@ public class FhjwCommentController {
return
new
Result
<
FhjwCommentDTO
>().
ok
(
data
);
return
new
Result
<
FhjwCommentDTO
>().
ok
(
data
);
}
}
@Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
FhjwCommentDTO
dto
){
public
Result
save
(
@RequestBody
FhjwCommentDTO
dto
){
...
@@ -69,6 +75,7 @@ public class FhjwCommentController {
...
@@ -69,6 +75,7 @@ public class FhjwCommentController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
FhjwCommentDTO
dto
){
public
Result
update
(
@RequestBody
FhjwCommentDTO
dto
){
...
@@ -80,6 +87,8 @@ public class FhjwCommentController {
...
@@ -80,6 +87,8 @@ public class FhjwCommentController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhjwFeedbackController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -37,6 +39,8 @@ public class FhjwFeedbackController {
...
@@ -37,6 +39,8 @@ public class FhjwFeedbackController {
@Autowired
@Autowired
private
FhjwFeedbackService
fhjwFeedbackService
;
private
FhjwFeedbackService
fhjwFeedbackService
;
@Login
@Delete
(
"未使用到"
)
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -51,6 +55,7 @@ public class FhjwFeedbackController {
...
@@ -51,6 +55,7 @@ public class FhjwFeedbackController {
return
new
Result
<
PageData
<
FhjwFeedbackDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
FhjwFeedbackDTO
>>().
ok
(
page
);
}
}
@Login
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhjwFeedbackDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
FhjwFeedbackDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -59,6 +64,7 @@ public class FhjwFeedbackController {
...
@@ -59,6 +64,7 @@ public class FhjwFeedbackController {
return
new
Result
<
FhjwFeedbackDTO
>().
ok
(
data
);
return
new
Result
<
FhjwFeedbackDTO
>().
ok
(
data
);
}
}
@Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
FhjwFeedbackDTO
dto
){
public
Result
save
(
@RequestBody
FhjwFeedbackDTO
dto
){
...
@@ -71,6 +77,7 @@ public class FhjwFeedbackController {
...
@@ -71,6 +77,7 @@ public class FhjwFeedbackController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
FhjwFeedbackDTO
dto
){
public
Result
update
(
@RequestBody
FhjwFeedbackDTO
dto
){
...
@@ -82,6 +89,8 @@ public class FhjwFeedbackController {
...
@@ -82,6 +89,8 @@ public class FhjwFeedbackController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhjwQuestionController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -37,6 +39,8 @@ public class FhjwQuestionController {
...
@@ -37,6 +39,8 @@ public class FhjwQuestionController {
@Autowired
@Autowired
private
FhjwQuestionService
fhjwQuestionService
;
private
FhjwQuestionService
fhjwQuestionService
;
@Login
@Delete
(
"未使用到"
)
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -51,6 +55,7 @@ public class FhjwQuestionController {
...
@@ -51,6 +55,7 @@ public class FhjwQuestionController {
return
new
Result
<
PageData
<
FhjwQuestionDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
FhjwQuestionDTO
>>().
ok
(
page
);
}
}
@Login
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhjwQuestionDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
FhjwQuestionDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -59,14 +64,20 @@ public class FhjwQuestionController {
...
@@ -59,14 +64,20 @@ public class FhjwQuestionController {
return
new
Result
<
FhjwQuestionDTO
>().
ok
(
data
);
return
new
Result
<
FhjwQuestionDTO
>().
ok
(
data
);
}
}
@GetMapping
(
"/getQuestionList/{tempId}"
)
@Login
@GetMapping
(
"/getQuestionList"
)
@ApiOperation
(
"获取问题列表"
)
@ApiOperation
(
"获取问题列表"
)
public
Result
<
List
<
FhjwQuestionDTO
>>
getQuestionList
(
@PathVariable
(
"tempId"
)
Long
tempId
){
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"tempId"
,
value
=
"模版ID"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"String"
)
,
})
public
Result
<
List
<
FhjwQuestionDTO
>>
getQuestionList
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
Long
tempId
=
params
.
get
(
"tempId"
)
==
null
?
0L
:(
Long
)
params
.
get
(
"tempId"
)
;
List
<
FhjwQuestionDTO
>
data
=
fhjwQuestionService
.
getQuestionList
(
tempId
);
List
<
FhjwQuestionDTO
>
data
=
fhjwQuestionService
.
getQuestionList
(
tempId
);
return
new
Result
<
List
<
FhjwQuestionDTO
>>().
ok
(
data
);
return
new
Result
<
List
<
FhjwQuestionDTO
>>().
ok
(
data
);
}
}
@Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
FhjwQuestionDTO
dto
){
public
Result
save
(
@RequestBody
FhjwQuestionDTO
dto
){
...
@@ -78,6 +89,7 @@ public class FhjwQuestionController {
...
@@ -78,6 +89,7 @@ public class FhjwQuestionController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
FhjwQuestionDTO
dto
){
public
Result
update
(
@RequestBody
FhjwQuestionDTO
dto
){
...
@@ -89,6 +101,8 @@ public class FhjwQuestionController {
...
@@ -89,6 +101,8 @@ public class FhjwQuestionController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhjwRoleFunctionController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -36,6 +38,8 @@ public class FhjwRoleFunctionController {
...
@@ -36,6 +38,8 @@ public class FhjwRoleFunctionController {
@Autowired
@Autowired
private
FhjwRoleFunctionService
fhjwRoleFunctionService
;
private
FhjwRoleFunctionService
fhjwRoleFunctionService
;
@Login
@Delete
(
"未使用到"
)
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -50,6 +54,7 @@ public class FhjwRoleFunctionController {
...
@@ -50,6 +54,7 @@ public class FhjwRoleFunctionController {
return
new
Result
<
PageData
<
FhjwRoleFunctionDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
FhjwRoleFunctionDTO
>>().
ok
(
page
);
}
}
@Login
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhjwRoleFunctionDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
FhjwRoleFunctionDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -58,6 +63,7 @@ public class FhjwRoleFunctionController {
...
@@ -58,6 +63,7 @@ public class FhjwRoleFunctionController {
return
new
Result
<
FhjwRoleFunctionDTO
>().
ok
(
data
);
return
new
Result
<
FhjwRoleFunctionDTO
>().
ok
(
data
);
}
}
@Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
FhjwRoleFunctionDTO
dto
){
public
Result
save
(
@RequestBody
FhjwRoleFunctionDTO
dto
){
...
@@ -69,6 +75,7 @@ public class FhjwRoleFunctionController {
...
@@ -69,6 +75,7 @@ public class FhjwRoleFunctionController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
FhjwRoleFunctionDTO
dto
){
public
Result
update
(
@RequestBody
FhjwRoleFunctionDTO
dto
){
...
@@ -80,6 +87,8 @@ public class FhjwRoleFunctionController {
...
@@ -80,6 +87,8 @@ public class FhjwRoleFunctionController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/FhjwTempController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -36,6 +38,8 @@ public class FhjwTempController {
...
@@ -36,6 +38,8 @@ public class FhjwTempController {
@Autowired
@Autowired
private
FhjwTempService
fhjwTempService
;
private
FhjwTempService
fhjwTempService
;
@Login
@Delete
(
"未使用到"
)
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -50,6 +54,7 @@ public class FhjwTempController {
...
@@ -50,6 +54,7 @@ public class FhjwTempController {
return
new
Result
<
PageData
<
FhjwTempDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
FhjwTempDTO
>>().
ok
(
page
);
}
}
@Login
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
FhjwTempDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
FhjwTempDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -58,6 +63,7 @@ public class FhjwTempController {
...
@@ -58,6 +63,7 @@ public class FhjwTempController {
return
new
Result
<
FhjwTempDTO
>().
ok
(
data
);
return
new
Result
<
FhjwTempDTO
>().
ok
(
data
);
}
}
@Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
FhjwTempDTO
dto
){
public
Result
save
(
@RequestBody
FhjwTempDTO
dto
){
...
@@ -69,6 +75,7 @@ public class FhjwTempController {
...
@@ -69,6 +75,7 @@ public class FhjwTempController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
FhjwTempDTO
dto
){
public
Result
update
(
@RequestBody
FhjwTempDTO
dto
){
...
@@ -80,6 +87,8 @@ public class FhjwTempController {
...
@@ -80,6 +87,8 @@ public class FhjwTempController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/controller/UserCaseController.java
View file @
55112575
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
package
io
.
hmit
.
modules
.
fhjw
.
controller
;
import
io.hmit.annotation.Login
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.utils.Result
;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
...
@@ -14,6 +15,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
...
@@ -36,6 +38,8 @@ public class UserCaseController {
...
@@ -36,6 +38,8 @@ public class UserCaseController {
@Autowired
@Autowired
private
UserCaseService
userCaseService
;
private
UserCaseService
userCaseService
;
@Login
@Delete
(
"未使用到"
)
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -50,6 +54,7 @@ public class UserCaseController {
...
@@ -50,6 +54,7 @@ public class UserCaseController {
return
new
Result
<
PageData
<
UserCaseDTO
>>().
ok
(
page
);
return
new
Result
<
PageData
<
UserCaseDTO
>>().
ok
(
page
);
}
}
@Login
@GetMapping
(
"{id}"
)
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
UserCaseDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
UserCaseDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
@@ -58,6 +63,7 @@ public class UserCaseController {
...
@@ -58,6 +63,7 @@ public class UserCaseController {
return
new
Result
<
UserCaseDTO
>().
ok
(
data
);
return
new
Result
<
UserCaseDTO
>().
ok
(
data
);
}
}
@Login
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
UserCaseDTO
dto
){
public
Result
save
(
@RequestBody
UserCaseDTO
dto
){
...
@@ -69,6 +75,7 @@ public class UserCaseController {
...
@@ -69,6 +75,7 @@ public class UserCaseController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@PutMapping
@PutMapping
@ApiOperation
(
"修改"
)
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
UserCaseDTO
dto
){
public
Result
update
(
@RequestBody
UserCaseDTO
dto
){
...
@@ -80,6 +87,8 @@ public class UserCaseController {
...
@@ -80,6 +87,8 @@ public class UserCaseController {
return
new
Result
();
return
new
Result
();
}
}
@Login
@Delete
(
"未使用到"
)
@DeleteMapping
@DeleteMapping
@ApiOperation
(
"删除"
)
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
public
Result
delete
(
@RequestBody
Long
[]
ids
){
...
...
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhiwFunctionServiceImpl.java
View file @
55112575
...
@@ -2,6 +2,11 @@ package io.hmit.modules.fhjw.service.impl;
...
@@ -2,6 +2,11 @@ package io.hmit.modules.fhjw.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.utils.ConvertUtils
;
import
io.hmit.common.utils.Result
;
import
io.hmit.config.ZhelibanUtils
;
import
io.hmit.entity.TokenEntity
;
import
io.hmit.entity.UserEntity
;
import
io.hmit.modules.fhjw.dao.FhiwFunctionDao
;
import
io.hmit.modules.fhjw.dao.FhiwFunctionDao
;
import
io.hmit.modules.fhjw.dto.FhiwFunctionDTO
;
import
io.hmit.modules.fhjw.dto.FhiwFunctionDTO
;
import
io.hmit.modules.fhjw.dto.FhjwCaseDTO
;
import
io.hmit.modules.fhjw.dto.FhjwCaseDTO
;
...
@@ -16,10 +21,24 @@ import io.hmit.modules.fhjw.service.UserCaseService;
...
@@ -16,10 +21,24 @@ import io.hmit.modules.fhjw.service.UserCaseService;
import
io.hmit.modules.user.dto.UserRoleDTO
;
import
io.hmit.modules.user.dto.UserRoleDTO
;
import
io.hmit.modules.user.service.RoleService
;
import
io.hmit.modules.user.service.RoleService
;
import
io.hmit.modules.user.service.UserRoleService
;
import
io.hmit.modules.user.service.UserRoleService
;
import
io.hmit.service.UserService
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -35,6 +54,8 @@ import java.util.stream.Collectors;
...
@@ -35,6 +54,8 @@ import java.util.stream.Collectors;
*/
*/
@Service
@Service
public
class
FhiwFunctionServiceImpl
extends
CrudServiceImpl
<
FhiwFunctionDao
,
FhiwFunctionEntity
,
FhiwFunctionDTO
>
implements
FhiwFunctionService
{
public
class
FhiwFunctionServiceImpl
extends
CrudServiceImpl
<
FhiwFunctionDao
,
FhiwFunctionEntity
,
FhiwFunctionDTO
>
implements
FhiwFunctionService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
FhiwFunctionServiceImpl
.
class
);
@Autowired
@Autowired
private
FhjwRoleFunctionService
fhjwRoleFunctionService
;
private
FhjwRoleFunctionService
fhjwRoleFunctionService
;
...
@@ -51,6 +72,7 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
...
@@ -51,6 +72,7 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
@Autowired
@Autowired
private
FhjwCaseService
fhjwCaseService
;
private
FhjwCaseService
fhjwCaseService
;
@Override
@Override
public
QueryWrapper
<
FhiwFunctionEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
FhiwFunctionEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
id
=
(
String
)
params
.
get
(
"id"
);
...
@@ -78,17 +100,17 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
...
@@ -78,17 +100,17 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
//当事人权限,则需要判断此案件是否有代理人,有代理人则不允许评价,无代理人则可以评价
//当事人权限,则需要判断此案件是否有代理人,有代理人则不允许评价,无代理人则可以评价
if
(
"当事人"
.
equals
(
roleService
.
get
(
roleId
).
getName
())){
if
(
"当事人"
.
equals
(
roleService
.
get
(
roleId
).
getName
())){
for
(
Long
caseId:
caseIds
)
{
for
(
Long
caseId:
caseIds
)
{
System
.
out
.
println
(
"caseId:"
+
caseId
);
logger
.
info
(
"caseId:"
+
caseId
);
Map
<
String
,
Object
>
query
=
new
HashMap
<>();
Map
<
String
,
Object
>
query
=
new
HashMap
<>();
query
.
put
(
"caseId"
,
caseId
);
query
.
put
(
"caseId"
,
caseId
);
query
.
put
(
"userId"
,
userId
);
query
.
put
(
"userId"
,
userId
);
List
<
UserCaseDTO
>
userCases
=
userCaseService
.
list
(
query
);
List
<
UserCaseDTO
>
userCases
=
userCaseService
.
list
(
query
);
if
(
userCases
.
size
()>
0
){
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
;
flag
=
true
;
break
;
}
}
}
}
/*
/*
List<Long> userIds = new ArrayList<>();
List<Long> userIds = new ArrayList<>();
...
@@ -106,26 +128,30 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
...
@@ -106,26 +128,30 @@ public class FhiwFunctionServiceImpl extends CrudServiceImpl<FhiwFunctionDao, Fh
}
}
}
}
*/
*/
}
}
}
}
//根据是否存在代理人,判断是否添加 "我要填写评测" 的权限!
Long
funcId
=
baseDao
.
selectOne
(
new
QueryWrapper
<
FhiwFunctionEntity
>().
eq
(
"name"
,
"我要填写评测"
)).
getId
();
Long
funcId
=
baseDao
.
selectOne
(
new
QueryWrapper
<
FhiwFunctionEntity
>().
eq
(
"name"
,
"我要填写评测"
)).
getId
();
List
<
Long
>
funIds
=
new
ArrayList
<>();
List
<
Long
>
funIds
=
new
ArrayList
<>();
if
(
flag
){
if
(
flag
){
logger
.
info
(
"存在代理人"
);
funIds
=
fhjwRoleFunctionService
.
list
(
params
).
stream
()
funIds
=
fhjwRoleFunctionService
.
list
(
params
).
stream
()
.
filter
(
roleFunc
->
!
funcId
.
equals
(
roleFunc
.
getFunctionId
()
))
.
filter
(
roleFunc
->
!
roleFunc
.
getFunctionId
().
equals
(
funcId
))
.
map
(
FhjwRoleFunctionDTO:
:
getFunctionId
).
collect
(
Collectors
.
toList
());
.
map
(
FhjwRoleFunctionDTO:
:
getFunctionId
).
collect
(
Collectors
.
toList
());
}
else
{
}
else
{
logger
.
info
(
"不存在代理人"
);
funIds
=
fhjwRoleFunctionService
.
list
(
params
).
stream
()
funIds
=
fhjwRoleFunctionService
.
list
(
params
).
stream
()
.
map
(
FhjwRoleFunctionDTO:
:
getFunctionId
).
collect
(
Collectors
.
toList
());
.
map
(
FhjwRoleFunctionDTO:
:
getFunctionId
).
collect
(
Collectors
.
toList
());
}
}
List
<
FhiwFunctionDTO
>
dtos
=
new
ArrayList
<>();
List
<
FhiwFunctionDTO
>
dtos
=
new
ArrayList
<>();
funIds
.
stream
().
forEach
(
id
->{
funIds
.
stream
().
forEach
(
id
->{
FhiwFunctionDTO
dto
=
get
(
id
);
FhiwFunctionDTO
dto
=
get
(
id
);
logger
.
info
(
"拥有的权限名称:"
+
dto
.
getName
());
dtos
.
add
(
dto
);
dtos
.
add
(
dto
);
});
});
return
dtos
;
return
dtos
;
}
}
}
}
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhjwCaseServiceImpl.java
View file @
55112575
...
@@ -84,14 +84,17 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
...
@@ -84,14 +84,17 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
.
eq
(
StringUtils
.
isNotBlank
(
caseNum
),
"case_num"
,
caseNum
)
.
eq
(
StringUtils
.
isNotBlank
(
caseNum
),
"case_num"
,
caseNum
)
.
eq
(
"people_name"
,
dto
.
getPeopleName
()));
.
eq
(
"people_name"
,
dto
.
getPeopleName
()));
//设置更新标志(默认未更新:2)用来更新承办人所属部门
dto
.
setFlag
(
"2"
);
//案件信息保存或更新
//案件信息保存或更新
if
(
entity
!=
null
){
if
(
entity
!=
null
){
dto
.
setId
(
entity
.
getId
());
dto
.
setId
(
entity
.
getId
());
dto
.
setUpdateDate
(
new
Date
());
dto
.
setUpdateDate
(
new
Date
());
//设置更新标志(默认未更新:2)用来更新承办人所属部门
if
(
entity
.
getDeptId
()
==
null
){
dto
.
setFlag
(
"2"
);
}
update
(
dto
);
update
(
dto
);
}
else
{
}
else
{
dto
.
setFlag
(
"2"
);
dto
.
setCreator
(
undertakerId
);
dto
.
setCreator
(
undertakerId
);
dto
.
setCreateDate
(
new
Date
());
dto
.
setCreateDate
(
new
Date
());
super
.
save
(
dto
);
super
.
save
(
dto
);
...
@@ -105,7 +108,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
...
@@ -105,7 +108,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
//保存案件相关人员关联信息(不包含承办人)
//保存案件相关人员关联信息(不包含承办人)
if
(
dto
.
getPeopleInfo
()!=
null
&&
dto
.
getPeopleInfo
().
size
()>
0
){
if
(
dto
.
getPeopleInfo
()!=
null
&&
dto
.
getPeopleInfo
().
size
()>
0
){
dto
.
getPeopleInfo
().
stream
().
forEach
(
item
->{
dto
.
getPeopleInfo
().
stream
().
forEach
(
item
->{
UserEntity
userEntity
=
n
ew
UserEntity
()
;
UserEntity
userEntity
=
n
ull
;
if
(!
""
.
equals
(
item
.
getUserMobile
())
){
if
(!
""
.
equals
(
item
.
getUserMobile
())
){
userEntity
=
userService
.
getByMobile
(
item
.
getUserMobile
());
userEntity
=
userService
.
getByMobile
(
item
.
getUserMobile
());
}
}
...
@@ -115,7 +118,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
...
@@ -115,7 +118,7 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
if
(
"嫌疑人"
.
equals
(
item
.
getUserRole
())
||
"被害人"
.
equals
(
item
.
getUserRole
())){
if
(
"嫌疑人"
.
equals
(
item
.
getUserRole
())
||
"被害人"
.
equals
(
item
.
getUserRole
())){
actRoleName
=
"当事人"
;
actRoleName
=
"当事人"
;
if
(!
""
.
equals
(
item
.
getUserName
())
&&
!
""
.
equals
(
item
.
getUserMobile
())
){
if
(!
""
.
equals
(
item
.
getUserName
())
){
Map
<
String
,
Object
>
query
=
new
HashMap
<>();
Map
<
String
,
Object
>
query
=
new
HashMap
<>();
query
.
put
(
"username"
,
item
.
getUserName
());
query
.
put
(
"username"
,
item
.
getUserName
());
userEntity
=
userService
.
getByParams
(
query
);
userEntity
=
userService
.
getByParams
(
query
);
...
@@ -123,11 +126,14 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
...
@@ -123,11 +126,14 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
}
}
//案件相关人员不存在人员表中则插入
//案件相关人员不存在人员表中则插入
if
(
userEntity
==
null
){
if
(
userEntity
==
null
){
if
(
""
.
equals
(
item
.
getUserName
())){
return
;
}
//tb_user中添加人员
//tb_user中添加人员
UserEntity
user
=
new
UserEntity
();
UserEntity
user
=
new
UserEntity
();
user
.
setUsername
(
item
.
getUserName
());
user
.
setUsername
(
item
.
getUserName
());
user
.
setMobile
(
""
.
equals
(
item
.
getUserMobile
())?
null
:
item
.
getUserMobile
());
user
.
setMobile
(
""
.
equals
(
item
.
getUserMobile
())?
""
:
item
.
getUserMobile
());
user
.
setCreateDate
(
new
Date
());
user
.
setCreateDate
(
new
Date
());
user
.
setUserIdno
(
item
.
getUserIdNo
());
user
.
setUserIdno
(
item
.
getUserIdNo
());
user
.
setIdentity
(
item
.
getUserRole
());
user
.
setIdentity
(
item
.
getUserRole
());
...
@@ -150,9 +156,9 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
...
@@ -150,9 +156,9 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
Long
userId
=
userEntity
.
getId
();
Long
userId
=
userEntity
.
getId
();
//人员信息更新
//人员信息更新
userEntity
.
setMobile
(
item
.
getUserMobile
());
userEntity
.
setMobile
(
""
.
equals
(
item
.
getUserMobile
())?
userEntity
.
getMobile
():
item
.
getUserMobile
());
userEntity
.
setUsername
(
item
.
getUserName
());
userEntity
.
setUsername
(
item
.
getUserName
());
userEntity
.
setUserIdno
(
item
.
getUserIdNo
());
userEntity
.
setUserIdno
(
""
.
equals
(
item
.
getUserIdNo
())?
userEntity
.
getUserIdno
():
item
.
getUserIdNo
());
userEntity
.
setIdentity
(
item
.
getUserRole
());
userEntity
.
setIdentity
(
item
.
getUserRole
());
userService
.
updateById
(
userEntity
);
userService
.
updateById
(
userEntity
);
...
@@ -203,4 +209,5 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
...
@@ -203,4 +209,5 @@ public class FhjwCaseServiceImpl extends CrudServiceImpl<FhjwCaseDao, FhjwCaseEn
}
}
return
false
;
return
false
;
}
}
}
}
hmit-api/src/main/java/io/hmit/modules/fhjw/service/impl/FhjwCommentServiceImpl.java
View file @
55112575
...
@@ -16,6 +16,7 @@ import io.hmit.modules.fhjw.service.UserCaseService;
...
@@ -16,6 +16,7 @@ import io.hmit.modules.fhjw.service.UserCaseService;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -56,11 +57,13 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
...
@@ -56,11 +57,13 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
save
(
FhjwCommentDTO
dto
)
{
public
void
save
(
FhjwCommentDTO
dto
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"caseNum"
,
dto
.
getCaseNum
());
params
.
put
(
"caseNum"
,
dto
.
getCaseNum
());
//根据受案号查出caseID
//根据受案号查出caseID
List
<
FhjwCaseDTO
>
caseDto
=
fhjwCaseService
.
list
(
params
);
List
<
FhjwCaseDTO
>
caseDto
=
fhjwCaseService
.
list
(
params
);
...
@@ -71,7 +74,15 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
...
@@ -71,7 +74,15 @@ public class FhjwCommentServiceImpl extends CrudServiceImpl<FhjwCommentDao, Fhjw
for
(
Long
id
:
ids
){
for
(
Long
id
:
ids
){
UserCaseDTO
userCaseDTO
=
userCaseService
.
getByUserACase
(
dto
.
getUserId
(),
id
);
UserCaseDTO
userCaseDTO
=
userCaseService
.
getByUserACase
(
dto
.
getUserId
(),
id
);
if
(
userCaseDTO
!=
null
){
if
(
userCaseDTO
!=
null
){
dto
.
setCaseId
(
id
);
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
->{
dto
.
getQuestionAnswerList
().
stream
().
forEach
(
item
->{
...
...
hmit-api/src/main/java/io/hmit/modules/user/dto/UserRoleDTO.java
View file @
55112575
...
@@ -25,6 +25,12 @@ public class UserRoleDTO implements Serializable {
...
@@ -25,6 +25,12 @@ public class UserRoleDTO implements Serializable {
@ApiModelProperty
(
value
=
"角色ID"
)
@ApiModelProperty
(
value
=
"角色ID"
)
private
Long
roleId
;
private
Long
roleId
;
@ApiModelProperty
(
value
=
"模版ID"
)
private
Long
tempId
;
@ApiModelProperty
(
value
=
"角色名称"
)
private
String
roleName
;
@ApiModelProperty
(
value
=
"用户ID"
)
@ApiModelProperty
(
value
=
"用户ID"
)
private
Long
userId
;
private
Long
userId
;
...
...
hmit-api/src/main/java/io/hmit/modules/user/service/UserRoleService.java
View file @
55112575
...
@@ -5,6 +5,8 @@ import io.hmit.modules.user.dto.RoleDTO;
...
@@ -5,6 +5,8 @@ import io.hmit.modules.user.dto.RoleDTO;
import
io.hmit.modules.user.dto.UserRoleDTO
;
import
io.hmit.modules.user.dto.UserRoleDTO
;
import
io.hmit.modules.user.entity.UserRoleEntity
;
import
io.hmit.modules.user.entity.UserRoleEntity
;
import
java.util.List
;
/**
/**
* 用户权限对应表
* 用户权限对应表
*
*
...
@@ -15,6 +17,8 @@ public interface UserRoleService extends CrudService<UserRoleEntity, UserRoleDTO
...
@@ -15,6 +17,8 @@ public interface UserRoleService extends CrudService<UserRoleEntity, UserRoleDTO
UserRoleDTO
getRoleByUser
(
Long
userID
);
UserRoleDTO
getRoleByUser
(
Long
userID
);
List
<
UserRoleDTO
>
getRoleByUsers
(
Long
userID
);
/**
/**
* 根据RoleID 和 UserId 查询
* 根据RoleID 和 UserId 查询
* @param roleId
* @param roleId
...
...
hmit-api/src/main/java/io/hmit/modules/user/service/impl/UserRoleServiceImpl.java
View file @
55112575
...
@@ -12,6 +12,7 @@ import io.hmit.modules.user.service.UserRoleService;
...
@@ -12,6 +12,7 @@ import io.hmit.modules.user.service.UserRoleService;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -40,6 +41,12 @@ public class UserRoleServiceImpl extends CrudServiceImpl<UserRoleDao, UserRoleEn
...
@@ -40,6 +41,12 @@ public class UserRoleServiceImpl extends CrudServiceImpl<UserRoleDao, UserRoleEn
return
ConvertUtils
.
sourceToTarget
(
entity
,
UserRoleDTO
.
class
);
return
ConvertUtils
.
sourceToTarget
(
entity
,
UserRoleDTO
.
class
);
}
}
@Override
public
List
<
UserRoleDTO
>
getRoleByUsers
(
Long
userID
)
{
List
<
UserRoleEntity
>
entity
=
baseDao
.
selectList
(
new
QueryWrapper
<
UserRoleEntity
>().
eq
(
"user_id"
,
userID
));
return
ConvertUtils
.
sourceToTarget
(
entity
,
UserRoleDTO
.
class
);
}
@Override
@Override
public
UserRoleDTO
getByRoleAUser
(
Long
roleId
,
Long
userId
)
{
public
UserRoleDTO
getByRoleAUser
(
Long
roleId
,
Long
userId
)
{
UserRoleEntity
entity
=
baseDao
.
selectOne
(
new
QueryWrapper
<
UserRoleEntity
>()
UserRoleEntity
entity
=
baseDao
.
selectOne
(
new
QueryWrapper
<
UserRoleEntity
>()
...
...
hmit-api/src/main/java/io/hmit/service/UserService.java
View file @
55112575
...
@@ -3,6 +3,7 @@ package io.hmit.service;
...
@@ -3,6 +3,7 @@ package io.hmit.service;
import
io.hmit.common.service.BaseService
;
import
io.hmit.common.service.BaseService
;
import
io.hmit.dto.LoginDTO
;
import
io.hmit.dto.LoginDTO
;
import
io.hmit.entity.UserEntity
;
import
io.hmit.entity.UserEntity
;
import
org.apache.ibatis.annotations.Delete
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -19,6 +20,9 @@ public interface UserService extends BaseService<UserEntity> {
...
@@ -19,6 +20,9 @@ public interface UserService extends BaseService<UserEntity> {
UserEntity
getByMobileAIdno
(
String
mobile
,
String
userIdno
);
UserEntity
getByMobileAIdno
(
String
mobile
,
String
userIdno
);
UserEntity
getByIdno
(
String
userIdno
);
UserEntity
getUserByUserId
(
Long
userId
);
UserEntity
getUserByUserId
(
Long
userId
);
/**
/**
...
...
hmit-api/src/main/java/io/hmit/service/impl/UserServiceImpl.java
View file @
55112575
...
@@ -11,6 +11,7 @@ import io.hmit.entity.UserEntity;
...
@@ -11,6 +11,7 @@ import io.hmit.entity.UserEntity;
import
io.hmit.service.TokenService
;
import
io.hmit.service.TokenService
;
import
io.hmit.service.UserService
;
import
io.hmit.service.UserService
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -42,6 +43,14 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
...
@@ -42,6 +43,14 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
return
baseDao
.
getUserByParams
(
params
);
return
baseDao
.
getUserByParams
(
params
);
}
}
@Override
public
UserEntity
getByIdno
(
String
userIdno
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"userIdno"
,
userIdno
);
return
baseDao
.
getUserByParams
(
params
);
}
@Override
@Override
public
UserEntity
getUserByUserId
(
Long
userId
)
{
public
UserEntity
getUserByUserId
(
Long
userId
)
{
return
baseDao
.
getUserByUserId
(
userId
);
return
baseDao
.
getUserByUserId
(
userId
);
...
...
hmit-api/src/main/resources/application-dev.yml
View file @
55112575
spring
:
spring
:
datasource
:
datasource
:
druid
:
druid
:
#
driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.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://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?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://localhost:3306/fhjw?allowPublicKeyRetrieval=true&useSSL=false&autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
username
:
hmit_user
username
:
hmit_user
password
:
HmitUser@1234
password
:
HmitUser@1234
initial-size
:
10
initial-size
:
10
...
...
hmit-api/src/main/resources/application-prod.yml
View file @
55112575
spring
:
spring
:
datasource
:
datasource
:
druid
:
druid
:
#
driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
#
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://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?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://localhost:3306/fhjw?allowPublicKeyRetrieval=true&useSSL=false&autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
username
:
hmit_user
username
:
hmit_user
password
:
HmitUser@1234
password
:
HmitUser@1234
initial-size
:
10
initial-size
:
10
...
...
hmit-common/pom.xml
View file @
55112575
...
@@ -14,5 +14,12 @@
...
@@ -14,5 +14,12 @@
<build>
<build>
<finalName>
${project.artifactId}
</finalName>
<finalName>
${project.artifactId}
</finalName>
</build>
</build>
<dependencies>
<dependency>
<groupId>
log4j
</groupId>
<artifactId>
log4j
</artifactId>
<version>
1.2.17
</version>
</dependency>
</dependencies>
</project>
</project>
hmit-common/src/main/java/io/hmit/common/utils/HttpRequestUtil.java
0 → 100644
View file @
55112575
This diff is collapsed.
Click to expand it.
hmit-common/src/main/java/io/hmit/common/utils/MD5.java
0 → 100644
View file @
55112575
package
io
.
hmit
.
common
.
utils
;
import
sun.misc.BASE64Encoder
;
import
java.io.UnsupportedEncodingException
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
/**
* 说明:MD5处理
* 创建人:hmit
* 修改时间:
* @version
*/
public
class
MD5
{
public
static
String
md5
(
String
str
)
{
try
{
MessageDigest
md
=
MessageDigest
.
getInstance
(
"MD5"
);
md
.
update
(
str
.
getBytes
());
byte
b
[]
=
md
.
digest
();
int
i
;
StringBuffer
buf
=
new
StringBuffer
(
""
);
for
(
int
offset
=
0
;
offset
<
b
.
length
;
offset
++)
{
i
=
b
[
offset
];
if
(
i
<
0
)
i
+=
256
;
if
(
i
<
16
)
buf
.
append
(
"0"
);
buf
.
append
(
Integer
.
toHexString
(
i
));
}
str
=
buf
.
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
str
;
}
/**利用MD5进行加密
* @param str 待加密的字符串
* @return 加密后的字符串
* @throws NoSuchAlgorithmException 没有这种产生消息摘要的算法
* @throws UnsupportedEncodingException
*/
public
static
String
EncoderByMd5
(
String
str
)
throws
NoSuchAlgorithmException
,
UnsupportedEncodingException
{
//确定计算方法
MessageDigest
md5
=
MessageDigest
.
getInstance
(
"MD5"
);
BASE64Encoder
base64en
=
new
BASE64Encoder
();
//加密后的字符串
String
newstr
=
base64en
.
encode
(
md5
.
digest
(
str
.
getBytes
(
"utf-8"
)));
return
newstr
;
}
public
static
void
main
(
String
[]
args
)
throws
UnsupportedEncodingException
,
NoSuchAlgorithmException
{
System
.
out
.
println
(
md5
(
"hjfhsdjfueytRwYSdsa%hdf^jdshfh*KGh$e241613389800"
));
System
.
out
.
println
(
md5
(
"kkk"
));
System
.
out
.
println
(
EncoderByMd5
(
"180@qq.com"
+
"123456"
));
}
}
hmit-common/src/main/java/io/hmit/common/utils/MyX509TrustManager.java
0 → 100644
View file @
55112575
package
io
.
hmit
.
common
.
utils
;
import
javax.net.ssl.X509TrustManager
;
import
java.security.cert.CertificateException
;
import
java.security.cert.X509Certificate
;
public
class
MyX509TrustManager
implements
X509TrustManager
{
@Override
public
void
checkClientTrusted
(
X509Certificate
certificates
[],
String
authType
)
throws
CertificateException
{
}
@Override
public
void
checkServerTrusted
(
X509Certificate
[]
ax509certificate
,
String
s
)
throws
CertificateException
{
}
@Override
public
X509Certificate
[]
getAcceptedIssuers
()
{
return
null
;
}
}
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