Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
c804b39f
提交
c804b39f
authored
1月 19, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[清退] 提交省直属代码
上级
b559b8a3
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
278 行增加
和
39 行删除
+278
-39
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+1
-0
RepelDevController.java
...kj/dev/device/sendback/controller/RepelDevController.java
+10
-2
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+21
-0
DeviceRepelDetail.java
.../dev/device/sendback/entity/domain/DeviceRepelDetail.java
+10
-0
DevRepelVo.java
...va/com/tykj/dev/device/sendback/entity/vo/DevRepelVo.java
+29
-0
DeviceIdLIstVo.java
...om/tykj/dev/device/sendback/entity/vo/DeviceIdLIstVo.java
+24
-0
ModelAndTypeVo.java
...om/tykj/dev/device/sendback/entity/vo/ModelAndTypeVo.java
+26
-0
ModelNameGroup.java
...om/tykj/dev/device/sendback/entity/vo/ModelNameGroup.java
+36
-0
StorageDeviceRepel.java
...ykj/dev/device/sendback/entity/vo/StorageDeviceRepel.java
+2
-0
RepelBusinessService.java
...ykj/dev/device/sendback/service/RepelBusinessService.java
+7
-5
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+24
-8
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+14
-13
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+74
-11
没有找到文件。
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
c804b39f
...
...
@@ -83,6 +83,7 @@ public enum StatusEnum {
SEND_BACK_1210
(
1210
,
"省清退送往中办等待回执单"
),
SEND_BACK_1211
(
1211
,
"市发清退任务待省审核"
),
SEND_BACK_1212
(
1212
,
"清退统计任务待办结"
),
SEND_BACK_1213
(
1213
,
"省直属清退任务待上传单据"
),
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelDevController.java
浏览文件 @
c804b39f
...
...
@@ -81,8 +81,7 @@ public class RepelDevController {
@ApiOperation
(
value
=
"清退出库任务接口"
,
notes
=
"清退出库任务接口"
)
@PostMapping
(
value
=
"/sendBackOutCheck/{userId}/{taskId}"
)
public
ResponseEntity
sendBackOutCheck
(
@PathVariable
Integer
taskId
,
@RequestBody
OrderOutData
orderOutData
,
@PathVariable
Integer
userId
){
repelBusinessService
.
sendBackOutCheck
(
taskId
,
userId
,
orderOutData
);
return
ResponseEntity
.
ok
(
"出库成功"
);
return
ResponseEntity
.
ok
(
repelBusinessService
.
sendBackOutCheck
(
taskId
,
userId
,
orderOutData
));
}
/**
...
...
@@ -157,4 +156,13 @@ public class RepelDevController {
return
ResponseEntity
.
ok
(
"统计清退任务的办结"
);
}
/**
* 省直属任务待清退
*/
@ApiOperation
(
value
=
"省直属任务待清退"
,
notes
=
"省直属任务待清退"
)
@GetMapping
(
value
=
"/provinceDirectlyUnder/{taskId}"
)
public
ResponseEntity
provinceDirectlyUnder
(
@PathVariable
Integer
taskId
){
repelBusinessService
.
provinceDirectlyUnder
(
taskId
);
return
ResponseEntity
.
ok
(
"省直属单位任务提交成功"
);
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
c804b39f
package
com
.
tykj
.
dev
.
device
.
sendback
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.sendback.entity.vo.DeviceIdLIstVo
;
import
com.tykj.dev.device.sendback.service.RepelQueryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -90,4 +91,24 @@ public class RepelQueryController {
public
ResponseEntity
provinceDirectlyUnderDev
(
@PathVariable
Integer
taskId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
directlyUnderUnitLeftNavigation
(
taskId
));
}
/**
* 清退管理页面 统计列表数据点击接口
*/
@PostMapping
(
value
=
"/repelManagementListDetails"
)
@ApiOperation
(
value
=
"清退管理页面 统计列表数据点击接口"
,
notes
=
"清退管理页面 统计列表数据点击接口"
)
public
ResponseEntity
repelManagementListDetails
(
@RequestBody
DeviceIdLIstVo
deviceIdLIstVo
){
return
ResponseEntity
.
ok
(
repelQueryService
.
repelManagementListDetails
(
deviceIdLIstVo
.
getIds
()));
}
/**
* 省直属单位 待上传接口装备查询
*/
@GetMapping
(
value
=
"/provinceDirectlyUnderSelectedDev/{taskId}/{unitId}"
)
@ApiOperation
(
value
=
"省直属单位 待上传接口装备查询"
,
notes
=
"省直属单位 待上传接口装备查询"
)
public
ResponseEntity
provinceDirectlyUnderSelectedDev
(
@PathVariable
Integer
taskId
,
@PathVariable
Integer
unitId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
provinceDirectlyUnderSelectedDev
(
taskId
,
unitId
));
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/DeviceRepelDetail.java
浏览文件 @
c804b39f
...
...
@@ -135,13 +135,23 @@ public class DeviceRepelDetail extends BaseEntity {
* 出库附件文件
*/
@ApiModelProperty
(
value
=
"出库附件文件"
)
@Column
(
name
=
"outbound_file"
,
columnDefinition
=
"TEXT"
)
private
String
outboundFile
;
/**
* 清退单文件
*/
@ApiModelProperty
(
value
=
"清退单文件"
)
@Column
(
name
=
"bill_file"
,
columnDefinition
=
"TEXT"
)
private
String
billFile
;
/**
* 入库确认单
*/
@ApiModelProperty
@Column
(
name
=
"in_file"
,
columnDefinition
=
"TEXT"
)
private
String
inFile
;
/**
* 退回状态(1:退回待审核,2:退回审核失败,3:退回中,4:退回接收待审核,5:退回接收审核失败,6:退回成功)
*/
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/DevRepelVo.java
0 → 100644
浏览文件 @
c804b39f
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DevRepelVo.java
* @Description TODO
* @createTime 2021年01月19日 17:40:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"清退管理-统计点击列表对象"
)
public
class
DevRepelVo
{
private
Integer
id
;
private
String
name
;
private
String
model
;
private
String
code
;
private
Integer
type
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/DeviceIdLIstVo.java
0 → 100644
浏览文件 @
c804b39f
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
com.tykj.dev.device.user.base.ret.LeftNavigation
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName DeviceIdLIstVo.java
* @Description TODO
* @createTime 2021年01月19日 18:02:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"接口参数--装备的id集合"
)
public
class
DeviceIdLIstVo
{
private
List
<
Integer
>
ids
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/ModelAndTypeVo.java
0 → 100644
浏览文件 @
c804b39f
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author zjm
* @version 1.0.0
* @ClassName ModelAndTypeVo.java
* @Description TODO
* @createTime 2021年01月19日 14:32:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"接口参数-待清退统计列表的查询对象"
)
public
class
ModelAndTypeVo
{
private
Integer
unitId
;
private
String
model
;
private
Integer
type
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/ModelNameGroup.java
0 → 100644
浏览文件 @
c804b39f
package
com
.
tykj
.
dev
.
device
.
sendback
.
entity
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author zjm
* @version 1.0.0
* @ClassName ModelNameGroup.java
* @Description TODO
* @createTime 2021年01月19日 11:24:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
"给前端-待清退统计对象"
)
public
class
ModelNameGroup
{
/**
* 型号
*/
private
String
model
;
/**
* 类型
*/
private
String
name
;
/**
* 装备id集合
*/
private
List
<
Integer
>
ids
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/StorageDeviceRepel.java
浏览文件 @
c804b39f
...
...
@@ -22,5 +22,7 @@ import java.util.List;
public
class
StorageDeviceRepel
{
private
List
<
FileRet
>
fileRets
;
private
List
<
FileRet
>
inFiles
;
private
List
<
Integer
>
deviceIds
;
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelBusinessService.java
浏览文件 @
c804b39f
package
com
.
tykj
.
dev
.
device
.
sendback
.
service
;
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.OrderOutData
;
import
com.tykj.dev.device.sendback.entity.vo.RepelAuditResult
;
import
com.tykj.dev.device.sendback.entity.vo.ResolveConfirm
;
...
...
@@ -58,7 +59,7 @@ public interface RepelBusinessService {
* 清退装备待出库 装备出库任务
* 出库操作 上传出库单
*/
void
sendBackOutCheck
(
Integer
taskId
,
Integer
userId
,
OrderOutData
orderOutData
);
DeviceRepelDetail
sendBackOutCheck
(
Integer
taskId
,
Integer
userId
,
OrderOutData
orderOutData
);
/**
...
...
@@ -74,10 +75,11 @@ public interface RepelBusinessService {
void
oneselfRepel
(
Integer
taskId
,
StorageDeviceRepel
storageDeviceRepel
,
Integer
userId
);
// /**
// * 省直属单位装备清退
// */
// void provinceDirectlyUnder(Integer taskId,StorageDeviceRepel storageDeviceRepel,Integer userId);
/**
* 省直属任务等待上传
*/
void
provinceDirectlyUnder
(
Integer
taskId
);
/**
* 省\市清退任待办结 签字上传
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
c804b39f
...
...
@@ -3,11 +3,7 @@ package com.tykj.dev.device.sendback.service;
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.domain.RepelTaskStatistical
;
import
com.tykj.dev.device.sendback.entity.vo.DeviceChooseRepel
;
import
com.tykj.dev.device.sendback.entity.vo.DirectlyUnderNavigation
;
import
com.tykj.dev.device.sendback.entity.vo.RepelStatisticsVo
;
import
com.tykj.dev.device.user.base.ret.LeftNavigation
;
import
com.tykj.dev.device.sendback.entity.vo.*
;
import
java.util.List
;
...
...
@@ -47,15 +43,21 @@ public interface RepelQueryService {
/**
* 待清退列表 省
*/
List
<
DeviceLibrary
>
toRepelList
(
Integer
unitId
);
List
<
ModelNameGroup
>
toRepelList
(
Integer
unitId
);
/**
* 待清退页面查询统计查询接口
*/
List
<
ModelNameGroup
>
findRepelListModelNameGroup
(
ModelAndTypeVo
modelAndTypeVo
);
/**
* 已清退列表
*/
List
<
DeviceLibrary
>
clearedList
(
Integer
unitId
);
List
<
ModelNameGroup
>
clearedList
(
Integer
unitId
);
/**
*省直属任务装备查询接口
*省直属任务装备查询接口
(无用)
*/
List
<
DeviceLibrary
>
provinceDirectlyUnderDev
(
Integer
taskId
);
...
...
@@ -64,4 +66,18 @@ public interface RepelQueryService {
* 查询直属单位列表
*/
List
<
DirectlyUnderNavigation
>
directlyUnderUnitLeftNavigation
(
Integer
taskId
);
/**
*省直属任务装备已选择装备列表接口
*/
List
<
DeviceLibrary
>
provinceDirectlyUnderSelectedDev
(
Integer
taskId
,
Integer
unitId
);
/**
* 清退管理 列表数据点击查询接口
*/
List
<
DevRepelVo
>
repelManagementListDetails
(
List
<
Integer
>
ids
);
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
c804b39f
...
...
@@ -325,7 +325,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
);
log
.
info
(
"存储设备开始"
);
long
time1
=
System
.
currentTimeMillis
();
deviceLibraryDao
.
upDateLeftStatus
(
2
,
resolveConfirm
.
getDevIds
());
deviceLibraryDao
.
upDateLeftStatus
(
15
,
resolveConfirm
.
getDevIds
());
log
.
info
(
"存储结束{}"
,
System
.
currentTimeMillis
()-
time1
);
for
(
String
key:
map
.
keySet
()){
ModelCount
modelCount
=
new
ModelCount
();
...
...
@@ -357,11 +357,7 @@ log.info("存储结束{}",System.currentTimeMillis()-time1);
}
else
{
//审核失败
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1206
,
0
);
List
<
DeviceLibrary
>
deviceLibraries
=
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
());
deviceLibraries
.
forEach
(
deviceLibrary
->
deviceLibrary
.
setLifeStatus
(
2
)
);
deviceLibraryDao
.
saveAll
(
deviceLibraries
);
deviceLibraryDao
.
upDateLeftStatus
(
2
,
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
}
deviceRepelDetail
.
setAuditingFeedback
(
repelAuditResult
.
getDes
());
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
...
...
@@ -376,7 +372,7 @@ log.info("存储结束{}",System.currentTimeMillis()-time1);
@Override
public
void
sendBackOutCheck
(
Integer
taskId
,
Integer
userId
,
OrderOutData
orderOutData
)
{
public
DeviceRepelDetail
sendBackOutCheck
(
Integer
taskId
,
Integer
userId
,
OrderOutData
orderOutData
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepelDetail
orderOutDataRepelDetail
=
orderOutData
.
toTrainDetailsVo
();
...
...
@@ -390,8 +386,10 @@ log.info("存储结束{}",System.currentTimeMillis()-time1);
taskBto
.
setOwnUnit
(
orderOutData
.
getReceiveUnitId
());
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1209
,
0
);
devLogAdd
(
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()),
deviceRepelDetail
.
getSendUnit
()+
"装备清退出库"
+
",等待"
+
deviceRepelDetail
.
getReceiveUnit
()+
"接收"
);
//把一些字段填写到对象中,保存入库
orderOutDataRepelDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()));
//把一些字段填写到对象中,保存入库
//把任务状态修改为 清退提交装备待接收
return
orderOutDataRepelDetail
;
}
@Override
...
...
@@ -400,6 +398,7 @@ log.info("存储结束{}",System.currentTimeMillis()-time1);
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
deviceRepelDetail
.
setBillFile
(
FilesUtil
.
stringFileToList
(
storageDeviceRepel
.
getFileRets
()));
deviceRepelDetail
.
setInFile
(
FilesUtil
.
stringFileToList
(
storageDeviceRepel
.
getInFiles
()));
taskService
.
moveToEnd
(
taskBto
);
//判断是否为 市提交 是则为在库
//否则为待清退
...
...
@@ -462,7 +461,7 @@ log.info("存储结束{}",System.currentTimeMillis()-time1);
deviceLibraryDao
.
upDateLeftStatusAndUnitName
(
15
,
units
.
getName
(),
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
()));
log
.
info
(
"更新数据装备以及所属单位{}"
,
System
.
currentTimeMillis
()-
time
);
deviceRepelDetail
.
setDeviceIds
(
ids
.
toString
());
//
deviceRepelDetail.setDeviceIds(ids.toString());
// deviceLibraryDao.saveAll(libraries);
repelDeviceUnitService
.
saveAllRepelDeviceUnit
(
list
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
...
...
@@ -473,10 +472,12 @@ log.info("存储结束{}",System.currentTimeMillis()-time1);
//把装备的状态都修改为待清退。
}
// @Override
// public void provinceDirectlyUnder(Integer taskId, StorageDeviceRepel storageDeviceRepel, Integer userId) {
//
// }
@Override
public
void
provinceDirectlyUnder
(
Integer
taskId
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1213
,
0
);
}
@Override
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
c804b39f
...
...
@@ -4,9 +4,9 @@ import com.tykj.dev.device.library.repository.DeviceLibraryDao;
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.DeviceChooseRepel
;
import
com.tykj.dev.device.sendback.entity.
vo.DirectlyUnderNavigation
;
import
com.tykj.dev.device.sendback.entity.vo.
RepelStatisticsVo
;
import
com.tykj.dev.device.sendback.entity.
domain.RepelDeviceUnit
;
import
com.tykj.dev.device.sendback.entity.
domain.RepelTaskStatistical
;
import
com.tykj.dev.device.sendback.entity.vo.
*
;
import
com.tykj.dev.device.sendback.service.*
;
import
com.tykj.dev.device.sendback.util.StringUtils
;
import
com.tykj.dev.device.task.service.TaskService
;
...
...
@@ -14,13 +14,11 @@ import com.tykj.dev.device.task.subject.bto.TaskBto;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -93,15 +91,63 @@ public class RepelQueryServiceImpl implements RepelQueryService {
}
@Override
public
List
<
DeviceLibrary
>
toRepelList
(
Integer
unitId
)
{
public
List
<
ModelNameGroup
>
toRepelList
(
Integer
unitId
)
{
Map
<
String
,
ModelNameGroup
>
modelNameGroupMap
=
new
HashMap
<>();
Units
units
=
unitsService
.
findById
(
unitId
);
return
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
);
return
toModelNameGroup
(
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
)
);
}
private
List
<
ModelNameGroup
>
toModelNameGroup
(
List
<
DeviceLibrary
>
deviceLibraries
){
Map
<
String
,
ModelNameGroup
>
modelNameGroupMap
=
new
HashMap
<>();
deviceLibraries
.
forEach
(
deviceLibrary
->
{
List
<
Integer
>
ids
=
new
ArrayList
<>();
String
key
=
deviceLibrary
.
getModel
()+
deviceLibrary
.
getName
();
if
(!
modelNameGroupMap
.
containsKey
(
key
)){
ids
.
add
(
deviceLibrary
.
getId
());
modelNameGroupMap
.
put
(
key
,
new
ModelNameGroup
(
deviceLibrary
.
getModel
(),
deviceLibrary
.
getName
(),
ids
));
}
else
{
ModelNameGroup
modelNameGroup
=
modelNameGroupMap
.
get
(
key
);
ids
=
modelNameGroupMap
.
get
(
key
).
getIds
();
ids
.
add
(
deviceLibrary
.
getId
());
modelNameGroup
.
setIds
(
ids
);
modelNameGroupMap
.
put
(
key
,
modelNameGroup
);
}
}
);
return
modelNameGroupMap
.
values
().
stream
().
sorted
(
Comparator
.
comparing
(
ModelNameGroup:
:
getModel
)).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
ModelNameGroup
>
findRepelListModelNameGroup
(
ModelAndTypeVo
modelAndTypeVo
)
{
Map
<
String
,
ModelNameGroup
>
modelNameGroupMap
=
new
HashMap
<>();
Units
units
=
unitsService
.
findById
(
modelAndTypeVo
.
getUnitId
());
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
).
stream
().
filter
(
deviceLibrary
->
modelAndTypeVo
.
getModel
()!=
null
&&
deviceLibrary
.
getModel
().
equals
(
modelAndTypeVo
.
getModel
()))
.
filter
(
deviceLibrary
->
modelAndTypeVo
.
getType
()!=
null
&&
deviceLibrary
.
getLifeStatus
().
equals
(
modelAndTypeVo
.
getType
())).
forEach
(
deviceLibrary
->
{
List
<
Integer
>
ids
=
new
ArrayList
<>();
String
key
=
deviceLibrary
.
getModel
()+
deviceLibrary
.
getName
();
if
(!
modelNameGroupMap
.
containsKey
(
key
)){
ids
.
add
(
deviceLibrary
.
getId
());
modelNameGroupMap
.
put
(
key
,
new
ModelNameGroup
(
deviceLibrary
.
getModel
(),
deviceLibrary
.
getName
(),
ids
));
}
else
{
ModelNameGroup
modelNameGroup
=
modelNameGroupMap
.
get
(
key
);
ids
=
modelNameGroupMap
.
get
(
key
).
getIds
();
ids
.
add
(
deviceLibrary
.
getId
());
modelNameGroup
.
setIds
(
ids
);
modelNameGroupMap
.
put
(
key
,
modelNameGroup
);
}
}
);
return
modelNameGroupMap
.
values
().
stream
().
sorted
(
Comparator
.
comparing
(
ModelNameGroup:
:
getModel
)).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
DeviceLibrary
>
clearedList
(
Integer
unitId
)
{
public
List
<
ModelNameGroup
>
clearedList
(
Integer
unitId
)
{
return
deviceUnitService
.
findHasRepel
(
unitId
);
return
toModelNameGroup
(
deviceUnitService
.
findHasRepel
(
unitId
)
);
}
@Override
...
...
@@ -130,6 +176,23 @@ public class RepelQueryServiceImpl implements RepelQueryService {
return
list
;
}
@Override
public
List
<
DeviceLibrary
>
provinceDirectlyUnderSelectedDev
(
Integer
taskId
,
Integer
unitId
)
{
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
());
}
@Override
public
List
<
DevRepelVo
>
repelManagementListDetails
(
List
<
Integer
>
ids
)
{
return
deviceLibraryDao
.
findAllById
(
ids
).
stream
().
map
(
this
::
devRepelVo
).
collect
(
Collectors
.
toList
());
}
private
DevRepelVo
devRepelVo
(
DeviceLibrary
deviceLibrary
){
return
new
DevRepelVo
(
deviceLibrary
.
getId
(),
deviceLibrary
.
getName
(),
deviceLibrary
.
getModel
(),
deviceLibrary
.
getSeqNumber
(),
deviceLibrary
.
getType
());
}
private
List
<
DeviceLibrary
>
findInvoleDevice
(
String
involeDevice
){
if
(
involeDevice
!=
null
&&
!
involeDevice
.
equals
(
""
)&&
!
involeDevice
.
equals
(
","
))
{
List
<
String
>
idStringList
=
Arrays
.
asList
(
involeDevice
.
split
(
","
));
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论