Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
b0e821ca
提交
b0e821ca
authored
4月 12, 2021
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新
上级
82bd9c0c
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
79 行增加
和
50 行删除
+79
-50
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+28
-23
BackController.java
.../com/tykj/dev/device/allot/controller/BackController.java
+28
-22
DeviceLibraryServiceImpl.java
...device/library/service/impl/DeviceLibraryServiceImpl.java
+3
-3
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+1
-1
UserUtils.java
...rc/main/java/com/tykj/dev/device/user/util/UserUtils.java
+5
-0
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+2
-1
DeviceUseReport.java
...j/dev/device/usereport/subject/domin/DeviceUseReport.java
+6
-0
DeviceUseReportDetailVo.java
.../device/usereport/subject/vo/DeviceUseReportDetailVo.java
+6
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
b0e821ca
...
...
@@ -574,27 +574,28 @@ public class AllotBillController {
public
ResponseEntity
saveAllotBill
(
@RequestBody
AllotBillSaveVo
allotBillSaveVo
)
{
//第一次保存
if
(
allotBillSaveVo
.
getTaskId
()==
null
){
Integer
userId
=
userUtils
.
getCurrentUserId
();
//保存入库单
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
0
);
userIds
.
add
(
userId
);
AllotBill
allotBill1
=
allotBillSaveVo
.
toDo
();
allotBill1
.
setAllotStatus
(
0
);
allotBill1
.
setSendUseraId
(
user
Utils
.
getCurrentUserId
()
);
allotBill1
.
setSendUseraId
(
user
Id
);
AllotBill
allotBill
=
allotBillService
.
addEntity
(
allotBill1
);
//发起任务
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
ALLOT_DRAFT
.
id
,
"配发业务"
,
null
,
"."
,
allotBill
.
getId
(),
3
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
//改变装备状态为待配发
if
(
allotBillSaveVo
.
getAllotCheckDetail
()!=
null
){
Map
<
Integer
,
DeviceLibrary
>
map
=
deviceLibraryService
.
getAllDeviceMap
();
StringSplitUtil
.
split
(
allotBillSaveVo
.
getAllotCheckDetail
()).
forEach
(
integer
->
{
if
(
map
.
get
(
integer
)!=
null
){
DeviceLibrary
deviceLibrary
=
map
.
get
(
integer
);
deviceLibrary
.
setLifeStatus
(
21
);
deviceLibraryService
.
update
(
deviceLibrary
);
}
});
}
//
if (allotBillSaveVo.getAllotCheckDetail()!=null){
//
Map<Integer,DeviceLibrary> map = deviceLibraryService.getAllDeviceMap();
//
StringSplitUtil.split(allotBillSaveVo.getAllotCheckDetail()).forEach(integer -> {
//
if (map.get(integer)!=null){
//
DeviceLibrary deviceLibrary = map.get(integer);
//
deviceLibrary.setLifeStatus(21);
//
deviceLibraryService.update(deviceLibrary);
//
}
//
});
//
}
Integer
id
=
taskBto1
.
getId
();
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
"保存成功"
+
id
);
...
...
@@ -621,17 +622,17 @@ public class AllotBillController {
TaskBto
taskBto1
=
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
taskService
.
moveToArchive
(
taskBto1
);
//更改装备状态为在库
AllotBill
allotBill
=
allotBillService
.
getOne
(
taskBto1
.
getBillId
());
if
(
allotBill
.
getAllotCheckDetail
()!=
null
){
Map
<
Integer
,
DeviceLibrary
>
map
=
deviceLibraryService
.
getAllDeviceMap
();
StringSplitUtil
.
split
(
allotBill
.
getAllotCheckDetail
()).
forEach
(
integer
->
{
if
(
map
.
get
(
integer
)!=
null
){
DeviceLibrary
deviceLibrary
=
map
.
get
(
integer
);
deviceLibrary
.
setLifeStatus
(
2
);
deviceLibraryService
.
update
(
deviceLibrary
);
}
});
}
//
AllotBill allotBill = allotBillService.getOne(taskBto1.getBillId());
//
if (allotBill.getAllotCheckDetail()!=null){
//
Map<Integer,DeviceLibrary> map = deviceLibraryService.getAllDeviceMap();
//
StringSplitUtil.split(allotBill.getAllotCheckDetail()).forEach(integer -> {
//
if (map.get(integer)!=null){
//
DeviceLibrary deviceLibrary = map.get(integer);
//
deviceLibrary.setLifeStatus(2);
//
deviceLibraryService.update(deviceLibrary);
//
}
//
});
//
}
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
"删除成功"
);
}
...
...
@@ -655,6 +656,10 @@ public class AllotBillController {
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
if
(
status
==
1
){
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
WAIT_SIGN
);
AllotBill
allotBill
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
allotBill
.
setSendUserbId
(
userUtils
.
getCurrentUserId
());
allotBill
.
setAgent
(
userUtils
.
getCurrentName
());
allotBillService
.
update
(
allotBill
);
}
else
{
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
ALLOT_DRAFT
,
taskBto
.
getCreateUserId
());
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/BackController.java
浏览文件 @
b0e821ca
...
...
@@ -376,26 +376,28 @@ public class BackController {
public
ResponseEntity
saveBackBill
(
@RequestBody
AllotBillSaveVo
allotBillSaveVo
)
{
//第一次保存
if
(
allotBillSaveVo
.
getTaskId
()==
null
){
Integer
userId
=
userUtils
.
getCurrentUserId
();
//保存退回单
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
0
);
userIds
.
add
(
userId
);
AllotBackBill
allotBackBill
=
allotBillSaveVo
.
toBackDo
();
allotBackBill
.
setBackStatus
(
1
);
allotBackBill
.
setSendUseraId
(
userId
);
AllotBackBill
allotBackBill1
=
allotBackBillService
.
addEntity
(
allotBackBill
);
//发起任务
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
BACK_DRAFT
.
id
,
"退回业务"
,
null
,
"."
,
allotBackBill1
.
getId
(),
22
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto1
=
taskService
.
start
(
taskBto
);
//改变装备状态为待退回
if
(
allotBillSaveVo
.
getAllotCheckDetail
()!=
null
){
Map
<
Integer
,
DeviceLibrary
>
map
=
deviceLibraryService
.
getAllDeviceMap
();
StringSplitUtil
.
split
(
allotBillSaveVo
.
getAllotCheckDetail
()).
forEach
(
integer
->
{
if
(
map
.
get
(
integer
)!=
null
){
DeviceLibrary
deviceLibrary
=
map
.
get
(
integer
);
deviceLibrary
.
setLifeStatus
(
22
);
deviceLibraryService
.
update
(
deviceLibrary
);
}
});
}
//
if (allotBillSaveVo.getAllotCheckDetail()!=null){
//
Map<Integer,DeviceLibrary> map = deviceLibraryService.getAllDeviceMap();
//
StringSplitUtil.split(allotBillSaveVo.getAllotCheckDetail()).forEach(integer -> {
//
if (map.get(integer)!=null){
//
DeviceLibrary deviceLibrary = map.get(integer);
//
deviceLibrary.setLifeStatus(22);
//
deviceLibraryService.update(deviceLibrary);
//
}
//
});
//
}
Integer
id
=
taskBto1
.
getId
();
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
"保存成功"
+
id
);
...
...
@@ -421,17 +423,17 @@ public class BackController {
TaskBto
taskBto1
=
taskService
.
addInvolveUser
(
taskBto
,
userUtils
.
getCurrentUserId
());
taskService
.
moveToArchive
(
taskBto1
);
//更改装备状态为在库
AllotBackBill
allotBackBill
=
allotBackBillService
.
getOne
(
taskBto1
.
getBillId
());
if
(
allotBackBill
.
getBackCheckDetail
()!=
null
){
Map
<
Integer
,
DeviceLibrary
>
map
=
deviceLibraryService
.
getAllDeviceMap
();
StringSplitUtil
.
split
(
allotBackBill
.
getBackCheckDetail
()).
forEach
(
integer
->
{
if
(
map
.
get
(
integer
)!=
null
){
DeviceLibrary
deviceLibrary
=
map
.
get
(
integer
);
deviceLibrary
.
setLifeStatus
(
2
);
deviceLibraryService
.
update
(
deviceLibrary
);
}
});
}
//
AllotBackBill allotBackBill = allotBackBillService.getOne(taskBto1.getBillId());
//
if (allotBackBill.getBackCheckDetail()!=null){
//
Map<Integer,DeviceLibrary> map = deviceLibraryService.getAllDeviceMap();
//
StringSplitUtil.split(allotBackBill.getBackCheckDetail()).forEach(integer -> {
//
if (map.get(integer)!=null){
//
DeviceLibrary deviceLibrary = map.get(integer);
//
deviceLibrary.setLifeStatus(2);
//
deviceLibraryService.update(deviceLibrary);
//
}
//
});
//
}
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
"删除成功"
);
}
...
...
@@ -455,6 +457,10 @@ public class BackController {
TaskBto
taskBto
=
taskService
.
get
(
taskId
);
if
(
status
==
1
){
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
BACK_WAIT_SIGN
);
AllotBackBill
allotBill
=
allotBackBillService
.
getOne
(
taskBto
.
getBillId
());
allotBill
.
setSendUserbId
(
userUtils
.
getCurrentUserId
());
allotBill
.
setAgent
(
userUtils
.
getCurrentUserName
());
allotBackBillService
.
update
(
allotBill
);
}
else
{
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
BACK_DRAFT
,
taskBto
.
getCreateUserId
());
...
...
dev-library/src/main/java/com/tykj/dev/device/library/service/impl/DeviceLibraryServiceImpl.java
浏览文件 @
b0e821ca
...
...
@@ -404,7 +404,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
public
void
isInStock
(
List
<
Integer
>
ids
)
{
ids
.
forEach
(
integer
->
{
DeviceLibrary
deviceLibrary
=
getOne
(
integer
);
if
(
deviceLibrary
.
getLifeStatus
()!=
2
){
if
(
deviceLibrary
.
getLifeStatus
()!=
2
&&
deviceLibrary
.
getLifeStatus
()!=
14
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"序列号"
+
deviceLibrary
.
getSeqNumber
()+
"的装备已被其他专管员操作"
));
}
});
...
...
@@ -434,7 +434,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
public
void
isInStockOrWaitRetired
(
List
<
Integer
>
ids
)
{
ids
.
forEach
(
integer
->
{
DeviceLibrary
deviceLibrary
=
getOne
(
integer
);
if
(
deviceLibrary
.
getLifeStatus
()!=
2
&&
deviceLibrary
.
getLifeStatus
()!=
15
&&
deviceLibrary
.
getLifeStatus
()!=
DeviceLifeStatus
.
SEND_BACK
.
id
){
if
(
deviceLibrary
.
getLifeStatus
()!=
2
&&
deviceLibrary
.
getLifeStatus
()!=
15
&&
deviceLibrary
.
getLifeStatus
()!=
14
&&
!
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
SEND_BACK
.
id
)
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"序列号"
+
deviceLibrary
.
getSeqNumber
()+
"的装备已被其他专管员操作"
));
}
});
...
...
@@ -449,7 +449,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
public
void
isInStockOrRepairing
(
List
<
Integer
>
ids
)
{
ids
.
forEach
(
integer
->
{
DeviceLibrary
deviceLibrary
=
getOne
(
integer
);
if
(
deviceLibrary
.
getLifeStatus
()!=
2
&&
deviceLibrary
.
getLifeStatus
()!=
4
){
if
(
deviceLibrary
.
getLifeStatus
()!=
2
&&
deviceLibrary
.
getLifeStatus
()!=
4
&&
deviceLibrary
.
getLifeStatus
()!=
14
){
throw
new
ApiException
(
ResponseEntity
.
status
(
303
).
body
(
"序列号"
+
deviceLibrary
.
getSeqNumber
()+
"的装备已被其他专管员操作"
));
}
});
...
...
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
b0e821ca
...
...
@@ -431,7 +431,7 @@ public class StorageBillController {
//保存入库单
Integer
userId
=
userUtils
.
getCurrentUserId
();
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
0
);
userIds
.
add
(
userId
);
StorageBill
storageBill1
=
storageBillSaveVo
.
toDo
();
storageBill1
.
setStorageStatus
(
0
);
StorageBill
storageBill
=
storageBillService
.
addEntity
(
storageBill1
);
...
...
dev-user/src/main/java/com/tykj/dev/device/user/util/UserUtils.java
浏览文件 @
b0e821ca
...
...
@@ -32,6 +32,11 @@ public class UserUtils {
return
authentication
.
getCurrentUserInfo
().
getUsername
();
}
public
String
getCurrentName
()
{
SecurityUser
authentication
=
AuthenticationUtils
.
getAuthentication
();
return
authentication
.
getCurrentUserInfo
().
getName
();
}
public
String
getCurrentUserUnitName
()
{
SecurityUser
authentication
=
AuthenticationUtils
.
getAuthentication
();
Integer
unitId
=
authentication
.
getCurrentUserInfo
().
getUnitsId
();
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
b0e821ca
...
...
@@ -6,7 +6,6 @@ import com.tykj.dev.blockcha.subject.entity.BcHash;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.device.allot.repository.AllotBillDao
;
import
com.tykj.dev.device.allot.subject.domin.AllotBill
;
import
com.tykj.dev.device.destroy.entity.domain.DeviceDestroyBill
;
import
com.tykj.dev.device.destroy.repository.DeviceDestroyBillDao
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
...
...
@@ -124,6 +123,8 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
public
DeviceUseReport
createReport
(
DeviceUseReportCreateVo
deviceUseReportCreateVo
)
{
DeviceUseReport
deviceUseReportEntity
=
new
DeviceUseReport
();
deviceUseReportEntity
.
setUnit
(
userUtils
.
getCurrentUserUnitName
());
deviceUseReportEntity
.
setStartTime
(
deviceUseReportCreateVo
.
getStartTime
());
deviceUseReportEntity
.
setEndTime
(
deviceUseReportCreateVo
.
getEndTime
());
StringBuffer
stringBuffer
=
new
StringBuffer
();
//按照开始时间和结束时间设置标题
Date
date
=
deviceUseReportCreateVo
.
getStartTime
();
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/subject/domin/DeviceUseReport.java
浏览文件 @
b0e821ca
...
...
@@ -81,4 +81,10 @@ public class DeviceUseReport {
@ApiModelProperty
(
value
=
"区块链记录id"
)
private
String
recordId
;
@ApiModelProperty
(
value
=
"报告开始时间"
)
private
Date
startTime
;
@ApiModelProperty
(
value
=
"报告结束时间"
)
private
Date
endTime
;
}
dev-usereport/src/main/java/com/tykj/dev/device/usereport/subject/vo/DeviceUseReportDetailVo.java
浏览文件 @
b0e821ca
...
...
@@ -44,4 +44,10 @@ public class DeviceUseReportDetailVo {
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"报告开始时间"
)
private
Date
startTime
;
@ApiModelProperty
(
value
=
"报告结束时间"
)
private
Date
endTime
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论