Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
08ec3e59
提交
08ec3e59
authored
2月 02, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
f2ac21fb
隐藏空白字符变更
内嵌
并排
正在显示
27 个修改的文件
包含
156 行增加
和
65 行删除
+156
-65
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+10
-6
AllotBackReceiveVo.java
.../tykj/dev/device/allot/subject/vo/AllotBackReceiveVo.java
+2
-2
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+6
-2
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+2
-2
DeviceDestroyController.java
...ev/device/destroy/controller/DeviceDestroyController.java
+2
-0
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+3
-2
DeviceLibraryService.java
...tykj/dev/device/library/service/DeviceLibraryService.java
+15
-0
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+48
-2
MatchingDeviceController.java
.../device/matching/controller/MatchingDeviceController.java
+2
-1
DeviceSeqUtil.java
.../src/main/java/com/tykj/dev/misc/utils/DeviceSeqUtil.java
+0
-4
TaskDisposeUtil.java
...rc/main/java/com/tykj/dev/misc/utils/TaskDisposeUtil.java
+8
-0
PackingController.java
...tykj/dev/device/packing/controller/PackingController.java
+1
-1
PackingLibraryServiceImpl.java
...evice/packing/service/impl/PackingLibraryServiceImpl.java
+1
-1
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+17
-12
RepairBackBillSaveVo.java
...kj/dev/device/repair/subject/vo/RepairBackBillSaveVo.java
+2
-2
DeviceRetiredController.java
...ev/device/retired/controller/DeviceRetiredController.java
+2
-0
RfidController.java
...ain/java/com/tykj/dev/rfid/controller/RfidController.java
+2
-0
DeviceScrapController.java
...kj/dev/device/scrap/controller/DeviceScrapController.java
+2
-0
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+3
-0
BigScreenServiceImpl.java
...kj/dev/statistical/service/impl/BigScreenServiceImpl.java
+1
-1
StatisticalServiceImpl.java
.../dev/statistical/service/impl/StatisticalServiceImpl.java
+5
-5
TaskController.java
...a/com/tykj/dev/device/task/controller/TaskController.java
+4
-7
TaskLogServiceImpl.java
...tykj/dev/device/task/service/impl/TaskLogServiceImpl.java
+3
-2
TaskUtils.java
...c/main/java/com/tykj/dev/device/task/utils/TaskUtils.java
+9
-8
LogAspect.java
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
+1
-1
MessageServiceImpl.java
...dev/device/user/read/service/impl/MessageServiceImpl.java
+2
-1
UnitsServiceImpl.java
...ev/device/user/subject/service/impl/UnitsServiceImpl.java
+3
-3
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
08ec3e59
...
@@ -28,10 +28,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
...
@@ -28,10 +28,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.MapperUtils
;
import
com.tykj.dev.misc.utils.*
;
import
com.tykj.dev.misc.utils.Snowflake
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TimestampUtil
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -137,6 +134,7 @@ public class AllotBillController {
...
@@ -137,6 +134,7 @@ public class AllotBillController {
@PostMapping
(
value
=
"/addAllotBill"
)
@PostMapping
(
value
=
"/addAllotBill"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
addAllotBill
(
@RequestBody
@Validated
AllotBillSaveVo
allotBillSaveVo
)
{
public
ResponseEntity
addAllotBill
(
@RequestBody
@Validated
AllotBillSaveVo
allotBillSaveVo
)
{
deviceLibraryService
.
isInStockOrWaitRetired
(
StringSplitUtil
.
split
(
allotBillSaveVo
.
getAllotCheckDetail
()));
//1.添加配发单
//1.添加配发单
AllotBill
a
=
allotBillSaveVo
.
toDo
();
AllotBill
a
=
allotBillSaveVo
.
toDo
();
a
.
setSendUseraId
(
userUtils
.
getCurrentUserId
());
a
.
setSendUseraId
(
userUtils
.
getCurrentUserId
());
...
@@ -298,6 +296,7 @@ public class AllotBillController {
...
@@ -298,6 +296,7 @@ public class AllotBillController {
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
//获取当前任务
//获取当前任务
TaskBto
taskBto
=
taskService
.
get
(
allotReceiveVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
allotReceiveVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
ALLOTING
);
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"配发单"
,
allotReceiveVo
.
getBillFileName
(),
allotReceiveVo
.
getBillFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"配发单"
,
allotReceiveVo
.
getBillFileName
(),
allotReceiveVo
.
getBillFileUrl
()));
...
@@ -372,6 +371,7 @@ public class AllotBillController {
...
@@ -372,6 +371,7 @@ public class AllotBillController {
public
ResponseEntity
receiveConfirm
(
@RequestBody
@Validated
AllotReceiveConfirmVo
allotReceiveConfirmVo
)
{
public
ResponseEntity
receiveConfirm
(
@RequestBody
@Validated
AllotReceiveConfirmVo
allotReceiveConfirmVo
)
{
//获取任务和账单
//获取任务和账单
TaskBto
taskBto
=
taskService
.
get
(
allotReceiveConfirmVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
allotReceiveConfirmVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
ALLOTING
);
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
String
deviceIdDetail
=
allotBillEntity
.
getAllotCheckDetail
();
String
deviceIdDetail
=
allotBillEntity
.
getAllotCheckDetail
();
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
...
@@ -403,7 +403,7 @@ public class AllotBillController {
...
@@ -403,7 +403,7 @@ public class AllotBillController {
if
(
allotReceiveConfirmVo
.
getStatus
()
==
1
)
{
if
(
allotReceiveConfirmVo
.
getStatus
()
==
1
)
{
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
//业务封存
//业务封存
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
)
);
taskService
.
moveToEnd
(
taskBto
);
//更新账单状态
//更新账单状态
AllotBill
allotBillEntity2
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
AllotBill
allotBillEntity2
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
allotBillEntity2
.
setAllotStatus
(
4
);
allotBillEntity2
.
setAllotStatus
(
4
);
...
@@ -425,7 +425,7 @@ public class AllotBillController {
...
@@ -425,7 +425,7 @@ public class AllotBillController {
ids
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBillEntity
.
getSendUnit
())).
stream
()
ids
.
addAll
(
userDao
.
findAllByUnitsId
(
userPublicService
.
findUnitIdByName
(
allotBillEntity
.
getSendUnit
())).
stream
()
.
map
(
User:
:
getUserId
)
.
map
(
User:
:
getUserId
)
.
collect
(
Collectors
.
toList
()));
.
collect
(
Collectors
.
toList
()));
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
allotBillEntity
.
getReceiveUnit
()+
"拒绝接收配发装备"
,
ids
);
MessageBto
messageBto
=
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"拒绝接收配发装备"
,
ids
);
messageService
.
add
(
messageBto
);
messageService
.
add
(
messageBto
);
//生成配发退回单
//生成配发退回单
AllotBackBill
allotBackBill
=
new
AllotBackBill
();
AllotBackBill
allotBackBill
=
new
AllotBackBill
();
...
@@ -532,6 +532,10 @@ public class AllotBillController {
...
@@ -532,6 +532,10 @@ public class AllotBillController {
public
ResponseEntity
uploadFile
(
@RequestBody
@Validated
com
.
tykj
.
dev
.
device
.
allot
.
subject
.
vo
.
FileVo
fileVo
){
public
ResponseEntity
uploadFile
(
@RequestBody
@Validated
com
.
tykj
.
dev
.
device
.
allot
.
subject
.
vo
.
FileVo
fileVo
){
//获取task
//获取task
TaskBto
taskBto
=
taskService
.
get
(
fileVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
fileVo
.
getTaskId
());
List
<
StatusEnum
>
statusEnums
=
new
ArrayList
<>();
statusEnums
.
add
(
StatusEnum
.
WAIT_UPLOAD_CROSS_FILE
);
statusEnums
.
add
(
StatusEnum
.
WAIT_UPLOAD_ALLOT_FILE
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
statusEnums
);
//不上传单据
//不上传单据
if
(
fileVo
.
getStatus
()==
0
){
if
(
fileVo
.
getStatus
()==
0
){
taskService
.
moveToArchive
(
taskBto
);
taskService
.
moveToArchive
(
taskBto
);
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/subject/vo/AllotBackReceiveVo.java
浏览文件 @
08ec3e59
...
@@ -32,11 +32,11 @@ public class AllotBackReceiveVo {
...
@@ -32,11 +32,11 @@ public class AllotBackReceiveVo {
@ApiModelProperty
(
value
=
"配发单附件URL"
)
@ApiModelProperty
(
value
=
"配发单附件URL"
)
private
String
billFileUrl
;
private
String
billFileUrl
;
@NotNull
(
message
=
"receiveFileName不能为空"
)
//
@NotNull(message = "receiveFileName不能为空")
@ApiModelProperty
(
value
=
"入库附件名字"
)
@ApiModelProperty
(
value
=
"入库附件名字"
)
private
String
receiveFileName
;
private
String
receiveFileName
;
@NotNull
(
message
=
"receiveFileUrl不能为空"
)
//
@NotNull(message = "receiveFileUrl不能为空")
@ApiModelProperty
(
value
=
"入库附件URL"
)
@ApiModelProperty
(
value
=
"入库附件URL"
)
private
String
receiveFileUrl
;
private
String
receiveFileUrl
;
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
08ec3e59
...
@@ -36,6 +36,7 @@ import com.tykj.dev.misc.exception.ApiException;
...
@@ -36,6 +36,7 @@ import com.tykj.dev.misc.exception.ApiException;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.Snowflake
;
import
com.tykj.dev.misc.utils.Snowflake
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -157,6 +158,7 @@ public class DeviceApplyController {
...
@@ -157,6 +158,7 @@ public class DeviceApplyController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
addDeviceApplyBillReplay
(
@RequestBody
@Validated
DeviceApplyConfirmVo
deviceApplyConfirmVo
)
{
public
ResponseEntity
addDeviceApplyBillReplay
(
@RequestBody
@Validated
DeviceApplyConfirmVo
deviceApplyConfirmVo
)
{
TaskBto
taskBto
=
taskService
.
get
(
deviceApplyConfirmVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
deviceApplyConfirmVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
DEVICE_APPLY_CONFIRM
);
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
taskService
.
addInvolveUser
(
taskBto
,
userId
);
taskService
.
addInvolveUser
(
taskBto
,
userId
);
DeviceApplyBill
applyBillEntity
=
deviceApplyBillService
.
getOne
(
taskBto
.
getBillId
());
DeviceApplyBill
applyBillEntity
=
deviceApplyBillService
.
getOne
(
taskBto
.
getBillId
());
...
@@ -207,8 +209,10 @@ public class DeviceApplyController {
...
@@ -207,8 +209,10 @@ public class DeviceApplyController {
@PostMapping
(
"/allot"
)
@PostMapping
(
"/allot"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
allot
(
@RequestBody
@Validated
DeviceApplyAllotSaveVo
deviceApplyAllotSaveVo
)
{
public
ResponseEntity
allot
(
@RequestBody
@Validated
DeviceApplyAllotSaveVo
deviceApplyAllotSaveVo
)
{
deviceLibraryService
.
isInStockOrWaitRetired
(
StringSplitUtil
.
split
(
deviceApplyAllotSaveVo
.
getAllotCheckDetail
()));
//获取配发的业务
//获取配发的业务
TaskBto
taskBto
=
taskService
.
get
(
deviceApplyAllotSaveVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
deviceApplyAllotSaveVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_ALLOT
);
//获取申请的业务
//获取申请的业务
TaskBto
applyTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
TaskBto
applyTask
=
taskService
.
get
(
taskBto
.
getParentTaskId
());
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
...
@@ -324,7 +328,7 @@ public class DeviceApplyController {
...
@@ -324,7 +328,7 @@ public class DeviceApplyController {
//获取可配发装备,按列装Id筛选,列装Id排序
//获取可配发装备,按列装Id筛选,列装Id排序
applyDetailVo
.
setDeviceLibraries
(
deviceLibraryService
.
getAllotList
(
new
DeviceLibrarySelectVo
()).
stream
()
applyDetailVo
.
setDeviceLibraries
(
deviceLibraryService
.
getAllotList
(
new
DeviceLibrarySelectVo
()).
stream
()
.
filter
(
deviceLibraryEntity
->
packingIdList
.
contains
(
deviceLibraryEntity
.
getPackingId
()))
.
filter
(
deviceLibraryEntity
->
packingIdList
.
contains
(
deviceLibraryEntity
.
getPackingId
()))
.
sorted
(
Comparator
.
comparing
(
DeviceLibrary:
:
getPackingId
))
.
sorted
(
Comparator
.
comparing
(
DeviceLibrary:
:
getPackingId
,
Comparator
.
nullsLast
(
Integer:
:
compareTo
)
))
.
collect
(
Collectors
.
toList
()));
.
collect
(
Collectors
.
toList
()));
//添加业务日志
//添加业务日志
List
<
TaskLogUserVo
>
applyLogUserVos
=
taskLogService
.
getByTaskId
(
taskBto
.
getId
());
List
<
TaskLogUserVo
>
applyLogUserVos
=
taskLogService
.
getByTaskId
(
taskBto
.
getId
());
...
@@ -336,7 +340,7 @@ public class DeviceApplyController {
...
@@ -336,7 +340,7 @@ public class DeviceApplyController {
}
}
//按日志时间排序
//按日志时间排序
List
<
TaskLogUserVo
>
allLogUserVos
=
applyLogUserVos
.
stream
()
List
<
TaskLogUserVo
>
allLogUserVos
=
applyLogUserVos
.
stream
()
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
))
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
applyDetailVo
.
setTaskLogUserVos
(
allLogUserVos
);
applyDetailVo
.
setTaskLogUserVos
(
allLogUserVos
);
return
ResponseEntity
.
ok
(
applyDetailVo
);
return
ResponseEntity
.
ok
(
applyDetailVo
);
...
...
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
08ec3e59
...
@@ -152,7 +152,7 @@ public enum LogType {
...
@@ -152,7 +152,7 @@ public enum LogType {
ALLOT_BACK_1
(
57
,
ALLOT_BACK
.
id
,
ORIGIN_STATUS
.
id
,
ALLOT_BACKING
.
id
,
"发起配发装备退回"
),
ALLOT_BACK_1
(
57
,
ALLOT_BACK
.
id
,
ORIGIN_STATUS
.
id
,
ALLOT_BACKING
.
id
,
"发起配发装备退回"
),
ALLOT_BACK_2
(
58
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
ALLOT_BACK_CONFIRM
.
id
,
"配发退回装备接收成功"
),
ALLOT_BACK_2
(
58
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
END
.
id
,
"配发退回装备接收成功"
),
ALLOT_BACK_3
(
59
,
ALLOT_BACK
.
id
,
ALLOT_BACK_CONFIRM
.
id
,
END
.
id
,
"配发退回装备接收审核成功"
),
ALLOT_BACK_3
(
59
,
ALLOT_BACK
.
id
,
ALLOT_BACK_CONFIRM
.
id
,
END
.
id
,
"配发退回装备接收审核成功"
),
...
@@ -212,7 +212,7 @@ public enum LogType {
...
@@ -212,7 +212,7 @@ public enum LogType {
ALLOT_10
(
84
,
ALLOT
.
id
,
WAIT_ALLOT
.
id
,
ALLOTING
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_10
(
84
,
ALLOT
.
id
,
WAIT_ALLOT
.
id
,
ALLOTING
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_11
(
85
,
ALLOT
.
id
,
ALLOTING
.
id
,
ARCHIVE
.
id
,
"拒绝接收配发装备"
),
ALLOT_11
(
85
,
ALLOT
.
id
,
ALLOTING
.
id
,
ARCHIVE
.
id
,
"拒绝接收配发装备"
),
ALLOT_BACK_5
(
86
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
END
.
id
,
"接收配发退回装备"
),
ALLOT_BACK_5
(
86
,
ALLOT_BACK
.
id
,
ALLOT_BACKING
.
id
,
END
.
id
,
"接收配发退回装备"
),
REPAIR_SEND_10
(
87
,
REPAIR
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"向(%receiveUnit)发起装备维修"
),
REPAIR_SEND_10
(
87
,
REPAIR
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_UPLOAD_FILE
.
id
,
"向(%receiveUnit)发起装备维修"
),
REPAIR_BACK_7
(
88
,
REPAIR_BACK
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"维修退回装备接收并发起入库"
),
REPAIR_BACK_7
(
88
,
REPAIR_BACK
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"维修退回装备接收并发起入库"
),
STORAGE_4
(
89
,
STORAGE
.
id
,
WAIT_STORAGE
.
id
,
ARCHIVE
.
id
,
"删除入库草稿"
),
STORAGE_4
(
89
,
STORAGE
.
id
,
WAIT_STORAGE
.
id
,
ARCHIVE
.
id
,
"删除入库草稿"
),
SCRAP_1
(
90
,
SCRAP
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_UPLOAD_SCRAP_FILE
.
id
,
"发起装备报废"
),
SCRAP_1
(
90
,
SCRAP
.
id
,
ORIGIN_STATUS
.
id
,
WAIT_UPLOAD_SCRAP_FILE
.
id
,
"发起装备报废"
),
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/controller/DeviceDestroyController.java
浏览文件 @
08ec3e59
...
@@ -23,6 +23,7 @@ import com.tykj.dev.misc.base.StatusEnum;
...
@@ -23,6 +23,7 @@ import com.tykj.dev.misc.base.StatusEnum;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -207,6 +208,7 @@ public class DeviceDestroyController {
...
@@ -207,6 +208,7 @@ public class DeviceDestroyController {
public
ResponseEntity
uploadDestroyFile
(
@RequestBody
@Validated
UploadDestroyFileVo
uploadDestroyFileVo
)
{
public
ResponseEntity
uploadDestroyFile
(
@RequestBody
@Validated
UploadDestroyFileVo
uploadDestroyFileVo
)
{
//获取当前task
//获取当前task
TaskBto
taskBto
=
taskService
.
get
(
uploadDestroyFileVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
uploadDestroyFileVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_UPLOAD_BILL_FILE
);
//获取销毁单
//获取销毁单
DeviceDestroyBill
deviceDestroyBill
=
deviceDestroyBillService
.
getOne
(
taskBto
.
getBillId
());
DeviceDestroyBill
deviceDestroyBill
=
deviceDestroyBillService
.
getOne
(
taskBto
.
getBillId
());
//更新销毁单
//更新销毁单
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
08ec3e59
...
@@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.Min
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -165,7 +166,7 @@ public class DeviceLibraryController {
...
@@ -165,7 +166,7 @@ public class DeviceLibraryController {
List
<
DeviceLogUserVo
>
deviceLogEntities
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
0
).
stream
()
List
<
DeviceLogUserVo
>
deviceLogEntities
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
0
).
stream
()
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLogDto:
:
toVo
)
.
map
(
DeviceLogDto:
:
toVo
)
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
//判断有没有维修新装备换新的情况
//判断有没有维修新装备换新的情况
List
<
DeviceLogUserVo
>
deviceLogUserVos
=
new
ArrayList
<>();
List
<
DeviceLogUserVo
>
deviceLogUserVos
=
new
ArrayList
<>();
...
@@ -175,7 +176,7 @@ public class DeviceLibraryController {
...
@@ -175,7 +176,7 @@ public class DeviceLibraryController {
deviceLogUserVos
.
addAll
(
deviceLogDao
.
getAllByDeviceIdAndType
(
integerList
.
get
(
i
),
0
).
stream
()
deviceLogUserVos
.
addAll
(
deviceLogDao
.
getAllByDeviceIdAndType
(
integerList
.
get
(
i
),
0
).
stream
()
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLogDto:
:
toVo
)
.
map
(
DeviceLogDto:
:
toVo
)
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
()));
.
collect
(
Collectors
.
toList
()));
}
}
}
}
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/DeviceLibraryService.java
浏览文件 @
08ec3e59
...
@@ -118,4 +118,19 @@ public interface DeviceLibraryService {
...
@@ -118,4 +118,19 @@ public interface DeviceLibraryService {
* 查询可清退装备
* 查询可清退装备
*/
*/
List
<
DeviceLibrary
>
getSendBackDevice
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
);
List
<
DeviceLibrary
>
getSendBackDevice
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
);
/**
* 判断装备状态是否在库
*/
void
isInStock
(
List
<
Integer
>
ids
);
/**
* 判断装备状态是否待退役
*/
void
isWaitRetired
(
List
<
Integer
>
ids
);
/**
* 判断装备状态是否在库或待退役
*/
void
isInStockOrWaitRetired
(
List
<
Integer
>
ids
);
}
}
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
08ec3e59
...
@@ -22,6 +22,7 @@ import org.springframework.data.domain.Page;
...
@@ -22,6 +22,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -303,7 +304,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -303,7 +304,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
// deviceLibraryEntity -> Optional.ofNullable(nodeCollect.get(deviceLibraryEntity.getPartParentId())),
// deviceLibraryEntity -> Optional.ofNullable(nodeCollect.get(deviceLibraryEntity.getPartParentId())),
// DeviceLibrary::addChildNode
// DeviceLibrary::addChildNode
// );
// );
return
deviceLibraryEntities
.
stream
().
sorted
(
Comparator
.
comparing
(
DeviceLibrary:
:
getLifeStatus
)).
collect
(
Collectors
.
toList
());
return
deviceLibraryEntities
.
stream
().
sorted
(
Comparator
.
comparing
(
DeviceLibrary:
:
getLifeStatus
,
Comparator
.
nullsLast
(
Integer:
:
compareTo
)
)).
collect
(
Collectors
.
toList
());
}
}
public
List
<
DeviceLibrary
>
getList2
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
List
<
DeviceLibrary
>
getList2
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
...
@@ -382,6 +383,51 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -382,6 +383,51 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
return
deviceLibraryDao
.
findAll
(
getSelectSpecification3
(
deviceLibrarySelectVo
));
return
deviceLibraryDao
.
findAll
(
getSelectSpecification3
(
deviceLibrarySelectVo
));
}
}
/**
* 判断装备状态是否在库
*
* @param ids 装备id集合
*/
@Override
public
void
isInStock
(
List
<
Integer
>
ids
)
{
ids
.
forEach
(
integer
->
{
DeviceLibrary
deviceLibrary
=
getOne
(
integer
);
if
(
deviceLibrary
.
getLifeStatus
()!=
2
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"序列号"
+
deviceLibrary
.
getSeqNumber
()+
"的装备已被其他专管员操作"
));
}
});
}
/**
* 判断装备状态是否待退役
*
* @param ids
*/
@Override
public
void
isWaitRetired
(
List
<
Integer
>
ids
)
{
ids
.
forEach
(
integer
->
{
DeviceLibrary
deviceLibrary
=
getOne
(
integer
);
if
(
deviceLibrary
.
getLifeStatus
()!=
15
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"序列号"
+
deviceLibrary
.
getSeqNumber
()+
"的装备已被其他专管员操作"
));
}
});
}
/**
* 判断装备状态是否在库或待退役
*
* @param ids
*/
@Override
public
void
isInStockOrWaitRetired
(
List
<
Integer
>
ids
)
{
ids
.
forEach
(
integer
->
{
DeviceLibrary
deviceLibrary
=
getOne
(
integer
);
if
(
deviceLibrary
.
getLifeStatus
()!=
2
&&
deviceLibrary
.
getLifeStatus
()!=
15
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"序列号"
+
deviceLibrary
.
getSeqNumber
()+
"的装备已被其他专管员操作"
));
}
});
}
@Override
@Override
public
List
<
DeviceLibrary
>
getAllList
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
public
List
<
DeviceLibrary
>
getAllList
(
DeviceLibrarySelectVo
deviceLibrarySelectVo
)
{
return
deviceLibraryDao
.
findAll
(
getSelectSpecification4
(
deviceLibrarySelectVo
));
return
deviceLibraryDao
.
findAll
(
getSelectSpecification4
(
deviceLibrarySelectVo
));
...
@@ -478,7 +524,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
...
@@ -478,7 +524,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
String
unit
=
userUtils
.
getCurrentUserUnitName
();
String
unit
=
userUtils
.
getCurrentUserUnitName
();
predicateBuilder
.
eq
(
"ownUnit"
,
unit
);
predicateBuilder
.
eq
(
"ownUnit"
,
unit
);
predicateBuilder
.
eq
(
"locationUnit"
,
unit
);
predicateBuilder
.
eq
(
"locationUnit"
,
unit
);
predicateBuilder
.
eq
(
"lifeStatus"
,
2
);
predicateBuilder
.
eq
(
"lifeStatus"
,
2
,
15
);
return
predicateBuilder
.
build
();
return
predicateBuilder
.
build
();
}
}
...
...
dev-matching/src/main/java/com/tykj/dev/device/matching/controller/MatchingDeviceController.java
浏览文件 @
08ec3e59
...
@@ -38,6 +38,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -38,6 +38,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.Min
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -200,7 +201,7 @@ public class MatchingDeviceController {
...
@@ -200,7 +201,7 @@ public class MatchingDeviceController {
List
<
DeviceLogUserVo
>
deviceLogs
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
1
).
stream
()
List
<
DeviceLogUserVo
>
deviceLogs
=
deviceLogDao
.
getAllByDeviceIdAndType
(
id
,
1
).
stream
()
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLog:
:
parse2Dto
)
.
map
(
DeviceLogDto:
:
toVo
)
.
map
(
DeviceLogDto:
:
toVo
)
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
))
.
sorted
(
Comparator
.
comparing
(
DeviceLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
list
.
add
(
deviceLogs
);
list
.
add
(
deviceLogs
);
return
ResponseEntity
.
ok
(
list
);
return
ResponseEntity
.
ok
(
list
);
...
...
dev-misc/src/main/java/com/tykj/dev/misc/utils/DeviceSeqUtil.java
浏览文件 @
08ec3e59
package
com
.
tykj
.
dev
.
misc
.
utils
;
package
com
.
tykj
.
dev
.
misc
.
utils
;
import
com.tykj.dev.misc.MiscApplication
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.exception.ApiException
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
sun.jvm.hotspot.utilities.Interval
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Comparator
;
...
...
dev-misc/src/main/java/com/tykj/dev/misc/utils/TaskDisposeUtil.java
浏览文件 @
08ec3e59
...
@@ -21,4 +21,12 @@ public class TaskDisposeUtil {
...
@@ -21,4 +21,12 @@ public class TaskDisposeUtil {
}
}
}
}
public
static
void
isNotSubmit
(
Integer
billStatus
,
StatusEnum
statusEnum
){
if
(!
statusEnum
.
id
.
equals
(
billStatus
)){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"本次任务已经被其他专管员完成,请处理其他任务"
));
}
}
}
}
dev-packing/src/main/java/com/tykj/dev/device/packing/controller/PackingController.java
浏览文件 @
08ec3e59
...
@@ -157,7 +157,7 @@ public class PackingController {
...
@@ -157,7 +157,7 @@ public class PackingController {
packingLibrary
.
setPackingStatus
(
2
);
packingLibrary
.
setPackingStatus
(
2
);
packingLibrary
.
setShowOrder
(
99999
);
packingLibrary
.
setShowOrder
(
99999
);
PackingLibrary
packingLibrary1
=
packingLibraryService
.
addEntity
(
packingLibrary
);
PackingLibrary
packingLibrary1
=
packingLibraryService
.
addEntity
(
packingLibrary
);
List
<
PackingLibrary
>
packingLibraries1
=
packingLibraryService
.
getInsertList
(
new
SelectPack
()).
stream
().
sorted
(
Comparator
.
comparing
(
PackingLibrary:
:
getModel
)).
collect
(
Collectors
.
toList
());
List
<
PackingLibrary
>
packingLibraries1
=
packingLibraryService
.
getInsertList
(
new
SelectPack
()).
stream
().
sorted
(
Comparator
.
comparing
(
PackingLibrary:
:
getModel
,
Comparator
.
nullsLast
(
String:
:
compareTo
)
)).
collect
(
Collectors
.
toList
());
int
order
=
9999
;
int
order
=
9999
;
for
(
int
i
=
1
;
i
<=
packingLibraries1
.
size
();
i
++){
for
(
int
i
=
1
;
i
<=
packingLibraries1
.
size
();
i
++){
PackingLibrary
packingLibrary2
=
packingLibraries1
.
get
(
i
-
1
);
PackingLibrary
packingLibrary2
=
packingLibraries1
.
get
(
i
-
1
);
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/service/impl/PackingLibraryServiceImpl.java
浏览文件 @
08ec3e59
...
@@ -211,7 +211,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
...
@@ -211,7 +211,7 @@ public class PackingLibraryServiceImpl implements PackingLibraryService {
||
GlobalMap
.
getDeviceInvisibleRangeMap
().
get
(
packingLibrary
.
getInvisibleRange
()).
name
.
contains
(
content
)
||
GlobalMap
.
getDeviceInvisibleRangeMap
().
get
(
packingLibrary
.
getInvisibleRange
()).
name
.
contains
(
content
)
||
GlobalMap
.
getDeviceSecretLevelMap
().
get
(
packingLibrary
.
getSecretLevel
()).
name
.
contains
(
content
);
||
GlobalMap
.
getDeviceSecretLevelMap
().
get
(
packingLibrary
.
getSecretLevel
()).
name
.
contains
(
content
);
return
isSameModel
&&
isSameName
&&
isSameStatus
&&
isSameSecretLevel
&&
isContainContent
;
return
isSameModel
&&
isSameName
&&
isSameStatus
&&
isSameSecretLevel
&&
isContainContent
;
}).
sorted
(
Comparator
.
comparing
(
PackingLibrary:
:
getShowOrder
)).
collect
(
Collectors
.
toList
());
}).
sorted
(
Comparator
.
comparing
(
PackingLibrary:
:
getShowOrder
,
Comparator
.
nullsLast
(
Integer:
:
compareTo
)
)).
collect
(
Collectors
.
toList
());
}
}
/**
/**
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
08ec3e59
...
@@ -42,6 +42,7 @@ import com.tykj.dev.misc.exception.ApiException;
...
@@ -42,6 +42,7 @@ import com.tykj.dev.misc.exception.ApiException;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.Snowflake
;
import
com.tykj.dev.misc.utils.Snowflake
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -239,7 +240,7 @@ public class RepairController {
...
@@ -239,7 +240,7 @@ public class RepairController {
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
List
<
Integer
>
ids
=
userPublicService
.
findOtherUser
(
userUtils
.
getCurrentUserId
());
if
(
level
==
1
)
{
if
(
level
==
1
)
{
ownUnit
=
userUtils
.
getCurrentUnitId
();
ownUnit
=
userUtils
.
getCurrentUnitId
();
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
END
.
id
,
"维修业务"
,
null
,
"."
,
repairBill1
.
getId
(),
5
,
ownUnit
,
1
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_FILE
.
id
,
"维修业务"
,
null
,
"."
,
repairBill1
.
getId
(),
5
,
ownUnit
,
1
,
null
,
userIds
);
saveEntity
=
taskService
.
start
(
taskBto
);
saveEntity
=
taskService
.
start
(
taskBto
);
}
else
{
}
else
{
ownUnit
=
userPublicService
.
findUnitIdByName
(
repairBill
.
getReceiveUnit
());
ownUnit
=
userPublicService
.
findUnitIdByName
(
repairBill
.
getReceiveUnit
());
...
@@ -410,6 +411,7 @@ public class RepairController {
...
@@ -410,6 +411,7 @@ public class RepairController {
public
ResponseEntity
receiveDevice
(
@RequestBody
@Validated
RepairReceiveVo
repairReceiveVo
)
{
public
ResponseEntity
receiveDevice
(
@RequestBody
@Validated
RepairReceiveVo
repairReceiveVo
)
{
//获取当前任务
//获取当前任务
TaskBto
taskBto
=
taskService
.
get
(
repairReceiveVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
repairReceiveVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_RECEIVE
);
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
//获取维修单,送修单,装备详情,维修装备详情
//获取维修单,送修单,装备详情,维修装备详情
RepairBill
repairBill
=
deviceRepairBillService
.
getOne
(
taskBto
.
getBillId
());
RepairBill
repairBill
=
deviceRepairBillService
.
getOne
(
taskBto
.
getBillId
());
...
@@ -513,17 +515,18 @@ public class RepairController {
...
@@ -513,17 +515,18 @@ public class RepairController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
uploadRepairBill
(
@RequestBody
@Validated
FileUploadVo
fileUploadVo
){
public
ResponseEntity
uploadRepairBill
(
@RequestBody
@Validated
FileUploadVo
fileUploadVo
){
TaskBto
taskBto
=
taskService
.
get
(
fileUploadVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
fileUploadVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_UPLOAD_FILE
);
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
taskService
.
addInvolveUser
(
taskBto
,
userId
);
taskService
.
addInvolveUser
(
taskBto
,
userId
);
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveToEnd
(
taskBto
);
RepairSendBill
repairSendBill
=
deviceRepairSendBill
Service
.
getOne
(
taskBto
.
getBillId
());
RepairSendBill
repairSendBill
=
deviceRepairSendBill
Dao
.
findByDeviceRepairBillId
(
taskBto
.
getBillId
());
repairSendBill
.
setBillFileName
(
fileUploadVo
.
getBillFileName
());
repairSendBill
.
setBillFileName
(
fileUploadVo
.
getBillFileName
());
repairSendBill
.
setBillFileUrl
(
fileUploadVo
.
getBillFileUrl
());
repairSendBill
.
setBillFileUrl
(
fileUploadVo
.
getBillFileUrl
());
deviceRepairSendBillService
.
update
(
repairSendBill
);
deviceRepairSendBillService
.
update
(
repairSendBill
);
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"维修单"
,
repairSendBill
.
getBillFileName
(),
repairSendBill
.
getBillFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"维修单"
,
repairSendBill
.
getBillFileName
(),
repairSendBill
.
getBillFileUrl
()));
//添加装备日志
//添加装备日志
List
<
Integer
>
deviceIds
=
StringSplitUtil
.
split
(
repairSendBill
.
getRepair
Reciv
eCheckDetail
());
List
<
Integer
>
deviceIds
=
StringSplitUtil
.
split
(
repairSendBill
.
getRepair
Devic
eCheckDetail
());
deviceIds
.
forEach
(
integer
->
{
deviceIds
.
forEach
(
integer
->
{
//存装备日志
//存装备日志
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
integer
,
"上传送修单据"
,
fileVoList
);
DeviceLogDto
deviceLogDto
=
new
DeviceLogDto
(
integer
,
"上传送修单据"
,
fileVoList
);
...
@@ -805,6 +808,7 @@ public class RepairController {
...
@@ -805,6 +808,7 @@ public class RepairController {
RepairBackBill
repairBackBill
;
RepairBackBill
repairBackBill
;
if
(
level
==
2
||
level
==
3
)
{
if
(
level
==
2
||
level
==
3
)
{
taskBto
=
taskService
.
get
(
repairReceiveVo
.
getTaskId
());
taskBto
=
taskService
.
get
(
repairReceiveVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_BACK_RECEIVE
);
taskService
.
addInvolveUser
(
taskBto
,
userId
);
taskService
.
addInvolveUser
(
taskBto
,
userId
);
repairBackBill
=
deviceRepairBackBillService
.
getOne
(
taskBto
.
getBillId
());
repairBackBill
=
deviceRepairBackBillService
.
getOne
(
taskBto
.
getBillId
());
}
else
{
}
else
{
...
@@ -893,14 +897,14 @@ public class RepairController {
...
@@ -893,14 +897,14 @@ public class RepairController {
// TaskLogBto taskLogBto2 = new TaskLogBto(taskBto2.getId(), "维修退回装备接收并发起入库", fileVoList);
// TaskLogBto taskLogBto2 = new TaskLogBto(taskBto2.getId(), "维修退回装备接收并发起入库", fileVoList);
// taskLogService.addLog(taskLogBto2);
// taskLogService.addLog(taskLogBto2);
}
else
{
}
else
{
if
(
repairReceiveVo
.
getStatus
()==
0
)
{
//
if (repairReceiveVo.getStatus()==0) {
//任务推至下一阶段
//任务推至下一阶段
// taskService.update(taskService.moveToNext(taskBto, repairReceiveVo.getReceiveUserbId()));
// taskService.update(taskService.moveToNext(taskBto, repairReceiveVo.getReceiveUserbId()));
taskBto2
=
taskService
.
moveToEnd
(
taskBto
);
taskBto2
=
taskService
.
moveToEnd
(
taskBto
);
}
//
}
else
{
//
else {
taskBto2
=
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
);
//
taskBto2 = taskService.moveToSpecial(taskBto,StatusEnum.WAIT_UPLOAD_BACK_FILE);
}
//
}
//获取维修详情
//获取维修详情
List
<
RepairDetail
>
repairDetailList
=
repairDetailDao
.
findByRepairBackBillId
(
repairBackBill
.
getId
());
List
<
RepairDetail
>
repairDetailList
=
repairDetailDao
.
findByRepairBackBillId
(
repairBackBill
.
getId
());
repairDetailList
.
forEach
(
repairDetail
->
{
repairDetailList
.
forEach
(
repairDetail
->
{
...
@@ -1019,6 +1023,7 @@ public class RepairController {
...
@@ -1019,6 +1023,7 @@ public class RepairController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
uploadRepairBackBill
(
@RequestBody
@Validated
FileUploadVo
fileUploadVo
){
public
ResponseEntity
uploadRepairBackBill
(
@RequestBody
@Validated
FileUploadVo
fileUploadVo
){
TaskBto
taskBto
=
taskService
.
get
(
fileUploadVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
fileUploadVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_UPLOAD_BACK_FILE
);
Integer
userId
=
userUtils
.
getCurrentUserId
();
Integer
userId
=
userUtils
.
getCurrentUserId
();
taskService
.
addInvolveUser
(
taskBto
,
userId
);
taskService
.
addInvolveUser
(
taskBto
,
userId
);
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveToEnd
(
taskBto
);
...
@@ -1450,7 +1455,7 @@ public class RepairController {
...
@@ -1450,7 +1455,7 @@ public class RepairController {
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
deviceRepairDetailService
.
update
(
repairDetail
);
deviceRepairDetailService
.
update
(
repairDetail
);
});
});
return
ResponseEntity
.
ok
(
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
)).
collect
(
Collectors
.
toList
()));
return
ResponseEntity
.
ok
(
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
,
Comparator
.
nullsLast
(
String:
:
compareTo
)
)).
collect
(
Collectors
.
toList
()));
}
}
//送修装备
//送修装备
else
if
(
type
==
2
){
else
if
(
type
==
2
){
...
@@ -1462,7 +1467,7 @@ public class RepairController {
...
@@ -1462,7 +1467,7 @@ public class RepairController {
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
deviceRepairDetailService
.
update
(
repairDetail
);
deviceRepairDetailService
.
update
(
repairDetail
);
});
});
return
ResponseEntity
.
ok
(
repairDetails1
.
stream
().
filter
(
repairDetail
->
userPublicService
.
findUnitsNameByUserId
(
repairDetail
.
getCreateUserId
()).
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
)).
collect
(
Collectors
.
toList
()));
return
ResponseEntity
.
ok
(
repairDetails1
.
stream
().
filter
(
repairDetail
->
userPublicService
.
findUnitsNameByUserId
(
repairDetail
.
getCreateUserId
()).
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
,
Comparator
.
nullsLast
(
String:
:
compareTo
)
)).
collect
(
Collectors
.
toList
()));
}
}
//待领取装备
//待领取装备
else
if
(
type
==
3
){
else
if
(
type
==
3
){
...
@@ -1471,7 +1476,7 @@ public class RepairController {
...
@@ -1471,7 +1476,7 @@ public class RepairController {
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
repairDetail
.
setLocationUnit
(
deviceLibraryService
.
getOne
(
repairDetail
.
getDeviceId
()).
getLocationUnit
());
deviceRepairDetailService
.
update
(
repairDetail
);
deviceRepairDetailService
.
update
(
repairDetail
);
});
});
return
ResponseEntity
.
ok
(
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
)).
collect
(
Collectors
.
toList
()));
return
ResponseEntity
.
ok
(
repairDetails
.
stream
().
filter
(
repairDetail
->
repairDetail
.
getLocationUnit
().
equals
(
unitName
)).
sorted
(
Comparator
.
comparing
(
RepairDetail:
:
getOwnUnit
,
Comparator
.
nullsLast
(
String:
:
compareTo
)
)).
collect
(
Collectors
.
toList
()));
}
}
else
{
else
{
throw
new
ApiException
(
"type只能为1,2,3"
);
throw
new
ApiException
(
"type只能为1,2,3"
);
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/subject/vo/RepairBackBillSaveVo.java
浏览文件 @
08ec3e59
...
@@ -56,11 +56,11 @@ public class RepairBackBillSaveVo {
...
@@ -56,11 +56,11 @@ public class RepairBackBillSaveVo {
@ApiModelProperty
(
value
=
"签发人"
)
@ApiModelProperty
(
value
=
"签发人"
)
private
String
agent
;
private
String
agent
;
@NotNull
(
message
=
"fileName不能为空"
)
//
@NotNull(message = "fileName不能为空")
@ApiModelProperty
(
value
=
"出库附件文件名"
)
@ApiModelProperty
(
value
=
"出库附件文件名"
)
private
String
fileName
;
private
String
fileName
;
@NotNull
(
message
=
"fileUrl不能为空"
)
//
@NotNull(message = "fileUrl不能为空")
@ApiModelProperty
(
value
=
"出库附件文件地址URL"
)
@ApiModelProperty
(
value
=
"出库附件文件地址URL"
)
private
String
fileUrl
;
private
String
fileUrl
;
...
...
dev-retired/src/main/java/com/tykj/dev/device/retired/controller/DeviceRetiredController.java
浏览文件 @
08ec3e59
...
@@ -26,6 +26,7 @@ import com.tykj.dev.misc.base.StatusEnum;
...
@@ -26,6 +26,7 @@ import com.tykj.dev.misc.base.StatusEnum;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -142,6 +143,7 @@ public class DeviceRetiredController {
...
@@ -142,6 +143,7 @@ public class DeviceRetiredController {
public
ResponseEntity
confirmDestroy
(
@RequestBody
@Validated
DeviceRetiredConfirmVo
deviceRetiredConfirmVo
)
{
public
ResponseEntity
confirmDestroy
(
@RequestBody
@Validated
DeviceRetiredConfirmVo
deviceRetiredConfirmVo
)
{
//初始化需要的数据
//初始化需要的数据
TaskBto
task
=
taskService
.
get
(
deviceRetiredConfirmVo
.
getTaskId
());
TaskBto
task
=
taskService
.
get
(
deviceRetiredConfirmVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
task
.
getBillStatus
(),
StatusEnum
.
RETIRED_BUSINESS_NEED_CONFIRM
);
DeviceRetiredBill
deviceRetiredBillEntity
=
deviceRetiredBillService
.
getOne
(
task
.
getBillId
());
DeviceRetiredBill
deviceRetiredBillEntity
=
deviceRetiredBillService
.
getOne
(
task
.
getBillId
());
//判断审核结果
//判断审核结果
if
(
deviceRetiredConfirmVo
.
getResult
()
==
1
)
{
if
(
deviceRetiredConfirmVo
.
getResult
()
==
1
)
{
...
...
dev-rfid/src/main/java/com/tykj/dev/rfid/controller/RfidController.java
浏览文件 @
08ec3e59
...
@@ -18,6 +18,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
...
@@ -18,6 +18,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.rfid.entity.domin.LibraryWarningLog
;
import
com.tykj.dev.rfid.entity.domin.LibraryWarningLog
;
import
com.tykj.dev.rfid.entity.domin.RfidChangeBill
;
import
com.tykj.dev.rfid.entity.domin.RfidChangeBill
;
import
com.tykj.dev.rfid.entity.domin.RfidChangeLog
;
import
com.tykj.dev.rfid.entity.domin.RfidChangeLog
;
...
@@ -172,6 +173,7 @@ public class RfidController {
...
@@ -172,6 +173,7 @@ public class RfidController {
public
ResponseEntity
confirmDestory
(
@RequestBody
@Validated
RfidChangeConfirmVo
rfidChangeConfirmVo
)
{
public
ResponseEntity
confirmDestory
(
@RequestBody
@Validated
RfidChangeConfirmVo
rfidChangeConfirmVo
)
{
//初始化需要的数据
//初始化需要的数据
TaskBto
task
=
taskService
.
get
(
rfidChangeConfirmVo
.
getTaskId
());
TaskBto
task
=
taskService
.
get
(
rfidChangeConfirmVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
task
.
getBillStatus
(),
StatusEnum
.
RFID_BUSINESS_NEED_CONFIRM
);
RfidChangeBill
rfidChangeBill
=
rfidChangeBillService
.
getOne
(
task
.
getBillId
());
RfidChangeBill
rfidChangeBill
=
rfidChangeBillService
.
getOne
(
task
.
getBillId
());
//生成日志所需的文件列表
//生成日志所需的文件列表
ArrayList
<
FileVo
>
billList
=
ListUtil
.
createList
(
ArrayList
<
FileVo
>
billList
=
ListUtil
.
createList
(
...
...
dev-scrap/src/main/java/com/tykj/dev/device/scrap/controller/DeviceScrapController.java
浏览文件 @
08ec3e59
...
@@ -16,6 +16,7 @@ import com.tykj.dev.device.task.subject.bto.TaskBto;
...
@@ -16,6 +16,7 @@ import com.tykj.dev.device.task.subject.bto.TaskBto;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -119,6 +120,7 @@ public class DeviceScrapController {
...
@@ -119,6 +120,7 @@ public class DeviceScrapController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
uploadScrap
(
@RequestBody
@Validated
UploadVo
uploadVo
)
{
public
ResponseEntity
uploadScrap
(
@RequestBody
@Validated
UploadVo
uploadVo
)
{
TaskBto
taskBto
=
taskService
.
get
(
uploadVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
uploadVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_UPLOAD_SCRAP_FILE
);
ScrapBill
scrapBill
=
scrapBillService
.
getOne
(
taskBto
.
getBillId
());
ScrapBill
scrapBill
=
scrapBillService
.
getOne
(
taskBto
.
getBillId
());
scrapBill
.
setFileName
(
uploadVo
.
getFileName
());
scrapBill
.
setFileName
(
uploadVo
.
getFileName
());
scrapBill
.
setFileUrl
(
uploadVo
.
getFileUrl
());
scrapBill
.
setFileUrl
(
uploadVo
.
getFileUrl
());
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
08ec3e59
...
@@ -21,6 +21,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
...
@@ -21,6 +21,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -261,6 +262,7 @@ public class SelfCheckController {
...
@@ -261,6 +262,7 @@ public class SelfCheckController {
SelfCheckBill
selfExaminationBillEntity
;
SelfCheckBill
selfExaminationBillEntity
;
if
(
selfCheckSaveVo
.
getTaskId
()!=
null
){
if
(
selfCheckSaveVo
.
getTaskId
()!=
null
){
TaskBto
taskBto
=
taskService
.
get
(
selfCheckSaveVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
selfCheckSaveVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_SELF_CHECK
);
selfExaminationBillEntity
=
selfExaminationBillService
.
getOne
(
taskBto
.
getBillId
());
selfExaminationBillEntity
=
selfExaminationBillService
.
getOne
(
taskBto
.
getBillId
());
selfExaminationBillEntity
.
setCheckTime
(
new
Date
());
selfExaminationBillEntity
.
setCheckTime
(
new
Date
());
selfExaminationBillEntity
.
setCheckDetail
(
selfCheckSaveVo
.
getCheckDetail
());
selfExaminationBillEntity
.
setCheckDetail
(
selfCheckSaveVo
.
getCheckDetail
());
...
@@ -351,6 +353,7 @@ public class SelfCheckController {
...
@@ -351,6 +353,7 @@ public class SelfCheckController {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
selfExaminationConfirm
(
@RequestBody
@Validated
SelfCheckConfirmVo
selfCheckConfirmVo
)
{
public
ResponseEntity
selfExaminationConfirm
(
@RequestBody
@Validated
SelfCheckConfirmVo
selfCheckConfirmVo
)
{
TaskBto
taskBto
=
taskService
.
get
(
selfCheckConfirmVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
selfCheckConfirmVo
.
getTaskId
());
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SELF_CHECK_CONFIRM
);
SelfCheckBill
selfExaminationBillEntity
=
selfExaminationBillService
.
getOne
(
taskBto
.
getBillId
());
SelfCheckBill
selfExaminationBillEntity
=
selfExaminationBillService
.
getOne
(
taskBto
.
getBillId
());
if
(
selfCheckConfirmVo
.
getCheckFiles
()!=
null
&&
selfCheckConfirmVo
.
getCheckFiles
().
size
()>
0
){
if
(
selfCheckConfirmVo
.
getCheckFiles
()!=
null
&&
selfCheckConfirmVo
.
getCheckFiles
().
size
()>
0
){
selfExaminationBillEntity
.
setCheckFiles
(
FilesUtil
.
stringFileToList
(
selfCheckConfirmVo
.
getCheckFiles
()));
selfExaminationBillEntity
.
setCheckFiles
(
FilesUtil
.
stringFileToList
(
selfCheckConfirmVo
.
getCheckFiles
()));
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/service/impl/BigScreenServiceImpl.java
浏览文件 @
08ec3e59
...
@@ -291,7 +291,7 @@ public class BigScreenServiceImpl implements BigScreenService {
...
@@ -291,7 +291,7 @@ public class BigScreenServiceImpl implements BigScreenService {
//筛选出当前单位已完成的自查和核查账单,按更新时间排序
//筛选出当前单位已完成的自查和核查账单,按更新时间排序
List
<
SelfCheckBill
>
selfCheckBillList
=
selfCheckBills
.
stream
()
List
<
SelfCheckBill
>
selfCheckBillList
=
selfCheckBills
.
stream
()
.
filter
(
selfCheckBill
->
selfCheckBill
.
getCheckUnit
().
equals
(
unitName
))
.
filter
(
selfCheckBill
->
selfCheckBill
.
getCheckUnit
().
equals
(
unitName
))
.
sorted
(
Comparator
.
comparing
(
SelfCheckBill:
:
getUpdateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
SelfCheckBill:
:
getUpdateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
if
(!
selfCheckBillList
.
isEmpty
())
{
if
(!
selfCheckBillList
.
isEmpty
())
{
SelfCheckBill
s
=
selfCheckBillList
.
get
(
0
);
SelfCheckBill
s
=
selfCheckBillList
.
get
(
0
);
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/service/impl/StatisticalServiceImpl.java
浏览文件 @
08ec3e59
...
@@ -209,9 +209,9 @@ public class StatisticalServiceImpl implements StatisticalService {
...
@@ -209,9 +209,9 @@ public class StatisticalServiceImpl implements StatisticalService {
//获取所有自查单
//获取所有自查单
List
<
SelfCheckBill
>
selfCheckBills
=
selfCheckBillDao
.
findAll
();
List
<
SelfCheckBill
>
selfCheckBills
=
selfCheckBillDao
.
findAll
();
//获取最近一次自查标题
//获取最近一次自查标题
List
<
SelfCheckBill
>
selfCheckBillList
=
selfCheckBills
.
stream
().
filter
(
selfCheckBill
->
selfCheckBill
.
getCycle
()!=
null
).
sorted
(
Comparator
.
comparing
(
SelfCheckBill:
:
getCreateTime
).
reversed
(
)).
collect
(
Collectors
.
toList
());
List
<
SelfCheckBill
>
selfCheckBillList
=
selfCheckBills
.
stream
().
filter
(
selfCheckBill
->
selfCheckBill
.
getCycle
()!=
null
).
sorted
(
Comparator
.
comparing
(
SelfCheckBill:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
).
reversed
()
)).
collect
(
Collectors
.
toList
());
if
(
selfCheckBillList
.
size
()>
0
){
if
(
selfCheckBillList
.
size
()>
0
){
Map
<
String
,
Integer
>
selfCheckBillMap
=
selfCheckBills
.
stream
().
filter
(
selfCheckBill
->
selfCheckBill
.
getCycle
()!=
null
&&
selfCheckBill
.
getTitle
().
equals
(
selfCheckBillList
.
get
(
0
).
getTitle
())).
collect
(
Collectors
.
toMap
(
SelfCheckBill:
:
getCheckUnit
,
SelfCheckBill:
:
getCheckStatus
));
Map
<
String
,
Integer
>
selfCheckBillMap
=
selfCheckBills
.
stream
().
filter
(
selfCheckBill
->
selfCheckBill
.
getCycle
()!=
null
&&
selfCheckBill
.
getTitle
().
equals
(
selfCheckBillList
.
get
(
0
).
getTitle
())).
collect
(
Collectors
.
toMap
(
SelfCheckBill:
:
getCheckUnit
,
SelfCheckBill:
:
getCheckStatus
,(
v1
,
v2
)->
v1
));
//获取所有市
//获取所有市
List
<
Area
>
areas
=
areaDao
.
findAreasByType
(
2
);
List
<
Area
>
areas
=
areaDao
.
findAreasByType
(
2
);
//遍历每个市
//遍历每个市
...
@@ -484,11 +484,11 @@ public class StatisticalServiceImpl implements StatisticalService {
...
@@ -484,11 +484,11 @@ public class StatisticalServiceImpl implements StatisticalService {
//筛选出当前单位已完成的自查和核查账单,按更新时间排序
//筛选出当前单位已完成的自查和核查账单,按更新时间排序
List
<
SelfCheckBill
>
selfCheckBillList
=
selfCheckBills
.
stream
()
List
<
SelfCheckBill
>
selfCheckBillList
=
selfCheckBills
.
stream
()
.
filter
(
selfCheckBill
->
selfCheckBill
.
getCheckUnit
().
equals
(
unitName
)
&&
selfCheckBill
.
getCheckedCount
()
!=
null
)
.
filter
(
selfCheckBill
->
selfCheckBill
.
getCheckUnit
().
equals
(
unitName
)
&&
selfCheckBill
.
getCheckedCount
()
!=
null
)
.
sorted
(
Comparator
.
comparing
(
SelfCheckBill:
:
getUpdateTime
).
reversed
(
))
.
sorted
(
Comparator
.
nullsLast
(
Comparator
.
comparing
(
SelfCheckBill:
:
getUpdateTime
).
reversed
()
))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
DeviceCheckDetail
>
deviceCheckDetailList
=
deviceCheckDetails
.
stream
()
List
<
DeviceCheckDetail
>
deviceCheckDetailList
=
deviceCheckDetails
.
stream
()
.
filter
(
deviceCheckDetail
->
deviceCheckDetail
.
getCheckUnit
().
equals
(
unitName
)
&&
deviceCheckDetail
.
getCheckedCount
()
!=
null
)
.
filter
(
deviceCheckDetail
->
deviceCheckDetail
.
getCheckUnit
().
equals
(
unitName
)
&&
deviceCheckDetail
.
getCheckedCount
()
!=
null
)
.
sorted
(
Comparator
.
comparing
(
DeviceCheckDetail:
:
getUpdateTime
).
reversed
(
))
.
sorted
(
Comparator
.
nullsLast
(
Comparator
.
comparing
(
DeviceCheckDetail:
:
getUpdateTime
).
reversed
()
))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
if
(!
selfCheckBillList
.
isEmpty
())
{
if
(!
selfCheckBillList
.
isEmpty
())
{
check
.
setSelfCheckCount
(
selfCheckBillList
.
get
(
0
).
getCheckedCount
());
check
.
setSelfCheckCount
(
selfCheckBillList
.
get
(
0
).
getCheckedCount
());
...
@@ -537,7 +537,7 @@ public class StatisticalServiceImpl implements StatisticalService {
...
@@ -537,7 +537,7 @@ public class StatisticalServiceImpl implements StatisticalService {
//筛选出上半年的自动核查按时间排序
//筛选出上半年的自动核查按时间排序
List
<
DeviceCheckDetail
>
deviceCheckDetailList
=
deviceCheckDetails
.
stream
()
List
<
DeviceCheckDetail
>
deviceCheckDetailList
=
deviceCheckDetails
.
stream
()
.
filter
(
deviceCheckDetail
->
deviceCheckDetail
.
getTitle
().
contains
(
"自动"
)&&
deviceCheckDetail
.
getTitle
().
contains
(
unitName
)
&&
Date
.
from
(
deviceCheckDetail
.
getCreateTime
().
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()).
after
(
dates
.
get
(
0
))&&
Date
.
from
(
deviceCheckDetail
.
getCreateTime
().
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()).
before
(
dates
.
get
(
1
)))
.
filter
(
deviceCheckDetail
->
deviceCheckDetail
.
getTitle
().
contains
(
"自动"
)&&
deviceCheckDetail
.
getTitle
().
contains
(
unitName
)
&&
Date
.
from
(
deviceCheckDetail
.
getCreateTime
().
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()).
after
(
dates
.
get
(
0
))&&
Date
.
from
(
deviceCheckDetail
.
getCreateTime
().
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()).
before
(
dates
.
get
(
1
)))
.
sorted
(
Comparator
.
comparing
(
DeviceCheckDetail:
:
getCreateTime
).
reversed
(
))
.
sorted
(
Comparator
.
nullsLast
(
Comparator
.
comparing
(
DeviceCheckDetail:
:
getCreateTime
).
reversed
()
))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
if
(
deviceCheckDetailList
.
size
()>
0
){
if
(
deviceCheckDetailList
.
size
()>
0
){
if
(
deviceCheckDetailList
.
get
(
0
).
getCheckStatus
()==
2
){
if
(
deviceCheckDetailList
.
get
(
0
).
getCheckStatus
()==
2
){
...
...
dev-task/src/main/java/com/tykj/dev/device/task/controller/TaskController.java
浏览文件 @
08ec3e59
...
@@ -20,10 +20,7 @@ import org.springframework.http.ResponseEntity;
...
@@ -20,10 +20,7 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -120,7 +117,7 @@ public class TaskController {
...
@@ -120,7 +117,7 @@ public class TaskController {
}
}
//按日志时间排序
//按日志时间排序
List
<
TaskLogUserVo
>
taskLogUserVoList
=
taskLogUserVos
.
stream
()
List
<
TaskLogUserVo
>
taskLogUserVoList
=
taskLogUserVos
.
stream
()
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
taskLogUserVoList
);
return
ResultUtil
.
success
(
taskLogUserVoList
);
}
}
...
@@ -144,7 +141,7 @@ public class TaskController {
...
@@ -144,7 +141,7 @@ public class TaskController {
}
}
//按日志时间排序
//按日志时间排序
List
<
TaskLogUserVo
>
taskLogUserVoList
=
taskLogUserVos
.
stream
()
List
<
TaskLogUserVo
>
taskLogUserVoList
=
taskLogUserVos
.
stream
()
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
taskLogUserVoList
);
return
ResultUtil
.
success
(
taskLogUserVoList
);
}
}
...
@@ -168,7 +165,7 @@ public class TaskController {
...
@@ -168,7 +165,7 @@ public class TaskController {
}
}
//按日志时间排序
//按日志时间排序
List
<
TaskLogUserVo
>
taskLogUserVoList
=
taskLogUserVos
.
stream
()
List
<
TaskLogUserVo
>
taskLogUserVoList
=
taskLogUserVos
.
stream
()
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
taskLogUserVoList
);
return
ResultUtil
.
success
(
taskLogUserVoList
);
}
}
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskLogServiceImpl.java
浏览文件 @
08ec3e59
...
@@ -19,6 +19,7 @@ import org.springframework.scheduling.annotation.Async;
...
@@ -19,6 +19,7 @@ import org.springframework.scheduling.annotation.Async;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
...
@@ -92,12 +93,12 @@ public class TaskLogServiceImpl implements TaskLogService {
...
@@ -92,12 +93,12 @@ public class TaskLogServiceImpl implements TaskLogService {
if
(
taskLogSelectVo
!=
null
&&
taskLogSelectVo
.
getStartTime
()!=
null
&&
taskLogSelectVo
.
getEndTime
()!=
null
){
if
(
taskLogSelectVo
!=
null
&&
taskLogSelectVo
.
getStartTime
()!=
null
&&
taskLogSelectVo
.
getEndTime
()!=
null
){
return
taskLogUserVos
.
stream
()
return
taskLogUserVos
.
stream
()
.
filter
(
taskLogUserVo
->
taskLogUserVo
.
getCreateTime
().
after
(
taskLogSelectVo
.
getStartTime
())&&
taskLogUserVo
.
getCreateTime
().
before
(
taskLogSelectVo
.
getEndTime
()))
.
filter
(
taskLogUserVo
->
taskLogUserVo
.
getCreateTime
().
after
(
taskLogSelectVo
.
getStartTime
())&&
taskLogUserVo
.
getCreateTime
().
before
(
taskLogSelectVo
.
getEndTime
()))
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
}
}
else
{
else
{
return
taskLogUserVos
.
stream
()
return
taskLogUserVos
.
stream
()
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
TaskLogUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
}
}
}
}
...
...
dev-task/src/main/java/com/tykj/dev/device/task/utils/TaskUtils.java
浏览文件 @
08ec3e59
...
@@ -6,6 +6,7 @@ import org.springframework.stereotype.Component;
...
@@ -6,6 +6,7 @@ import org.springframework.stereotype.Component;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -20,7 +21,7 @@ public class TaskUtils {
...
@@ -20,7 +21,7 @@ public class TaskUtils {
* 按照日志创建时间降序排列
* 按照日志创建时间降序排列
*/
*/
public
List
<
TaskLog
>
orderByCreateTimeDesc
(
List
<
TaskLog
>
list
)
{
public
List
<
TaskLog
>
orderByCreateTimeDesc
(
List
<
TaskLog
>
list
)
{
list
.
sort
(
Comparator
.
comparing
(
TaskLog:
:
getCreateTime
).
reversed
());
list
.
sort
(
Comparator
.
comparing
(
TaskLog:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
());
return
list
;
return
list
;
}
}
...
@@ -29,7 +30,7 @@ public class TaskUtils {
...
@@ -29,7 +30,7 @@ public class TaskUtils {
* 按照日志创建时间增序排列
* 按照日志创建时间增序排列
*/
*/
public
List
<
TaskLog
>
orderByCreateTimeAsc
(
List
<
TaskLog
>
list
)
{
public
List
<
TaskLog
>
orderByCreateTimeAsc
(
List
<
TaskLog
>
list
)
{
list
.
sort
(
Comparator
.
comparing
(
TaskLog:
:
getCreateTime
));
list
.
sort
(
Comparator
.
comparing
(
TaskLog:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
));
return
list
;
return
list
;
}
}
...
@@ -38,7 +39,7 @@ public class TaskUtils {
...
@@ -38,7 +39,7 @@ public class TaskUtils {
* 按照跟踪时间增序排列
* 按照跟踪时间增序排列
*/
*/
public
List
<
TaskUserVo
>
orderByUserTimeDateAsc
(
List
<
TaskUserVo
>
list
)
{
public
List
<
TaskUserVo
>
orderByUserTimeDateAsc
(
List
<
TaskUserVo
>
list
)
{
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getUserTimeDate
));
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getUserTimeDate
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
));
return
list
;
return
list
;
}
}
...
@@ -47,7 +48,7 @@ public class TaskUtils {
...
@@ -47,7 +48,7 @@ public class TaskUtils {
* 按照跟踪时间降序排列
* 按照跟踪时间降序排列
*/
*/
public
List
<
TaskUserVo
>
orderByUserTimeDateDesc
(
List
<
TaskUserVo
>
list
)
{
public
List
<
TaskUserVo
>
orderByUserTimeDateDesc
(
List
<
TaskUserVo
>
list
)
{
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getUserTimeDate
).
reversed
());
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getUserTimeDate
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
());
return
list
;
return
list
;
}
}
...
@@ -56,7 +57,7 @@ public class TaskUtils {
...
@@ -56,7 +57,7 @@ public class TaskUtils {
* 按照待办时间增序排列
* 按照待办时间增序排列
*/
*/
public
List
<
TaskUserVo
>
orderByTrackingTimeDateAsc
(
List
<
TaskUserVo
>
list
)
{
public
List
<
TaskUserVo
>
orderByTrackingTimeDateAsc
(
List
<
TaskUserVo
>
list
)
{
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getTrackingTimeDate
));
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getTrackingTimeDate
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
));
return
list
;
return
list
;
}
}
...
@@ -65,7 +66,7 @@ public class TaskUtils {
...
@@ -65,7 +66,7 @@ public class TaskUtils {
* 按照待办时间降序排列
* 按照待办时间降序排列
*/
*/
public
List
<
TaskUserVo
>
orderByTrackingTimeDateDesc
(
List
<
TaskUserVo
>
list
)
{
public
List
<
TaskUserVo
>
orderByTrackingTimeDateDesc
(
List
<
TaskUserVo
>
list
)
{
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getTrackingTimeDate
).
reversed
());
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getTrackingTimeDate
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
());
return
list
;
return
list
;
}
}
...
@@ -74,7 +75,7 @@ public class TaskUtils {
...
@@ -74,7 +75,7 @@ public class TaskUtils {
* 按照发起时间降序排列
* 按照发起时间降序排列
*/
*/
public
List
<
TaskUserVo
>
orderByCreateTimeDesc2
(
List
<
TaskUserVo
>
list
)
{
public
List
<
TaskUserVo
>
orderByCreateTimeDesc2
(
List
<
TaskUserVo
>
list
)
{
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getCreateTime
).
reversed
());
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
());
return
list
;
return
list
;
}
}
...
@@ -83,7 +84,7 @@ public class TaskUtils {
...
@@ -83,7 +84,7 @@ public class TaskUtils {
* 按照发起时间升序排列
* 按照发起时间升序排列
*/
*/
public
List
<
TaskUserVo
>
orderByCreateTimeAsc2
(
List
<
TaskUserVo
>
list
)
{
public
List
<
TaskUserVo
>
orderByCreateTimeAsc2
(
List
<
TaskUserVo
>
list
)
{
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getCreateTime
));
list
.
sort
(
Comparator
.
comparing
(
TaskUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
));
return
list
;
return
list
;
}
}
...
...
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
浏览文件 @
08ec3e59
...
@@ -381,7 +381,7 @@ public class LogAspect {
...
@@ -381,7 +381,7 @@ public class LogAspect {
// }
// }
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
WAIT_BACK_RECEIVE
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
END
.
id
))||
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
WAIT_BACK_RECEIVE
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
END
.
id
))||
(
this
.
oldStatus
.
equals
(
StatusEnum
.
ORIGIN_STATUS
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
END
.
id
)))
{
(
this
.
oldStatus
.
equals
(
StatusEnum
.
ORIGIN_STATUS
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
END
.
id
)))
{
this
.
fileVos
.
add
(
new
FileVo
(
"
回执单"
,
repairBackBill
.
getBillFileName
(),
repairBackBill
.
getBill
FileUrl
()));
this
.
fileVos
.
add
(
new
FileVo
(
"
签收单"
,
repairBackBill
.
getReceiveFileName
(),
repairBackBill
.
getReceive
FileUrl
()));
// this.fileVos.add(new FileVo("入库确认单", repairBackBill.getReceiveFileName(), repairBackBill.getReceiveFileUrl()));
// this.fileVos.add(new FileVo("入库确认单", repairBackBill.getReceiveFileName(), repairBackBill.getReceiveFileUrl()));
}
}
// if ((this.oldStatus.equals(StatusEnum.ORIGIN_STATUS.id) && this.newStatus.equals(StatusEnum.WAIT_UPLOAD_BACK_FILE.id))
// if ((this.oldStatus.equals(StatusEnum.ORIGIN_STATUS.id) && this.newStatus.equals(StatusEnum.WAIT_UPLOAD_BACK_FILE.id))
...
...
dev-user/src/main/java/com/tykj/dev/device/user/read/service/impl/MessageServiceImpl.java
浏览文件 @
08ec3e59
...
@@ -16,6 +16,7 @@ import org.springframework.scheduling.annotation.Async;
...
@@ -16,6 +16,7 @@ import org.springframework.scheduling.annotation.Async;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.CompletableFuture
;
...
@@ -84,7 +85,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -84,7 +85,7 @@ public class MessageServiceImpl implements MessageService {
.
map
(
Message:
:
parse2Bto
)
.
map
(
Message:
:
parse2Bto
)
.
filter
(
messageBto
->
messageBto
.
getInvolveUserIdList
().
contains
(
userId
)&&!
messageBto
.
getCompleteUserIdList
().
contains
(
userId
))
.
filter
(
messageBto
->
messageBto
.
getInvolveUserIdList
().
contains
(
userId
)&&!
messageBto
.
getCompleteUserIdList
().
contains
(
userId
))
.
map
(
MessageBto:
:
toVo
)
.
map
(
MessageBto:
:
toVo
)
.
sorted
(
Comparator
.
comparing
(
MessageUserVo:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
MessageUserVo:
:
getCreateTime
,
Comparator
.
nullsLast
(
Date:
:
compareTo
)
).
reversed
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
}
}
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UnitsServiceImpl.java
浏览文件 @
08ec3e59
...
@@ -115,12 +115,12 @@ public class UnitsServiceImpl implements UnitsService {
...
@@ -115,12 +115,12 @@ public class UnitsServiceImpl implements UnitsService {
}
}
);
);
}
}
leftNavigation
.
setLeftNavigations
(
leftNavigationList1
.
stream
().
sorted
(
Comparator
.
comparing
(
LeftNavigation:
:
getOrder
)).
collect
(
Collectors
.
toList
()));
leftNavigation
.
setLeftNavigations
(
leftNavigationList1
.
stream
().
sorted
(
Comparator
.
comparing
(
LeftNavigation:
:
getOrder
,
Comparator
.
nullsLast
(
Integer:
:
compareTo
)
)).
collect
(
Collectors
.
toList
()));
leftNavigationList
.
add
(
leftNavigation
);
leftNavigationList
.
add
(
leftNavigation
);
});
});
}
else
if
(
thisArea
.
getType
()==
2
){
}
else
if
(
thisArea
.
getType
()==
2
){
areas
.
forEach
(
area
->
{
areas
.
forEach
(
area
->
{
leftNavigationList
.
addAll
(
unitsDao
.
findAllByAreaId
(
area
.
getId
()).
stream
().
map
(
Units:
:
toLeftNavigation
).
sorted
(
Comparator
.
comparing
(
LeftNavigation:
:
getOrder
)).
collect
(
Collectors
.
toList
()));
leftNavigationList
.
addAll
(
unitsDao
.
findAllByAreaId
(
area
.
getId
()).
stream
().
map
(
Units:
:
toLeftNavigation
).
sorted
(
Comparator
.
comparing
(
LeftNavigation:
:
getOrder
,
Comparator
.
nullsLast
(
Integer:
:
compareTo
)
)).
collect
(
Collectors
.
toList
()));
});
});
}
else
{
}
else
{
return
leftNavigationList
;
return
leftNavigationList
;
...
@@ -293,7 +293,7 @@ public class UnitsServiceImpl implements UnitsService {
...
@@ -293,7 +293,7 @@ public class UnitsServiceImpl implements UnitsService {
leftNavigationList
=
unitsDao
.
findAllByAreaId
(
belongsArea
.
getId
()).
stream
().
map
(
Units:
:
toLeftNavigation
).
collect
(
Collectors
.
toList
());
leftNavigationList
=
unitsDao
.
findAllByAreaId
(
belongsArea
.
getId
()).
stream
().
map
(
Units:
:
toLeftNavigation
).
collect
(
Collectors
.
toList
());
}
}
leftNavigation
.
setLeftNavigations
(
leftNavigationList
.
stream
().
sorted
(
Comparator
.
comparing
(
LeftNavigation:
:
getOrder
)).
collect
(
Collectors
.
toList
()));
leftNavigation
.
setLeftNavigations
(
leftNavigationList
.
stream
().
sorted
(
Comparator
.
comparing
(
LeftNavigation:
:
getOrder
,
Comparator
.
nullsLast
(
Integer:
:
compareTo
)
)).
collect
(
Collectors
.
toList
()));
return
leftNavigation
;
return
leftNavigation
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论