Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
162b2b4a
提交
162b2b4a
authored
2月 03, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【清退】 代码提交
上级
85450c1d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
46 行增加
和
13 行删除
+46
-13
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+2
-0
DeviceLibraryDao.java
.../tykj/dev/device/library/repository/DeviceLibraryDao.java
+1
-1
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+36
-8
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+7
-4
没有找到文件。
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
162b2b4a
...
...
@@ -203,6 +203,8 @@ public enum LogType {
LOSS_3
(
9002
,
LOSS
.
id
,
LOSS1300
.
id
,
END
.
id
,
"确认了装备丢失报告,报告任务结束"
),
LOSS_4
(
9003
,
LOSS
.
id
,
ORIGIN_STATUS
.
id
,
END
.
id
,
"省装备丢失报告发起记录"
),
LOSS_5
(
9004
,
LOSS
.
id
,
ORIGIN_STATUS
.
id
,
LOSS1301
.
id
,
"发起丢失装备上报"
),
LOSS_6
(
9005
,
LOSS
.
id
,
LOSS1301
.
id
,
END
.
id
,
"发起丢失装备上报,完成"
),
RETRIEVE_1
(
9010
,
RETRIEVE
.
id
,
ORIGIN_STATUS
.
id
,
RETRIEVE1400
.
id
,
"发起装备找回上报"
),
...
...
dev-library/src/main/java/com/tykj/dev/device/library/repository/DeviceLibraryDao.java
浏览文件 @
162b2b4a
...
...
@@ -61,7 +61,7 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
boolean
existsAllByPackingIdInAndOwnUnitIn
(
List
<
Integer
>
packingIds
,
List
<
String
>
unitNames
);
Integer
countAllByModelAndOwnUnitIn
(
String
model
,
List
<
String
>
unitName
s
);
Integer
countAllByModelAndOwnUnitIn
AndLifeStatusNotIn
(
String
model
,
List
<
String
>
unitNames
,
List
<
Integer
>
lifeStatu
s
);
List
<
DeviceLibrary
>
findAllByPackingIdInAndOwnUnit
(
List
<
Integer
>
packingIds
,
String
unitNames
);
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
162b2b4a
...
...
@@ -99,6 +99,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
User
user
=
userService
.
findByUser
(
userId
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
List
<
Integer
>
lifeStatus
=
new
ArrayList
<>();
lifeStatus
.
add
(
DeviceLifeStatus
.
RETIRE
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
LOSS
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
DESTROYED
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
SCRAP_I
.
id
);
List
<
String
>
directlUnderUnitNames
=
new
ArrayList
<>();
AtomicBoolean
directlUnderUnit
=
new
AtomicBoolean
(
false
);
AtomicBoolean
correspondingLevel
=
new
AtomicBoolean
(
false
);
...
...
@@ -119,7 +124,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
TaskBto
taskBto
=
statsXTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
());
// repelTaskStatisticalService.saveRepelTaskStatistical(new RepelTaskStatistical(deviceRepel1.getId(),null,taskBto.getId(),null,area.getName()));
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
Set
<
ModelCount
>
modelCounts
=
new
HashSe
t
<>();
List
<
ModelCount
>
modelCounts
=
new
ArrayLis
t
<>();
deviceRepel
.
getModels
().
forEach
(
i
->{
modelCounts
.
add
(
new
ModelCount
(
i
,
0
));
});
...
...
@@ -137,10 +142,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setId
(
null
);
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
())))
{
TaskBto
taskBto1
=
cityRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
Se
t
<
ModelCount
>
modelCounts1
=
modelCounts
;
Lis
t
<
ModelCount
>
modelCounts1
=
modelCounts
;
if
(
deviceRepel
.
getRepelStatus
()==
1
){
modelCounts1
.
clear
();
deviceRepel
.
getModels
().
forEach
(
i
->{
modelCounts1
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitIn
(
i
,
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
())
)));
modelCounts1
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitIn
AndLifeStatusNotIn
(
i
,
unitsService
.
findBySubordinateUnitName
(
units1
.
getUnitId
()),
lifeStatus
)));
});
}
list
.
add
(
new
RepelTaskStatistical
(
deviceRepel1
.
getId
(),
taskBto
.
getId
(),
taskBto1
.
getId
(),
0
,
area1
.
getName
(),
JacksonUtil
.
toJSon
(
modelCounts1
),
""
));
...
...
@@ -157,8 +163,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setId
(
null
);
if
(
directlUnderUnit
.
get
()&&
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
directlUnderUnitNames
)){
if
(
deviceRepel
.
getRepelStatus
()==
1
)
{
modelCounts
.
clear
();
deviceRepel
.
getModels
().
forEach
(
i
->
{
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitIn
(
i
,
directlUnderUnitName
s
)));
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitIn
AndLifeStatusNotIn
(
i
,
directlUnderUnitNames
,
lifeStatu
s
)));
});
}
TaskBto
taskBto2
=
directlyUnderTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
());
...
...
@@ -170,9 +177,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
correspondingLevel
.
get
()&&
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
strings
)){
if
(
deviceRepel
.
getRepelStatus
()==
1
)
{
modelCounts
.
clear
();
deviceRepel
.
getModels
().
forEach
(
i
->
{
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitIn
(
i
,
string
s
)));
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitIn
AndLifeStatusNotIn
(
i
,
strings
,
lifeStatu
s
)));
});
}
TaskBto
taskBto1
=
oneselfTask
(
units
.
getUnitId
(),
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
taskBto
.
getId
(),
deviceRepel
.
getTitle
());
...
...
@@ -190,6 +197,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
// 当前task推送 装备待清退
// 生成的任务放入统计表中 关联信息
// 修改当前任务的状态 市清退任务待区县提交
List
<
Integer
>
lifeStatus
=
new
ArrayList
<>();
lifeStatus
.
add
(
DeviceLifeStatus
.
RETIRE
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
LOSS
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
DESTROYED
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
SCRAP_I
.
id
);
User
user
=
userService
.
findByUser
(
userId
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
...
...
@@ -220,8 +232,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
unitNames
))
{
Set
<
ModelCount
>
modelCounts1
=
modelCounts
;
if
(
deviceRepel
.
getRepelStatus
()==
1
)
{
modelCounts1
.
clear
();
deviceRepel
.
getModels
().
forEach
(
i
->
{
modelCounts1
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitIn
(
i
,
unitName
s
)));
modelCounts1
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitIn
AndLifeStatusNotIn
(
i
,
unitNames
,
lifeStatu
s
)));
});
}
TaskBto
taskBto1
=
countyRepelTask
(
unisId
,
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
).
getId
(),
deviceRepel
.
getTitle
(),
taskBto
.
getId
());
...
...
@@ -445,6 +458,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
public
DeviceRepelDetail
sendBackOutCheck
(
Integer
taskId
,
Integer
userId
,
OrderOutData
orderOutData
)
{
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
List
<
StatusEnum
>
statusEnums
=
new
ArrayList
<>();
statusEnums
.
add
(
StatusEnum
.
SEND_BACK_1205
);
statusEnums
.
add
(
StatusEnum
.
SEND_BACK_1206
);
statusEnums
.
add
(
StatusEnum
.
SEND_BACK_1208
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
statusEnums
);
...
...
@@ -482,6 +496,16 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
List
<
RepelDeviceUnit
>
list
=
new
ArrayList
<>();
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
deviceRepelDetail
.
setReceiveUserBName
(
storageDeviceRepel
.
getUserBName
());
if
(
storageDeviceRepel
.
getUserB
()!=
null
){
deviceRepelDetail
.
setReceiveUserBId
(
storageDeviceRepel
.
getUserB
());
}
if
(
storageDeviceRepel
.
getUserA
()!=
null
){
deviceRepelDetail
.
setReceiveUserAId
(
storageDeviceRepel
.
getUserA
());
}
deviceRepelDetail
.
setReceiveUserAName
(
storageDeviceRepel
.
getUserBName
());
//判断是否为入库单据待补充 还是直接入库。
if
(
storageDeviceRepel
.
getFileRets
()!=
null
&&
storageDeviceRepel
.
getFileRets
().
size
()!=
0
)
{
List
<
StatusEnum
>
enumList
=
new
ArrayList
<>();
...
...
@@ -490,13 +514,14 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
enumList
.
add
(
StatusEnum
.
SEND_BACK_1215
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
enumList
);
deviceRepelDetail
.
setBillFile
(
FilesUtil
.
stringFileToList
(
storageDeviceRepel
.
getFileRets
()));
deviceRepelDetail
.
setRepelStatus
(
2
);
taskService
.
moveToEnd
(
taskBto
);
}
else
{
//判断当前状态是否为SEND_BACK_1209 清退装备等待入库
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SEND_BACK_1209
);
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1215
,
0
);
}
deviceRepelDetail
.
setRepelStatus
(
2
);
//判断是否为 市提交 是则为在库
//否则为待清退
// if (unitsService.findById(deviceRepelDetail.getReceiveUnitId()).getLevel()==2){
...
...
@@ -560,6 +585,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
// deviceRepelDetail.setDeviceIds(ids.toString());
// deviceLibraryDao.saveAll(libraries);
// repelDeviceUnitService.saveAllRepelDeviceUnit(list);
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
repelTaskStatistical
.
setTaskStatus
(
1
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
isEnd
(
taskBto
,
deviceRepelDetail
.
getRepelId
());
devLogAdd
(
libraries
,
"省本级清退,把装备转变为待清退"
,
userId
);
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
162b2b4a
...
...
@@ -94,7 +94,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
@Override
public
List
<
ModelNameGroup
>
toRepelList
(
RepelManagementVo
repelManagementVo
)
{
Units
units
=
unitsService
.
findById
(
repelManagementVo
.
getUnitId
());
return
toModelNameGroup
(
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
).
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getUpdateTime
().
getTime
()>=
repelManagementVo
.
getTime
()&&
deviceLibrary
.
getUpdateTime
().
getTime
()<=
repelManagementVo
.
getEndTime
(
)).
collect
(
Collectors
.
toList
()));
return
toModelNameGroup
(
deviceLibraryDao
.
findAllByOwnUnitAndLocationUnitAndLifeStatus
(
units
.
getName
(),
units
.
getName
(),
15
).
stream
().
filter
(
deviceLibrary
->
deviceLibrary
.
getUpdateTime
()==
null
||(
deviceLibrary
.
getUpdateTime
().
getTime
()>=
repelManagementVo
.
getTime
()&&
deviceLibrary
.
getUpdateTime
().
getTime
()<=
repelManagementVo
.
getEndTime
()
)).
collect
(
Collectors
.
toList
()));
}
private
List
<
ModelNameGroup
>
toModelNameGroup
(
List
<
DeviceLibrary
>
deviceLibraries
){
...
...
@@ -196,13 +196,16 @@ public class RepelQueryServiceImpl implements RepelQueryService {
@Override
public
List
<
DeviceRepelDetail
>
getList
()
{
List
<
DeviceRepelDetail
>
list
=
new
ArrayList
<>();
repelDetailService
.
findAll
().
forEach
(
repelDetailService
.
findAll
().
stream
().
filter
(
i
->
i
.
getRepelStatus
()==
2
).
forEach
(
deviceRepelDetail
->
{
if
(
deviceRepelDetail
.
getBillFile
()!=
null
){
deviceRepelDetail
.
setBillFiles
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getBillFile
()));
deviceRepelDetail
.
setDeviceLibraryEntities
(
deviceLibraryDao
.
findAllById
(
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
())));
list
.
add
(
deviceRepelDetail
);
}
if
(
deviceRepelDetail
.
getOutboundFile
()!=
null
){
deviceRepelDetail
.
setOutboundFiles
(
FilesUtil
.
stringFileToList
(
deviceRepelDetail
.
getOutboundFile
()));
}
deviceRepelDetail
.
setDeviceLibraryEntities
(
deviceLibraryDao
.
findAllById
(
StringUtils
.
stringToList
(
deviceRepelDetail
.
getDeviceIds
())));
list
.
add
(
deviceRepelDetail
);
}
);
return
list
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论