Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
c0403685
提交
c0403685
authored
3月 14, 2021
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[清退业务 file] 代码提交
上级
64b81a32
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
103 行增加
和
96 行删除
+103
-96
JavaToPdfHtmlFreeMarker.java
...om/tykj/dev/device/file/util/JavaToPdfHtmlFreeMarker.java
+4
-75
RepelQueryController.java
.../dev/device/sendback/controller/RepelQueryController.java
+6
-0
RepelTaskStatistical.java
...v/device/sendback/entity/domain/RepelTaskStatistical.java
+1
-1
StorageDeviceRepel.java
...ykj/dev/device/sendback/entity/vo/StorageDeviceRepel.java
+4
-0
RepelQueryService.java
...m/tykj/dev/device/sendback/service/RepelQueryService.java
+5
-0
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+34
-15
RepelQueryServiceImpl.java
...v/device/sendback/service/impl/RepelQueryServiceImpl.java
+34
-2
WorkHandover.java
...n/java/com/tykj/dev/device/train/entity/WorkHandover.java
+5
-2
SecurityConfig.java
.../java/com/tykj/dev/device/user/config/SecurityConfig.java
+5
-0
MyFailHandler.java
...om/tykj/dev/device/user/config/handler/MyFailHandler.java
+5
-1
没有找到文件。
dev-file/src/main/java/com/tykj/dev/device/file/util/JavaToPdfHtmlFreeMarker.java
浏览文件 @
c0403685
...
@@ -215,7 +215,7 @@ public class JavaToPdfHtmlFreeMarker {
...
@@ -215,7 +215,7 @@ public class JavaToPdfHtmlFreeMarker {
documentDevice
->
{
documentDevice
->
{
documentDevice
.
setCode
(
i
.
get
());
documentDevice
.
setCode
(
i
.
get
());
i
.
set
(
i
.
get
()
+
1
);
i
.
set
(
i
.
get
()
+
1
);
list1
.
add
(
toDocDevice
(
documentDevice
)
);
list1
.
add
(
documentDevice
);
}
}
);
);
data
.
put
(
"documentDevices"
,
list1
);
data
.
put
(
"documentDevices"
,
list1
);
...
@@ -236,7 +236,7 @@ public class JavaToPdfHtmlFreeMarker {
...
@@ -236,7 +236,7 @@ public class JavaToPdfHtmlFreeMarker {
documentDevice
->
{
documentDevice
->
{
documentDevice
.
setCode
(
i
.
get
());
documentDevice
.
setCode
(
i
.
get
());
i
.
set
(
i
.
get
()
+
1
);
i
.
set
(
i
.
get
()
+
1
);
list1
.
add
(
toDocDevice
(
documentDevice
)
);
list1
.
add
(
documentDevice
);
}
}
);
);
data
.
put
(
"documentDevices"
,
list1
);
data
.
put
(
"documentDevices"
,
list1
);
...
@@ -261,85 +261,14 @@ public class JavaToPdfHtmlFreeMarker {
...
@@ -261,85 +261,14 @@ public class JavaToPdfHtmlFreeMarker {
documentDevice
->
{
documentDevice
->
{
documentDevice
.
setCode
(
i
.
get
());
documentDevice
.
setCode
(
i
.
get
());
i
.
set
(
i
.
get
()
+
1
);
i
.
set
(
i
.
get
()
+
1
);
list1
.
add
(
toDocDevice
(
documentDevice
)
);
list1
.
add
(
documentDevice
);
}
}
);
);
data
.
put
(
"documentDevices"
,
list1
);
data
.
put
(
"documentDevices"
,
list1
);
return
data
;
return
data
;
}
}
private
static
DocumentDevice
toDocDevice
(
DocumentDevice
documentDevice
){
DocumentDevice
documentDevice1
=
new
DocumentDevice
();
documentDevice1
.
setCode
(
documentDevice
.
getCode
());
documentDevice1
.
setParts
(
documentDevice
.
getParts
());
documentDevice1
.
setProductionSerialNumber
(
documentDevice
.
getProductionSerialNumber
());
documentDevice1
.
setModel
(
documentDevice
.
getModel
());
documentDevice1
.
setCount
(
documentDevice
.
getCount
());
documentDevice1
.
setRemark
(
documentDevice
.
getRemark
());
documentDevice1
.
setDeviceSerialNumber
(
documentDevice
.
getDeviceSerialNumber
());
switch
(
documentDevice
.
getCategory
()){
case
"1"
:
documentDevice1
.
setCategory
(
"密码机"
);
break
;
case
"2"
:
documentDevice1
.
setCategory
(
"密码模块"
);
break
;
case
"3"
:
documentDevice1
.
setCategory
(
"密码芯片"
);
break
;
case
"4"
:
documentDevice1
.
setCategory
(
"说明书"
);
break
;
case
"5"
:
documentDevice1
.
setCategory
(
"U盘"
);
break
;
case
"6"
:
documentDevice1
.
setCategory
(
"光盘"
);
break
;
case
"7"
:
documentDevice1
.
setCategory
(
"密码软件"
);
break
;
case
"8"
:
documentDevice1
.
setCategory
(
"密码卡"
);
default
:
documentDevice1
.
setCategory
(
"-"
);
break
;
}
switch
(
documentDevice
.
getSecurityClassification
()){
case
"1"
:
documentDevice1
.
setSecurityClassification
(
"绝密"
);
break
;
case
"2"
:
documentDevice1
.
setSecurityClassification
(
"机密"
);
break
;
case
"3"
:
documentDevice1
.
setSecurityClassification
(
"秘密"
);
break
;
default
:
documentDevice1
.
setSecurityClassification
(
"无"
);
break
;
}
switch
(
documentDevice
.
getApplicationField
()){
case
"1"
:
documentDevice1
.
setApplicationField
(
"省一级"
);
break
;
case
"2"
:
documentDevice1
.
setApplicationField
(
"市一级"
);
break
;
case
"3"
:
documentDevice1
.
setApplicationField
(
"县一级"
);
break
;
default
:
documentDevice1
.
setApplicationField
(
"无"
);
break
;
}
return
documentDevice1
;
}
/**
/**
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/controller/RepelQueryController.java
浏览文件 @
c0403685
...
@@ -69,6 +69,12 @@ public class RepelQueryController {
...
@@ -69,6 +69,12 @@ public class RepelQueryController {
return
ResponseEntity
.
ok
(
repelQueryService
.
findDeviceChooseRepel
(
fielding
,
unitId
));
return
ResponseEntity
.
ok
(
repelQueryService
.
findDeviceChooseRepel
(
fielding
,
unitId
));
}
}
@PostMapping
(
value
=
"/deviceChooseRepel1/{unitId}"
)
@ApiOperation
(
value
=
"省本级任务清退装备查询接口"
,
notes
=
"省本级任务清退装备查询接口"
)
public
ResponseEntity
findDeviceRepel1
(
@RequestBody
List
<
Integer
>
fielding
,
@PathVariable
Integer
unitId
){
return
ResponseEntity
.
ok
(
repelQueryService
.
findDeviceChooseRepel1
(
fielding
,
unitId
));
}
@GetMapping
(
value
=
"/deviceSendOut/{taskId}"
)
@GetMapping
(
value
=
"/deviceSendOut/{taskId}"
)
@ApiOperation
(
value
=
"出库查询装备"
,
notes
=
"代办任务通知页面详情"
)
@ApiOperation
(
value
=
"出库查询装备"
,
notes
=
"代办任务通知页面详情"
)
public
ResponseEntity
findDeviceSendOut
(
@PathVariable
Integer
taskId
){
public
ResponseEntity
findDeviceSendOut
(
@PathVariable
Integer
taskId
){
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/domain/RepelTaskStatistical.java
浏览文件 @
c0403685
...
@@ -54,7 +54,7 @@ public class RepelTaskStatistical extends BaseEntity {
...
@@ -54,7 +54,7 @@ public class RepelTaskStatistical extends BaseEntity {
/**
/**
* 任务状态 1.正常提交 2.延期 3.等待审核
* 任务状态 1.正常提交 2.延期 3.等待审核
*/
*/
@ApiModelProperty
(
value
=
"任务状态 1.正常提交 2.延期 3.等待审核"
)
@ApiModelProperty
(
value
=
"任务状态 1.正常提交 2.延期 3.等待审核
4.等待上传单据
"
)
private
Integer
taskStatus
;
private
Integer
taskStatus
;
/**
/**
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/entity/vo/StorageDeviceRepel.java
浏览文件 @
c0403685
...
@@ -48,4 +48,8 @@ public class StorageDeviceRepel {
...
@@ -48,4 +48,8 @@ public class StorageDeviceRepel {
private
String
userAName
;
private
String
userAName
;
private
String
userBName
;
private
String
userBName
;
private
String
senderName
;
private
String
senderId
;
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/RepelQueryService.java
浏览文件 @
c0403685
...
@@ -96,4 +96,9 @@ public interface RepelQueryService {
...
@@ -96,4 +96,9 @@ public interface RepelQueryService {
*/
*/
List
<
TaskBto
>
findOutsideTheProvince
();
List
<
TaskBto
>
findOutsideTheProvince
();
/**
* 省自己装备清退列表查询的接口
*/
DeviceChooseRepel
findDeviceChooseRepel1
(
List
<
Integer
>
fielding
,
Integer
unitId
);
}
}
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
c0403685
...
@@ -110,6 +110,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -110,6 +110,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPEL
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPEL
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPAIRING
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPAIRING
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
USE
.
id
);
List
<
String
>
directlUnderUnitNames
=
new
ArrayList
<>();
List
<
String
>
directlUnderUnitNames
=
new
ArrayList
<>();
AtomicBoolean
directlUnderUnit
=
new
AtomicBoolean
(
false
);
AtomicBoolean
directlUnderUnit
=
new
AtomicBoolean
(
false
);
AtomicBoolean
correspondingLevel
=
new
AtomicBoolean
(
false
);
AtomicBoolean
correspondingLevel
=
new
AtomicBoolean
(
false
);
...
@@ -187,6 +189,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -187,6 +189,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
correspondingLevel
.
get
()&&
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
strings
)){
if
(
correspondingLevel
.
get
()&&
deviceLibraryDao
.
existsAllByPackingIdInAndOwnUnitIn
(
deviceRepel
.
getFieldingIds
(),
strings
)){
if
(
deviceRepel
.
getRepelStatus
()==
1
)
{
if
(
deviceRepel
.
getRepelStatus
()==
1
)
{
modelCounts
.
clear
();
modelCounts
.
clear
();
lifeStatus
.
remove
(
DeviceLifeStatus
.
REPEL
.
id
);
deviceRepel
.
getModels
().
forEach
(
i
->
{
deviceRepel
.
getModels
().
forEach
(
i
->
{
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatusIn
(
i
,
strings
,
lifeStatus
)));
modelCounts
.
add
(
new
ModelCount
(
i
,
deviceLibraryDao
.
countAllByModelAndOwnUnitInAndLifeStatusIn
(
i
,
strings
,
lifeStatus
)));
});
});
...
@@ -212,6 +215,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -212,6 +215,8 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPEL
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPEL
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPAIRING
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
REPAIRING
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
IN_TRANSIT
.
id
);
lifeStatus
.
add
(
DeviceLifeStatus
.
USE
.
id
);
User
user
=
userService
.
findByUser
(
userId
);
User
user
=
userService
.
findByUser
(
userId
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
Area
area
=
areaService
.
findByid
(
units
.
getAreaId
());
...
@@ -410,10 +415,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -410,10 +415,11 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
StringBuffer
ids
=
new
StringBuffer
();
StringBuffer
ids
=
new
StringBuffer
();
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetailNoDev
(
taskBto
.
getBillId
());
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetailNoDev
(
taskBto
.
getBillId
());
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
List
<
ModelCount
>
modelCountList
=
JacksonUtil
.
readValue
(
repelTaskStatistical
.
getModelCount
(),
new
TypeReference
<
List
<
ModelCount
>>()
{});
// List<ModelCount> modelCountList= JacksonUtil.readValue(repelTaskStatistical.getModelCount(), new TypeReference<List<ModelCount>>() {});
List
<
ModelCount
>
modelCountList
=
new
ArrayList
<>();
modelCountList
.
forEach
(
modelCountList
.
forEach
(
modelCount
->
{
modelCount
->
{
map
.
put
(
modelCount
.
getModel
(),
modelCount
.
getCount
()
);
map
.
put
(
modelCount
.
getModel
(),
0
);
}
}
);
);
List
<
ModelCount
>
modelCounts
=
new
ArrayList
<>();
List
<
ModelCount
>
modelCounts
=
new
ArrayList
<>();
...
@@ -538,7 +544,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -538,7 +544,9 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setReceiveUserA
(
storageDeviceRepel
.
getUserBName
());
deviceRepelDetail
.
setReceiveUserA
(
storageDeviceRepel
.
getUserBName
());
}
}
//判断是否为入库单据待补充 还是直接入库。
//判断是否为入库单据待补充 还是直接入库。
if
(
storageDeviceRepel
.
getFileRets
()!=
null
&&
storageDeviceRepel
.
getFileRets
().
size
()!=
0
)
{
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
if
(
storageDeviceRepel
.
getFileRets
()!=
null
&&
storageDeviceRepel
.
getFileRets
().
size
()!=
0
)
{
List
<
StatusEnum
>
enumList
=
new
ArrayList
<>();
List
<
StatusEnum
>
enumList
=
new
ArrayList
<>();
enumList
.
add
(
StatusEnum
.
SEND_BACK_1209
);
enumList
.
add
(
StatusEnum
.
SEND_BACK_1209
);
enumList
.
add
(
StatusEnum
.
SEND_BACK_1213
);
enumList
.
add
(
StatusEnum
.
SEND_BACK_1213
);
...
@@ -546,13 +554,17 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -546,13 +554,17 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
enumList
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
enumList
);
deviceRepelDetail
.
setBillFile
(
FilesUtil
.
stringFileToList
(
storageDeviceRepel
.
getFileRets
()));
deviceRepelDetail
.
setBillFile
(
FilesUtil
.
stringFileToList
(
storageDeviceRepel
.
getFileRets
()));
deviceRepelDetail
.
setRepelStatus
(
2
);
deviceRepelDetail
.
setRepelStatus
(
2
);
taskService
.
moveToEnd
(
taskBto
);
repelTaskStatistical
.
setTaskStatus
(
1
);
taskService
.
moveToEnd
(
taskBto
);
}
else
{
}
else
{
if
(
storageDeviceRepel
.
getIsIgnore
()==
null
)
{
if
(
storageDeviceRepel
.
getIsIgnore
()==
null
)
{
//判断当前状态是否为SEND_BACK_1209 清退装备等待入库
//判断当前状态是否为SEND_BACK_1209 清退装备等待入库
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SEND_BACK_1209
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SEND_BACK_1209
);
repelTaskStatistical
.
setTaskStatus
(
4
);
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1215
,
0
);
taskService
.
moveToSpecial
(
taskBto
,
StatusEnum
.
SEND_BACK_1215
,
0
);
}
else
{
}
else
{
repelTaskStatistical
.
setTaskStatus
(
1
);
taskService
.
moveToEnd
(
taskBto
);
taskService
.
moveToEnd
(
taskBto
);
}
}
}
}
...
@@ -580,8 +592,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -580,8 +592,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
log
.
info
(
"更新数据装备以及所属单位{}"
,
System
.
currentTimeMillis
()-
time
);
log
.
info
(
"更新数据装备以及所属单位{}"
,
System
.
currentTimeMillis
()-
time
);
repelDeviceUnitService
.
saveAllRepelDeviceUnit
(
list
);
repelDeviceUnitService
.
saveAllRepelDeviceUnit
(
list
);
RepelTaskStatistical
repelTaskStatistical
=
repelTaskStatisticalService
.
findRepelTaskStatistical
(
taskBto
.
getId
(),
deviceRepelDetail
.
getRepelId
());
repelTaskStatistical
.
setTaskStatus
(
1
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
repelTaskStatisticalService
.
saveRepelTaskStatistical
(
repelTaskStatistical
);
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
DeviceRepel
deviceRepel
=
deviceRepelService
.
findDeviceRepel
(
deviceRepelDetail
.
getRepelId
());
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
...
@@ -673,12 +683,12 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -673,12 +683,12 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceRepelDetail
.
setDeviceIds
(
StringUtils
.
ListToString
(
orderOutData
.
getDevIds
()));
deviceRepelDetail
.
setDeviceIds
(
StringUtils
.
ListToString
(
orderOutData
.
getDevIds
()));
deviceRepelDetail
.
setOutboundFile
(
FilesUtil
.
stringFileToList
(
orderOutData
.
getOutboundFileList
()));
deviceRepelDetail
.
setOutboundFile
(
FilesUtil
.
stringFileToList
(
orderOutData
.
getOutboundFileList
()));
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceRepelDetail
.
setScripts
(
orderOutData
.
getScriptSaveVos
());
deviceRepelDetail
.
setScriptJson
(
JacksonUtil
.
toJSon
(
orderOutData
.
getScriptSaveVos
()));
deviceRepelDetail
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()+
"QT"
+
deviceRepelDetail
.
getId
());
deviceRepelDetail
.
setNum
(
"NO:第"
+
LocalDateTime
.
now
().
getYear
()+
"QT"
+
deviceRepelDetail
.
getId
());
deviceRepelDetail
.
setDeviceLibraryEntities
(
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
()));
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceRepelDetailService
.
saveDeviceRepelDetail
(
deviceRepelDetail
);
deviceLibraryDao
.
upDateLeftStatusAndOwnUnitName
(
DeviceLifeStatus
.
REPEL
.
id
,
orderOutData
.
getReceiveUnit
(),
orderOutData
.
getDevIds
());
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
);
TaskBto
taskBto
=
sendOutSuperior
(
units
.
getUnitId
(),
deviceRepelDetail
.
getId
(),
null
);
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起退役任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
addMessage
(
new
MessageBto
(
taskBto
.
getId
(),
taskBto
.
getBusinessType
(),
"发起退役任务,待上传回执单据"
,
gainThisUser
(
user
.
getUserId
(),
user
.
getUnitsId
())));
return
deviceRepelDetail
;
return
deviceRepelDetail
;
...
@@ -692,13 +702,22 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -692,13 +702,22 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SEND_BACK_1210
);
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
SEND_BACK_1210
);
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
DeviceRepelDetail
deviceRepelDetail
=
deviceRepelDetailService
.
findDeviceRepelDetail
(
taskBto
.
getBillId
());
deviceRepelDetail
.
setBillFile
(
FilesUtil
.
stringFileToList
(
storageDeviceRepel
.
getFileRets
()));
deviceRepelDetail
.
setBillFile
(
FilesUtil
.
stringFileToList
(
storageDeviceRepel
.
getFileRets
()));
// deviceRepelDetail.setReceiveUserAId(storageDeviceRepel.getUserA());
if
(
storageDeviceRepel
.
getUserBName
()!=
null
)
{
deviceRepelDetail
.
setReceiveUserA
(
storageDeviceRepel
.
getUserAName
());
deviceRepelDetail
.
setReceiveUserB
(
storageDeviceRepel
.
getUserBName
());
// deviceRepelDetail.setReceiveUserBId(storageDeviceRepel.getUserB());
}
deviceRepelDetail
.
setReceiveUserB
(
storageDeviceRepel
.
getUserBName
());
if
(
storageDeviceRepel
.
getUserB
()!=
null
){
deviceRepelDetail
.
setReceiveUserbId
(
storageDeviceRepel
.
getUserB
());
taskService
.
moveToEnd
(
taskBto
);
}
if
(
storageDeviceRepel
.
getUserA
()!=
null
){
deviceRepelDetail
.
setReceiveUseraId
(
storageDeviceRepel
.
getUserA
());
}
if
(
storageDeviceRepel
.
getUserBName
()!=
null
)
{
deviceRepelDetail
.
setReceiveUserA
(
storageDeviceRepel
.
getUserBName
());
}
taskService
.
moveToEnd
(
taskBto
);
deviceRepelDetail
.
setRepelStatus
(
2
);
List
<
DeviceLibrary
>
libraries
=
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
());
List
<
DeviceLibrary
>
libraries
=
findInvoleDevice
(
deviceRepelDetail
.
getDeviceIds
());
libraries
.
forEach
(
libraries
.
forEach
(
deviceLibrary
->
{
deviceLibrary
->
{
...
@@ -754,7 +773,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
...
@@ -754,7 +773,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
deviceLibraries
.
forEach
(
deviceLibraries
.
forEach
(
deviceLibrary
->
deviceLibrary
.
setLifeStatus
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
deviceLibrary
->
deviceLibrary
.
setLifeStatus
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
);
);
deviceLibrary
Service
.
sendHash
(
deviceLibraries
);
deviceLibrary
Dao
.
saveAll
(
deviceLibraries
);
}
}
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelQueryServiceImpl.java
浏览文件 @
c0403685
...
@@ -80,10 +80,16 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -80,10 +80,16 @@ public class RepelQueryServiceImpl implements RepelQueryService {
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibrariesAbnormal
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibrariesAbnormal
=
new
ArrayList
<>();
Units
units
=
unitsService
.
findById
(
unitId
);
Units
units
=
unitsService
.
findById
(
unitId
);
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
fielding
,
units
.
getName
()).
stream
().
map
(
DeviceLibrary:
:
setConfigName
).
forEach
(
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
fielding
,
units
.
getName
()).
stream
()
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
id
)
||
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
REPEL
.
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
->
{
deviceLibrary
->
{
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
())){
if
(
deviceLibrary
.
getOwnUnit
().
equals
(
deviceLibrary
.
getLocationUnit
())){
if
(
deviceLibrary
.
getLifeStatus
()==
2
||
deviceLibrary
.
getLifeStatus
()==
15
||
deviceLibrary
.
getLifeStatus
()==
4
)
{
if
(
deviceLibrary
.
getLifeStatus
()==
2
||
deviceLibrary
.
getLifeStatus
()==
15
||
deviceLibrary
.
getLifeStatus
()==
1
4
)
{
deviceLibraries
.
add
(
deviceLibrary
);
deviceLibraries
.
add
(
deviceLibrary
);
}
else
{
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
...
@@ -240,6 +246,32 @@ public class RepelQueryServiceImpl implements RepelQueryService {
...
@@ -240,6 +246,32 @@ public class RepelQueryServiceImpl implements RepelQueryService {
return
taskService
.
findBillIdAndBillType
(
list
.
stream
().
map
(
DeviceRepelDetail:
:
getId
).
collect
(
Collectors
.
toList
()),
BusinessEnum
.
SEND_BACK
.
id
);
return
taskService
.
findBillIdAndBillType
(
list
.
stream
().
map
(
DeviceRepelDetail:
:
getId
).
collect
(
Collectors
.
toList
()),
BusinessEnum
.
SEND_BACK
.
id
);
}
}
@Override
public
DeviceChooseRepel
findDeviceChooseRepel1
(
List
<
Integer
>
fielding
,
Integer
unitId
)
{
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
List
<
DeviceLibrary
>
deviceLibrariesAbnormal
=
new
ArrayList
<>();
Units
units
=
unitsService
.
findById
(
unitId
);
deviceLibraryDao
.
findAllByPackingIdInAndOwnUnit
(
fielding
,
units
.
getName
()).
stream
()
.
filter
(
deviceLibrary
->
deviceLibrary
.
getLifeStatus
().
equals
(
DeviceLifeStatus
.
IN_LIBRARY
.
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
()==
14
)
{
deviceLibraries
.
add
(
deviceLibrary
);
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
}
}
else
{
deviceLibrariesAbnormal
.
add
(
deviceLibrary
);
}
}
);
return
new
DeviceChooseRepel
(
deviceLibraries
,
deviceLibrariesAbnormal
);
}
private
DevRepelVo
devRepelVo
(
DeviceLibrary
deviceLibrary
){
private
DevRepelVo
devRepelVo
(
DeviceLibrary
deviceLibrary
){
return
new
DevRepelVo
(
deviceLibrary
.
getId
(),
deviceLibrary
.
getName
(),
deviceLibrary
.
getModel
(),
deviceLibrary
.
getSeqNumber
(),
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
(),
deviceLibrary
.
getUpdateTime
());
return
new
DevRepelVo
(
deviceLibrary
.
getId
(),
deviceLibrary
.
getName
(),
deviceLibrary
.
getModel
(),
deviceLibrary
.
getSeqNumber
(),
deviceLibrary
.
getType
(),
deviceLibrary
.
getTypeName
(),
deviceLibrary
.
getUpdateTime
());
...
...
dev-train/src/main/java/com/tykj/dev/device/train/entity/WorkHandover.java
浏览文件 @
c0403685
...
@@ -62,6 +62,11 @@ public class WorkHandover {
...
@@ -62,6 +62,11 @@ public class WorkHandover {
*/
*/
private
String
inUserName
;
private
String
inUserName
;
/**
* 上级领导
*/
private
String
leadershipName
;
/**
/**
* 代办业务 json
* 代办业务 json
*/
*/
...
@@ -98,8 +103,6 @@ public class WorkHandover {
...
@@ -98,8 +103,6 @@ public class WorkHandover {
@ApiModelProperty
(
value
=
"区块链RID"
,
name
=
"recordId"
)
@ApiModelProperty
(
value
=
"区块链RID"
,
name
=
"recordId"
)
private
String
recordId
;
private
String
recordId
;
/**
/**
* 发起用户集合
* 发起用户集合
*/
*/
...
...
dev-user/src/main/java/com/tykj/dev/device/user/config/SecurityConfig.java
浏览文件 @
c0403685
...
@@ -9,10 +9,13 @@ import com.tykj.dev.device.user.config.url.ApiResult;
...
@@ -9,10 +9,13 @@ import com.tykj.dev.device.user.config.url.ApiResult;
import
com.tykj.dev.device.user.config.url.UrlAccessDecisionManager
;
import
com.tykj.dev.device.user.config.url.UrlAccessDecisionManager
;
import
com.tykj.dev.device.user.config.url.UrlAccessDeniedHandler
;
import
com.tykj.dev.device.user.config.url.UrlAccessDeniedHandler
;
import
com.tykj.dev.device.user.config.url.UrlFilterInvocationSecurityMetadataSource
;
import
com.tykj.dev.device.user.config.url.UrlFilterInvocationSecurityMetadataSource
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.security.authentication.BadCredentialsException
;
import
org.springframework.security.authentication.dao.DaoAuthenticationProvider
;
import
org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder
;
import
org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.builders.WebSecurity
;
import
org.springframework.security.config.annotation.web.builders.WebSecurity
;
...
@@ -20,6 +23,7 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
...
@@ -20,6 +23,7 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
import
org.springframework.security.core.session.SessionRegistryImpl
;
import
org.springframework.security.core.session.SessionRegistryImpl
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
;
import
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
;
import
org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy
;
import
org.springframework.security.web.authentication.session.ConcurrentSessionControlAuthenticationStrategy
;
import
org.springframework.security.web.session.ConcurrentSessionFilter
;
import
org.springframework.security.web.session.ConcurrentSessionFilter
;
...
@@ -184,4 +188,5 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -184,4 +188,5 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
return
new
BCryptPasswordEncoder
();
return
new
BCryptPasswordEncoder
();
}
}
//
//
}
}
dev-user/src/main/java/com/tykj/dev/device/user/config/handler/MyFailHandler.java
浏览文件 @
c0403685
...
@@ -23,6 +23,10 @@ public class MyFailHandler implements AuthenticationFailureHandler {
...
@@ -23,6 +23,10 @@ public class MyFailHandler implements AuthenticationFailureHandler {
httpServletResponse
.
setStatus
(
200
);
httpServletResponse
.
setStatus
(
200
);
httpServletResponse
.
setCharacterEncoding
(
"utf-8"
);
httpServletResponse
.
setCharacterEncoding
(
"utf-8"
);
httpServletResponse
.
setContentType
(
"application/json"
);
httpServletResponse
.
setContentType
(
"application/json"
);
httpServletResponse
.
getWriter
().
println
(
"{\"code\":401,\"msg\":\""
+
e
.
getMessage
()+
"\"}"
);
if
(
e
.
getMessage
().
equals
(
"Bad credentials"
)){
httpServletResponse
.
getWriter
().
println
(
"{\"code\":401,\"msg\":\"密码错误请重新输入\"}"
);
}
else
{
httpServletResponse
.
getWriter
().
println
(
"{\"code\":401,\"msg\":\""
+
e
.
getMessage
()
+
"\"}"
);
}
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论