Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
135e1726
提交
135e1726
authored
2月 25, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【file 清退 user】 代码修改
上级
ad198e35
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
156 行增加
和
109 行删除
+156
-109
Destruction.java
...ain/java/com/tykj/dev/device/file/entity/Destruction.java
+4
-1
DocumentDevice.java
.../java/com/tykj/dev/device/file/entity/DocumentDevice.java
+0
-62
JavaToPdfHtmlFreeMarker.java
...om/tykj/dev/device/file/util/JavaToPdfHtmlFreeMarker.java
+89
-5
DeviceLibraryDao.java
.../tykj/dev/device/library/repository/DeviceLibraryDao.java
+1
-0
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+10
-12
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+1
-1
bill.html
dev-union/src/main/resources/bill.html
+5
-3
bill1.html
dev-union/src/main/resources/bill1.html
+6
-4
bill2.html
dev-union/src/main/resources/bill2.html
+23
-20
UnitsController.java
...j/dev/device/user/subject/controller/UnitsController.java
+8
-1
UnitsService.java
...om/tykj/dev/device/user/subject/service/UnitsService.java
+2
-0
UnitsServiceImpl.java
...ev/device/user/subject/service/impl/UnitsServiceImpl.java
+7
-0
没有找到文件。
dev-file/src/main/java/com/tykj/dev/device/file/entity/Destruction.java
浏览文件 @
135e1726
package
com
.
tykj
.
dev
.
device
.
file
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -25,7 +27,8 @@ public class Destruction {
private
String
disposeUnitName
;
@ApiModelProperty
(
name
=
"报废时间"
)
private
String
time
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
time
;
@ApiModelProperty
(
name
=
"单据号"
)
private
String
number
;
...
...
dev-file/src/main/java/com/tykj/dev/device/file/entity/DocumentDevice.java
浏览文件 @
135e1726
...
...
@@ -52,67 +52,5 @@ public class DocumentDevice {
public
Integer
getLen
(){
return
deviceSerialNumber
.
length
();
}
public
DocumentDevice
toDocumentDevice
(){
switch
(
category
){
case
"1"
:
category
=
"密码机"
;
break
;
case
"2"
:
category
=
"密码模块"
;
break
;
case
"3"
:
category
=
"密码芯片"
;
break
;
case
"4"
:
category
=
"说明书"
;
break
;
case
"5"
:
category
=
"U盘"
;
break
;
case
"6"
:
category
=
"光盘"
;
break
;
case
"7"
:
category
=
"密码软件"
;
break
;
case
"8"
:
category
=
"密码卡"
;
default
:
category
=
"-"
;
break
;
}
switch
(
securityClassification
){
case
"1"
:
securityClassification
=
"绝密"
;
break
;
case
"2"
:
securityClassification
=
"机密"
;
break
;
case
"3"
:
securityClassification
=
"秘密"
;
break
;
default
:
securityClassification
=
"无"
;
break
;
}
switch
(
applicationField
){
case
"1"
:
applicationField
=
"省一级"
;
break
;
case
"2"
:
applicationField
=
"市一级"
;
break
;
case
"3"
:
applicationField
=
"县一级"
;
break
;
default
:
applicationField
=
"无"
;
break
;
}
return
this
;
}
}
dev-file/src/main/java/com/tykj/dev/device/file/util/JavaToPdfHtmlFreeMarker.java
浏览文件 @
135e1726
...
...
@@ -15,6 +15,10 @@ import org.xhtmlrenderer.pdf.ITextFontResolver;
import
org.xhtmlrenderer.pdf.ITextRenderer
;
import
java.io.*
;
import
java.time.Instant
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.stream.Collectors
;
...
...
@@ -185,6 +189,7 @@ public class JavaToPdfHtmlFreeMarker {
private
static
Map
<
String
,
Object
>
toMap
(
Documents
documents
,
List
<
DocumentDevice
>
list
,
String
test
,
Integer
page
,
Integer
count
){
Map
<
String
,
Object
>
data
=
new
HashMap
();
data
.
put
(
"ul"
,
test
);
data
.
put
(
"number"
,
documents
.
getNumber
());
data
.
put
(
"title"
,
documents
.
getTitle
());
...
...
@@ -193,14 +198,16 @@ public class JavaToPdfHtmlFreeMarker {
data
.
put
(
"senderUnit"
,
documents
.
getSenderUnit
());
data
.
put
(
"page"
,
page
);
data
.
put
(
"count"
,
count
);
List
<
DocumentDevice
>
list1
=
new
ArrayList
<>();
AtomicInteger
i
=
new
AtomicInteger
(
1
);
list
.
forEach
(
documentDevice
->
{
documentDevice
.
setCode
(
i
.
get
());
i
.
set
(
i
.
get
()
+
1
);
list1
.
add
(
toDocDevice
(
documentDevice
));
}
);
data
.
put
(
"documentDevices"
,
list
.
stream
().
map
(
DocumentDevice:
:
toDocumentDevice
).
collect
(
Collectors
.
toList
())
);
data
.
put
(
"documentDevices"
,
list
1
);
return
data
;
}
...
...
@@ -210,14 +217,16 @@ public class JavaToPdfHtmlFreeMarker {
data
.
put
(
"title"
,
confirm
.
getTitle
());
data
.
put
(
"page"
,
page
);
data
.
put
(
"count"
,
count
);
List
<
DocumentDevice
>
list1
=
new
ArrayList
<>();
AtomicInteger
i
=
new
AtomicInteger
(
1
);
list
.
forEach
(
documentDevice
->
{
documentDevice
.
setCode
(
i
.
get
());
i
.
set
(
i
.
get
()
+
1
);
list1
.
add
(
toDocDevice
(
documentDevice
));
}
);
data
.
put
(
"documentDevices"
,
list
.
stream
().
map
(
DocumentDevice:
:
toDocumentDevice
).
collect
(
Collectors
.
toList
())
);
data
.
put
(
"documentDevices"
,
list
1
);
return
data
;
}
...
...
@@ -228,21 +237,96 @@ public class JavaToPdfHtmlFreeMarker {
data
.
put
(
"ul"
,
test
);
data
.
put
(
"unitName"
,
destruction
.
getDisposeUnitName
());
data
.
put
(
"number"
,
destruction
.
getNumber
());
data
.
put
(
"time"
,
destruction
.
getTime
());
Instant
instant
=
destruction
.
getTime
().
toInstant
();
String
local1
=
LocalDateTime
.
ofInstant
(
instant
,
ZoneId
.
systemDefault
()).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
data
.
put
(
"time"
,
local1
);
data
.
put
(
"page"
,
page
);
data
.
put
(
"count"
,
count
);
List
<
DocumentDevice
>
list1
=
new
ArrayList
<>();
AtomicInteger
i
=
new
AtomicInteger
(
1
);
list
.
forEach
(
documentDevice
->
{
documentDevice
.
setCode
(
i
.
get
());
i
.
set
(
i
.
get
()
+
1
);
list1
.
add
(
toDocDevice
(
documentDevice
));
}
);
data
.
put
(
"documentDevices"
,
list
.
stream
().
map
(
DocumentDevice:
:
toDocumentDevice
).
collect
(
Collectors
.
toList
())
);
data
.
put
(
"documentDevices"
,
list
1
);
return
data
;
}
private
static
DocumentDevice
toDocDevice
(
DocumentDevice
documentDevice
){
DocumentDevice
documentDevice1
=
new
DocumentDevice
();
documentDevice1
.
setCode
(
documentDevice
.
getCode
());
documentDevice1
.
setParts
(
documentDevice
.
getParts
());
documentDevice1
.
setProductionSerialNumber
(
documentDevice
.
getProductionSerialNumber
());
documentDevice1
.
setModel
(
documentDevice
.
getModel
());
documentDevice1
.
setCount
(
documentDevice
.
getCount
());
documentDevice1
.
setRemark
(
documentDevice
.
getRemark
());
documentDevice1
.
setDeviceSerialNumber
(
documentDevice
.
getDeviceSerialNumber
());
switch
(
documentDevice
.
getCategory
()){
case
"1"
:
documentDevice1
.
setCategory
(
"密码机"
);
break
;
case
"2"
:
documentDevice1
.
setCategory
(
"密码模块"
);
break
;
case
"3"
:
documentDevice1
.
setCategory
(
"密码芯片"
);
break
;
case
"4"
:
documentDevice1
.
setCategory
(
"说明书"
);
break
;
case
"5"
:
documentDevice1
.
setCategory
(
"U盘"
);
break
;
case
"6"
:
documentDevice1
.
setCategory
(
"光盘"
);
break
;
case
"7"
:
documentDevice1
.
setCategory
(
"密码软件"
);
break
;
case
"8"
:
documentDevice1
.
setCategory
(
"密码卡"
);
default
:
documentDevice1
.
setCategory
(
"-"
);
break
;
}
switch
(
documentDevice
.
getSecurityClassification
()){
case
"1"
:
documentDevice1
.
setSecurityClassification
(
"绝密"
);
break
;
case
"2"
:
documentDevice1
.
setSecurityClassification
(
"机密"
);
break
;
case
"3"
:
documentDevice1
.
setSecurityClassification
(
"秘密"
);
break
;
default
:
documentDevice1
.
setSecurityClassification
(
"无"
);
break
;
}
switch
(
documentDevice
.
getApplicationField
()){
case
"1"
:
documentDevice1
.
setApplicationField
(
"省一级"
);
break
;
case
"2"
:
documentDevice1
.
setApplicationField
(
"市一级"
);
break
;
case
"3"
:
documentDevice1
.
setApplicationField
(
"县一级"
);
break
;
default
:
documentDevice1
.
setApplicationField
(
"无"
);
break
;
}
return
documentDevice1
;
}
/**
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryDao.java
浏览文件 @
135e1726
...
...
@@ -63,6 +63,7 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
Integer
countAllByModelAndOwnUnitInAndLifeStatusNotIn
(
String
model
,
List
<
String
>
unitNames
,
List
<
Integer
>
lifeStatus
);
Integer
countAllByModelAndOwnUnitInAndLifeStatusIn
(
String
model
,
List
<
String
>
unitNames
,
List
<
Integer
>
lifeStatus
);
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnit
(
List
<
Integer
>
packingIds
,
String
unitNames
);
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
135e1726
...
...
@@ -100,10 +100,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
List
<
Integer
>
lifeStatus
=
new
ArrayList
<>();
lifeStatus
.
add
(
DeviceLifeStatus
.
RETIRE
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
LOSS
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
DESTROYED
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
SCRAP_I
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPEL
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPAIRING
.
id
);
List
<
String
>
directlUnderUnitNames
=
new
ArrayList
<>();
AtomicBoolean
directlUnderUnit
=
new
AtomicBoolean
(
false
);
AtomicBoolean
correspondingLevel
=
new
AtomicBoolean
(
false
);
...
...
@@ -146,7 +145,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
deviceRepel
.
getRepelStatus
()==
1
){
modelCounts1
.
clear
();
deviceRepel
.
getModels
().
forEach
(
i
->{
modelCounts1
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatus
Not
In
(
i
,
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
lifeStatus
)));
modelCounts1
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatusIn
(
i
,
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
lifeStatus
)));
});
}
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
JacksonUtil
.
toJSon
(
modelCounts1
),
""
));
...
...
@@ -165,7 +164,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
deviceRepel
.
getRepelStatus
()==
1
)
{
modelCounts
.
clear
();
deviceRepel
.
getModels
().
forEach
(
i
->
{
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatus
Not
In
(
i
,
directlUnderUnitNames
,
lifeStatus
)));
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatusIn
(
i
,
directlUnderUnitNames
,
lifeStatus
)));
});
}
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
());
...
...
@@ -179,7 +178,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
deviceRepel
.
getRepelStatus
()==
1
)
{
modelCounts
.
clear
();
deviceRepel
.
getModels
().
forEach
(
i
->
{
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatus
Not
In
(
i
,
strings
,
lifeStatus
)));
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatusIn
(
i
,
strings
,
lifeStatus
)));
});
}
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
());
...
...
@@ -198,10 +197,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
// 生成的任务放入统计表中 关联信息
// 修改当前任务的状态 市清退任务待区县提交
List
<
Integer
>
lifeStatus
=
new
ArrayList
<>();
lifeStatus
.
add
(
DeviceLifeStatus
.
RETIRE
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
LOSS
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
DESTROYED
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
SCRAP_I
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPEL
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPAIRING
.
id
);
User
user
=
userService
.
findByUser
(
userId
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
...
...
@@ -234,7 +232,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
deviceRepel
.
getRepelStatus
()==
1
)
{
modelCounts1
.
clear
();
deviceRepel
.
getModels
().
forEach
(
i
->
{
modelCounts1
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatus
Not
In
(
i
,
unitNames
,
lifeStatus
)));
modelCounts1
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatusIn
(
i
,
unitNames
,
lifeStatus
)));
});
}
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
135e1726
...
...
@@ -73,7 +73,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
fielding
,
units
.
getName
()).
forEach
(
deviceLibrary
->
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
())){
if
(
deviceLibrary
.
getLifeStatus
()==
2
)
{
if
(
deviceLibrary
.
getLifeStatus
()==
2
||
deviceLibrary
.
getLifeStatus
()==
15
||
deviceLibrary
.
getLifeStatus
()==
4
)
{
deviceLibraries
.
add
(
deviceLibrary
);
}
}
else
{
...
...
dev-union/src/main/resources/bill.html
浏览文件 @
135e1726
...
...
@@ -240,14 +240,16 @@
padding
:
5px
;
border-style
:
solid
;
border-color
:
#a9c6c9
;
background-color
:
#dedede
;
}
table
.altrowstable
td
{
border-width
:
0px
;
padding
:
5px
;
border-style
:
solid
;
border-color
:
#a9c6c9
;
/*border-style: solid;*/
/*border-color: #a9c6c9;*/
word-break
:
break-all
;
word-wrap
:
break-word
;
border-bottom
:
1px
solid
#bebebe
;
}
.oddrowcolor
{
background-color
:
#fff
;
...
...
@@ -315,7 +317,7 @@
${dev.count}
</
#
if>
</td>
<td
style=
"text-align: left;"
>
${dev.deviceSerialNumber}
</td>
<td>
${dev.deviceSerialNumber}
</td>
</tr>
</
#
list>
</table>
...
...
dev-union/src/main/resources/bill1.html
浏览文件 @
135e1726
...
...
@@ -152,7 +152,7 @@
}
.returnTablePrint
.line3
{
width
:
100%
;
height
:
5
0px
;
height
:
8
0px
;
/* box-sizing: border-box; */
/*height:150px;*/
/*display: flex;*/
...
...
@@ -165,7 +165,7 @@
box-sizing
:
border-box
;
/*padding-left: 20px;*/
position
:
relative
;
line-height
:
5
0px
;
line-height
:
8
0px
;
}
.returnTablePrint
.line3
.left
{
border-right
:
1px
solid
#7f7f7f
;
...
...
@@ -248,12 +248,14 @@
padding
:
5px
;
border-style
:
solid
;
border-color
:
#a9c6c9
;
background-color
:
#dedede
;
}
table
.altrowstable
td
{
border-width
:
0px
;
padding
:
5px
;
border-style
:
solid
;
border-color
:
#a9c6c9
;
/*border-style: solid;*/
/*border-color: #a9c6c9;*/
border
:
1px
solid
#bebebe
;
word-break
:
break-all
;
word-wrap
:
break-word
;
}
...
...
dev-union/src/main/resources/bill2.html
浏览文件 @
135e1726
...
...
@@ -100,22 +100,23 @@
border-color
:
#a9c6c9
;
border-collapse
:
collapse
;
text-align
:
center
;
/*table-layout: fixed;*/
/*word-break:break-all;*/
table-layout
:
fixed
;
word-break
:
break-all
;
}
table
.altrowstable
th
{
border-width
:
0px
;
padding
:
8px
;
border-style
:
solid
;
border-color
:
#a9c6c9
;
background-color
:
#dedede
;
}
table
.altrowstable
td
{
border-width
:
0px
;
padding
:
8px
;
border-style
:
solid
;
border-color
:
#a9c6c9
;
/*word-break:break-all;*/
/*word-wrap : break-word;*/
word-break
:
break-all
;
word-wrap
:
break-word
;
}
.oddrowcolor
{
background-color
:
#fff
;
...
...
@@ -152,23 +153,25 @@
</span>
</div>
</p>
<table
class=
"altrowstable"
id=
"alternatecolor"
>
<tr>
<th>
序号
</th><th
style=
"width: 150px;"
>
型号
</th><th>
形态
</th><th>
密级
</th><th>
应用领域
</th><th
style=
"width: 150px;"
>
装备序列号
</th>
</tr>
<
#
list
documentDevices
as
dev
>
<tr>
<td>
<
#
if
dev
.
code
!=
0
>
${dev.code}
</
#
if>
</td>
<td>
${dev.model}
</td><td>
${dev.category}
</td><td>
${dev.securityClassification}
</td><td>
${dev.applicationField}
</td><td>
${dev.deviceSerialNumber}
</td>
</tr>
</
#
list>
</table>
<div
style=
"height: 825px;"
>
<table
class=
"altrowstable"
id=
"alternatecolor"
>
<tr>
<th>
序号
</th><th
style=
"width: 150px;"
>
型号
</th><th>
形态
</th><th>
密级
</th><th>
应用领域
</th><th
style=
"width: 150px;"
>
装备序列号
</th>
</tr>
<
#
list
documentDevices
as
dev
>
<tr>
<td>
<
#
if
dev
.
code
!=
0
>
${dev.code}
</
#
if>
</td>
<td>
${dev.model}
</td><td>
${dev.category}
</td><td>
${dev.securityClassification}
</td><td>
${dev.applicationField}
</td><td>
${dev.deviceSerialNumber}
</td>
</tr>
</
#
list>
</table>
</div>
</div>
<p
class=
"person"
style=
"margin-top:
5
0px"
>
<p
class=
"person"
style=
"margin-top:
2
0px"
>
<span
style=
"width: 200px;text-align: left"
>
经办人:
</span>
<span
style=
"width: 200px;text-align: left"
>
审核人:
</span>
</p>
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/controller/UnitsController.java
浏览文件 @
135e1726
...
...
@@ -50,7 +50,6 @@ public class UnitsController {
@GetMapping
(
value
=
"/area"
)
@ApiOperation
(
value
=
"查询装备库、专管员左侧的区域单位列表"
,
notes
=
"单位组织结构集合"
)
public
ResponseEntity
selectOrganizationUnits
(
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
log
.
info
(
"数据星系:{}"
,
securityUser
);
return
ResponseEntity
.
ok
(
unitsService
.
findLeftNavigation
(
securityUser
));
}
...
...
@@ -73,6 +72,14 @@ public class UnitsController {
return
ResponseEntity
.
ok
(
unitsService
.
findBySubordinate
(
unitsId
));
}
@GetMapping
(
value
=
"/find/units/subordinate/{unitsId}"
)
@ApiOperation
(
value
=
"根据当前用户的单位ID查询下级单位对象(不包括type为2的)"
,
notes
=
"单位"
)
public
ResponseEntity
findLastSubordinate
(
@PathVariable
Integer
unitsId
)
{
return
ResponseEntity
.
ok
(
unitsService
.
findSubordinateList
(
unitsId
));
}
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
value
=
"添加单位接口"
,
notes
=
"单位"
)
public
ResponseEntity
saveUnits
(
@RequestBody
Units
units
){
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/UnitsService.java
浏览文件 @
135e1726
...
...
@@ -133,4 +133,6 @@ public interface UnitsService extends PublicService<Units> {
List
<
Units
>
findSuperiorUnitsList
();
List
<
Units
>
findDirectlyUnder
();
List
<
Units
>
findSubordinateList
(
Integer
unitsId
);
}
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UnitsServiceImpl.java
浏览文件 @
135e1726
...
...
@@ -311,6 +311,13 @@ public class UnitsServiceImpl implements UnitsService {
return
unitsList
;
}
@Override
public
List
<
Units
>
findSubordinateList
(
Integer
unitsId
)
{
Units
units
=
unitsDao
.
findById
(
unitsId
).
get
();
List
<
Integer
>
areaIds
=
areaDao
.
findAllByFatherId
(
units
.
getAreaId
()).
stream
().
map
(
Area:
:
getId
).
collect
(
Collectors
.
toList
());
return
unitsDao
.
findAllByAreaIdIn
(
areaIds
);
}
@Override
public
Units
save
(
Units
units
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论