Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
5ac46093
提交
5ac46093
authored
9月 24, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新业务日志aop
上级
6b49c8ff
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
28 个修改的文件
包含
297 行增加
和
118 行删除
+297
-118
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+4
-3
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+9
-9
pom.xml
dev-config/pom.xml
+5
-0
GlobalMap.java
dev-config/src/main/java/com/tykj/dev/config/GlobalMap.java
+14
-1
LogAspect.java
dev-config/src/main/java/com/tykj/dev/config/LogAspect.java
+0
-34
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+134
-0
Param.java
dev-config/src/main/java/com/tykj/dev/config/Param.java
+3
-6
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+6
-6
DeviceDestroyController.java
...ev/device/destroy/controller/DeviceDestroyController.java
+19
-10
DeviceDestroyBill.java
...j/dev/device/destroy/entity/domain/DeviceDestroyBill.java
+11
-1
DeviceDestroyConfirmVo.java
.../dev/device/destroy/entity/vo/DeviceDestroyConfirmVo.java
+6
-0
DeviceLibrarySaveVo.java
...kj/dev/device/library/subject/vo/DeviceLibrarySaveVo.java
+3
-0
MatchingDeviceController.java
.../device/matching/controller/MatchingDeviceController.java
+7
-7
StatusEnum.java
...misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
+4
-1
PackingController.java
...tykj/dev/device/packing/controller/PackingController.java
+8
-9
RepairController.java
...m/tykj/dev/device/repair/controller/RepairController.java
+0
-0
DeviceRetiredController.java
...ev/device/retired/controller/DeviceRetiredController.java
+3
-3
RfidController.java
...ain/java/com/tykj/dev/rfid/controller/RfidController.java
+3
-3
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+7
-7
SendBackServiceImpl.java
...dev/device/sendback/service/impl/SendBackServiceImpl.java
+2
-2
StorageBillController.java
.../dev/device/storage/controller/StorageBillController.java
+7
-7
TaskService.java
...in/java/com/tykj/dev/device/task/service/TaskService.java
+1
-1
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+16
-3
TaskBto.java
...in/java/com/tykj/dev/device/task/subject/bto/TaskBto.java
+1
-1
TrainJobController.java
.../tykj/dev/device/train/controller/TrainJobController.java
+3
-3
WorkHandoverServiceImpl.java
...ev/device/train/service/impl/WorkHandoverServiceImpl.java
+1
-1
LogAspect.java
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
+0
-0
UnionApplication.java
...on/src/main/java/com/tykj/dev/union/UnionApplication.java
+20
-0
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
5ac46093
...
@@ -91,7 +91,7 @@ public class AllotBillController {
...
@@ -91,7 +91,7 @@ public class AllotBillController {
userIds
.
add
(
userId
);
userIds
.
add
(
userId
);
userIds
.
add
(
allotBillSaveVo
.
getSendUserbId
());
userIds
.
add
(
allotBillSaveVo
.
getSendUserbId
());
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
ALLOT_SEND_CONFIRM
.
id
,
"配发业务"
,
null
,
"."
,
billId
,
3
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
ALLOT_SEND_CONFIRM
.
id
,
"配发业务"
,
null
,
"."
,
billId
,
3
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
Task
saveEntity
=
taskService
.
start
(
taskBto
);
Task
Bto
saveEntity
=
taskService
.
start
(
taskBto
);
//存业务日志
//存业务日志
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"出库确认单"
,
allotBillEntity
.
getFileName
(),
allotBillEntity
.
getFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"出库确认单"
,
allotBillEntity
.
getFileName
(),
allotBillEntity
.
getFileUrl
()));
...
@@ -179,9 +179,8 @@ public class AllotBillController {
...
@@ -179,9 +179,8 @@ public class AllotBillController {
@ApiOperation
(
value
=
"接收配发装备"
,
notes
=
"可以通过这个接口接收配发装备"
)
@ApiOperation
(
value
=
"接收配发装备"
,
notes
=
"可以通过这个接口接收配发装备"
)
@PostMapping
(
value
=
"/receiveDevice"
)
@PostMapping
(
value
=
"/receiveDevice"
)
public
ResponseEntity
receiveDevice
(
@RequestBody
AllotReceiveVo
allotReceiveVo
)
{
public
ResponseEntity
receiveDevice
(
@RequestBody
AllotReceiveVo
allotReceiveVo
)
{
//获取当前任务
,推至下一阶段
//获取当前任务
TaskBto
taskBto
=
taskService
.
get
(
allotReceiveVo
.
getTaskId
());
TaskBto
taskBto
=
taskService
.
get
(
allotReceiveVo
.
getTaskId
());
taskService
.
update
(
taskService
.
moveToNext
(
taskBto
,
allotReceiveVo
.
getReceiveUserbId
()));
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
AllotBill
allotBillEntity
=
allotBillService
.
getOne
(
taskBto
.
getBillId
());
//添加业务日志
//添加业务日志
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
...
@@ -194,6 +193,8 @@ public class AllotBillController {
...
@@ -194,6 +193,8 @@ public class AllotBillController {
BeanUtils
.
copyProperties
(
allotReceiveVo
,
allotBillEntity
);
BeanUtils
.
copyProperties
(
allotReceiveVo
,
allotBillEntity
);
allotBillEntity
.
setReceiveTime
(
TimestampUtil
.
getCurrentTimestamp
());
allotBillEntity
.
setReceiveTime
(
TimestampUtil
.
getCurrentTimestamp
());
allotBillService
.
update
(
allotBillEntity
);
allotBillService
.
update
(
allotBillEntity
);
//推至下一阶段
taskService
.
update
(
taskService
.
moveToNext
(
taskBto
,
allotReceiveVo
.
getReceiveUserbId
()));
//分隔装备id信息
//分隔装备id信息
String
deviceIdDetail
=
allotReceiveVo
.
getReceiveCheckDetail
();
String
deviceIdDetail
=
allotReceiveVo
.
getReceiveCheckDetail
();
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
String
[]
strings
=
deviceIdDetail
.
split
(
"x"
);
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
5ac46093
...
@@ -106,10 +106,10 @@ public class DeviceApplyController {
...
@@ -106,10 +106,10 @@ public class DeviceApplyController {
userIds
.
add
(
0
);
userIds
.
add
(
0
);
taskBto
=
new
TaskBto
(
StatusEnum
.
DEVICE_APPLY_CONFIRM
.
id
,
"申请业务"
,
null
,
"."
,
deviceApplyBillEntity
.
getId
(),
9
,
userPublicService
.
findUnitIdByName
(
deviceApplySaveVo
.
getReplyUnit
()),
1
,
null
,
userIds
);
taskBto
=
new
TaskBto
(
StatusEnum
.
DEVICE_APPLY_CONFIRM
.
id
,
"申请业务"
,
null
,
"."
,
deviceApplyBillEntity
.
getId
(),
9
,
userPublicService
.
findUnitIdByName
(
deviceApplySaveVo
.
getReplyUnit
()),
1
,
null
,
userIds
);
}
}
Task
saveEntity
=
taskService
.
start
(
taskBto
);
Task
Bto
saveEntity
=
taskService
.
start
(
taskBto
);
//添加业务日志
//添加业务日志
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
saveEntity
.
getId
(),
"发起装备申请"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(saveEntity.getId(),"发起装备申请",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
deviceApplyBillEntity
);
return
ResponseEntity
.
ok
(
deviceApplyBillEntity
);
}
}
...
@@ -129,8 +129,8 @@ public class DeviceApplyController {
...
@@ -129,8 +129,8 @@ public class DeviceApplyController {
applyBillEntity
.
setApplyStatus
(
1
);
applyBillEntity
.
setApplyStatus
(
1
);
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
deviceApplyBillService
.
update
(
applyBillEntity
);
deviceApplyBillService
.
update
(
applyBillEntity
);
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"装备申请批复驳回"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(),"装备申请批复驳回",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
taskBto
);
return
ResponseEntity
.
ok
(
taskBto
);
}
}
...
@@ -138,16 +138,16 @@ public class DeviceApplyController {
...
@@ -138,16 +138,16 @@ public class DeviceApplyController {
if
(
deviceApplyConfirmVo
.
getStatus
()==
0
){
if
(
deviceApplyConfirmVo
.
getStatus
()==
0
){
applyBillEntity
.
setApplyStatus
(
2
);
applyBillEntity
.
setApplyStatus
(
2
);
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"装备申请批复通过"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(),"装备申请批复通过",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
//生成配发子任务
//生成配发子任务
List
<
Integer
>
userIds
=
new
ArrayList
<>();
List
<
Integer
>
userIds
=
new
ArrayList
<>();
userIds
.
add
(
userId
);
userIds
.
add
(
userId
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
WAIT_ALLOT
.
id
,
"配发业务"
,
taskBto
.
getId
(),
"."
+
taskBto
.
getId
()+
"."
,
0
,
3
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
TaskBto
taskBto1
=
new
TaskBto
(
StatusEnum
.
WAIT_ALLOT
.
id
,
"配发业务"
,
taskBto
.
getId
(),
"."
+
taskBto
.
getId
()+
"."
,
0
,
3
,
userUtils
.
getCurrentUnitId
(),
0
,
null
,
userIds
);
Task
task
=
taskService
.
start
(
taskBto1
);
Task
Bto
task
=
taskService
.
start
(
taskBto1
);
deviceApplyBillService
.
update
(
applyBillEntity
);
deviceApplyBillService
.
update
(
applyBillEntity
);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
task
.
parse2Bto
()
);
return
ResponseEntity
.
ok
(
task
);
}
}
else
{
else
{
throw
new
ApiException
(
ResultUtil
.
failed
(
"status只能为0或1"
));
throw
new
ApiException
(
ResultUtil
.
failed
(
"status只能为0或1"
));
...
...
dev-config/pom.xml
浏览文件 @
5ac46093
...
@@ -73,6 +73,11 @@
...
@@ -73,6 +73,11 @@
<artifactId>
misc
</artifactId>
<artifactId>
misc
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
4.1.14
</version>
</dependency>
<!--<dependency>-->
<!--<dependency>-->
...
...
dev-
misc/src/main/java/com/tykj/dev/misc/base
/GlobalMap.java
→
dev-
config/src/main/java/com/tykj/dev/config
/GlobalMap.java
浏览文件 @
5ac46093
package
com
.
tykj
.
dev
.
misc
.
base
;
package
com
.
tykj
.
dev
.
config
;
import
com.tykj.dev.misc.base.RepairStatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.function.Function
;
...
@@ -14,11 +19,15 @@ public class GlobalMap {
...
@@ -14,11 +19,15 @@ public class GlobalMap {
private
static
final
Map
<
Integer
,
RepairStatusEnum
>
repairStatusMap
;
private
static
final
Map
<
Integer
,
RepairStatusEnum
>
repairStatusMap
;
private
static
final
Map
<
Integer
,
LogType
>
logTypeMap
;
static
{
static
{
statusEnumMap
=
Arrays
.
stream
(
StatusEnum
.
values
())
statusEnumMap
=
Arrays
.
stream
(
StatusEnum
.
values
())
.
collect
(
Collectors
.
toMap
(
statusEnum
->
statusEnum
.
id
,
Function
.
identity
()));
.
collect
(
Collectors
.
toMap
(
statusEnum
->
statusEnum
.
id
,
Function
.
identity
()));
repairStatusMap
=
Arrays
.
stream
(
RepairStatusEnum
.
values
())
repairStatusMap
=
Arrays
.
stream
(
RepairStatusEnum
.
values
())
.
collect
(
Collectors
.
toMap
(
repairStatusEnum
->
repairStatusEnum
.
id
,
Function
.
identity
()));
.
collect
(
Collectors
.
toMap
(
repairStatusEnum
->
repairStatusEnum
.
id
,
Function
.
identity
()));
logTypeMap
=
Arrays
.
stream
(
LogType
.
values
())
.
collect
(
Collectors
.
toMap
(
logType
->
logType
.
id
,
Function
.
identity
()));
}
}
public
static
Map
<
Integer
,
StatusEnum
>
getStatusEnumMap
()
{
public
static
Map
<
Integer
,
StatusEnum
>
getStatusEnumMap
()
{
...
@@ -28,4 +37,8 @@ public class GlobalMap {
...
@@ -28,4 +37,8 @@ public class GlobalMap {
public
static
Map
<
Integer
,
RepairStatusEnum
>
getRepairStatusMap
()
{
public
static
Map
<
Integer
,
RepairStatusEnum
>
getRepairStatusMap
()
{
return
repairStatusMap
;
return
repairStatusMap
;
}
}
public
static
Map
<
Integer
,
LogType
>
getLogTypeMap
()
{
return
logTypeMap
;
}
}
}
dev-config/src/main/java/com/tykj/dev/config/LogAspect.java
deleted
100644 → 0
浏览文件 @
6b49c8ff
package
com
.
tykj
.
dev
.
config
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.springframework.stereotype.Component
;
/**
* 业务操作日志aop
*/
@Aspect
@Component
public
class
LogAspect
{
/**
* 请求中的所有参数
*/
private
Object
[]
args
;
/**
* 请求中的所有参数名
*/
private
String
[]
paramNames
;
/**
* 参数类
*/
private
Param
params
;
/**
* 业务操作日志定义切入点
*/
public
void
opreationLog
(){
}
}
dev-config/src/main/java/com/tykj/dev/config/LogType.java
0 → 100644
浏览文件 @
5ac46093
package
com
.
tykj
.
dev
.
config
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
/**
* Type
*
* @author Lunhao Hu
* @date 2019-01-30 17:12
**/
@AllArgsConstructor
public
enum
LogType
{
/**
* 发起列装
*/
PACKING_1
(
1
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
PACKING_CONFIRM
.
id
,
"发起列装"
),
/**
* 列装审核成功
*/
PACKING_2
(
2
,
StatusEnum
.
PACKING_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"列装审核成功"
),
/**
* 列装审核失败
*/
PACKING_3
(
3
,
StatusEnum
.
PACKING_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"列装审核失败"
),
STORAGE_1
(
4
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
STORAGE_CONFIRM
.
id
,
"发起入库"
),
STORAGE_2
(
5
,
StatusEnum
.
STORAGE_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"入库审核成功"
),
STORAGE_3
(
6
,
StatusEnum
.
STORAGE_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"入库审核失败"
),
ALLOT_1
(
7
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
ALLOT_SEND_CONFIRM
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_2
(
8
,
StatusEnum
.
WAIT_ALLOT
.
id
,
StatusEnum
.
ALLOT_SEND_CONFIRM
.
id
,
"对(%receiveUnit)发起配发"
),
ALLOT_3
(
9
,
StatusEnum
.
ALLOT_SEND_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"配发出库审核失败"
),
ALLOT_4
(
10
,
StatusEnum
.
ALLOT_SEND_CONFIRM
.
id
,
StatusEnum
.
ALLOTING
.
id
,
"审核成功并出库"
),
ALLOT_5
(
11
,
StatusEnum
.
ALLOTING
.
id
,
StatusEnum
.
ALLOT_RECEIVE_CONFIRM
.
id
,
"接收并发起入库"
),
ALLOT_6
(
12
,
StatusEnum
.
ALLOT_RECEIVE_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"审核成功并入库"
),
ALLOT_7
(
13
,
StatusEnum
.
ALLOT_RECEIVE_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"配发入库审核失败"
),
RFID_1
(
14
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
RFID_BUSINESS_NEED_CONFIRM
.
id
,
"发起标签替换"
),
RFID_2
(
15
,
StatusEnum
.
RFID_BUSINESS_NEED_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"标签替换审核成功"
),
RFID_3
(
16
,
StatusEnum
.
RFID_BUSINESS_NEED_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"标签替换审核失败"
),
SELF_CHECK_1
(
17
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"手动发起自查"
),
SELF_CHECK_2
(
18
,
StatusEnum
.
WAIT_SELF_CHECK
.
id
,
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"周期发起自查"
),
SELF_CHECK_3
(
19
,
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"自查审核成功"
),
SELF_CHECK_4
(
20
,
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"自查审核失败"
),
APPLY_1
(
21
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
DEVICE_APPLY_CONFIRM
.
id
,
"发起装备申请"
),
APPLY_2
(
22
,
StatusEnum
.
DEVICE_APPLY_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"装备申请批复通过"
),
APPLY_3
(
23
,
StatusEnum
.
DEVICE_APPLY_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"装备申请批复驳回"
),
DESTROY_1
(
24
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
DESTROY_BUSINESS_NEED_CONFIRM
.
id
,
"发起销毁"
),
DESTROY_2
(
25
,
StatusEnum
.
DESTROY_BUSINESS_NEED_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"销毁出库审核成功"
),
DESTROY_3
(
26
,
StatusEnum
.
DESTROY_BUSINESS_NEED_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"销毁出库审核失败"
),
MATCHING_1
(
27
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
ADD_MATCHING_DEVICE_CONFIRM
.
id
,
"发起新增配套设备"
),
MATCHING_2
(
28
,
StatusEnum
.
ADD_MATCHING_DEVICE_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"添加配套设备审核成功"
),
MATCHING_3
(
29
,
StatusEnum
.
ADD_MATCHING_DEVICE_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"添加配套设备审核失败"
),
REPAIR_SEND_1
(
30
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
REPAIR_SEND_CONFIRM
.
id
,
"向(%receiveUnit)发起装备维修"
),
REPAIR_SEND_2
(
31
,
StatusEnum
.
REPAIR_SEND_CONFIRM
.
id
,
StatusEnum
.
WAIT_RECEIVE
.
id
,
"审核成功并出库"
),
REPAIR_SEND_3
(
32
,
StatusEnum
.
REPAIR_SEND_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"维修出库审核失败"
),
REPAIR_SEND_4
(
33
,
StatusEnum
.
WAIT_RECEIVE
.
id
,
StatusEnum
.
REPAIR_RECEIVE_CONFIRM
.
id
,
"接收维修装备并发起入库"
),
REPAIR_SEND_5
(
34
,
StatusEnum
.
REPAIR_RECEIVE_CONFIRM
.
id
,
StatusEnum
.
REPAIRING
.
id
,
"审核成功并入库维修"
),
REPAIR_SEND_6
(
35
,
StatusEnum
.
REPAIR_RECEIVE_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"维修装备入库审核失败"
),
REPAIR_SEND_7
(
36
,
StatusEnum
.
REPAIR_SEND_CONFIRM
.
id
,
StatusEnum
.
COUNTRY_REPAIRING
.
id
,
"审核成功并出库"
),
REPAIR_BACK_1
(
37
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
REPAIR_BACK_CONFIRM
.
id
,
"向(%receiveUnit)退还维修装备"
),
REPAIR_BACK_2
(
38
,
StatusEnum
.
REPAIR_BACK_CONFIRM
.
id
,
StatusEnum
.
WAIT_BACK_RECEIVE
.
id
,
"维修退回审核成功并出库"
),
REPAIR_BACK_3
(
39
,
StatusEnum
.
REPAIR_BACK_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"维修退回出库审核失败"
),
REPAIR_BACK_4
(
40
,
StatusEnum
.
WAIT_BACK_RECEIVE
.
id
,
StatusEnum
.
REPAIR_BACK_RECEIVE_CONFIRM
.
id
,
"维修退回装备接收并发起入库"
),
REPAIR_BACK_5
(
41
,
StatusEnum
.
REPAIR_BACK_RECEIVE_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"维修退回装备入库审核成功"
),
REPAIR_BACK_6
(
42
,
StatusEnum
.
REPAIR_BACK_RECEIVE_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"维修退回装备入库审核失败"
),
RETIRED_1
(
43
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
RETIRED_BUSINESS_NEED_CONFIRM
.
id
,
"发起退装"
),
RETIRED_2
(
44
,
StatusEnum
.
RETIRED_BUSINESS_NEED_CONFIRM
.
id
,
StatusEnum
.
END
.
id
,
"退装审核成功"
),
RETIRED_3
(
45
,
StatusEnum
.
RETIRED_BUSINESS_NEED_CONFIRM
.
id
,
StatusEnum
.
ARCHIVE
.
id
,
"退装审核失败"
),
TRAIN_1
(
46
,
StatusEnum
.
ORIGIN_STATUS
.
id
,
StatusEnum
.
TRAIN1000
.
id
,
"发起培训"
)
;
public
Integer
id
;
/**
* 旧状态
*/
public
Integer
oldStatus
;
/**
* 新状态
*/
public
Integer
newStatus
;
/**
* 执行操作
*/
public
String
operation
;
public
String
getOperation
()
{
return
this
.
operation
;
}
}
dev-config/src/main/java/com/tykj/dev/config/Param.java
浏览文件 @
5ac46093
package
com
.
tykj
.
dev
.
config
;
package
com
.
tykj
.
dev
.
config
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
/**
* @author dengdiyi
* @author dengdiyi
...
@@ -11,10 +12,6 @@ public class Param {
...
@@ -11,10 +12,6 @@ public class Param {
/**
/**
* 所有可能存储在业务日志中的参数
* 所有可能存储在业务日志中的参数
*/
*/
private
String
id
;
private
String
receiveUnit
;
private
String
age
;
private
String
workOrderNumber
;
private
String
userId
;
private
String
name
;
private
String
email
;
}
}
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
5ac46093
...
@@ -24,7 +24,7 @@ import com.tykj.dev.device.user.subject.entity.Area;
...
@@ -24,7 +24,7 @@ import com.tykj.dev.device.user.subject.entity.Area;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.subject.entity.User
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.device.user.util.AuthenticationUtils
;
import
com.tykj.dev.
misc.base
.GlobalMap
;
import
com.tykj.dev.
config
.GlobalMap
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.ResultObj
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
...
@@ -142,7 +142,7 @@ public class DeviceCheckController {
...
@@ -142,7 +142,7 @@ public class DeviceCheckController {
TaskBto
provStatTask
=
new
Task
(
CHECK_STAT_0
.
id
,
"省自动核查"
,
0
,
".0."
,
CONFIRM_CHECK_STAT
.
id
,
provStat
.
getId
(),
provUnit
.
getUnitId
())
TaskBto
provStatTask
=
new
Task
(
CHECK_STAT_0
.
id
,
"省自动核查"
,
0
,
".0."
,
CONFIRM_CHECK_STAT
.
id
,
provStat
.
getId
(),
provUnit
.
getUnitId
())
.
parse2Bto
();
.
parse2Bto
();
provStatTask
.
setInvolveUserIdList
(
Lists
.
newArrayList
(-
1
));
provStatTask
.
setInvolveUserIdList
(
Lists
.
newArrayList
(-
1
));
provStatTask
=
taskService
.
start
(
provStatTask
)
.
parse2Bto
()
;
provStatTask
=
taskService
.
start
(
provStatTask
);
resultIds
.
get
(
"taskId"
).
add
(
provStatTask
.
getId
());
resultIds
.
get
(
"taskId"
).
add
(
provStatTask
.
getId
());
List
<
CheckDeviceStatVo
>
statVoList
=
new
ArrayList
<>();
List
<
CheckDeviceStatVo
>
statVoList
=
new
ArrayList
<>();
...
@@ -168,7 +168,7 @@ public class DeviceCheckController {
...
@@ -168,7 +168,7 @@ public class DeviceCheckController {
TaskBto
cityStatTask
=
new
Task
(
CHECK_STAT_0
.
id
,
city
.
getName
()
+
"自动核查统计"
,
provStatTask
.
getId
(),
addNode
(
provStatTask
.
getNodeIdDetail
(),
provinceStatDo
.
getId
()),
CONFIRM_CHECK_STAT
.
id
,
cityStat
.
getId
(),
city
.
getUnitId
())
TaskBto
cityStatTask
=
new
Task
(
CHECK_STAT_0
.
id
,
city
.
getName
()
+
"自动核查统计"
,
provStatTask
.
getId
(),
addNode
(
provStatTask
.
getNodeIdDetail
(),
provinceStatDo
.
getId
()),
CONFIRM_CHECK_STAT
.
id
,
cityStat
.
getId
(),
city
.
getUnitId
())
.
parse2Bto
();
.
parse2Bto
();
cityStatTask
.
setInvolveUserIdList
(
Lists
.
newArrayList
(-
1
));
cityStatTask
.
setInvolveUserIdList
(
Lists
.
newArrayList
(-
1
));
cityStatTask
=
taskService
.
start
(
cityStatTask
)
.
parse2Bto
()
;
cityStatTask
=
taskService
.
start
(
cityStatTask
);
resultIds
.
get
(
"taskId"
).
add
(
cityStatTask
.
getId
());
resultIds
.
get
(
"taskId"
).
add
(
cityStatTask
.
getId
());
// 构建市自查账单
// 构建市自查账单
...
@@ -189,7 +189,7 @@ public class DeviceCheckController {
...
@@ -189,7 +189,7 @@ public class DeviceCheckController {
statVoList
.
addAll
(
cityStatVoList
);
statVoList
.
addAll
(
cityStatVoList
);
// 构建市自查TASK
// 构建市自查TASK
TaskBto
cityDetailTask
=
new
TaskBto
(
CHECK_DETAIL_0
.
id
,
city
.
getName
()
+
"自动核查自查"
,
cityStatTask
.
getId
(),
addNode
(
cityStatTask
.
getNodeIdDetail
(),
cityStatTask
.
getId
()),
CONFIRM_CHECK_DETAIL
.
id
,
cityDetail
.
getId
(),
city
.
getUnitId
(),
0
);
TaskBto
cityDetailTask
=
new
TaskBto
(
CHECK_DETAIL_0
.
id
,
city
.
getName
()
+
"自动核查自查"
,
cityStatTask
.
getId
(),
addNode
(
cityStatTask
.
getNodeIdDetail
(),
cityStatTask
.
getId
()),
CONFIRM_CHECK_DETAIL
.
id
,
cityDetail
.
getId
(),
city
.
getUnitId
(),
0
);
cityDetailTask
=
taskService
.
start
(
cityDetailTask
)
.
parse2Bto
()
;
cityDetailTask
=
taskService
.
start
(
cityDetailTask
);
resultIds
.
get
(
"taskId"
).
add
(
cityDetailTask
.
getId
());
resultIds
.
get
(
"taskId"
).
add
(
cityDetailTask
.
getId
());
// 构建县任务
// 构建县任务
...
@@ -213,7 +213,7 @@ public class DeviceCheckController {
...
@@ -213,7 +213,7 @@ public class DeviceCheckController {
//构建县自查TASK
//构建县自查TASK
TaskBto
countyDetailTask
=
new
TaskBto
(
CHECK_DETAIL_0
.
id
,
county
.
getName
()
+
"自动核查自查"
,
cityStatTask
.
getId
(),
addNode
(
cityStatTask
.
getNodeIdDetail
(),
cityStatTask
.
getId
()),
CONFIRM_CHECK_DETAIL
.
id
,
countyDetail
.
getId
(),
county
.
getUnitId
(),
0
);
TaskBto
countyDetailTask
=
new
TaskBto
(
CHECK_DETAIL_0
.
id
,
county
.
getName
()
+
"自动核查自查"
,
cityStatTask
.
getId
(),
addNode
(
cityStatTask
.
getNodeIdDetail
(),
cityStatTask
.
getId
()),
CONFIRM_CHECK_DETAIL
.
id
,
countyDetail
.
getId
(),
county
.
getUnitId
(),
0
);
countyDetailTask
=
taskService
.
start
(
countyDetailTask
)
.
parse2Bto
()
;
countyDetailTask
=
taskService
.
start
(
countyDetailTask
);
resultIds
.
get
(
"taskId"
).
add
(
countyDetailTask
.
getId
());
resultIds
.
get
(
"taskId"
).
add
(
countyDetailTask
.
getId
());
}
}
...
@@ -281,7 +281,7 @@ public class DeviceCheckController {
...
@@ -281,7 +281,7 @@ public class DeviceCheckController {
provStatTask
.
getInvolveUserIdList
().
add
(
AuthenticationUtils
.
getAuthentication
().
getCurrentUserInfo
().
getUserId
());
provStatTask
.
getInvolveUserIdList
().
add
(
AuthenticationUtils
.
getAuthentication
().
getCurrentUserInfo
().
getUserId
());
provStatTask
.
getInvolveUserIdList
().
add
(-
1
);
provStatTask
.
getInvolveUserIdList
().
add
(-
1
);
provStatTask
.
setCurrentPoint
(
1
);
provStatTask
.
setCurrentPoint
(
1
);
provStatTask
=
taskService
.
start
(
provStatTask
)
.
parse2Bto
()
;
provStatTask
=
taskService
.
start
(
provStatTask
);
// 3 构建被查单位的 自查账单 与 自查任务
// 3 构建被查单位的 自查账单 与 自查任务
// 获取所有在库装备与不在库装备
// 获取所有在库装备与不在库装备
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/controller/DeviceDestroyController.java
浏览文件 @
5ac46093
...
@@ -27,6 +27,7 @@ import com.tykj.dev.misc.utils.StringSplitUtil;
...
@@ -27,6 +27,7 @@ import com.tykj.dev.misc.utils.StringSplitUtil;
import
com.tykj.dev.socket.MyWebSocket
;
import
com.tykj.dev.socket.MyWebSocket
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -97,18 +98,17 @@ public class DeviceDestroyController {
...
@@ -97,18 +98,17 @@ public class DeviceDestroyController {
DeviceDestroyBill
deviceDestroyBillEntitySaved
=
deviceDestroyBillService
.
addEntity
(
destroyBill
);
DeviceDestroyBill
deviceDestroyBillEntitySaved
=
deviceDestroyBillService
.
addEntity
(
destroyBill
);
//生成日志所需的文件列表
//生成日志所需的文件列表
ArrayList
<
FileVo
>
billList
=
ListUtil
.
createList
(
ArrayList
<
FileVo
>
billList
=
ListUtil
.
createList
(
new
FileVo
(
"
销毁单据
"
,
deviceDestroyBillEntitySaved
.
getFileName
(),
deviceDestroyBillEntitySaved
.
getFileUrl
())
new
FileVo
(
"
出库确认单
"
,
deviceDestroyBillEntitySaved
.
getFileName
(),
deviceDestroyBillEntitySaved
.
getFileUrl
())
);
);
//生成装备变更日志
//生成装备变更日志
formVo
.
getDevices
().
forEach
(
d
->{
formVo
.
getDevices
().
forEach
(
d
->{
deviceLogService
.
addLog
(
new
DeviceLogDto
(
d
,
"发起销毁"
,
billList
));
deviceLogService
.
addLog
(
new
DeviceLogDto
(
d
,
"发起销毁"
,
billList
));
deviceLogService
.
addLog
(
new
DeviceLogDto
(
d
,
"销毁待审核"
,
billList
));
});
});
//生成销毁审核任务
//生成销毁审核任务
Task
task
=
taskService
.
start
(
initTaskBto
(
deviceDestroyBillEntitySaved
));
Task
Bto
task
=
taskService
.
start
(
initTaskBto
(
deviceDestroyBillEntitySaved
));
//生成任务日志
//生成任务日志
taskLogService
.
addLog
(
new
TaskLogBto
(
task
.
getId
(),
"发起销毁"
,
billList
));
//
taskLogService.addLog(new TaskLogBto(task.getId(),"发起销毁",billList));
taskLogService
.
addLog
(
new
TaskLogBto
(
task
.
getId
(),
"销毁待审核"
,
billList
));
//
taskLogService.addLog(new TaskLogBto(task.getId(),"销毁待审核",billList));
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResultUtil
.
success
(
"销毁-出库申请成功"
);
return
ResultUtil
.
success
(
"销毁-出库申请成功"
);
}
}
...
@@ -174,10 +174,18 @@ public class DeviceDestroyController {
...
@@ -174,10 +174,18 @@ public class DeviceDestroyController {
//初始化需要的数据
//初始化需要的数据
TaskBto
task
=
taskService
.
get
(
deviceDestoryConfirmVo
.
getTaskId
());
TaskBto
task
=
taskService
.
get
(
deviceDestoryConfirmVo
.
getTaskId
());
DeviceDestroyBill
deviceDestroyBill
=
deviceDestroyBillService
.
getOne
(
task
.
getBillId
());
DeviceDestroyBill
deviceDestroyBill
=
deviceDestroyBillService
.
getOne
(
task
.
getBillId
());
if
(
deviceDestoryConfirmVo
.
getDestroyFileName
()!=
null
){
deviceDestroyBill
.
setDestroyFileName
(
deviceDestoryConfirmVo
.
getDestroyFileName
());
}
if
(
deviceDestoryConfirmVo
.
getDestroyFileUrl
()!=
null
){
deviceDestroyBill
.
setDestroyFileUrl
(
deviceDestoryConfirmVo
.
getDestroyFileUrl
());
}
//判断审核结果 0为审核通过,1为审核不通过
//判断审核结果 0为审核通过,1为审核不通过
if
(
deviceDestoryConfirmVo
.
getResult
()
==
1
)
{
if
(
deviceDestoryConfirmVo
.
getResult
()
==
1
)
{
//更改账单状态
//更改账单状态
deviceDestroyBill
.
setDestroyStatus
(
DestroyStatus
.
CONFIRM_FAILED
.
getStatus
());
deviceDestroyBill
.
setDestroyStatus
(
DestroyStatus
.
CONFIRM_FAILED
.
getStatus
());
//更新销毁账单
this
.
deviceDestroyBillService
.
updateEntity
(
deviceDestroyBill
);
//将任务推进至封存
//将任务推进至封存
taskService
.
moveToArchive
(
task
);
taskService
.
moveToArchive
(
task
);
taskService
.
update
(
task
);
taskService
.
update
(
task
);
...
@@ -188,20 +196,21 @@ public class DeviceDestroyController {
...
@@ -188,20 +196,21 @@ public class DeviceDestroyController {
deviceDestroyBill
.
setDestroyTime
(
new
Date
());
deviceDestroyBill
.
setDestroyTime
(
new
Date
());
//为账单新增文号
//为账单新增文号
deviceDestroyBill
.
setDocNumber
(
this
.
deviceDestroyBillService
.
getNewDocNumber
());
deviceDestroyBill
.
setDocNumber
(
this
.
deviceDestroyBillService
.
getNewDocNumber
());
//更新销毁账单
this
.
deviceDestroyBillService
.
updateEntity
(
deviceDestroyBill
);
//将任务推进至完结
//将任务推进至完结
taskService
.
moveToEnd
(
task
);
taskService
.
moveToEnd
(
task
);
taskService
.
update
(
task
);
taskService
.
update
(
task
);
}
}
//生成日志所需的文件列表
//生成日志所需的文件列表
ArrayList
<
FileVo
>
billList
=
ListUtil
.
createList
(
ArrayList
<
FileVo
>
billList
=
ListUtil
.
createList
(
new
FileVo
(
"标签替换单据"
,
deviceDestroyBill
.
getFileName
(),
deviceDestroyBill
.
getFileUrl
())
deviceDestroyBill
.
getDestroyFileName
()!=
null
&&
deviceDestroyBill
.
getDestroyFileUrl
()!=
null
?
new
FileVo
(
"销毁单据"
,
deviceDestroyBill
.
getDestroyFileName
(),
deviceDestroyBill
.
getDestroyFileUrl
()):
null
);
);
//更改对应装备的状态为销毁
//更改对应装备的状态为销毁
handleDeviceDetail
(
deviceDestroyBill
,
billList
,
deviceDestoryConfirmVo
.
getResult
());
handleDeviceDetail
(
deviceDestroyBill
,
billList
,
deviceDestoryConfirmVo
.
getResult
());
//更新销毁账单
// //生成任务日志
this
.
deviceDestroyBillService
.
updateEntity
(
deviceDestroyBill
);
// taskLogService.addLog(new TaskLogBto(task.getId(),deviceDestoryConfirmVo.getResult() == 0?"销毁成功":"销毁审核失败",billList));
//生成任务日志
taskLogService
.
addLog
(
new
TaskLogBto
(
task
.
getId
(),
deviceDestoryConfirmVo
.
getResult
()
==
0
?
"销毁成功"
:
"销毁审核失败"
,
billList
));
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
selectDestroyDetail
(
deviceDestroyBill
.
getId
());
return
selectDestroyDetail
(
deviceDestroyBill
.
getId
());
}
}
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/entity/domain/DeviceDestroyBill.java
浏览文件 @
5ac46093
...
@@ -68,7 +68,17 @@ public class DeviceDestroyBill {
...
@@ -68,7 +68,17 @@ public class DeviceDestroyBill {
* 出库附件文件地址URL
* 出库附件文件地址URL
*/
*/
@ApiModelProperty
(
value
=
"出库附件文件地址URL"
)
@ApiModelProperty
(
value
=
"出库附件文件地址URL"
)
private
String
fileUrl
;
private
String
fileUrl
;
/**
* 出库附件文件名
*/
@ApiModelProperty
(
value
=
"销毁附件文件名"
)
private
String
destroyFileName
;
/**
* 出库附件文件地址URL
*/
@ApiModelProperty
(
value
=
"销毁附件文件地址URL"
)
private
String
destroyFileUrl
;
/**
/**
* 装备销毁出库详情(装备主键id+核对结果(0缺失1无误2新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增
* 装备销毁出库详情(装备主键id+核对结果(0缺失1无误2新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增
*/
*/
...
...
dev-destroy/src/main/java/com/tykj/dev/device/destroy/entity/vo/DeviceDestroyConfirmVo.java
浏览文件 @
5ac46093
...
@@ -23,4 +23,10 @@ public class DeviceDestroyConfirmVo {
...
@@ -23,4 +23,10 @@ public class DeviceDestroyConfirmVo {
@NotNull
@NotNull
@ApiModelProperty
(
value
=
"审核结果 0为不通过 1为通过 "
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"审核结果 0为不通过 1为通过 "
,
example
=
"1"
)
private
Integer
result
;
private
Integer
result
;
@ApiModelProperty
(
value
=
"销毁附件文件名"
)
private
String
destroyFileName
;
@ApiModelProperty
(
value
=
"销毁附件文件地址URL"
)
private
String
destroyFileUrl
;
}
}
dev-library/src/main/java/com/tykj/dev/device/library/subject/vo/DeviceLibrarySaveVo.java
浏览文件 @
5ac46093
...
@@ -36,4 +36,7 @@ public class DeviceLibrarySaveVo {
...
@@ -36,4 +36,7 @@ public class DeviceLibrarySaveVo {
@ApiModelProperty
(
value
=
"是不是单独的配件,0-不是,1-是"
)
@ApiModelProperty
(
value
=
"是不是单独的配件,0-不是,1-是"
)
private
Integer
isSinglePart
=
0
;
private
Integer
isSinglePart
=
0
;
@ApiModelProperty
(
value
=
"货架位置"
)
private
String
position
;
}
}
dev-matching/src/main/java/com/tykj/dev/device/matching/controller/MatchingDeviceController.java
浏览文件 @
5ac46093
...
@@ -86,12 +86,12 @@ public class MatchingDeviceController {
...
@@ -86,12 +86,12 @@ public class MatchingDeviceController {
userIds
.
add
(
userId
);
userIds
.
add
(
userId
);
userIds
.
add
(
matchingDeviceBillSaveVo
.
getUserbId
());
userIds
.
add
(
matchingDeviceBillSaveVo
.
getUserbId
());
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
ADD_MATCHING_DEVICE_CONFIRM
.
id
,
"新增配套"
,
null
,
"."
,
m
.
getId
(),
19
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
ADD_MATCHING_DEVICE_CONFIRM
.
id
,
"新增配套"
,
null
,
"."
,
m
.
getId
(),
19
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
Task
taskEntity1
=
taskService
.
start
(
taskBto
);
Task
Bto
taskEntity1
=
taskService
.
start
(
taskBto
);
//添加业务日志
//添加业务日志
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"新增确认单"
,
matchingDeviceBillEntity
.
getFileName
(),
matchingDeviceBillEntity
.
getFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"新增确认单"
,
matchingDeviceBillEntity
.
getFileName
(),
matchingDeviceBillEntity
.
getFileUrl
()));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskEntity1
.
getId
(),
"发起新增配套"
,
fileVoList
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskEntity1.getId(),"发起新增配套",fileVoList);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
for
(
MatchingDeviceSaveVo
matchingDeviceSaveVo:
matchingDeviceBillSaveVo
.
getMatchingDeviceSaveVoList
())
{
for
(
MatchingDeviceSaveVo
matchingDeviceSaveVo:
matchingDeviceBillSaveVo
.
getMatchingDeviceSaveVoList
())
{
MatchingDeviceLibrary
matchingDeviceLibraryEntity
=
matchingDeviceSaveVo
.
toDo
();
MatchingDeviceLibrary
matchingDeviceLibraryEntity
=
matchingDeviceSaveVo
.
toDo
();
MatchingDeviceLibrary
saveEntity
=
matchingDeviceLibraryService
.
addEntity
(
matchingDeviceLibraryEntity
);
MatchingDeviceLibrary
saveEntity
=
matchingDeviceLibraryService
.
addEntity
(
matchingDeviceLibraryEntity
);
...
@@ -116,8 +116,8 @@ public class MatchingDeviceController {
...
@@ -116,8 +116,8 @@ public class MatchingDeviceController {
if
(
matchingDeviceBillConfirmVo
.
getStatus
()
==
0
)
{
if
(
matchingDeviceBillConfirmVo
.
getStatus
()
==
0
)
{
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
//添加日业务志
//添加日业务志
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"添加配套设备审核成功"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(), "添加配套设备审核成功", null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
//更新账单状态
//更新账单状态
MatchingDeviceBill
matchingDeviceBillEntity
=
matchingDeviceBillService
.
getOne
(
taskBto
.
getBillId
());
MatchingDeviceBill
matchingDeviceBillEntity
=
matchingDeviceBillService
.
getOne
(
taskBto
.
getBillId
());
matchingDeviceBillEntity
.
setBillStatus
(
2
);
matchingDeviceBillEntity
.
setBillStatus
(
2
);
...
@@ -140,8 +140,8 @@ public class MatchingDeviceController {
...
@@ -140,8 +140,8 @@ public class MatchingDeviceController {
if
(
matchingDeviceBillConfirmVo
.
getStatus
()==
1
){
if
(
matchingDeviceBillConfirmVo
.
getStatus
()==
1
){
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
//添加日业务志
//添加日业务志
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"添加配套设备审核失败"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(),"添加配套设备审核失败",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
//更新账单状态
//更新账单状态
MatchingDeviceBill
matchingDeviceBillEntity
=
matchingDeviceBillService
.
getOne
(
taskBto
.
getBillId
());
MatchingDeviceBill
matchingDeviceBillEntity
=
matchingDeviceBillService
.
getOne
(
taskBto
.
getBillId
());
matchingDeviceBillEntity
.
setBillStatus
(
1
);
matchingDeviceBillEntity
.
setBillStatus
(
1
);
...
...
dev-misc/src/main/java/com/tykj/dev/misc/base/StatusEnum.java
浏览文件 @
5ac46093
...
@@ -10,7 +10,10 @@ import lombok.AllArgsConstructor;
...
@@ -10,7 +10,10 @@ import lombok.AllArgsConstructor;
@AllArgsConstructor
@AllArgsConstructor
public
enum
StatusEnum
{
public
enum
StatusEnum
{
/**
* 初始状态
*/
ORIGIN_STATUS
(
0
,
"初始状态"
),
/**
/**
* RFID标签制作
* RFID标签制作
...
...
dev-packing/src/main/java/com/tykj/dev/device/packing/controller/PackingController.java
浏览文件 @
5ac46093
...
@@ -11,7 +11,6 @@ import com.tykj.dev.device.task.service.TaskLogService;
...
@@ -11,7 +11,6 @@ import com.tykj.dev.device.task.service.TaskLogService;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskBto
;
import
com.tykj.dev.device.task.subject.bto.TaskLogBto
;
import
com.tykj.dev.device.task.subject.bto.TaskLogBto
;
import
com.tykj.dev.device.task.subject.domin.Task
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
...
@@ -76,12 +75,12 @@ public class PackingController {
...
@@ -76,12 +75,12 @@ public class PackingController {
userIds
.
add
(
userId
);
userIds
.
add
(
userId
);
userIds
.
add
(
packingLibrarySaveVo
.
getUserbId
());
userIds
.
add
(
packingLibrarySaveVo
.
getUserbId
());
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
PACKING_CONFIRM
.
id
,
"列装业务"
,
null
,
"."
,
packingLibraryEntity
.
getId
(),
1
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
PACKING_CONFIRM
.
id
,
"列装业务"
,
null
,
"."
,
packingLibraryEntity
.
getId
(),
1
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
Task
saveEntity
=
taskService
.
start
(
taskBto
);
Task
Bto
saveEntity
=
taskService
.
start
(
taskBto
);
//添加业务日志
//添加业务日志
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
saveEntity
.
getId
(),
"发起列装"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(saveEntity.getId(),"发起列装",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResultUtil
.
success
(
packingLibrary
Entity
);
return
ResultUtil
.
success
(
save
Entity
);
}
}
@ApiOperation
(
value
=
"列装审核"
,
notes
=
"可以通过这个接口进行列装审核"
)
@ApiOperation
(
value
=
"列装审核"
,
notes
=
"可以通过这个接口进行列装审核"
)
...
@@ -101,8 +100,8 @@ public class PackingController {
...
@@ -101,8 +100,8 @@ public class PackingController {
}
}
packingLibraryService
.
update
(
packingLibraryEntity
);
packingLibraryService
.
update
(
packingLibraryEntity
);
//添加业务日志
//添加业务日志
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"列装审核成功"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(),"列装审核成功",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResultUtil
.
success
(
"审核通过列装成功"
);
return
ResultUtil
.
success
(
"审核通过列装成功"
);
}
}
...
@@ -119,8 +118,8 @@ public class PackingController {
...
@@ -119,8 +118,8 @@ public class PackingController {
}
}
packingLibraryService
.
update
(
packingLibraryEntity
);
packingLibraryService
.
update
(
packingLibraryEntity
);
//添加业务日志
//添加业务日志
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"列装审核失败"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(),"列装审核失败",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResultUtil
.
success
(
"列装审核失败"
);
return
ResultUtil
.
success
(
"列装审核失败"
);
}
}
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/controller/RepairController.java
浏览文件 @
5ac46093
差异被折叠。
点击展开。
dev-retired/src/main/java/com/tykj/dev/device/retired/controller/DeviceRetiredController.java
浏览文件 @
5ac46093
...
@@ -103,9 +103,9 @@ public class DeviceRetiredController {
...
@@ -103,9 +103,9 @@ public class DeviceRetiredController {
DeviceRetiredBill
retiredBill
=
DeviceRetiredBill
.
formVoToBill
(
formVo
,
currentUserInfo
);
DeviceRetiredBill
retiredBill
=
DeviceRetiredBill
.
formVoToBill
(
formVo
,
currentUserInfo
);
retiredBill
=
deviceRetiredBillService
.
addEntity
(
retiredBill
);
retiredBill
=
deviceRetiredBillService
.
addEntity
(
retiredBill
);
//生成Task
//生成Task
Task
task
=
taskService
.
start
(
initTaskBto
(
retiredBill
));
Task
Bto
task
=
taskService
.
start
(
initTaskBto
(
retiredBill
));
//生成任务日志
//生成任务日志
taskLogService
.
addLog
(
new
TaskLogBto
(
task
.
getId
(),
"发起退装"
,
null
));
//
taskLogService.addLog(new TaskLogBto(task.getId(), "发起退装", null));
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResultUtil
.
success
(
"退装申请成功"
);
return
ResultUtil
.
success
(
"退装申请成功"
);
}
}
...
@@ -160,7 +160,7 @@ public class DeviceRetiredController {
...
@@ -160,7 +160,7 @@ public class DeviceRetiredController {
}
}
}
}
//生成日志
//生成日志
taskLogService
.
addLog
(
new
TaskLogBto
(
task
.
getId
(),
deviceRetiredConfirmVo
.
getResult
()==
1
?
"退装审核失败"
:
"退装审核成功"
,
null
));
//
taskLogService.addLog(new TaskLogBto(task.getId(),deviceRetiredConfirmVo.getResult()==1?"退装审核失败":"退装审核成功",null));
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
selectDestoryDetail
(
deviceRetiredBillEntity
.
getId
());
return
selectDestoryDetail
(
deviceRetiredBillEntity
.
getId
());
}
}
...
...
dev-rfid/src/main/java/com/tykj/dev/rfid/controller/RfidController.java
浏览文件 @
5ac46093
...
@@ -136,9 +136,9 @@ public class RfidController {
...
@@ -136,9 +136,9 @@ public class RfidController {
deviceLogService
.
addLog
(
new
DeviceLogDto
(
d
.
getDeviceId
(),
"发起标签替换"
,
billList
));
deviceLogService
.
addLog
(
new
DeviceLogDto
(
d
.
getDeviceId
(),
"发起标签替换"
,
billList
));
});
});
//生成Task
//生成Task
Task
task
=
taskService
.
start
(
initTaskBto
(
currentUserInfo
,
rfidChangeBillSaved
));
Task
Bto
task
=
taskService
.
start
(
initTaskBto
(
currentUserInfo
,
rfidChangeBillSaved
));
//生成任务日志
//生成任务日志
taskLogService
.
addLog
(
new
TaskLogBto
(
task
.
getId
(),
"发起标签替换"
,
billList
));
//
taskLogService.addLog(new TaskLogBto(task.getId(),"发起标签替换",billList));
myWebSocket
.
sendMessage1
();;
myWebSocket
.
sendMessage1
();;
return
ResultUtil
.
success
(
"标签修改申请成功"
);
return
ResultUtil
.
success
(
"标签修改申请成功"
);
}
}
...
@@ -184,7 +184,7 @@ public class RfidController {
...
@@ -184,7 +184,7 @@ public class RfidController {
//处理详情和生成日志
//处理详情和生成日志
handleBillDetail
(
task
,
billList
,
rfidChangeConfirmVo
.
getResult
());
handleBillDetail
(
task
,
billList
,
rfidChangeConfirmVo
.
getResult
());
//生成任务变更日志
//生成任务变更日志
taskLogService
.
addLog
(
new
TaskLogBto
(
task
.
getId
(),
rfidChangeConfirmVo
.
getResult
()==
0
?
"标签替换审核成功"
:
"标签替换审核失败"
,
billList
));
//
taskLogService.addLog(new TaskLogBto(task.getId(),rfidChangeConfirmVo.getResult()==0?"标签替换审核成功":"标签替换审核失败",billList));
//更新账单
//更新账单
rfidChangeBillService
.
updateEntity
(
rfidChangeBill
);
rfidChangeBillService
.
updateEntity
(
rfidChangeBill
);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
5ac46093
...
@@ -169,10 +169,10 @@ public class SelfCheckController {
...
@@ -169,10 +169,10 @@ public class SelfCheckController {
userIds
.
add
(
userId
);
userIds
.
add
(
userId
);
userIds
.
add
(
selfExaminationBillEntity1
.
getUserbId
());
userIds
.
add
(
selfExaminationBillEntity1
.
getUserbId
());
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"自查业务"
,
null
,
"."
,
selfExaminationBillEntity1
.
getId
(),
4
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
SELF_CHECK_CONFIRM
.
id
,
"自查业务"
,
null
,
"."
,
selfExaminationBillEntity1
.
getId
(),
4
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
Task
saveEntity
=
taskService
.
start
(
taskBto
);
Task
Bto
saveEntity
=
taskService
.
start
(
taskBto
);
//存业务日志
//存业务日志
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
saveEntity
.
getId
(),
"发起自查"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(saveEntity.getId(),"发起自查",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
//添加装备日志
//添加装备日志
for
(
String
s:
strings
)
{
for
(
String
s:
strings
)
{
if
(
s
.
length
()>=
2
)
{
if
(
s
.
length
()>=
2
)
{
...
@@ -195,8 +195,8 @@ public class SelfCheckController {
...
@@ -195,8 +195,8 @@ public class SelfCheckController {
//审核通过,改变账单和任务状态,发起确认的任务
//审核通过,改变账单和任务状态,发起确认的任务
if
(
selfCheckConfirmVo
.
getStatus
()
==
0
)
{
if
(
selfCheckConfirmVo
.
getStatus
()
==
0
)
{
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"自查审核成功"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(), "自查审核成功", null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
selfExaminationBillEntity
.
setCheckStatus
(
2
);
selfExaminationBillEntity
.
setCheckStatus
(
2
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity
);
for
(
String
s:
strings
)
{
for
(
String
s:
strings
)
{
...
@@ -212,8 +212,8 @@ public class SelfCheckController {
...
@@ -212,8 +212,8 @@ public class SelfCheckController {
//审核不通过,改变账单和任务状态
//审核不通过,改变账单和任务状态
if
(
selfCheckConfirmVo
.
getStatus
()==
1
){
if
(
selfCheckConfirmVo
.
getStatus
()==
1
){
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"自查审核失败"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(),"自查审核失败",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
selfExaminationBillEntity
.
setCheckStatus
(
1
);
selfExaminationBillEntity
.
setCheckStatus
(
1
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity
);
for
(
String
s:
strings
)
{
for
(
String
s:
strings
)
{
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/SendBackServiceImpl.java
浏览文件 @
5ac46093
...
@@ -811,7 +811,7 @@ public class SendBackServiceImpl implements SendBackService {
...
@@ -811,7 +811,7 @@ public class SendBackServiceImpl implements SendBackService {
// addJob(task.getId(),task.getBillStatus(),startUserId,null,0,0);
// addJob(task.getId(),task.getBillStatus(),startUserId,null,0,0);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1200
.
id
,
"装备清退"
,
parentTaskId
,
"."
,
billEntity
.
getId
(),
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
0
,
null
,
integers
))
.
parse2Bto
()
;
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1200
.
id
,
"装备清退"
,
parentTaskId
,
"."
,
billEntity
.
getId
(),
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
0
,
null
,
integers
));
}
}
/**
/**
...
@@ -847,7 +847,7 @@ public class SendBackServiceImpl implements SendBackService {
...
@@ -847,7 +847,7 @@ public class SendBackServiceImpl implements SendBackService {
// addJob(task.getId(),task.getBillStatus(),startUserId,null,0,0);
// addJob(task.getId(),task.getBillStatus(),startUserId,null,0,0);
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1200
.
id
,
"装备清退"
,
parentTaskId
,
"."
,
billEntity
.
getId
(),
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
1
,
null
,
integers
))
.
parse2Bto
()
;
return
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
SEND_BACK_1200
.
id
,
"装备清退"
,
parentTaskId
,
"."
,
billEntity
.
getId
(),
BusinessEnum
.
SEND_BACK
.
id
,
unitId
,
1
,
null
,
integers
));
}
}
/**
/**
...
...
dev-storage/src/main/java/com/tykj/dev/device/storage/controller/StorageBillController.java
浏览文件 @
5ac46093
...
@@ -127,13 +127,13 @@ public class StorageBillController {
...
@@ -127,13 +127,13 @@ public class StorageBillController {
userIds
.
add
(
userId
);
userIds
.
add
(
userId
);
userIds
.
add
(
storageBillSaveVo
.
getReceiveUserbId
());
userIds
.
add
(
storageBillSaveVo
.
getReceiveUserbId
());
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
STORAGE_CONFIRM
.
id
,
"入库业务"
,
null
,
"."
,
storageBillEntity
.
getId
(),
2
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
TaskBto
taskBto
=
new
TaskBto
(
StatusEnum
.
STORAGE_CONFIRM
.
id
,
"入库业务"
,
null
,
"."
,
storageBillEntity
.
getId
(),
2
,
userUtils
.
getCurrentUnitId
(),
1
,
null
,
userIds
);
Task
taskEntity1
=
taskService
.
start
(
taskBto
);
Task
Bto
taskEntity1
=
taskService
.
start
(
taskBto
);
//存业务日志
//存业务日志
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
fileVoList
.
add
(
new
FileVo
(
"配发单"
,
storageBillEntity
.
getFileName
(),
storageBillEntity
.
getFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"配发单"
,
storageBillEntity
.
getFileName
(),
storageBillEntity
.
getFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"入库确认单"
,
storageBillEntity
.
getReceiveFileName
(),
storageBillEntity
.
getReceiveFileUrl
()));
fileVoList
.
add
(
new
FileVo
(
"入库确认单"
,
storageBillEntity
.
getReceiveFileName
(),
storageBillEntity
.
getReceiveFileUrl
()));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskEntity1
.
getId
(),
"发起入库"
,
fileVoList
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskEntity1.getId(),"发起入库",fileVoList);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
//3.存装备
//3.存装备
Integer
parentId
=
null
;
Integer
parentId
=
null
;
for
(
DeviceLibrarySaveVo
d:
storageBillSaveVo
.
getDeviceLibrarySaveVoList
())
{
for
(
DeviceLibrarySaveVo
d:
storageBillSaveVo
.
getDeviceLibrarySaveVoList
())
{
...
@@ -181,8 +181,8 @@ public class StorageBillController {
...
@@ -181,8 +181,8 @@ public class StorageBillController {
//1.审核成功,入库任务结束,发起新的确认任务,改变装备状态
//1.审核成功,入库任务结束,发起新的确认任务,改变装备状态
if
(
storageBillConfirmVo
.
getStatus
()
==
0
)
{
if
(
storageBillConfirmVo
.
getStatus
()
==
0
)
{
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
taskService
.
update
(
taskService
.
moveToEnd
(
taskBto
));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"入库审核成功"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(), "入库审核成功", null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
StorageBill
storageBillEntity
=
storageBillService
.
getOne
(
taskBto
.
getBillId
());
StorageBill
storageBillEntity
=
storageBillService
.
getOne
(
taskBto
.
getBillId
());
storageBillEntity
.
setStorageStatus
(
2
);
storageBillEntity
.
setStorageStatus
(
2
);
storageBillService
.
update
(
storageBillEntity
);
storageBillService
.
update
(
storageBillEntity
);
...
@@ -199,8 +199,8 @@ public class StorageBillController {
...
@@ -199,8 +199,8 @@ public class StorageBillController {
//2.审核失败
//2.审核失败
if
(
storageBillConfirmVo
.
getStatus
()==
1
){
if
(
storageBillConfirmVo
.
getStatus
()==
1
){
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
taskService
.
update
(
taskService
.
moveToArchive
(
taskBto
));
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
taskBto
.
getId
(),
"入库审核失败"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(taskBto.getId(),"入库审核失败",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
StorageBill
storageBillEntity
=
storageBillService
.
getOne
(
taskBto
.
getBillId
());
StorageBill
storageBillEntity
=
storageBillService
.
getOne
(
taskBto
.
getBillId
());
storageBillEntity
.
setStorageStatus
(
1
);
storageBillEntity
.
setStorageStatus
(
1
);
storageBillService
.
update
(
storageBillEntity
);
storageBillService
.
update
(
storageBillEntity
);
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/TaskService.java
浏览文件 @
5ac46093
...
@@ -79,7 +79,7 @@ public interface TaskService {
...
@@ -79,7 +79,7 @@ public interface TaskService {
/**
/**
* 新增Task
* 新增Task
*/
*/
Task
start
(
TaskBto
taskBto
);
Task
Bto
start
(
TaskBto
taskBto
);
/**
/**
* 更新Task
* 更新Task
*/
*/
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
5ac46093
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.task.service.impl;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.task.service.impl;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.config.Log
;
import
com.tykj.dev.device.task.repository.TaskDao
;
import
com.tykj.dev.device.task.repository.TaskDao
;
import
com.tykj.dev.device.task.repository.TaskLogDao
;
import
com.tykj.dev.device.task.repository.TaskLogDao
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
...
@@ -13,7 +14,7 @@ import com.tykj.dev.device.task.subject.vo.TaskUserVo;
...
@@ -13,7 +14,7 @@ import com.tykj.dev.device.task.subject.vo.TaskUserVo;
import
com.tykj.dev.device.task.utils.TaskUtils
;
import
com.tykj.dev.device.task.utils.TaskUtils
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.device.user.util.UserUtils
;
import
com.tykj.dev.
misc.base
.GlobalMap
;
import
com.tykj.dev.
config
.GlobalMap
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
...
@@ -54,6 +55,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -54,6 +55,7 @@ public class TaskServiceImpl implements TaskService {
* <li>不指定待办用户</li>
* <li>不指定待办用户</li>
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToNext
(
TaskBto
taskBto
)
{
public
TaskBto
moveToNext
(
TaskBto
taskBto
)
{
//status++
//status++
taskBto
.
setBillStatus
(
GlobalMap
.
getStatusEnumMap
().
getOrDefault
(
taskBto
.
getBillStatus
()
+
1
,
StatusEnum
.
END
).
id
);
taskBto
.
setBillStatus
(
GlobalMap
.
getStatusEnumMap
().
getOrDefault
(
taskBto
.
getBillStatus
()
+
1
,
StatusEnum
.
END
).
id
);
...
@@ -73,6 +75,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -73,6 +75,7 @@ public class TaskServiceImpl implements TaskService {
* @param customInfo 自定义信息
* @param customInfo 自定义信息
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToNext
(
TaskBto
taskBto
,
String
customInfo
)
{
public
TaskBto
moveToNext
(
TaskBto
taskBto
,
String
customInfo
)
{
//status++
//status++
taskBto
.
setBillStatus
(
GlobalMap
.
getStatusEnumMap
().
getOrDefault
(
taskBto
.
getBillStatus
()
+
1
,
StatusEnum
.
END
).
id
);
taskBto
.
setBillStatus
(
GlobalMap
.
getStatusEnumMap
().
getOrDefault
(
taskBto
.
getBillStatus
()
+
1
,
StatusEnum
.
END
).
id
);
...
@@ -93,6 +96,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -93,6 +96,7 @@ public class TaskServiceImpl implements TaskService {
* @param userId 待办用户Id
* @param userId 待办用户Id
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToNext
(
TaskBto
taskBto
,
Integer
userId
)
{
public
TaskBto
moveToNext
(
TaskBto
taskBto
,
Integer
userId
)
{
//status++
//status++
taskBto
.
setBillStatus
(
GlobalMap
.
getStatusEnumMap
().
getOrDefault
(
taskBto
.
getBillStatus
()
+
1
,
StatusEnum
.
END
).
id
);
taskBto
.
setBillStatus
(
GlobalMap
.
getStatusEnumMap
().
getOrDefault
(
taskBto
.
getBillStatus
()
+
1
,
StatusEnum
.
END
).
id
);
...
@@ -113,6 +117,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -113,6 +117,7 @@ public class TaskServiceImpl implements TaskService {
* @param customInfo 自定义信息
* @param customInfo 自定义信息
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToNext
(
TaskBto
taskBto
,
Integer
userId
,
String
customInfo
)
{
public
TaskBto
moveToNext
(
TaskBto
taskBto
,
Integer
userId
,
String
customInfo
)
{
//status++
//status++
taskBto
.
setBillStatus
(
GlobalMap
.
getStatusEnumMap
().
getOrDefault
(
taskBto
.
getBillStatus
()
+
1
,
StatusEnum
.
END
).
id
);
taskBto
.
setBillStatus
(
GlobalMap
.
getStatusEnumMap
().
getOrDefault
(
taskBto
.
getBillStatus
()
+
1
,
StatusEnum
.
END
).
id
);
...
@@ -132,6 +137,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -132,6 +137,7 @@ public class TaskServiceImpl implements TaskService {
* @param statusEnum 状态枚举
* @param statusEnum 状态枚举
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToSpecial
(
TaskBto
taskBto
,
StatusEnum
statusEnum
)
{
public
TaskBto
moveToSpecial
(
TaskBto
taskBto
,
StatusEnum
statusEnum
)
{
//status++
//status++
taskBto
.
setBillStatus
(
statusEnum
.
id
);
taskBto
.
setBillStatus
(
statusEnum
.
id
);
...
@@ -152,6 +158,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -152,6 +158,7 @@ public class TaskServiceImpl implements TaskService {
* @param customInfo 自定义信息
* @param customInfo 自定义信息
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToSpecial
(
TaskBto
taskBto
,
StatusEnum
statusEnum
,
String
customInfo
)
{
public
TaskBto
moveToSpecial
(
TaskBto
taskBto
,
StatusEnum
statusEnum
,
String
customInfo
)
{
//status++
//status++
taskBto
.
setBillStatus
(
statusEnum
.
id
);
taskBto
.
setBillStatus
(
statusEnum
.
id
);
...
@@ -173,6 +180,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -173,6 +180,7 @@ public class TaskServiceImpl implements TaskService {
* @param userId 待办用户Id
* @param userId 待办用户Id
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToSpecial
(
TaskBto
taskBto
,
StatusEnum
statusEnum
,
Integer
userId
)
{
public
TaskBto
moveToSpecial
(
TaskBto
taskBto
,
StatusEnum
statusEnum
,
Integer
userId
)
{
//status++
//status++
taskBto
.
setBillStatus
(
statusEnum
.
id
);
taskBto
.
setBillStatus
(
statusEnum
.
id
);
...
@@ -194,6 +202,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -194,6 +202,7 @@ public class TaskServiceImpl implements TaskService {
* @param customInfo 自定义信息
* @param customInfo 自定义信息
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToSpecial
(
TaskBto
taskBto
,
StatusEnum
statusEnum
,
Integer
userId
,
String
customInfo
)
{
public
TaskBto
moveToSpecial
(
TaskBto
taskBto
,
StatusEnum
statusEnum
,
Integer
userId
,
String
customInfo
)
{
//status++
//status++
taskBto
.
setBillStatus
(
statusEnum
.
id
);
taskBto
.
setBillStatus
(
statusEnum
.
id
);
...
@@ -212,6 +221,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -212,6 +221,7 @@ public class TaskServiceImpl implements TaskService {
* 业务完结
* 业务完结
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToEnd
(
TaskBto
taskBto
)
{
public
TaskBto
moveToEnd
(
TaskBto
taskBto
)
{
//set status end
//set status end
taskBto
.
setBillStatus
(
StatusEnum
.
END
.
id
);
taskBto
.
setBillStatus
(
StatusEnum
.
END
.
id
);
...
@@ -223,6 +233,7 @@ public class TaskServiceImpl implements TaskService {
...
@@ -223,6 +233,7 @@ public class TaskServiceImpl implements TaskService {
* 业务审核失败封存
* 业务审核失败封存
*/
*/
@Override
@Override
@Log
public
TaskBto
moveToArchive
(
TaskBto
taskBto
)
{
public
TaskBto
moveToArchive
(
TaskBto
taskBto
)
{
//set status archive
//set status archive
taskBto
.
setBillStatus
(
StatusEnum
.
ARCHIVE
.
id
);
taskBto
.
setBillStatus
(
StatusEnum
.
ARCHIVE
.
id
);
...
@@ -235,8 +246,10 @@ public class TaskServiceImpl implements TaskService {
...
@@ -235,8 +246,10 @@ public class TaskServiceImpl implements TaskService {
*/
*/
@Override
@Override
@ExceptionHandler
(
Exception
.
class
)
@ExceptionHandler
(
Exception
.
class
)
public
Task
start
(
TaskBto
taskBto
)
{
@Log
return
taskDao
.
save
(
taskBto
.
toDo
());
public
TaskBto
start
(
TaskBto
taskBto
)
{
Task
task
=
taskDao
.
save
(
taskBto
.
toDo
());
return
task
.
parse2Bto
();
}
}
/**
/**
...
...
dev-task/src/main/java/com/tykj/dev/device/task/subject/bto/TaskBto.java
浏览文件 @
5ac46093
...
@@ -4,7 +4,7 @@ import com.tykj.dev.device.task.subject.domin.Task;
...
@@ -4,7 +4,7 @@ import com.tykj.dev.device.task.subject.domin.Task;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.misc.base.BeanHelper
;
import
com.tykj.dev.
misc.base
.GlobalMap
;
import
com.tykj.dev.
config
.GlobalMap
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.misc.utils.SpringUtils
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
dev-train/src/main/java/com/tykj/dev/device/train/controller/TrainJobController.java
浏览文件 @
5ac46093
...
@@ -92,7 +92,7 @@ public class TrainJobController {
...
@@ -92,7 +92,7 @@ public class TrainJobController {
List
<
Integer
>
integers
=
new
ArrayList
<>();
List
<
Integer
>
integers
=
new
ArrayList
<>();
integers
.
add
(
securityUser
.
getCurrentUserInfo
().
getUserId
());
integers
.
add
(
securityUser
.
getCurrentUserInfo
().
getUserId
());
Task
task
=
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
TRAIN1000
.
id
,
trainTheme
.
getName
(),
null
,
null
,
trainTheme
.
getTrainId
(),
BusinessEnum
.
TRAIN
.
id
,
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
0
,
null
,
integers
));
Task
Bto
task
=
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
TRAIN1000
.
id
,
trainTheme
.
getName
(),
null
,
null
,
trainTheme
.
getTrainId
(),
BusinessEnum
.
TRAIN
.
id
,
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
0
,
null
,
integers
));
//1 新建培训
//1 新建培训
// jobService.addEntity(new JobEntity(taskEntity.getId(),1,39,0,"x"+securityUser.getCurrentUserInfo().getUserId()+"x",0));
// jobService.addEntity(new JobEntity(taskEntity.getId(),1,39,0,"x"+securityUser.getCurrentUserInfo().getUserId()+"x",0));
...
@@ -125,8 +125,8 @@ public class TrainJobController {
...
@@ -125,8 +125,8 @@ public class TrainJobController {
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
TRAIN1002
.
id
,
trainTheme
.
getName
(),
task
.
getId
(),
task
.
getId
().
toString
(),
trainTheme
.
getTrainId
(),
BusinessEnum
.
TRAIN
.
id
,
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
0
,
null
,
list
));
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
TRAIN1002
.
id
,
trainTheme
.
getName
(),
task
.
getId
(),
task
.
getId
().
toString
(),
trainTheme
.
getTrainId
(),
BusinessEnum
.
TRAIN
.
id
,
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
0
,
null
,
list
));
}
}
);
);
TaskLogBto
taskLogBto
=
new
TaskLogBto
(
task
.
getId
(),
"发起培训"
,
null
);
//
TaskLogBto taskLogBto = new TaskLogBto(task.getId(),"发起培训",null);
taskLogService
.
addLog
(
taskLogBto
);
//
taskLogService.addLog(taskLogBto);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
return
ResponseEntity
.
ok
(
trainTheme
);
return
ResponseEntity
.
ok
(
trainTheme
);
}
}
...
...
dev-train/src/main/java/com/tykj/dev/device/train/service/impl/WorkHandoverServiceImpl.java
浏览文件 @
5ac46093
...
@@ -53,7 +53,7 @@ public class WorkHandoverServiceImpl implements WorkHandoverService {
...
@@ -53,7 +53,7 @@ public class WorkHandoverServiceImpl implements WorkHandoverService {
WorkHandover
workHandover
=
workHandoverDao
.
save
(
workHandoverAddVo
.
toWorkHandover
());
WorkHandover
workHandover
=
workHandoverDao
.
save
(
workHandoverAddVo
.
toWorkHandover
());
List
<
Integer
>
integers
=
new
ArrayList
<>();
List
<
Integer
>
integers
=
new
ArrayList
<>();
integers
.
add
(
securityUser
.
getCurrentUserInfo
().
getUserId
());
integers
.
add
(
securityUser
.
getCurrentUserInfo
().
getUserId
());
Task
task
=
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
WORKHANDOVER1011
.
id
,
"工作交接"
,
null
,
null
,
workHandover
.
getWorkHandoverId
(),
BusinessEnum
.
WORK_HANDOVER
.
id
,
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
0
,
null
,
integers
));
Task
Bto
task
=
taskService
.
start
(
new
TaskBto
(
StatusEnum
.
WORKHANDOVER1011
.
id
,
"工作交接"
,
null
,
null
,
workHandover
.
getWorkHandoverId
(),
BusinessEnum
.
WORK_HANDOVER
.
id
,
securityUser
.
getCurrentUserInfo
().
getUnitsId
(),
0
,
null
,
integers
));
return
workHandover
;
return
workHandover
;
}
}
...
...
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
0 → 100644
浏览文件 @
5ac46093
差异被折叠。
点击展开。
dev-union/src/main/java/com/tykj/dev/union/UnionApplication.java
浏览文件 @
5ac46093
package
com
.
tykj
.
dev
.
union
;
package
com
.
tykj
.
dev
.
union
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
java.util.Arrays
;
@SpringBootApplication
(
scanBasePackages
=
"com.tykj.dev.*"
)
@SpringBootApplication
(
scanBasePackages
=
"com.tykj.dev.*"
)
@EnableSwagger2
@EnableSwagger2
@ServletComponentScan
@ServletComponentScan
...
@@ -24,4 +29,19 @@ public class UnionApplication extends SpringBootServletInitializer {
...
@@ -24,4 +29,19 @@ public class UnionApplication extends SpringBootServletInitializer {
SpringApplication
.
run
(
UnionApplication
.
class
,
args
);
SpringApplication
.
run
(
UnionApplication
.
class
,
args
);
}
}
// @Bean
// public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
// return args -> {
//
// System.out.println("Let's inspect the beans provided by Spring Boot:");
//
// String[] beanNames = ctx.getBeanDefinitionNames();
// Arrays.sort(beanNames);
// for (String beanName : beanNames) {
// System.out.println(beanName);
// }
//
// };
// }
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论