Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
dd56a246
提交
dd56a246
authored
10月 10, 2020
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[zjm] 用户判断是否冻结
上级
c11ce3d0
全部展开
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
75 行增加
和
36 行删除
+75
-36
FileController.java
...a/com/tykj/dev/device/file/Controller/FileController.java
+5
-9
pom.xml
dev-finalcheck/pom.xml
+0
-2
SendBackService.java
...com/tykj/dev/device/sendback/service/SendBackService.java
+11
-6
SendBackServiceImpl.java
...dev/device/sendback/service/impl/SendBackServiceImpl.java
+0
-0
MyUserDetailsServiceImpl.java
...tykj/dev/device/user/config/MyUserDetailsServiceImpl.java
+3
-0
UnitsController.java
...j/dev/device/user/subject/controller/UnitsController.java
+5
-2
MgrcertService.java
.../tykj/dev/device/user/subject/service/MgrcertService.java
+0
-1
UnitsService.java
...om/tykj/dev/device/user/subject/service/UnitsService.java
+2
-1
UnitsServiceImpl.java
...ev/device/user/subject/service/impl/UnitsServiceImpl.java
+45
-15
UserServiceImpl.java
...dev/device/user/subject/service/impl/UserServiceImpl.java
+4
-0
没有找到文件。
dev-file/src/main/java/com/tykj/dev/device/file/Controller/FileController.java
浏览文件 @
dd56a246
...
...
@@ -14,14 +14,12 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.multipart.MultipartRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
...
...
@@ -63,12 +61,10 @@ public class FileController {
/**
* 文件下载
*/
@ApiOperation
(
value
=
"文件下载"
)
@GetMapping
(
"/download"
)
public
void
download
(
@RequestParam
String
url
,
@RequestParam
String
name
,
HttpServletResponse
response
,
HttpServletRequest
httpServletRequest
)
{
@PostMapping
(
"/download"
)
public
void
download
(
@RequestBody
FileRet
fileRet
,
HttpServletResponse
response
,
HttpServletRequest
httpServletRequest
){
useReportFIleService
.
download
(
fileRet
.
getFilePath
(),
fileRet
.
getName
(),
response
,
httpServletRequest
);
}
@ApiOperation
(
value
=
"多文件上传"
)
@PostMapping
(
value
=
"/many/upload"
)
public
ResponseEntity
<
List
<
FileRet
>>
manyFileUpload
(
HttpServletRequest
request
)
{
...
...
dev-finalcheck/pom.xml
浏览文件 @
dd56a246
...
...
@@ -58,7 +58,6 @@
<version>
29.0-jre
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/SendBackService.java
浏览文件 @
dd56a246
...
...
@@ -12,7 +12,7 @@ import java.util.List;
/**
* <h4>Description : </h4>
*
* @Author
czq
* @Author
zjm
* @Date 2020-08-15 18:15
* @Version 1.0
*/
...
...
@@ -94,30 +94,36 @@ public interface SendBackService {
ResponseEntity
sendBackIn
(
Integer
taskIdy
,
Integer
userId
,
Integer
type
);
/*
/*
*
查看业务详情,只显示表格和异常装备
*/
ResponseEntity
bussiness
(
Integer
task
);
/*
/*
*
查询清退单
*/
ResponseEntity
getList
(
SendBackOutFormVo
sendBackOutFormVo
);
/*
/*
*
造数据用
*/
ResponseEntity
save
(
SendBackBillDetail
sendBackBillDetailEntity
);
/*
/*
*
查看此次清退的某个型号的装备
*/
ResponseEntity
getDeviceByModel
(
List
<
Integer
>
deviceList
);
/**
* 保存入库单接口
*/
ResponseEntity
saveSendBackBillDetailEntity
(
SendBackBillDetail
sendBackBillDetailEntity
);
/**
* 入库申请接口
*/
ResponseEntity
sendBackInCheck
(
Integer
taskId
,
SendBackOutVo
sendBackOut
,
Integer
userId
);
/**
...
...
@@ -133,5 +139,4 @@ public interface SendBackService {
*/
ResponseEntity
exceptionSelect
(
Integer
task
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/SendBackServiceImpl.java
浏览文件 @
dd56a246
差异被折叠。
点击展开。
dev-user/src/main/java/com/tykj/dev/device/user/config/MyUserDetailsServiceImpl.java
浏览文件 @
dd56a246
...
...
@@ -40,6 +40,9 @@ public class MyUserDetailsServiceImpl implements UserDetailsService {
if
(
user
==
null
)
{
throw
new
UsernameNotFoundException
(
"用户名不正确"
);
}
else
{
if
(
user
.
getIsDel
()==
1
){
throw
new
UsernameNotFoundException
(
"账号已冻结,请联系管理人员"
);
}
List
<
UserRole
>
userRoles
=
userRoleService
.
findByUserId
(
user
.
getUserId
());
List
<
Integer
>
roleIds
=
new
ArrayList
<>();
if
(
userRoles
!=
null
)
{
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/controller/UnitsController.java
浏览文件 @
dd56a246
package
com
.
tykj
.
dev
.
device
.
user
.
subject
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.security.core.annotation.AuthenticationPrincipal
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
springfox.documentation.annotations.ApiIgnore
;
/**
* @author zjm
...
...
@@ -46,8 +49,8 @@ public class UnitsController {
@GetMapping
(
value
=
"/area"
)
@ApiOperation
(
value
=
"根据等级查询对应等级的单位集合"
,
notes
=
"单位集合"
)
public
ResponseEntity
deleteUser
(
)
{
return
ResponseEntity
.
ok
(
unitsService
.
findListAreaUnitsVo
());
public
ResponseEntity
selectOrganizationUnits
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
return
ResponseEntity
.
ok
(
unitsService
.
findListAreaUnitsVo
(
securityUser
));
}
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/MgrcertService.java
浏览文件 @
dd56a246
...
...
@@ -31,7 +31,6 @@ public interface MgrcertService {
/**
* 根据用户id查询用户对应对证书
*
* @param userId 用户id
* @return 证书信息
*/
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/UnitsService.java
浏览文件 @
dd56a246
...
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.user.subject.service;
import
com.tykj.dev.device.user.base.ret.AreaVo
;
import
com.tykj.dev.device.user.base.ret.UnitsTrainVo
;
import
com.tykj.dev.device.user.base.ret.UnitsVo
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
java.util.List
;
...
...
@@ -20,7 +21,7 @@ public interface UnitsService extends PublicService<Units> {
List
<
Units
>
findListById
(
Integer
leven
);
List
<
AreaVo
>
findListAreaUnitsVo
();
List
<
AreaVo
>
findListAreaUnitsVo
(
SecurityUser
securityUser
);
List
<
Units
>
findListlevenGreaterThanEqual
(
Integer
leven
);
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UnitsServiceImpl.java
浏览文件 @
dd56a246
...
...
@@ -6,6 +6,7 @@ import com.tykj.dev.device.user.base.ret.UnitsVo;
import
com.tykj.dev.device.user.subject.dao.AreaDao
;
import
com.tykj.dev.device.user.subject.dao.UnitsDao
;
import
com.tykj.dev.device.user.subject.entity.Area
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -29,7 +30,6 @@ public class UnitsServiceImpl implements UnitsService {
UnitsDao
unitsDao
;
@Autowired
AreaDao
areaDao
;
@Override
public
Units
findById
(
Integer
unitId
)
{
Optional
<
Units
>
unit
=
unitsDao
.
findById
(
unitId
);
...
...
@@ -42,23 +42,53 @@ public class UnitsServiceImpl implements UnitsService {
}
@Override
public
List
<
AreaVo
>
findListAreaUnitsVo
()
{
List
<
AreaVo
>
areaVos
=
new
ArrayList
<>();
List
<
Area
>
list
=
areaDao
.
findAll
();
int
i
=
0
;
for
(
Area
area
:
list
)
{
public
List
<
AreaVo
>
findListAreaUnitsVo
(
SecurityUser
securityUser
)
{
List
<
AreaVo
>
areaVos
=
new
ArrayList
<>();
//查询当前登入用户所属单位 的区域
Integer
areaId
=
securityUser
.
getCurrentUserInfo
().
getUnits
().
getAreaId
();
Area
belongsArea
=
areaDao
.
findById
(
areaId
).
get
();
if
(
belongsArea
.
getType
()==
1
){
int
i
=
10000
;
AreaVo
areaVo
=
belongsArea
.
toVo
();
areaVo
.
setFrontEnd
(
i
++);
List
<
UnitsVo
>
unitsList
=
unitsDao
.
findAllByAreaId
(
belongsArea
.
getId
()).
stream
().
map
(
Units:
:
toVo
).
collect
(
Collectors
.
toList
());
for
(
UnitsVo
unitsVo
:
unitsList
)
{
unitsVo
.
setFrontEnd
(
i
++);
}
areaVo
.
setUnits
(
unitsList
);
areaVos
.
add
(
areaVo
);
}
List
<
Area
>
areas
=
areaDao
.
findAllByFatherId
(
areaId
);
if
(
areas
.
size
()!=
0
)
{
areas
.
forEach
(
area
->
{
int
i
=
1
;
AreaVo
areaVo
=
area
.
toVo
();
areaVo
.
setFrontEnd
(
i
++);
List
<
UnitsVo
>
unitsList
=
unitsDao
.
findAllByAreaId
(
area
.
getId
()).
stream
().
map
(
Units:
:
toVo
).
collect
(
Collectors
.
toList
());
List
<
Area
>
countys
=
areaDao
.
findAllByFatherId
(
areaId
);
if
(
countys
!=
null
&&
countys
.
size
()
!=
0
)
{
List
<
UnitsVo
>
countyUnitsList
=
unitsDao
.
findAllByAreaId
(
area
.
getId
()).
stream
().
map
(
Units:
:
toVo
).
collect
(
Collectors
.
toList
());
unitsList
.
addAll
(
countyUnitsList
);
}
for
(
UnitsVo
unitsVo
:
unitsList
)
{
unitsVo
.
setFrontEnd
(
i
++);
}
areaVo
.
setUnits
(
unitsList
);
areaVos
.
add
(
areaVo
);
});
}
else
{
int
i
=
0
;
AreaVo
areaVo
=
belongsArea
.
toVo
();
areaVo
.
setFrontEnd
(
i
++);
List
<
UnitsVo
>
unitsList
=
unitsDao
.
findAllByAreaId
(
belongsArea
.
getId
()).
stream
().
map
(
Units:
:
toVo
).
collect
(
Collectors
.
toList
());
for
(
UnitsVo
unitsVo
:
unitsList
)
{
unitsVo
.
setFrontEnd
(
i
++);
}
areaVo
.
setUnits
(
unitsList
);
areaVos
.
add
(
areaVo
);
}
//查询区域下所有的区域
//根据区域查看
return
areaVos
;
}
...
...
@@ -71,16 +101,16 @@ public class UnitsServiceImpl implements UnitsService {
@Override
public
List
<
Integer
>
findListSubordinateId
(
Integer
unitsId
)
{
Integer
areaId
=
unitsDao
.
findById
(
unitsId
).
get
().
getAreaId
();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
areaId
).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
areaId
).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
return
unitsDao
.
findAllByAreaIdIn
(
areaIds
).
stream
().
map
(
Units:
:
getUnitId
).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
UnitsVo
>
findListVoSubordinateAreaId
(
Integer
areaId
)
{
List
<
UnitsVo
>
unitsVos
=
new
ArrayList
<>();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
areaId
).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
UnitsVo
>
unitsVos
=
new
ArrayList
<>();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
areaId
).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
areaIds
.
size
()
!=
0
)
{
unitsVos
=
unitsDao
.
findAllByAreaIdIn
(
areaIds
).
stream
().
map
(
Units:
:
toVo
).
collect
(
Collectors
.
toList
());
unitsVos
=
unitsDao
.
findAllByAreaIdIn
(
areaIds
).
stream
().
map
(
Units:
:
toVo
).
collect
(
Collectors
.
toList
());
}
return
unitsVos
;
}
...
...
@@ -93,13 +123,13 @@ public class UnitsServiceImpl implements UnitsService {
@Override
public
List
<
UnitsTrainVo
>
findListUnitsTrainVo
(
Integer
unitsId
)
{
Integer
areaId
=
unitsDao
.
findById
(
unitsId
).
get
().
getAreaId
();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
areaId
).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
areaId
).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
return
unitsDao
.
findAllByAreaIdIn
(
areaIds
).
stream
().
map
(
Units:
:
toUnitsTrainVo
).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
Integer
>
findSuperiorByunitsId
(
Integer
unitsId
)
{
Area
area
=
areaDao
.
findById
(
this
.
findById
(
unitsId
).
getAreaId
()).
get
();
Area
area
=
areaDao
.
findById
(
this
.
findById
(
unitsId
).
getAreaId
()).
get
();
return
unitsDao
.
findAllByAreaId
(
area
.
getFatherId
()).
stream
().
map
(
Units:
:
getUnitId
).
collect
(
Collectors
.
toList
());
}
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UserServiceImpl.java
浏览文件 @
dd56a246
...
...
@@ -39,6 +39,10 @@ public class UserServiceImpl implements UserService {
public
User
save
(
User
user
)
{
String
encode
=
bCryptPasswordEncoder
.
encode
(
"qwer1234"
);
user
.
setPassword
(
encode
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
return
userDao
.
save
(
user
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论