Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
c570b8fc
提交
c570b8fc
authored
12月 16, 2021
作者:
zjm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(区块链): 任务、培训 使用text上联
任务、培训 使用text上联
上级
c8e12c0f
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
15 行增加
和
14 行删除
+15
-14
DeviceDecommissioningBusinessServiceImpl.java
...ervice/impl/DeviceDecommissioningBusinessServiceImpl.java
+0
-1
RepelBusinessServiceImpl.java
...evice/sendback/service/impl/RepelBusinessServiceImpl.java
+2
-4
TaskLogServiceImpl.java
...tykj/dev/device/task/service/impl/TaskLogServiceImpl.java
+3
-2
TaskServiceImpl.java
...om/tykj/dev/device/task/service/impl/TaskServiceImpl.java
+4
-3
TrainJobController.java
.../tykj/dev/device/train/controller/TrainJobController.java
+2
-1
TrainThemeServiceImpl.java
.../dev/device/train/service/impl/TrainThemeServiceImpl.java
+4
-3
没有找到文件。
dev-decommissioning/src/main/java/com/tykj/dev/device/decommissioning/service/impl/DeviceDecommissioningBusinessServiceImpl.java
浏览文件 @
c570b8fc
...
...
@@ -364,7 +364,6 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
deviceLibraryDao
.
findAllBySeqNumberIn
(
seqNumbers
).
forEach
(
deviceLibrary
->
{
logDtos
.
add
(
new
DeviceLogDto
(
deviceLibrary
.
getId
(),
remark
,
null
,
userId
,
taskId
).
toDo
());
}
);
...
...
dev-sendback/src/main/java/com/tykj/dev/device/sendback/service/impl/RepelBusinessServiceImpl.java
浏览文件 @
c570b8fc
...
...
@@ -121,6 +121,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
*/
// @Override
// @Transactional(rollbackFor = Exception.class)
//原来的版本
public
void
initiateRepel1
(
DeviceRepel
deviceRepel
,
Integer
userId
,
SecurityUser
securityUser
)
{
//生成一个清退任务 省清退任务 类型为 清退统计 17 16清退
//参照选择的范围给单位都发送 市清退任务待执行
...
...
@@ -197,8 +198,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
TaskBto
taskBto
=
statsXTask
(
units
.
getUnitId
(),
deviceRepel1
.
getId
(),
"清退型号为"
+
StringSplitUtil
.
stringListToString
(
deviceRepel
.
getModels
().
stream
()
.
distinct
()
.
collect
(
Collectors
.
toList
()))
+
"设备任务"
,
userId
);
//给本单位其他专管员阅知
// addMessage(new MessageBto(taskBto.getId(),taskBto.getBusinessType(),user.getName()+"发起清退任务["+deviceRepel1.getTitle()+"]",gainThisUser(userId,units.getUnitId())));
List
<
RepelTaskStatistical
>
list
=
new
ArrayList
<>();
deviceRepel
.
getTaskScopes
().
forEach
(
unisId
->
{
...
...
@@ -207,7 +206,6 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
if
(
units1
.
getType
()
==
2
)
{
directlUnderUnit
.
set
(
true
);
directlUnderUnitNames
.
add
(
units1
.
getName
());
// directlUnderUnitDeviceIds.addAll(unitNameMap.get(units1.getName()));
}
else
if
(
units1
.
getType
()
==
1
)
{
Area
area1
=
areaService
.
findByid
(
units1
.
getAreaId
());
DeviceRepelDetail
deviceRepelDetail
=
new
DeviceRepelDetail
();
...
...
@@ -266,7 +264,7 @@ public class RepelBusinessServiceImpl implements RepelBusinessService {
}
//
测试版本
//
正式版
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
initiateRepel
(
DeviceRepel
deviceRepel
,
Integer
userId
,
SecurityUser
securityUser
)
{
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskLogServiceImpl.java
浏览文件 @
c570b8fc
package
com
.
tykj
.
dev
.
device
.
task
.
service
.
impl
;
import
com.tykj.dev.blockcha.subject.entity.BcHash
;
import
com.tykj.dev.blockcha.subject.entity.BcText
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.config.TaskBeanConfig
;
import
com.tykj.dev.device.task.repository.TaskLogDao
;
...
...
@@ -47,7 +48,7 @@ public class TaskLogServiceImpl implements TaskLogService {
TaskLog
taskLog
=
taskLogDao
.
save
(
taskLogBto
.
toDo
());
CompletableFuture
.
runAsync
(()
->{
TaskLog
taskLog1
=
taskLogDao
.
findById
(
taskLog
.
getId
()).
get
();
Bc
Hash
bcText
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
taskLog1
));
Bc
Text
bcText
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
taskLog1
));
String
recordId
=
bcText
.
getData
().
getRecordID
();
taskLog1
.
setRecordId
(
recordId
);
taskLogDao
.
save
(
taskLog1
);
...
...
@@ -57,7 +58,7 @@ public class TaskLogServiceImpl implements TaskLogService {
@Async
(
"taskScheduler"
)
public
void
sendHash
(
TaskLog
taskLog
)
{
CompletableFuture
.
runAsync
(()
->{
Bc
Hash
bcText
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
taskLog
));
Bc
Text
bcText
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
taskLog
));
String
recordId
=
bcText
.
getData
().
getRecordID
();
taskLog
.
setRecordId
(
recordId
);
taskLogDao
.
save
(
taskLog
);
...
...
dev-task/src/main/java/com/tykj/dev/device/task/service/impl/TaskServiceImpl.java
浏览文件 @
c570b8fc
...
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.task.service.impl;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.blockcha.subject.entity.BcHash
;
import
com.tykj.dev.blockcha.subject.entity.BcText
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.config.GlobalMap
;
import
com.tykj.dev.config.Log
;
...
...
@@ -348,7 +349,7 @@ public class TaskServiceImpl implements TaskService {
e
.
printStackTrace
();
}
Task
task1
=
taskDao
.
findById
(
task
.
getId
()).
get
();
Bc
Hash
bcText
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
task1
));
Bc
Text
bcText
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
task1
));
String
recordId
=
bcText
.
getData
().
getRecordID
();
task1
.
setRecordId
(
recordId
);
taskDao
.
save
(
task1
);
...
...
@@ -364,7 +365,7 @@ public class TaskServiceImpl implements TaskService {
public
void
sendHash
(
List
<
TaskBto
>
taskBtos
)
{
taskBtos
.
forEach
(
taskBto
->
{
Task
task
=
taskBto
.
toDo
();
Bc
Hash
bcText
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
task
));
Bc
Text
bcText
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
task
));
String
recordId
=
bcText
.
getData
().
getRecordID
();
task
.
setRecordId
(
recordId
);
update
(
task
.
parse2Bto
());
...
...
@@ -378,7 +379,7 @@ public class TaskServiceImpl implements TaskService {
@Async
(
"taskScheduler"
)
public
void
sendHash
(
TaskBto
taskBto
)
{
Task
task
=
taskBto
.
toDo
();
Bc
Hash
bcText
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
task
));
Bc
Text
bcText
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
task
));
String
recordId
=
bcText
.
getData
().
getRecordID
();
task
.
setRecordId
(
recordId
);
update
(
task
.
parse2Bto
());
...
...
dev-train/src/main/java/com/tykj/dev/device/train/controller/TrainJobController.java
浏览文件 @
c570b8fc
...
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.train.controller;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.blockcha.subject.entity.BcHash
;
import
com.tykj.dev.blockcha.subject.entity.BcText
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.file.service.FilesUtil
;
...
...
@@ -747,7 +748,7 @@ public class TrainJobController {
TrainUser
trainUser1
=
trainUserDao
.
save
(
trainUser
);
//异步线程
CompletableFuture
.
runAsync
(()->
{
Bc
Hash
bcHash
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
trainUser1
));
Bc
Text
bcHash
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
trainUser1
));
trainUserDao
.
upDate
(
bcHash
.
getData
().
getRecordID
(),
trainUser1
.
getId
());
});
}
...
...
dev-train/src/main/java/com/tykj/dev/device/train/service/impl/TrainThemeServiceImpl.java
浏览文件 @
c570b8fc
...
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
import
com.github.wenhao.jpa.PredicateBuilder
;
import
com.github.wenhao.jpa.Specifications
;
import
com.tykj.dev.blockcha.subject.entity.BcHash
;
import
com.tykj.dev.blockcha.subject.entity.BcText
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.config.TaskBeanConfig
;
import
com.tykj.dev.device.file.service.FilesUtil
;
...
...
@@ -93,7 +94,7 @@ public class TrainThemeServiceImpl implements TrainThemeService {
e
.
printStackTrace
();
}
TrainTheme
trainTheme2
=
findById
(
trainTheme1
.
getTrainId
());
Bc
Hash
bcText
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
trainTheme2
));
Bc
Text
bcText
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
trainTheme2
));
String
recordId
=
bcText
.
getData
().
getRecordID
();
trainTheme2
.
setRecordId
(
recordId
);
trainThemeDao
.
save
(
trainTheme2
);
...
...
@@ -108,7 +109,7 @@ public class TrainThemeServiceImpl implements TrainThemeService {
@Async
public
void
sendHash
(
List
<
TrainTheme
>
trainThemes
)
{
trainThemes
.
forEach
(
trainTheme1
->
{
Bc
Hash
bcHash
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
trainTheme1
));
Bc
Text
bcHash
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
trainTheme1
));
trainTheme1
.
setRecordId
(
bcHash
.
getData
().
getRecordID
());
trainThemeDao
.
save
(
trainTheme1
);
});
...
...
@@ -379,7 +380,7 @@ public class TrainThemeServiceImpl implements TrainThemeService {
TrainUser
trainUser1
=
trainUserDao
.
save
(
trainUser
);
//异步线程
CompletableFuture
.
runAsync
(()->
{
Bc
Hash
bcHash
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
trainUser1
));
Bc
Text
bcHash
=
blockChainUtil
.
sendText
(
1000
,
JacksonUtil
.
toJSon
(
trainUser1
));
trainUserDao
.
upDate
(
bcHash
.
getData
().
getRecordID
(),
trainUser1
.
getId
());
});
return
trainUser1
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论