Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
d24a4d7e
提交
d24a4d7e
authored
1月 12, 2023
作者:
zjm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上链
上级
d1d6a84f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
243 行增加
和
32 行删除
+243
-32
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+19
-0
AllotBackBillServiceImpl.java
...v/device/allot/service/impl/AllotBackBillServiceImpl.java
+7
-2
AllotBillServiceImpl.java
...j/dev/device/allot/service/impl/AllotBillServiceImpl.java
+6
-1
pom.xml
dev-apply/pom.xml
+5
-0
DeviceApplyController.java
...kj/dev/device/apply/controller/DeviceApplyController.java
+19
-0
DeviceApplyBillService.java
...tykj/dev/device/apply/service/DeviceApplyBillService.java
+18
-0
DeviceApplyBillServiceImpl.java
...device/apply/service/impl/DeviceApplyBillServiceImpl.java
+101
-16
DeviceApplyBill.java
.../tykj/dev/device/apply/subject/domin/DeviceApplyBill.java
+5
-0
BlockRun.java
...src/main/java/com/tykj/dev/device/block/run/BlockRun.java
+5
-7
pom.xml
dev-selfcheck/pom.xml
+4
-0
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+18
-0
SelfCheckBillService.java
...kj/dev/device/selfcheck/service/SelfCheckBillService.java
+17
-0
SelfCheckBillServiceImpl.java
...vice/selfcheck/service/impl/SelfCheckBillServiceImpl.java
+0
-0
SelfCheckBill.java
...ykj/dev/device/selfcheck/subject/domin/SelfCheckBill.java
+10
-0
TrainJobController.java
.../tykj/dev/device/train/controller/TrainJobController.java
+2
-2
application-prodT.properties
dev-union/src/main/resources/application-prodT.properties
+3
-2
application-test.properties
dev-union/src/main/resources/application-test.properties
+4
-2
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
d24a4d7e
...
@@ -1259,5 +1259,24 @@ public class AllotBillController {
...
@@ -1259,5 +1259,24 @@ public class AllotBillController {
}
}
/**
* 区块验证
*/
@GetMapping
(
value
=
"/checkTrueData/{billId}"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的验证"
,
notes
=
"根据业务id进行对应业务的验证"
)
public
ResponseEntity
checkTrueData
(
@PathVariable
Integer
billId
){
return
ResponseEntity
.
ok
(
allotBillService
.
checkTrueData
(
billId
));
}
/**
* 区块溯源
*/
@GetMapping
(
value
=
"/traceabilityParsing/{billId}"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的溯源"
,
notes
=
"根据业务id进行对应业务的溯源"
)
public
ResponseEntity
traceabilityParsing
(
@PathVariable
Integer
billId
){
return
ResponseEntity
.
ok
(
allotBillService
.
traceabilityParsing
(
billId
));
}
}
}
dev-allot/src/main/java/com/tykj/dev/device/allot/service/impl/AllotBackBillServiceImpl.java
浏览文件 @
d24a4d7e
...
@@ -170,8 +170,8 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
...
@@ -170,8 +170,8 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
@Override
@Override
public
BlockTraceabilityParsing
traceabilityParsing
(
Integer
billId
)
{
public
BlockTraceabilityParsing
traceabilityParsing
(
Integer
billId
)
{
BlockData
billTypeAndBillId
=
blockDataService
.
findBillTypeAndBillId
(
BusinessEnum
.
ALLOT
.
id
,
billId
);
BlockData
billTypeAndBillId
=
blockDataService
.
findBillTypeAndBillId
(
BusinessEnum
.
ALLOT
_BACK
.
id
,
billId
);
BcRecord
bcRecord
=
blockService
.
fetchRecord
(
BlockBusinessEnum
.
ALLOT
.
subCode
,
billTypeAndBillId
.
getRecordID
());
BcRecord
bcRecord
=
blockService
.
fetchRecord
(
BlockBusinessEnum
.
ALLOT
_BACK
.
subCode
,
billTypeAndBillId
.
getRecordID
());
AllotBackBill
allotBackBill
=
queryAllotBill
(
billId
);
AllotBackBill
allotBackBill
=
queryAllotBill
(
billId
);
AllotBackBill
allotBackBill1
=
JSON
.
parseObject
(
bcRecord
.
getData
().
getContent
(),
AllotBackBill
.
class
);
AllotBackBill
allotBackBill1
=
JSON
.
parseObject
(
bcRecord
.
getData
().
getContent
(),
AllotBackBill
.
class
);
BlockTraceabilityParsing
blockTraceabilityParsing
=
bcRecord
.
getData
().
toBlockTraceabilityParsing
();
BlockTraceabilityParsing
blockTraceabilityParsing
=
bcRecord
.
getData
().
toBlockTraceabilityParsing
();
...
@@ -245,6 +245,11 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
...
@@ -245,6 +245,11 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
allotBackBill
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
allotBackBill
.
getApplyFiles
()));
allotBackBill
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
allotBackBill
.
getApplyFiles
()));
allotBackBill
.
setSendFileList
(
FilesUtil
.
stringFileToList
(
allotBackBill
.
getSendFiles
()));
allotBackBill
.
setSendFileList
(
FilesUtil
.
stringFileToList
(
allotBackBill
.
getSendFiles
()));
allotBackBill
.
setReceiveFileList
(
FilesUtil
.
stringFileToList
(
allotBackBill
.
getReceiveFiles
()));
allotBackBill
.
setReceiveFileList
(
FilesUtil
.
stringFileToList
(
allotBackBill
.
getReceiveFiles
()));
allotBackBill
.
setSenderUserA
(
userPublicService
.
getOne
(
allotBackBill
.
getSendUseraId
()).
getName
());
allotBackBill
.
setSenderUserB
(
userPublicService
.
getOne
(
allotBackBill
.
getSendUserbId
()).
getName
());
allotBackBill
.
setReceiveUserA
(
userPublicService
.
getOne
(
allotBackBill
.
getReceiveUseraId
()).
getName
());
allotBackBill
.
setReceiveUserB
(
userPublicService
.
getOne
(
allotBackBill
.
getReceiveUserbId
()).
getName
());
allotBackBill
.
setScripts
(
JacksonUtil
.
readValue
(
allotBackBill
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
allotBackBill
.
setScripts
(
JacksonUtil
.
readValue
(
allotBackBill
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
}));
}));
return
allotBackBill
;
return
allotBackBill
;
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/service/impl/AllotBillServiceImpl.java
浏览文件 @
d24a4d7e
...
@@ -235,7 +235,7 @@ public class AllotBillServiceImpl implements AllotBillService {
...
@@ -235,7 +235,7 @@ public class AllotBillServiceImpl implements AllotBillService {
taskLogBto
.
setOldStatus
(
taskBto
.
getBillStatus
());
taskLogBto
.
setOldStatus
(
taskBto
.
getBillStatus
());
taskLogBto
.
setTaskId
(
taskId
);
taskLogBto
.
setTaskId
(
taskId
);
taskLogService
.
addLog
(
taskLogBto
);
taskLogService
.
addLog
(
taskLogBto
);
return
update
;
return
update
;
}
}
@Override
@Override
...
@@ -321,6 +321,10 @@ public class AllotBillServiceImpl implements AllotBillService {
...
@@ -321,6 +321,10 @@ public class AllotBillServiceImpl implements AllotBillService {
allotBill
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
allotBill
.
getApplyFiles
()));
allotBill
.
setApplyFileList
(
FilesUtil
.
stringFileToList
(
allotBill
.
getApplyFiles
()));
allotBill
.
setSendFileList
(
FilesUtil
.
stringFileToList
(
allotBill
.
getSendFiles
()));
allotBill
.
setSendFileList
(
FilesUtil
.
stringFileToList
(
allotBill
.
getSendFiles
()));
allotBill
.
setReceiveFileList
(
FilesUtil
.
stringFileToList
(
allotBill
.
getReceiveFiles
()));
allotBill
.
setReceiveFileList
(
FilesUtil
.
stringFileToList
(
allotBill
.
getReceiveFiles
()));
allotBill
.
setSenderUserA
(
userPublicService
.
getOne
(
allotBill
.
getSendUseraId
()).
getName
());
allotBill
.
setSenderUserB
(
userPublicService
.
getOne
(
allotBill
.
getSendUserbId
()).
getName
());
allotBill
.
setReceiveUserA
(
userPublicService
.
getOne
(
allotBill
.
getReceiveUseraId
()).
getName
());
allotBill
.
setReceiveUserB
(
userPublicService
.
getOne
(
allotBill
.
getReceiveUserbId
()).
getName
());
allotBill
.
setScripts
(
JacksonUtil
.
readValue
(
allotBill
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
allotBill
.
setScripts
(
JacksonUtil
.
readValue
(
allotBill
.
getScriptJson
(),
new
TypeReference
<
List
<
ScriptSaveVo
>>()
{
}));
}));
return
allotBill
;
return
allotBill
;
...
@@ -329,6 +333,7 @@ public class AllotBillServiceImpl implements AllotBillService {
...
@@ -329,6 +333,7 @@ public class AllotBillServiceImpl implements AllotBillService {
/**
/**
* @param allotBillSelectVo 查询vo
* @param allotBillSelectVo 查询vo
* 查询统一筛选器
* 查询统一筛选器
...
...
dev-apply/pom.xml
浏览文件 @
d24a4d7e
...
@@ -24,6 +24,11 @@
...
@@ -24,6 +24,11 @@
<groupId>
com.tykj
</groupId>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-allot
</artifactId>
<artifactId>
dev-allot
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-block
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-library
</artifactId>
<artifactId>
dev-library
</artifactId>
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/controller/DeviceApplyController.java
浏览文件 @
d24a4d7e
...
@@ -980,4 +980,23 @@ public class DeviceApplyController {
...
@@ -980,4 +980,23 @@ public class DeviceApplyController {
// }
// }
/**
* 区块验证
*/
@GetMapping
(
value
=
"/checkTrueData/{billId}"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的验证"
,
notes
=
"根据业务id进行对应业务的验证"
)
public
ResponseEntity
checkTrueData
(
@PathVariable
Integer
billId
){
return
ResponseEntity
.
ok
(
deviceApplyBillService
.
checkTrueData
(
billId
));
}
/**
* 区块溯源
*/
@GetMapping
(
value
=
"/traceabilityParsing/{billId}"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的溯源"
,
notes
=
"根据业务id进行对应业务的溯源"
)
public
ResponseEntity
traceabilityParsing
(
@PathVariable
Integer
billId
){
return
ResponseEntity
.
ok
(
deviceApplyBillService
.
traceabilityParsing
(
billId
));
}
}
}
dev-apply/src/main/java/com/tykj/dev/device/apply/service/DeviceApplyBillService.java
浏览文件 @
d24a4d7e
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.apply.service;
...
@@ -3,6 +3,7 @@ package com.tykj.dev.device.apply.service;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
com.tykj.dev.device.apply.subject.vo.*
;
import
com.tykj.dev.device.apply.subject.vo.*
;
import
com.tykj.dev.device.block.entity.vo.BlockTraceabilityParsing
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -46,4 +47,21 @@ public interface DeviceApplyBillService {
...
@@ -46,4 +47,21 @@ public interface DeviceApplyBillService {
ApplyRemoveSeqVo
removeSameSeq
(
RemoveSameSeqVo
removeSameSeqVo
);
ApplyRemoveSeqVo
removeSameSeq
(
RemoveSameSeqVo
removeSameSeqVo
);
/**
* 溯源接口
* @param billId 业务id
* @return 溯源信息实体
*/
BlockTraceabilityParsing
traceabilityParsing
(
Integer
billId
);
/**
* 历史数据上链
*/
void
historyUpperChain
();
boolean
checkTrueData
(
Integer
billId
);
}
}
dev-apply/src/main/java/com/tykj/dev/device/apply/service/impl/DeviceApplyBillServiceImpl.java
浏览文件 @
d24a4d7e
package
com
.
tykj
.
dev
.
device
.
apply
.
service
.
impl
;
package
com
.
tykj
.
dev
.
device
.
apply
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tykj.dev.blockcha.subject.entity.BcHash
;
import
com.tykj.dev.blockcha.subject.entity.BcHash
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
import
com.tykj.dev.blockcha.subject.service.BlockChainUtil
;
...
@@ -8,6 +9,12 @@ import com.tykj.dev.device.apply.repository.DeviceApplyBillDao;
...
@@ -8,6 +9,12 @@ import com.tykj.dev.device.apply.repository.DeviceApplyBillDao;
import
com.tykj.dev.device.apply.service.DeviceApplyBillService
;
import
com.tykj.dev.device.apply.service.DeviceApplyBillService
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
com.tykj.dev.device.apply.subject.domin.DeviceApplyBill
;
import
com.tykj.dev.device.apply.subject.vo.*
;
import
com.tykj.dev.device.apply.subject.vo.*
;
import
com.tykj.dev.device.block.entity.BlockData
;
import
com.tykj.dev.device.block.entity.bc.BcRecord
;
import
com.tykj.dev.device.block.entity.vo.BlockTraceabilityParsing
;
import
com.tykj.dev.device.block.entity.vo.TraceabilityParsingData
;
import
com.tykj.dev.device.block.service.BlockDataService
;
import
com.tykj.dev.device.block.service.BlockService
;
import
com.tykj.dev.device.library.service.DeviceLibraryCacheService
;
import
com.tykj.dev.device.library.service.DeviceLibraryCacheService
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.DeviceLibraryService
;
import
com.tykj.dev.device.library.service.impl.CacheLibraryServiceImpl
;
import
com.tykj.dev.device.library.service.impl.CacheLibraryServiceImpl
;
...
@@ -21,11 +28,10 @@ import com.tykj.dev.device.user.read.service.MessageService;
...
@@ -21,11 +28,10 @@ import com.tykj.dev.device.user.read.service.MessageService;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
import
com.tykj.dev.device.user.read.subject.bto.MessageBto
;
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.BlockBusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.base.StatusEnum
;
import
com.tykj.dev.misc.utils.DeviceSeqUtil
;
import
com.tykj.dev.misc.utils.*
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -43,6 +49,12 @@ import static java.util.stream.Collectors.groupingBy;
...
@@ -43,6 +49,12 @@ import static java.util.stream.Collectors.groupingBy;
@Service
@Service
public
class
DeviceApplyBillServiceImpl
implements
DeviceApplyBillService
{
public
class
DeviceApplyBillServiceImpl
implements
DeviceApplyBillService
{
@Autowired
BlockService
blockService
;
@Autowired
BlockDataService
blockDataService
;
@Autowired
@Autowired
private
DeviceApplyBillDao
deviceApplyBillDao
;
private
DeviceApplyBillDao
deviceApplyBillDao
;
...
@@ -73,18 +85,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
...
@@ -73,18 +85,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
@Override
@Override
public
DeviceApplyBill
addEntity
(
DeviceApplyBill
deviceApplyBillEntity
)
{
public
DeviceApplyBill
addEntity
(
DeviceApplyBill
deviceApplyBillEntity
)
{
DeviceApplyBill
deviceApplyBill
=
deviceApplyBillDao
.
save
(
deviceApplyBillEntity
);
DeviceApplyBill
deviceApplyBill
=
deviceApplyBillDao
.
save
(
deviceApplyBillEntity
);
CompletableFuture
.
runAsync
(()->{
sendText
(
deviceApplyBill
.
getId
());
try
{
Thread
.
sleep
(
2000
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
DeviceApplyBill
deviceApplyBill1
=
getOne
(
deviceApplyBill
.
getId
());
BcHash
bcText
=
blockChainUtil
.
sendHash
(
1000
,
JacksonUtil
.
toJSon
(
deviceApplyBill1
));
String
recordId
=
bcText
.
getData
().
getRecordID
();
deviceApplyBill1
.
setRecordId
(
recordId
);
deviceApplyBillDao
.
save
(
deviceApplyBill1
);
},
TaskBeanConfig
.
getThreadPoolTaskScheduler
());
return
deviceApplyBill
;
return
deviceApplyBill
;
}
}
...
@@ -318,4 +319,88 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
...
@@ -318,4 +319,88 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
applyRemoveSeqVo
.
setCount
(
selectDeviceSeqs
.
size
());
applyRemoveSeqVo
.
setCount
(
selectDeviceSeqs
.
size
());
return
applyRemoveSeqVo
;
return
applyRemoveSeqVo
;
}
}
/**
* 验证接口
*/
@Override
public
BlockTraceabilityParsing
traceabilityParsing
(
Integer
billId
)
{
BlockData
billTypeAndBillId
=
blockDataService
.
findBillTypeAndBillId
(
BusinessEnum
.
APPLY
.
id
,
billId
);
BcRecord
bcRecord
=
blockService
.
fetchRecord
(
BlockBusinessEnum
.
APPLY
.
subCode
,
billTypeAndBillId
.
getRecordID
());
DeviceApplyBill
deviceApplyBill
=
queryDeviceApplyBill
(
billId
);
DeviceApplyBill
deviceApplyBill1
=
JSON
.
parseObject
(
bcRecord
.
getData
().
getContent
(),
DeviceApplyBill
.
class
);
BlockTraceabilityParsing
blockTraceabilityParsing
=
bcRecord
.
getData
().
toBlockTraceabilityParsing
();
blockTraceabilityParsing
.
setBusinessTraceabilityParsingData
(
TraceabilityParsingData
.
builder
()
.
billTypeName
(
"申请"
)
.
applyNumber
(
deviceApplyBill
.
getApplyNumber
())
.
replayNumber
(
deviceApplyBill
.
getReplayNumber
())
.
fileMd5
(
deviceApplyBill
.
getFileMd5
())
.
unitName
(
deviceApplyBill
.
getApplyUnit
())
.
operationTime
(
DateUtil
.
getLocalDateTime
(
deviceApplyBill
.
getCreateTime
()))
.
operatorUserName
(
operatorName
(
deviceApplyBill
))
.
build
());
blockTraceabilityParsing
.
setBlockTraceabilityParsingData
(
TraceabilityParsingData
.
builder
()
.
billTypeName
(
"申请"
)
.
applyNumber
(
deviceApplyBill1
.
getApplyNumber
())
.
replayNumber
(
deviceApplyBill1
.
getReplayNumber
())
.
fileMd5
(
deviceApplyBill1
.
getFileMd5
())
.
unitName
(
deviceApplyBill1
.
getApplyUnit
())
.
operationTime
(
DateUtil
.
getLocalDateTime
(
deviceApplyBill1
.
getCreateTime
()))
.
operatorUserName
(
operatorName
(
deviceApplyBill1
))
.
build
());
blockTraceabilityParsing
.
setBlockData
(
deviceApplyBill1
);
blockTraceabilityParsing
.
setCurrentData
(
deviceApplyBill
);
return
blockTraceabilityParsing
;
}
@Override
public
void
historyUpperChain
()
{
}
private
String
operatorName
(
DeviceApplyBill
deviceApplyBill
)
{
StringBuffer
buf
=
new
StringBuffer
();
buf
.
append
(
deviceApplyBill
.
getApplyUser
())
.
append
(
","
)
.
append
(
deviceApplyBill
.
getAgent
());
return
buf
.
toString
();
}
//验真
@Override
public
boolean
checkTrueData
(
Integer
billId
)
{
BlockTraceabilityParsing
blockTraceabilityParsing
=
traceabilityParsing
(
billId
);
boolean
contrast
=
blockDataService
.
contrast
(
blockTraceabilityParsing
);
return
contrast
;
}
/**
* 上链接口
*/
public
void
sendText
(
Integer
id
){
DeviceApplyBill
deviceApplyBill
=
queryDeviceApplyBill
(
id
);
blockService
.
sendText
(
BlockBusinessEnum
.
APPLY
.
subCode
,
JacksonUtil
.
toJSon
(
deviceApplyBill
),
BusinessEnum
.
APPLY
.
id
,
id
,
deviceApplyBill
.
getApplyUnit
());
}
private
DeviceApplyBill
queryDeviceApplyBill
(
Integer
billId
){
//获取账单
DeviceApplyBill
deviceApplyBillEntity
=
getOne
(
billId
);
if
(
deviceApplyBillEntity
.
getApplyUseraId
()
!=
null
)
{
deviceApplyBillEntity
.
setApplyUser
(
userPublicService
.
getOne
(
deviceApplyBillEntity
.
getApplyUseraId
()).
getName
());
}
List
<
ApplyBillDetailVo
>
applyBillDetailVos
=
Objects
.
requireNonNull
(
JacksonUtil
.
readValue
(
deviceApplyBillEntity
.
getApplyStat
(),
new
TypeReference
<
List
<
ApplyBillDetailVo
>>()
{
}));
deviceApplyBillEntity
.
setApplyBillDetailVos
(
applyBillDetailVos
);
return
deviceApplyBillEntity
;
}
}
}
dev-apply/src/main/java/com/tykj/dev/device/apply/subject/domin/DeviceApplyBill.java
浏览文件 @
d24a4d7e
...
@@ -181,4 +181,9 @@ public class DeviceApplyBill {
...
@@ -181,4 +181,9 @@ public class DeviceApplyBill {
@ApiModelProperty
(
value
=
"申请装备序列号信息vo"
)
@ApiModelProperty
(
value
=
"申请装备序列号信息vo"
)
@Transient
@Transient
private
List
<
ApplyBillDetailVo
>
applyBillDetailVos
=
new
ArrayList
<>();
private
List
<
ApplyBillDetailVo
>
applyBillDetailVos
=
new
ArrayList
<>();
@Transient
@ApiModelProperty
(
value
=
"文件md5"
)
private
String
fileMd5
;
}
}
dev-block/src/main/java/com/tykj/dev/device/block/run/BlockRun.java
浏览文件 @
d24a4d7e
...
@@ -21,12 +21,10 @@ public class BlockRun implements CommandLineRunner {
...
@@ -21,12 +21,10 @@ public class BlockRun implements CommandLineRunner {
BlockService
blockService
;
BlockService
blockService
;
@Override
@Override
public
void
run
(
String
...
args
)
throws
Exception
{
public
void
run
(
String
...
args
)
throws
Exception
{
// log.info("添加区块业务类型开始");
log
.
info
(
"添加区块业务类型开始"
);
//// for (BlockBusinessEnum value : BlockBusinessEnum.values()) {
for
(
BlockBusinessEnum
value
:
BlockBusinessEnum
.
values
())
{
//// if (value.subCode>19) {
blockService
.
subRegister
(
value
.
name
);
//// blockService.subRegister(value.name);
}
//// }
log
.
info
(
"添加区块业务类型结束"
);
//// }
// log.info("添加区块业务类型结束");
}
}
}
}
dev-selfcheck/pom.xml
浏览文件 @
d24a4d7e
...
@@ -41,6 +41,10 @@
...
@@ -41,6 +41,10 @@
<groupId>
com.tykj
</groupId>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-file
</artifactId>
<artifactId>
dev-file
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-block
</artifactId>
</dependency>
</dependencies>
</dependencies>
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
d24a4d7e
...
@@ -1276,4 +1276,22 @@ public class SelfCheckController {
...
@@ -1276,4 +1276,22 @@ public class SelfCheckController {
return
ResultUtil
.
success
(
"1"
);
return
ResultUtil
.
success
(
"1"
);
}
}
/**
* 区块验证
*/
@GetMapping
(
value
=
"/checkTrueData/{billId}"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的验证"
,
notes
=
"根据业务id进行对应业务的验证"
)
public
ResponseEntity
checkTrueData
(
@PathVariable
Integer
billId
){
return
ResponseEntity
.
ok
(
selfCheckBillService
.
checkTrueData
(
billId
));
}
/**
* 区块溯源
*/
@GetMapping
(
value
=
"/traceabilityParsing/{billId}"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的溯源"
,
notes
=
"根据业务id进行对应业务的溯源"
)
public
ResponseEntity
traceabilityParsing
(
@PathVariable
Integer
billId
){
return
ResponseEntity
.
ok
(
selfCheckBillService
.
traceabilityParsing
(
billId
));
}
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/SelfCheckBillService.java
浏览文件 @
d24a4d7e
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.selfcheck.service;
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.selfcheck.service;
import
com.tykj.dev.config.domin.CheckUnitInfo
;
import
com.tykj.dev.config.domin.CheckUnitInfo
;
import
com.tykj.dev.device.block.entity.vo.BlockTraceabilityParsing
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.file.entity.FileRet
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
import
com.tykj.dev.device.selfcheck.subject.domin.SelfCheckBill
;
...
@@ -68,4 +69,20 @@ public interface SelfCheckBillService {
...
@@ -68,4 +69,20 @@ public interface SelfCheckBillService {
* 只要2周后未完成
* 只要2周后未完成
*/
*/
List
<
CheckUnitInfo
>
selectNoFinSh2Weeks
();
List
<
CheckUnitInfo
>
selectNoFinSh2Weeks
();
/**
* 溯源接口
* @param billId 业务id
* @return 溯源信息实体
*/
BlockTraceabilityParsing
traceabilityParsing
(
Integer
billId
);
/**
* 历史数据上链
*/
void
historyUpperChain
();
boolean
checkTrueData
(
Integer
billId
);
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/SelfCheckBillServiceImpl.java
浏览文件 @
d24a4d7e
差异被折叠。
点击展开。
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/SelfCheckBill.java
浏览文件 @
d24a4d7e
...
@@ -183,4 +183,14 @@ public class SelfCheckBill {
...
@@ -183,4 +183,14 @@ public class SelfCheckBill {
@Transient
@Transient
private
Integer
taskId
;
private
Integer
taskId
;
@Transient
private
List
<
DeviceLibrary
>
deviceLibraries
;
@Transient
private
List
<
HistoryDeviceBill
>
historyDeviceBills
;
@Transient
@ApiModelProperty
(
value
=
"文件md5"
)
private
String
fileMd5
;
}
}
dev-train/src/main/java/com/tykj/dev/device/train/controller/TrainJobController.java
浏览文件 @
d24a4d7e
...
@@ -809,7 +809,7 @@ public class TrainJobController {
...
@@ -809,7 +809,7 @@ public class TrainJobController {
@GetMapping
(
value
=
"/traceabilityParsing/{billId}"
)
@GetMapping
(
value
=
"/traceabilityParsing/{billId}"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的溯源"
,
notes
=
"根据业务id进行对应业务的溯源"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的溯源"
,
notes
=
"根据业务id进行对应业务的溯源"
)
public
BlockTraceabilityParsing
traceabilityParsing
(
Integer
billId
)
{
public
BlockTraceabilityParsing
traceabilityParsing
(
@PathVariable
Integer
billId
)
{
BlockData
billTypeAndBillId
=
blockDataService
.
findBillTypeAndBillId
(
BusinessEnum
.
TRAIN
.
id
,
billId
);
BlockData
billTypeAndBillId
=
blockDataService
.
findBillTypeAndBillId
(
BusinessEnum
.
TRAIN
.
id
,
billId
);
BcRecord
bcRecord
=
blockService
.
fetchRecord
(
BlockBusinessEnum
.
TRAIN
.
subCode
,
billTypeAndBillId
.
getRecordID
());
BcRecord
bcRecord
=
blockService
.
fetchRecord
(
BlockBusinessEnum
.
TRAIN
.
subCode
,
billTypeAndBillId
.
getRecordID
());
TrainDetailsVo
trainDetailsVo
=
trainThemeService
.
findSelectDetailsVo
(
billId
);
TrainDetailsVo
trainDetailsVo
=
trainThemeService
.
findSelectDetailsVo
(
billId
);
...
@@ -857,7 +857,7 @@ public class TrainJobController {
...
@@ -857,7 +857,7 @@ public class TrainJobController {
@GetMapping
(
value
=
"/checkTrueData/{billId}"
)
@GetMapping
(
value
=
"/checkTrueData/{billId}"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的验证"
,
notes
=
"根据业务id进行对应业务的验证"
)
@ApiOperation
(
value
=
"根据业务id进行对应业务的验证"
,
notes
=
"根据业务id进行对应业务的验证"
)
public
boolean
checkTrueData
(
Integer
billId
)
{
public
boolean
checkTrueData
(
@PathVariable
Integer
billId
)
{
BlockTraceabilityParsing
blockTraceabilityParsing
=
traceabilityParsing
(
billId
);
BlockTraceabilityParsing
blockTraceabilityParsing
=
traceabilityParsing
(
billId
);
boolean
contrast
=
blockDataService
.
contrast
(
blockTraceabilityParsing
);
boolean
contrast
=
blockDataService
.
contrast
(
blockTraceabilityParsing
);
return
contrast
;
return
contrast
;
...
...
dev-union/src/main/resources/application-prodT.properties
浏览文件 @
d24a4d7e
...
@@ -11,4 +11,5 @@ block.flag=false
...
@@ -11,4 +11,5 @@ block.flag=false
qrcode.path
=
/opt/qrcode/
qrcode.path
=
/opt/qrcode/
qrcode.preview.path
=
http://10.153.4.11:8088/equipTest/code/
qrcode.preview.path
=
http://10.153.4.11:8088/equipTest/code/
carrier.url
=
http://10.153.4.11:8088/carrierTest/configuration/saveConfiguration
carrier.url
=
http://10.153.4.11:8088/carrierTest/configuration/saveConfiguration
file.matching.excel
=
/data/equipTest/matching/excel/
file.matching.excel
=
/data/equipTest/matching/excel/
\ No newline at end of file
block.carrier.ip
=
http://10.153.4.11:8088/blockTest
\ No newline at end of file
dev-union/src/main/resources/application-test.properties
浏览文件 @
d24a4d7e
...
@@ -18,4 +18,6 @@ qrcode.preview.path=http://localhost:8088/equip/code/
...
@@ -18,4 +18,6 @@ qrcode.preview.path=http://localhost:8088/equip/code/
carrier.url
=
http://192.168.0.80:8088/carrier/configuration/saveConfiguration
carrier.url
=
http://192.168.0.80:8088/carrier/configuration/saveConfiguration
file.matching.excel
=
/data/equip/excel/
file.matching.excel
=
/data/equip/excel/
\ No newline at end of file
block.carrier.ip
=
http://192.168.0.80:8088/block
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论