Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
ff7f23ee
提交
ff7f23ee
authored
4月 19, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[清退] 修改了直属单位提交完成 装备查询不到的bug
上级
89836d79
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
164 行增加
和
20 行删除
+164
-20
FilesUtil.java
...main/java/com/tykj/dev/device/file/service/FilesUtil.java
+0
-1
DeviceLoss.java
...va/com/tykj/dev/device/loss/entity/domain/DeviceLoss.java
+3
-0
DeviceLossServiceImpl.java
...j/dev/device/loss/service/impl/DeviceLossServiceImpl.java
+15
-2
LossBillServiceImpl.java
...ykj/dev/device/loss/service/impl/LossBillServiceImpl.java
+7
-0
BusinessEnum.java
...sc/src/main/java/com/tykj/dev/misc/base/BusinessEnum.java
+6
-6
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+6
-0
DeviceRepelDetail.java
.../dev/device/sendback/entity/domain/DeviceRepelDetail.java
+5
-2
DirectlyUnderDevicesVo.java
...dev/device/sendback/entity/vo/DirectlyUnderDevicesVo.java
+31
-0
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+4
-0
DeviceRepelDetailServiceImpl.java
...e/sendback/service/impl/DeviceRepelDetailServiceImpl.java
+0
-2
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+24
-5
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+60
-1
TrainJobController.java
.../tykj/dev/device/train/controller/TrainJobController.java
+1
-1
UserPublicService.java
...kj/dev/device/user/subject/service/UserPublicService.java
+2
-0
没有找到文件。
dev-file/src/main/java/com/tykj/dev/device/file/service/FilesUtil.java
浏览文件 @
ff7f23ee
...
...
@@ -21,7 +21,6 @@ public class FilesUtil {
List
<
String
>
strings
=
Arrays
.
asList
(
fileRets
);
strings
.
forEach
(
file
->
{
System
.
out
.
println
(
file
);
String
[]
files
=
file
.
split
(
","
);
FileRet
fileRet
=
new
FileRet
();
fileRet
.
setName
(
files
[
0
]);
...
...
dev-loss/src/main/java/com/tykj/dev/device/loss/entity/domain/DeviceLoss.java
浏览文件 @
ff7f23ee
...
...
@@ -98,6 +98,9 @@ public class DeviceLoss extends BaseEntity {
@Column
(
name
=
"loss_file"
,
columnDefinition
=
"TEXT"
)
private
String
lossFile
;
@ApiModelProperty
(
value
=
"区块链记录id"
)
private
String
recordId
;
/**
* 找回业务状态
*/
...
...
dev-loss/src/main/java/com/tykj/dev/device/loss/service/impl/DeviceLossServiceImpl.java
浏览文件 @
ff7f23ee
package
com
.
tykj
.
dev
.
device
.
loss
.
service
.
impl
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.device.loss.entity.domain.DeviceLoss
;
import
com.tykj.dev.device.loss.repository.LossDao
;
import
com.tykj.dev.device.loss.service.DeviceLossService
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -16,14 +19,23 @@ import java.util.List;
* @createTime 2021年01月30日 11:17:00
*/
@Service
@Slf4j
public
class
DeviceLossServiceImpl
implements
DeviceLossService
{
@Autowired
LossDao
lossDao
;
@Autowired
BlockChainUtil
blockChainUtil
;
@Override
public
DeviceLoss
save
(
DeviceLoss
deviceLoss
)
{
return
lossDao
.
save
(
deviceLoss
);
// if (deviceLoss.getRecordId()==null){
// long time=System.currentTimeMillis();
// deviceLoss.setRecordId(blockChainUtil.sendText(1000, JacksonUtil.toJSon(deviceLoss)).getData().getRecordID());
// log.info("[丢失-找回]上链数据时间本次");
// }else {
// deviceLoss.setRecordId(blockChainUtil.appendText(JacksonUtil.toJSon(deviceLoss),deviceLoss.getRecordId()).getData().getRecordID());
// }
return
lossDao
.
save
(
deviceLoss
);
}
@Override
...
...
@@ -40,4 +52,5 @@ public class DeviceLossServiceImpl implements DeviceLossService {
public
List
<
DeviceLoss
>
findByListLossUnitId
(
Integer
unitId
)
{
return
lossDao
.
findAllByUnitId
(
unitId
);
}
}
dev-loss/src/main/java/com/tykj/dev/device/loss/service/impl/LossBillServiceImpl.java
浏览文件 @
ff7f23ee
package
com
.
tykj
.
dev
.
device
.
loss
.
service
.
impl
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
...
...
@@ -50,6 +51,9 @@ public class LossBillServiceImpl implements LossBillService {
@Autowired
UnitsService
unitsService
;
@Autowired
BlockChainUtil
blockChainUtil
;
@Autowired
DeviceLibraryDao
deviceLibraryDao
;
...
...
@@ -223,4 +227,7 @@ public class LossBillServiceImpl implements LossBillService {
);
CompletableFuture
.
runAsync
(()
->
deviceLogService
.
saveAllLog
(
logDtos
));
}
}
dev-misc/src/main/java/com/tykj/dev/misc/base/BusinessEnum.java
浏览文件 @
ff7f23ee
...
...
@@ -68,7 +68,7 @@ public enum BusinessEnum {
/**
* 清退业务
*/
SEND_BACK
(
16
,
"清退
装备交接
业务"
),
SEND_BACK
(
16
,
"清退业务"
),
/**
* 清退异常处理
*/
...
...
@@ -76,7 +76,7 @@ public enum BusinessEnum {
/**
* 清退出库
*/
SEND_BACK_STATISTICAL
(
18
,
"清退统计"
),
SEND_BACK_STATISTICAL
(
18
,
"清退统计
业务
"
),
/**
* 新增配套设备
*/
...
...
@@ -92,7 +92,7 @@ public enum BusinessEnum {
/**
* 退回
*/
ALLOT_BACK
(
22
,
"退回"
),
ALLOT_BACK
(
22
,
"退回
业务
"
),
/**
* 报废
*/
...
...
@@ -101,17 +101,17 @@ public enum BusinessEnum {
/**
* 丢失
*/
LOSS
(
24
,
"丢失"
),
LOSS
(
24
,
"丢失
业务
"
),
/**
* 找回
*/
RETRIEVE
(
25
,
"找回"
),
RETRIEVE
(
25
,
"找回
业务
"
),
/**
* 重新入库
*/
AGAINSTORAGE
(
26
,
"
重新入库
"
);
AGAINSTORAGE
(
26
,
"
装备状态转换业务
"
);
public
Integer
id
;
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
ff7f23ee
...
...
@@ -70,6 +70,12 @@ public class RepelQueryController {
return
ResponseEntity
.
ok
(
repelQueryService
.
findDeviceChooseRepel
(
deviceChoosePageVo
));
}
@PostMapping
(
value
=
"/idsList"
)
@ApiOperation
(
value
=
"清退选择装备id集合"
,
notes
=
"清退选择装备id集合"
)
public
ResponseEntity
idsList
(
@RequestBody
DeviceChoosePageVo
deviceChoosePageVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
findIdList
(
deviceChoosePageVo
));
}
@PostMapping
(
value
=
"/deviceChooseRepel1"
)
@ApiOperation
(
value
=
"省本级任务清退装备查询接口"
,
notes
=
"省本级任务清退装备查询接口"
)
public
ResponseEntity
findDeviceRepel1
(
@RequestBody
DeviceChoosePageVo
deviceChoosePageVo
){
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/DeviceRepelDetail.java
浏览文件 @
ff7f23ee
...
...
@@ -251,10 +251,13 @@ public class DeviceRepelDetail extends BaseEntity {
@Column
(
name
=
"script_json"
,
columnDefinition
=
"TEXT"
)
private
String
scriptJson
;
@Transient
private
List
<
ScriptSaveVo
>
scripts
=
new
ArrayList
<>();
@Column
(
name
=
"directly_under_devices"
,
columnDefinition
=
"TEXT"
)
private
String
directlyUnderDevices
;
@Transient
private
List
<
ScriptSaveVo
>
scripts
=
new
ArrayList
<>();
@Transient
private
List
<
FileRet
>
sendFileList
=
new
ArrayList
<>();
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/DirectlyUnderDevicesVo.java
0 → 100644
浏览文件 @
ff7f23ee
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DirectlyUnderDevicesVo.java
* @Description 直属单位提交装备列表对象
* @createTime 2021年04月18日 14:10:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"直属单位提交装备列表"
)
public
class
DirectlyUnderDevicesVo
{
@ApiModelProperty
(
value
=
"单位id"
)
private
Integer
unitId
;
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@ApiModelProperty
(
value
=
"装备id集合"
)
private
List
<
Integer
>
idsList
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
ff7f23ee
...
...
@@ -35,6 +35,10 @@ public interface RepelQueryService {
*/
DeviceChooseRepel
findDeviceChooseRepel
(
DeviceChoosePageVo
deviceChoosePageVo
);
/**
* 根据列装id,以及当前用户 查询提交装备的ID集合
*/
List
<
Integer
>
findIdList
(
DeviceChoosePageVo
deviceChoosePageVo
);
/**
* 区县出库界面查询接口 根据taskid查询出库装备列表
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/DeviceRepelDetailServiceImpl.java
浏览文件 @
ff7f23ee
...
...
@@ -92,12 +92,10 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
return
deviceRepelDetailDao
.
findAllByReceiveUnitIdIn
(
unitIds
);
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
","
)
)
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
List
<
String
>
idListString
=
idStringList
.
stream
().
filter
(
list2
->!
list2
.
equals
(
""
)).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
idListString
);
List
<
Integer
>
devIds
=
idListString
.
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
return
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
devIds
).
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
());
}
else
{
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
ff7f23ee
...
...
@@ -665,8 +665,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
taskService
.
moveToEnd
(
taskService
.
findBillTypeAndFatherId
(
BusinessEnum
.
SEND_BACK
.
id
,
taskId
));
}
else
{
if
(
storageDeviceRepel
.
getIsIgnore
()==
null
)
{
List
<
StatusEnum
>
enumList
=
new
ArrayList
<>();
enumList
.
add
(
StatusEnum
.
SEND_BACK_1209
);
enumList
.
add
(
StatusEnum
.
SEND_BACK_1218
);
//判断当前状态是否为SEND_BACK_1209 清退装备等待入库
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SEND_BACK_1209
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
enumList
);
repelTaskStatistical
.
setTaskStatus
(
4
);
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1215
,
0
);
}
else
{
...
...
@@ -756,8 +759,25 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SEND_BACK_1202
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
Map
<
String
,
List
<
Integer
>>
map
=
new
HashMap
<>();
List
<
DeviceLibrary
>
libraries
=
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
libraries
.
forEach
(
deviceLibrary
->
{
if
(
map
.
containsKey
(
deviceLibrary
.
getOwnUnit
())){
List
<
Integer
>
list
=
map
.
get
(
deviceLibrary
.
getOwnUnit
());
list
.
add
(
deviceLibrary
.
getId
());
map
.
put
(
deviceLibrary
.
getOwnUnit
(),
list
);
}
else
{
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
deviceLibrary
.
getId
());
map
.
put
(
deviceLibrary
.
getOwnUnit
(),
list
);
}
}
);
deviceRepelDetail
.
setDirectlyUnderDevices
(
JacksonUtil
.
toJSon
(
map
));
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
devLogAdd
(
libraries
,
"省直属清退,把装备转变为待清退"
,
securityUser
.
getCurrentUserInfo
().
getUserId
());
deviceLibraryDao
.
upDateLeftStatusAndLockStatus
(
filterTypeReturnLeftStatus
(
deviceRepel
.
getType
()),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1213
,
0
);
...
...
@@ -778,7 +798,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
enumList
.
add
(
StatusEnum
.
SEND_BACK_1212
);
enumList
.
add
(
StatusEnum
.
SEND_BACK_1204
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
enumList
);
taskService
.
moveToEnd
(
taskService
.
get
(
taskId
));
}
...
...
@@ -813,7 +832,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setReceiveUserA
(
storageDeviceRepel
.
getUserAName
());
}
if
(
units
.
getLevel
()==
3
)
{
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
RETIRE
.
id
,
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
DeviceLifeStatus
.
SEND_BACK
.
id
,
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
}
else
{
deviceLibraryDao
.
upDateLeftStatusAndUnitNameAndLockStatus
(
filterTypeReturnLeftStatus
(
deviceRepel
.
getType
()),
deviceRepelDetail
.
getReceiveUnit
(),
0
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
}
...
...
@@ -974,7 +993,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
List
<
Integer
>
list
=
new
ArrayList
<>();
list
.
add
(
userId
);
list
.
add
(
0
);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1202
.
id
,
title
+
"直属单位"
,
parentTaskId
,
"."
,
repelDetailId
,
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
1
,
""
,
list
));
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1202
.
id
,
title
+
"直属单位"
,
parentTaskId
,
"."
,
repelDetailId
,
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
1
,
"
DirectlyUnder
"
,
list
));
}
/**
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
ff7f23ee
...
...
@@ -19,6 +19,7 @@ import com.tykj.dev.device.user.subject.service.UnitsService;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.DeviceLifeStatus
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.PageUtil
;
...
...
@@ -27,6 +28,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
javax.persistence.Transient
;
...
...
@@ -150,6 +152,51 @@ public class RepelQueryServiceImpl implements RepelQueryService {
return
new
DeviceChooseRepel
(
deviceLibraryPage
,
deviceLibraryPageAbnormal
,
isNotSub
);
}
@Override
public
List
<
Integer
>
findIdList
(
DeviceChoosePageVo
deviceChoosePageVo
)
{
List
<
Integer
>
deviceLibraries
=
new
ArrayList
<>();
Units
units
=
unitsService
.
findById
(
deviceChoosePageVo
.
getUnitId
());
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetail
(
taskService
.
get
(
deviceChoosePageVo
.
getTaskId
()).
getBillId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
if
(
deviceRepel
.
getSeqNumbers
()==
null
||
deviceRepel
.
getSeqNumbers
().
equals
(
""
))
{
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
deviceChoosePageVo
.
getFielding
(),
units
.
getName
()).
stream
()
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPEL
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
deviceLibrary
->
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
15
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
deviceLibraries
.
add
(
deviceLibrary
.
getId
());
}
}
}
);
}
else
{
deviceLibraryDao
.
findAllBySeqNumberIn
(
DeviceSeqUtil
.
selectDeviceSeqs
(
deviceRepel
.
getSeqNumbers
())).
stream
()
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPEL
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPAIRING
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
USE
.
id
))
.
filter
(
deviceLibrary
->
deviceLibrary
.
getOwnUnit
().
equals
(
units
.
getName
()))
.
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
deviceLibrary
->
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
()))
{
if
(
deviceLibrary
.
getLifeStatus
()
==
2
||
deviceLibrary
.
getLifeStatus
()
==
15
||
deviceLibrary
.
getLifeStatus
()
==
14
||
deviceLibrary
.
getLifeStatus
()
==
6
)
{
deviceLibraries
.
add
(
deviceLibrary
.
getId
());
}
}
}
);
}
return
deviceLibraries
;
}
private
List
<
DeviceLibrary
>
findModelAndType
(
DeviceSelectVo
deviceSelectVo
,
List
<
DeviceLibrary
>
libraries
){
if
(
deviceSelectVo
.
getModel
()!=
null
&&
deviceSelectVo
.
getType
()==
null
){
return
libraries
.
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getModel
().
equals
(
deviceSelectVo
.
getModel
())).
collect
(
Collectors
.
toList
());
...
...
@@ -282,7 +329,19 @@ public class RepelQueryServiceImpl implements RepelQueryService {
Units
units
=
unitsService
.
findById
(
unitId
);
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
return
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()).
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getOwnUnit
().
equals
(
units
.
getName
())).
collect
(
Collectors
.
toList
());
Map
<
String
,
List
<
Integer
>>
map
=
JacksonUtil
.
readValue
(
deviceRepelDetail
.
getDirectlyUnderDevices
(),
new
TypeReference
<
Map
<
String
,
List
<
Integer
>>>()
{});
if
(
map
!=
null
)
{
if
(
map
.
containsKey
(
units
.
getName
()))
{
return
deviceLibraryDao
.
findAllById
(
map
.
get
(
units
.
getName
()));
}
else
{
log
.
info
(
"直属单位-{}-没有提交的装备,请查看"
,
units
.
getName
());
return
new
ArrayList
<>();
}
}
else
{
log
.
info
(
"直属单位任务{}没有提交的装备,请查看"
,
taskBto
.
getId
());
return
new
ArrayList
<>();
}
}
@Override
...
...
dev-train/src/main/java/com/tykj/dev/device/train/controller/TrainJobController.java
浏览文件 @
ff7f23ee
...
...
@@ -504,7 +504,7 @@ public class TrainJobController {
}
private
TrainUser
saveTrainUser
(
TrainUser
trainUser
){
TrainUser
trainUser1
=
trainUserDao
.
save
(
trainUser
);
TrainUser
trainUser1
=
trainUserDao
.
save
(
trainUser
);
BcHash
bcHash
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
trainUser1
));
trainUser1
.
setRecordId
(
bcHash
.
getData
().
getRecordID
());
// log.info("id----{}",bcHash.getData().getRecordID());
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/UserPublicService.java
浏览文件 @
ff7f23ee
...
...
@@ -47,4 +47,6 @@ public interface UserPublicService {
List
<
Integer
>
findOtherUser
(
Integer
userId
);
String
getAreaNameByUnitName
(
String
unitName
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论