Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
50f3ecce
提交
50f3ecce
authored
3月 13, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[销毁 清退] 代码修改 添加单据装备字段
上级
c3c64513
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
133 行增加
和
12 行删除
+133
-12
DeviceDestroyController.java
...ev/device/destroy/controller/DeviceDestroyController.java
+9
-5
DeviceDestroyBill.java
...j/dev/device/destroy/entity/domain/DeviceDestroyBill.java
+8
-0
DeviceDestroyDetailResultVo.java
...device/destroy/entity/vo/DeviceDestroyDetailResultVo.java
+7
-1
DeviceDestroyFormVo.java
...ykj/dev/device/destroy/entity/vo/DeviceDestroyFormVo.java
+9
-0
RepelDevController.java
...kj/dev/device/sendback/controller/RepelDevController.java
+10
-0
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+9
-0
DeviceRepelDetail.java
.../dev/device/sendback/entity/domain/DeviceRepelDetail.java
+11
-0
OrderOutData.java
.../com/tykj/dev/device/sendback/entity/vo/OrderOutData.java
+4
-2
DeviceRepelDetailDao.java
.../dev/device/sendback/repository/DeviceRepelDetailDao.java
+2
-0
DeviceRepelDetailService.java
...dev/device/sendback/service/DeviceRepelDetailService.java
+3
-0
RepelBusinessService.java
...ykj/dev/device/sendback/service/RepelBusinessService.java
+8
-0
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+5
-0
DeviceRepelDetailServiceImpl.java
...e/sendback/service/impl/DeviceRepelDetailServiceImpl.java
+5
-0
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+15
-3
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+16
-1
TaskDao.java
...ain/java/com/tykj/dev/device/task/repository/TaskDao.java
+2
-0
TaskService.java
...in/java/com/tykj/dev/device/task/service/TaskService.java
+5
-0
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+5
-0
没有找到文件。
dev-destroy/src/main/java/com/tykj/dev/device/destroy/controller/DeviceDestroyController.java
浏览文件 @
50f3ecce
package
com
.
tykj
.
dev
.
device
.
destroy
.
controller
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill
;
import
com.tykj.dev.device.destroy.entity.enums.DestroyStatus
;
...
...
@@ -12,6 +13,7 @@ import com.tykj.dev.device.library.subject.Dto.DeviceLogDto;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo
;
import
com.tykj.dev.device.library.subject.vo.FileVo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.task.service.TaskLogService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
...
...
@@ -21,15 +23,13 @@ import com.tykj.dev.device.user.util.AuthenticationUtils;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.ListUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.TaskDisposeUtil
;
import
com.tykj.dev.misc.utils.*
;
import
com.tykj.dev.rfid.service.InputOutputDeviceService
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -98,6 +98,7 @@ public class DeviceDestroyController {
destroyBill
.
setDestroyStatus
(
DestroyStatus
.
CONFIRM_SUCCESS
.
getStatus
());
//设置销毁时间
destroyBill
.
setDestroyTime
(
formVo
.
getDestroyTime
());
destroyBill
.
setScriptJson
(
JacksonUtil
.
toJSon
(
formVo
.
getScriptSaveVos
()));
//保存销毁账单
DeviceDestroyBill
deviceDestroyBillEntitySaved
=
deviceDestroyBillService
.
addEntity
(
destroyBill
);
//为账单新增文号
...
...
@@ -169,7 +170,10 @@ public class DeviceDestroyController {
StringUtils
.
join
(
nameSet
,
","
),
StringUtils
.
join
(
modelSet
,
","
),
userPublicService
.
findUnitsNameByUserId
(
destroyBill
.
getStartUserAId
()),
devices
devices
,
JacksonUtil
.
readValue
(
destroyBill
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
})
);
return
ResultUtil
.
success
(
destroyDetailResultVo
);
}
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/entity/domain/DeviceDestroyBill.java
浏览文件 @
50f3ecce
...
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.destroy.entity.domain;
import
com.tykj.dev.device.destroy.entity.enums.DestroyStatus
;
import
com.tykj.dev.device.destroy.entity.vo.DeviceDestroyFormVo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -17,6 +18,7 @@ import org.springframework.data.annotation.LastModifiedDate;
import
org.springframework.data.jpa.domain.support.AuditingEntityListener
;
import
javax.persistence.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -158,6 +160,12 @@ public class DeviceDestroyBill {
@ApiModelProperty
(
value
=
"区块链记录id"
)
private
String
recordId
;
@Column
(
name
=
"script_json"
,
columnDefinition
=
"TEXT"
)
private
String
scriptJson
;
@Transient
private
List
<
ScriptSaveVo
>
scripts
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"单号"
)
@Transient
private
String
num
;
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/entity/vo/DeviceDestroyDetailResultVo.java
浏览文件 @
50f3ecce
package
com
.
tykj
.
dev
.
device
.
destroy
.
entity
.
vo
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Transient
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -68,7 +70,10 @@ public class DeviceDestroyDetailResultVo {
@ApiModelProperty
(
value
=
"销毁装备列表"
,
example
=
"1"
)
private
List
<
DeviceLibrary
>
devices
=
new
ArrayList
<>();
public
DeviceDestroyDetailResultVo
(
Integer
startUserId
,
Integer
confirmUserId
,
String
startUser
,
String
confirmUser
,
Integer
destoryStatus
,
String
fileName
,
String
fileUrl
,
String
docNumber
,
Date
createTime
,
String
undertaker
,
String
leader
,
String
supervisor
,
String
name
,
String
model
,
String
unit
,
List
<
DeviceLibrary
>
devices
)
{
@ApiModelProperty
(
value
=
"装备数据"
,
example
=
"1"
)
private
List
<
ScriptSaveVo
>
scripts
=
new
ArrayList
<>();
public
DeviceDestroyDetailResultVo
(
Integer
startUserId
,
Integer
confirmUserId
,
String
startUser
,
String
confirmUser
,
Integer
destoryStatus
,
String
fileName
,
String
fileUrl
,
String
docNumber
,
Date
createTime
,
String
undertaker
,
String
leader
,
String
supervisor
,
String
name
,
String
model
,
String
unit
,
List
<
DeviceLibrary
>
devices
,
List
<
ScriptSaveVo
>
scripts
)
{
this
.
startUserId
=
startUserId
;
this
.
confirmUserId
=
confirmUserId
;
this
.
startUser
=
startUser
;
...
...
@@ -85,5 +90,6 @@ public class DeviceDestroyDetailResultVo {
this
.
model
=
model
;
this
.
unit
=
unit
;
this
.
devices
=
devices
;
this
.
scripts
=
scripts
;
}
}
dev-destroy/src/main/java/com/tykj/dev/device/destroy/entity/vo/DeviceDestroyFormVo.java
浏览文件 @
50f3ecce
package
com
.
tykj
.
dev
.
device
.
destroy
.
entity
.
vo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Transient
;
import
javax.validation.constraints.NotEmpty
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -44,4 +48,9 @@ public class DeviceDestroyFormVo {
@ApiModelProperty
(
value
=
"销毁时间"
)
private
Date
destroyTime
;
@ApiModelProperty
(
value
=
"销毁单据装备数据"
)
private
List
<
ScriptSaveVo
>
scriptSaveVos
=
new
ArrayList
<>();
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelDevController.java
浏览文件 @
50f3ecce
...
...
@@ -188,6 +188,16 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"签发人选择成功"
);
}
/**
* 重新入库接口
*/
@ApiOperation
(
value
=
"重新入库接口"
,
notes
=
"重新入库接口"
)
@PostMapping
(
value
=
"/againPutInStorage"
)
public
ResponseEntity
againPutInStorage
(
@RequestBody
List
<
Integer
>
ids
){
repelBusinessService
.
againPutInStorage
(
ids
);
return
ResponseEntity
.
ok
(
"重新入库成功"
);
}
/**
* 测试
*/
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
50f3ecce
...
...
@@ -172,4 +172,13 @@ public class RepelQueryController {
List
<
TaskUserVo
>
taskUserVos
=
taskService
.
getManageList
(
taskSelectVo
).
stream
().
filter
(
taskUserVo
->
taskUserVo
.
getBusinessType
()==
18
||
taskUserVo
.
getBusinessType
()==
16
).
collect
(
Collectors
.
toList
());
return
ResultUtil
.
success
(
PageUtil
.
getPerPage
(
taskSelectVo
.
getPage
(),
taskSelectVo
.
getSize
(),
taskUtils
.
orderByTopDesc
(
taskUserVos
),
taskSelectVo
.
getPageable
()));
}
/**
* 查询退役中办任务
*/
@ApiOperation
(
value
=
"查询退役中办任务"
)
@GetMapping
(
"/outsideTheProvince"
)
public
ResponseEntity
findOutsideTheProvince
()
{
return
ResponseEntity
.
ok
(
repelQueryService
.
findOutsideTheProvince
());
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/DeviceRepelDetail.java
浏览文件 @
50f3ecce
...
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.sendback.entity.domain;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.misc.base.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -240,6 +241,13 @@ public class DeviceRepelDetail extends BaseEntity {
@Column
(
name
=
"send_files"
,
columnDefinition
=
"TEXT"
)
private
String
sendFiles
;
@Column
(
name
=
"script_json"
,
columnDefinition
=
"TEXT"
)
private
String
scriptJson
;
@Transient
private
List
<
ScriptSaveVo
>
scripts
=
new
ArrayList
<>();
@Transient
private
List
<
FileRet
>
replyFileList
=
new
ArrayList
<>();
...
...
@@ -263,4 +271,7 @@ public class DeviceRepelDetail extends BaseEntity {
@ApiModelProperty
(
value
=
"清退单对象"
)
private
List
<
FileRet
>
outboundFiles
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/OrderOutData.java
浏览文件 @
50f3ecce
...
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.sendback.entity.vo;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -176,12 +177,13 @@ public class OrderOutData {
@ApiModelProperty
(
value
=
"发件单位签章id"
)
private
String
leftSignatureId
;
@Transient
private
List
<
FileRet
>
replyFileList
=
new
ArrayList
<>();
@Transient
private
List
<
FileRet
>
sendFileList
=
new
ArrayList
<>();
@ApiModelProperty
(
value
=
"单据装备数据信息"
)
private
List
<
ScriptSaveVo
>
scriptSaveVos
=
new
ArrayList
<>();
public
DeviceRepelDetail
toTrainDetailsVo
()
{
ModelMapper
mapper
=
BeanHelper
.
getUserMapper
();
return
mapper
.
map
(
this
,
DeviceRepelDetail
.
class
);
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/repository/DeviceRepelDetailDao.java
浏览文件 @
50f3ecce
...
...
@@ -13,4 +13,6 @@ public interface DeviceRepelDetailDao extends JpaRepository<DeviceRepelDetail, I
@Query
(
value
=
"select d from DeviceRepelDetail as d where d.sendUnitId= ?1 or d.receiveUnitId = ?1"
)
List
<
DeviceRepelDetail
>
findAllBySendUnitIdOrReceiveUnitId
(
Integer
unitId
);
List
<
DeviceRepelDetail
>
findAllByReceiveUnitIdIn
(
List
<
Integer
>
ids
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/DeviceRepelDetailService.java
浏览文件 @
50f3ecce
...
...
@@ -34,5 +34,8 @@ public interface DeviceRepelDetailService {
*/
List
<
DeviceLibrary
>
findYearAndUnitToDeviceList
(
Date
time
,
Date
endTime
,
Integer
unitId
);
List
<
DeviceRepelDetail
>
findUnitIdSendOrReceive
(
Integer
unitId
);
List
<
DeviceRepelDetail
>
findIdsReceiptUnits
(
List
<
Integer
>
unitIds
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelBusinessService.java
浏览文件 @
50f3ecce
...
...
@@ -8,6 +8,7 @@ import com.tykj.dev.device.sendback.entity.vo.ResolveConfirm;
import
com.tykj.dev.device.sendback.entity.vo.StorageDeviceRepel
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
java.util.List
;
public
interface
RepelBusinessService
{
...
...
@@ -117,4 +118,11 @@ public interface RepelBusinessService {
* 添加发件签发人员信息
*/
void
addSendBUser
(
StorageDeviceRepel
storageDeviceRepel
);
/**
* 装备重新入库 改变装备的生命状态
* @param ids 装备id
*/
void
againPutInStorage
(
List
<
Integer
>
ids
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
50f3ecce
...
...
@@ -4,6 +4,7 @@ import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepel
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.vo.*
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
java.util.List
;
...
...
@@ -90,5 +91,9 @@ public interface RepelQueryService {
*/
List
<
DeviceRepelDetail
>
getList
(
SecurityUser
securityUser
);
/**
* 查询上级
*/
List
<
TaskBto
>
findOutsideTheProvince
();
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/DeviceRepelDetailServiceImpl.java
浏览文件 @
50f3ecce
...
...
@@ -84,6 +84,11 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
return
deviceRepelDetailDao
.
findAllBySendUnitIdOrReceiveUnitId
(
unitId
);
}
@Override
public
List
<
DeviceRepelDetail
>
findIdsReceiptUnits
(
List
<
Integer
>
unitIds
)
{
return
deviceRepelDetailDao
.
findAllByReceiveUnitIdIn
(
unitIds
);
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
","
)
)
{
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
50f3ecce
...
...
@@ -10,6 +10,7 @@ import com.tykj.dev.device.library.service.DeviceLogService;
import
com.tykj.dev.device.library.subject.Dto.DeviceLogDto
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLog
;
import
com.tykj.dev.device.library.subject.vo.LifeStatusVo
;
import
com.tykj.dev.device.packing.repository.PackingLibraryDao
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepel
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
...
...
@@ -494,8 +495,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
orderOutDataRepelDetail
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()+
"QT"
+
taskBto
.
getBillId
());
orderOutDataRepelDetail
.
setReplyFiles
(
FilesUtil
.
stringFileToList
(
orderOutData
.
getReplyFileList
()));
orderOutDataRepelDetail
.
setSendFiles
(
FilesUtil
.
stringFileToList
(
orderOutData
.
getSendFileList
()));
deviceRepelDetailService
.
saveDeviceRepelDetail
(
orderOutDataRepelDetail
);
orderOutDataRepelDetail
.
setScriptJson
(
JacksonUtil
.
toJSon
(
orderOutData
.
getScriptSaveVos
()));
orderOutDataRepelDetail
.
setScripts
(
orderOutData
.
getScriptSaveVos
());
deviceRepelDetailService
.
saveDeviceRepelDetail
(
orderOutDataRepelDetail
);
deviceLibraryDao
.
upDateLeftStatusAndOwnUnitName
(
DeviceLifeStatus
.
REPEL
.
id
,
orderOutData
.
getReceiveUnit
(),
StringUtils
.
stringToList
(
orderOutDataRepelDetail
.
getDeviceIds
()));
taskBto
.
setCreateUserId
(
userId
);
taskBto
.
setOwnUnit
(
orderOutData
.
getReceiveUnitId
());
...
...
@@ -600,7 +602,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
enumList
.
add
(
StatusEnum
.
SEND_BACK_1203
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
enumList
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
deviceRepelDetail
.
setBillFile
(
FilesUtil
.
stringFileToList
(
storageDeviceRepel
.
getFileRets
()));
deviceRepelDetail
.
setRepelStatus
(
2
);
...
...
@@ -676,6 +677,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceLibraryDao
.
upDateLeftStatusAndOwnUnitName
(
DeviceLifeStatus
.
REPEL
.
id
,
orderOutData
.
getReceiveUnit
(),
orderOutData
.
getDevIds
());
deviceRepelDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()));
deviceRepelDetail
.
setScripts
(
orderOutData
.
getScriptSaveVos
());
deviceRepelDetail
.
setScriptJson
(
JacksonUtil
.
toJSon
(
orderOutData
.
getScriptSaveVos
()));
TaskBto
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
deviceRepelDetail
.
getId
(),
null
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起退役任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
return
deviceRepelDetail
;
...
...
@@ -745,6 +748,15 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
}
@Override
public
void
againPutInStorage
(
List
<
Integer
>
ids
)
{
List
<
DeviceLibrary
>
deviceLibraries
=
deviceLibraryDao
.
getDeviceLibraryEntitiesByIdIn
(
ids
);
deviceLibraries
.
forEach
(
deviceLibrary
->
deviceLibrary
.
setLifeStatus
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
);
deviceLibraryService
.
sendHash
(
deviceLibraries
);
}
/**
* 生成区清退任务
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
50f3ecce
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
.
impl
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepel
;
import
com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail
;
import
com.tykj.dev.device.sendback.entity.vo.*
;
...
...
@@ -13,7 +15,9 @@ import com.tykj.dev.device.task.subject.bto.TaskBto;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.DeviceLifeStatus
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -55,7 +59,10 @@ public class RepelQueryServiceImpl implements RepelQueryService {
@Override
public
DeviceRepelDetail
findDeviceRepelDetail
(
Integer
taskId
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
return
repelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepelDetail
deviceRepelDetail
=
repelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
deviceRepelDetail
.
setScripts
(
JacksonUtil
.
readValue
(
deviceRepelDetail
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
}));
return
deviceRepelDetail
;
}
@Override
...
...
@@ -218,6 +225,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
if
(
deviceRepelDetail
.
getOutboundFile
()!=
null
){
deviceRepelDetail
.
setOutboundFiles
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getOutboundFile
()));
}
deviceRepelDetail
.
setScripts
(
JacksonUtil
.
readValue
(
deviceRepelDetail
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{}));
deviceRepelDetail
.
setDeviceLibraryEntities
(
deviceLibraryDao
.
findAllById
(
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
())).
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
collect
(
Collectors
.
toList
()));
list
.
add
(
deviceRepelDetail
);
}
...
...
@@ -225,6 +233,13 @@ public class RepelQueryServiceImpl implements RepelQueryService {
return
list
;
}
@Override
public
List
<
TaskBto
>
findOutsideTheProvince
()
{
List
<
Integer
>
unitIds
=
unitsService
.
findSuperiorUnitsList
().
stream
().
map
(
Units:
:
getUnitId
).
collect
(
Collectors
.
toList
());
List
<
DeviceRepelDetail
>
list
=
repelDetailService
.
findIdsReceiptUnits
(
unitIds
);
return
taskService
.
findBillIdAndBillType
(
list
.
stream
().
map
(
DeviceRepelDetail:
:
getId
).
collect
(
Collectors
.
toList
()),
BusinessEnum
.
SEND_BACK
.
id
);
}
private
DevRepelVo
devRepelVo
(
DeviceLibrary
deviceLibrary
){
return
new
DevRepelVo
(
deviceLibrary
.
getId
(),
deviceLibrary
.
getName
(),
deviceLibrary
.
getModel
(),
deviceLibrary
.
getSeqNumber
(),
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
(),
deviceLibrary
.
getUpdateTime
());
...
...
dev-task/src/main/java/com/tykj/dev/device/task/repository/TaskDao.java
浏览文件 @
50f3ecce
...
...
@@ -66,4 +66,6 @@ public interface TaskDao extends JpaRepository<Task, Integer>, JpaSpecificationE
Task
findByParentTaskIdAndAndTitle
(
Integer
parentId
,
String
title
);
List
<
Task
>
findAllByBusinessType
(
Integer
businessType
);
List
<
Task
>
findAllByBillIdInAndBusinessType
(
List
<
Integer
>
ids
,
Integer
type
);
}
dev-task/src/main/java/com/tykj/dev/device/task/service/TaskService.java
浏览文件 @
50f3ecce
...
...
@@ -165,4 +165,9 @@ public interface TaskService {
* 工作交接替换跟踪和待办
*/
void
workHandover
(
Integer
oldUserId
,
Integer
newUserId
);
/**
* 根据业务id 以及 业务类型进行查询
*/
List
<
TaskBto
>
findBillIdAndBillType
(
List
<
Integer
>
billIds
,
Integer
billType
);
}
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
50f3ecce
...
...
@@ -614,6 +614,11 @@ public class TaskServiceImpl implements TaskService {
myWebSocket
.
sendMessage1
();
}
@Override
public
List
<
TaskBto
>
findBillIdAndBillType
(
List
<
Integer
>
billIds
,
Integer
billType
)
{
return
taskDao
.
findAllByBillIdInAndBusinessType
(
billIds
,
billType
).
stream
().
map
(
Task:
:
parse2Bto
).
collect
(
Collectors
.
toList
());
}
/**
* @param taskSelectVo 查询vo
* 查询跟踪和待办列表
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论