Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
9d1cc644
提交
9d1cc644
authored
3月 28, 2023
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(区块链模块): 修复配发,退回,入库问题
修复了入库接收人为null,修复了配发,退回验证为假
上级
b13a83b5
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
118 行增加
和
44 行删除
+118
-44
AllotBackBillServiceImpl.java
...v/device/allot/service/impl/AllotBackBillServiceImpl.java
+24
-4
AllotBillServiceImpl.java
...j/dev/device/allot/service/impl/AllotBillServiceImpl.java
+19
-4
DeviceApplyBillServiceImpl.java
...device/apply/service/impl/DeviceApplyBillServiceImpl.java
+3
-6
RepairBackBillServiceImpl.java
...device/repair/service/impl/RepairBackBillServiceImpl.java
+8
-4
RepairSendBillServiceImpl.java
...device/repair/service/impl/RepairSendBillServiceImpl.java
+21
-5
HistoryDeviceBillRun.java
...ykj/dev/device/selfcheck/config/HistoryDeviceBillRun.java
+6
-6
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+1
-0
SelfCheckBillServiceImpl.java
...vice/selfcheck/service/impl/SelfCheckBillServiceImpl.java
+32
-12
StorageBillServiceImpl.java
...v/device/storage/service/impl/StorageBillServiceImpl.java
+4
-3
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/service/impl/AllotBackBillServiceImpl.java
浏览文件 @
9d1cc644
...
@@ -24,6 +24,7 @@ import com.tykj.dev.device.file.entity.FileRet;
...
@@ -24,6 +24,7 @@ import com.tykj.dev.device.file.entity.FileRet;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.file.service.FilesUtil
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.library.subject.vo.ScriptSaveVo
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.user.cache.UserCache
;
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.BlockBusinessEnum
;
...
@@ -33,6 +34,7 @@ import com.tykj.dev.misc.utils.DateUtil;
...
@@ -33,6 +34,7 @@ import com.tykj.dev.misc.utils.DateUtil;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
...
@@ -40,6 +42,7 @@ import org.springframework.data.jpa.domain.Specification;
...
@@ -40,6 +42,7 @@ import org.springframework.data.jpa.domain.Specification;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.persistence.Transient
;
import
javax.persistence.Transient
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -53,6 +56,7 @@ import java.util.stream.Collectors;
...
@@ -53,6 +56,7 @@ import java.util.stream.Collectors;
* @author dengdiyi
* @author dengdiyi
*/
*/
@Service
@Service
@Slf4j
public
class
AllotBackBillServiceImpl
implements
AllotBackBillService
{
public
class
AllotBackBillServiceImpl
implements
AllotBackBillService
{
@Autowired
@Autowired
...
@@ -76,12 +80,16 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
...
@@ -76,12 +80,16 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
@Autowired
@Autowired
private
TaskService
taskService
;
private
TaskService
taskService
;
@Resource
private
UserCache
userCache
;
@Override
@Override
public
AllotBackBill
addEntity
(
AllotBackBill
allotBackBill
)
{
public
AllotBackBill
addEntity
(
AllotBackBill
allotBackBill
)
{
AllotBackBill
allotBackBill1
=
allotBackBillDao
.
save
(
allotBackBill
);
AllotBackBill
allotBackBill1
=
allotBackBillDao
.
save
(
allotBackBill
);
//异步上链
//异步上链
//延迟2s防止同时写入
//延迟2s防止同时写入
sendText
(
allotBackBill1
.
getId
());
sendText
(
allotBackBill1
.
getId
());
log
.
info
(
"新增[退回]上链"
);
return
allotBackBill1
;
return
allotBackBill1
;
}
}
...
@@ -105,6 +113,7 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
...
@@ -105,6 +113,7 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
//根据recordId追加上链
//根据recordId追加上链
// CompletableFuture.runAsync(()->blockChainUtil.appendHash(JacksonUtil.toJSon(allotBackBill),allotBackBill.getRecordId()),TaskBeanConfig.getThreadPoolTaskScheduler());
// CompletableFuture.runAsync(()->blockChainUtil.appendHash(JacksonUtil.toJSon(allotBackBill),allotBackBill.getRecordId()),TaskBeanConfig.getThreadPoolTaskScheduler());
sendText
(
allotBackBill1
.
getId
());
sendText
(
allotBackBill1
.
getId
());
log
.
info
(
"更新[退回]上链"
);
return
allotBackBill1
;
return
allotBackBill1
;
}
}
...
@@ -215,13 +224,24 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
...
@@ -215,13 +224,24 @@ public class AllotBackBillServiceImpl implements AllotBackBillService {
private
String
operatorName
(
AllotBackBill
allotBill
)
{
private
String
operatorName
(
AllotBackBill
allotBill
)
{
StringBuffer
buf
=
new
StringBuffer
();
StringBuffer
buf
=
new
StringBuffer
();
buf
.
append
(
allotBill
.
getSenderUserA
())
// buf.append(allotBill.getSenderUserA())
// .append(",")
// .append(allotBill.getSenderUserB())
// .append(",")
// .append(allotBill.getReceiveUserA())
// .append(",")
// .append(allotBill.getReceiveUserB());
Integer
sendUseraId
=
allotBill
.
getSendUseraId
();
Integer
sendUserbId
=
allotBill
.
getSendUserbId
();
Integer
receiveUseraId
=
allotBill
.
getReceiveUseraId
();
Integer
receiveUserbId
=
allotBill
.
getReceiveUserbId
();
buf
.
append
(
sendUseraId
!=
null
?
userCache
.
findById
(
sendUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
allotBill
.
getSenderUserB
()
)
.
append
(
sendUserbId
!=
null
?
userCache
.
findById
(
sendUserbId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
allotBill
.
getReceiveUserA
()
)
.
append
(
receiveUseraId
!=
null
?
userCache
.
findById
(
receiveUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
allotBill
.
getReceiveUserB
()
);
.
append
(
receiveUserbId
!=
null
?
userCache
.
findById
(
receiveUserbId
).
getName
():
"无"
);
return
buf
.
toString
();
return
buf
.
toString
();
}
}
...
...
dev-allot/src/main/java/com/tykj/dev/device/allot/service/impl/AllotBillServiceImpl.java
浏览文件 @
9d1cc644
...
@@ -27,6 +27,7 @@ import com.tykj.dev.device.task.service.TaskService;
...
@@ -27,6 +27,7 @@ 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.vo.TaskFileRet
;
import
com.tykj.dev.device.task.subject.vo.TaskFileRet
;
import
com.tykj.dev.device.user.cache.UserCache
;
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.BlockBusinessEnum
;
...
@@ -81,6 +82,9 @@ public class AllotBillServiceImpl implements AllotBillService {
...
@@ -81,6 +82,9 @@ public class AllotBillServiceImpl implements AllotBillService {
@Resource
@Resource
private
TaskLogService
taskLogService
;
private
TaskLogService
taskLogService
;
@Resource
private
UserCache
userCache
;
@Override
@Override
public
AllotBill
addEntity
(
AllotBill
allotBillEntity
)
{
public
AllotBill
addEntity
(
AllotBill
allotBillEntity
)
{
AllotBill
allotBill
=
allotBillDao
.
save
(
allotBillEntity
);
AllotBill
allotBill
=
allotBillDao
.
save
(
allotBillEntity
);
...
@@ -292,13 +296,24 @@ public class AllotBillServiceImpl implements AllotBillService {
...
@@ -292,13 +296,24 @@ public class AllotBillServiceImpl implements AllotBillService {
private
String
operatorName
(
AllotBill
allotBill
)
{
private
String
operatorName
(
AllotBill
allotBill
)
{
StringBuffer
buf
=
new
StringBuffer
();
StringBuffer
buf
=
new
StringBuffer
();
buf
.
append
(
allotBill
.
getSenderUserA
())
// buf.append(allotBill.getSenderUserA())
// .append(",")
// .append(allotBill.getSenderUserB())
// .append(",")
// .append(allotBill.getReceiveUserA())
// .append(",")
// .append(allotBill.getReceiveUserB());
Integer
sendUseraId
=
allotBill
.
getSendUseraId
();
Integer
sendUserbId
=
allotBill
.
getSendUserbId
();
Integer
receiveUseraId
=
allotBill
.
getReceiveUseraId
();
Integer
receiveUserbId
=
allotBill
.
getReceiveUserbId
();
buf
.
append
(
sendUseraId
!=
null
?
userCache
.
findById
(
sendUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
allotBill
.
getSenderUserB
()
)
.
append
(
sendUserbId
!=
null
?
userCache
.
findById
(
sendUserbId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
allotBill
.
getReceiveUserA
()
)
.
append
(
receiveUseraId
!=
null
?
userCache
.
findById
(
receiveUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
allotBill
.
getReceiveUserB
()
);
.
append
(
receiveUserbId
!=
null
?
userCache
.
findById
(
receiveUserbId
).
getName
():
"无"
);
return
buf
.
toString
();
return
buf
.
toString
();
}
}
...
...
dev-apply/src/main/java/com/tykj/dev/device/apply/service/impl/DeviceApplyBillServiceImpl.java
浏览文件 @
9d1cc644
...
@@ -367,14 +367,11 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
...
@@ -367,14 +367,11 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
}
}
private
String
operatorName
(
DeviceApplyBill
deviceApplyBill
)
{
private
String
operatorName
(
DeviceApplyBill
deviceApplyBill
)
{
String
agent
=
deviceApplyBill
.
getAgent
();
StringBuffer
buf
=
new
StringBuffer
();
StringBuffer
buf
=
new
StringBuffer
();
buf
.
append
(
deviceApplyBill
.
getApplyUser
())
buf
.
append
(
deviceApplyBill
.
getApplyUser
())
.
append
(
","
);
.
append
(
","
)
String
agent
=
deviceApplyBill
.
getAgent
();
.
append
(
agent
!=
null
?
agent:
"无"
);
if
(
agent
!=
null
){
buf
.
append
(
agent
);
}
return
buf
.
toString
();
return
buf
.
toString
();
}
}
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/service/impl/RepairBackBillServiceImpl.java
浏览文件 @
9d1cc644
...
@@ -230,14 +230,18 @@ public class RepairBackBillServiceImpl implements RepairBackBillService {
...
@@ -230,14 +230,18 @@ public class RepairBackBillServiceImpl implements RepairBackBillService {
*/
*/
private
String
operatorName
(
RepairBackBill
repairBackBill
)
{
private
String
operatorName
(
RepairBackBill
repairBackBill
)
{
Integer
startUseraId
=
repairBackBill
.
getStartUseraId
();
Integer
startUserbId
=
repairBackBill
.
getStartUserbId
();
Integer
receiveUseraId
=
repairBackBill
.
getReceiveUseraId
();
Integer
receiveUserbId
=
repairBackBill
.
getReceiveUserbId
();
StringBuffer
buf
=
new
StringBuffer
();
StringBuffer
buf
=
new
StringBuffer
();
buf
.
append
(
userCache
.
findById
(
repairBackBill
.
getStartUseraId
()).
getName
()
)
buf
.
append
(
startUseraId
!=
null
?
userCache
.
findById
(
startUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
userCache
.
findById
(
repairBackBill
.
getStartUserbId
()).
getName
()
)
.
append
(
startUserbId
!=
null
?
userCache
.
findById
(
startUserbId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
userCache
.
findById
(
repairBackBill
.
getReceiveUseraId
()).
getName
()
)
.
append
(
receiveUseraId
!=
null
?
userCache
.
findById
(
receiveUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
userCache
.
findById
(
repairBackBill
.
getReceiveUserbId
()).
getName
()
);
.
append
(
receiveUserbId
!=
null
?
userCache
.
findById
(
receiveUserbId
).
getName
():
"无"
);
return
buf
.
toString
();
return
buf
.
toString
();
}
}
...
...
dev-repair/src/main/java/com/tykj/dev/device/repair/service/impl/RepairSendBillServiceImpl.java
浏览文件 @
9d1cc644
...
@@ -24,6 +24,7 @@ import com.tykj.dev.device.repair.subject.domin.RepairBill;
...
@@ -24,6 +24,7 @@ import com.tykj.dev.device.repair.subject.domin.RepairBill;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.repair.subject.domin.RepairSendBill
;
import
com.tykj.dev.device.repair.subject.vo.RepairBillSelectVo
;
import
com.tykj.dev.device.repair.subject.vo.RepairBillSelectVo
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.task.service.TaskService
;
import
com.tykj.dev.device.user.cache.UserCache
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.device.user.subject.service.UserPublicService
;
import
com.tykj.dev.misc.base.BlockBusinessEnum
;
import
com.tykj.dev.misc.base.BlockBusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
import
com.tykj.dev.misc.base.BusinessEnum
;
...
@@ -76,6 +77,9 @@ public class RepairSendBillServiceImpl implements RepairSendBillService {
...
@@ -76,6 +77,9 @@ public class RepairSendBillServiceImpl implements RepairSendBillService {
@Resource
@Resource
private
RepairBillService
repairBillService
;
private
RepairBillService
repairBillService
;
@Resource
private
UserCache
userCache
;
@Override
@Override
public
RepairSendBill
addEntity
(
RepairSendBill
deviceRepairSendBillEntity
)
{
public
RepairSendBill
addEntity
(
RepairSendBill
deviceRepairSendBillEntity
)
{
RepairSendBill
repairSendBill
=
deviceRepairSendBillDao
.
save
(
deviceRepairSendBillEntity
);
RepairSendBill
repairSendBill
=
deviceRepairSendBillDao
.
save
(
deviceRepairSendBillEntity
);
...
@@ -235,16 +239,28 @@ public class RepairSendBillServiceImpl implements RepairSendBillService {
...
@@ -235,16 +239,28 @@ public class RepairSendBillServiceImpl implements RepairSendBillService {
*/
*/
private
String
operatorName
(
RepairSendBill
repairSendBill
)
{
private
String
operatorName
(
RepairSendBill
repairSendBill
)
{
// StringBuffer buf = new StringBuffer();
// buf.append(repairSendBill.getStartUserA())
// .append(",")
// .append(repairSendBill.getStartUserB())
// .append(",")
// .append(repairSendBill.getRepairUserA())
// .append(",")
// .append(repairSendBill.getRepairUserB());
// return buf.toString();
Integer
startUseraId
=
repairSendBill
.
getStartUseraId
();
Integer
startUserbId
=
repairSendBill
.
getStartUserbId
();
Integer
repairUseraId
=
repairSendBill
.
getRepairUseraId
();
Integer
repairUserbId
=
repairSendBill
.
getRepairUserbId
();
StringBuffer
buf
=
new
StringBuffer
();
StringBuffer
buf
=
new
StringBuffer
();
buf
.
append
(
repairSendBill
.
getStartUserA
()
)
buf
.
append
(
startUseraId
!=
null
?
userCache
.
findById
(
startUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
repairSendBill
.
getStartUserB
()
)
.
append
(
startUserbId
!=
null
?
userCache
.
findById
(
startUserbId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
repair
SendBill
.
getRepairUserA
()
)
.
append
(
repair
UseraId
!=
null
?
userCache
.
findById
(
repairUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
repair
SendBill
.
getRepairUserB
()
);
.
append
(
repair
UserbId
!=
null
?
userCache
.
findById
(
repairUserbId
).
getName
():
"无"
);
return
buf
.
toString
();
return
buf
.
toString
();
}
}
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/config/HistoryDeviceBillRun.java
浏览文件 @
9d1cc644
...
@@ -36,12 +36,12 @@ public class HistoryDeviceBillRun {
...
@@ -36,12 +36,12 @@ public class HistoryDeviceBillRun {
private
Map
<
Integer
,
List
<
HistoryDeviceBill
>>
map
=
new
HashMap
<>();
private
Map
<
Integer
,
List
<
HistoryDeviceBill
>>
map
=
new
HashMap
<>();
//
@PostConstruct
@PostConstruct
//
private void initHistoryDeviceBill(){
private
void
initHistoryDeviceBill
(){
//
log.info("历史自查存储数据表开始同步....");
log
.
info
(
"历史自查存储数据表开始同步...."
);
//
this.map = deviceBillDao.findAll().stream().collect(Collectors.groupingBy(HistoryDeviceBill::getBillId));
this
.
map
=
deviceBillDao
.
findAll
().
stream
().
collect
(
Collectors
.
groupingBy
(
HistoryDeviceBill:
:
getBillId
));
//
log.info("历史自查存储数据表同步成功....");
log
.
info
(
"历史自查存储数据表同步成功...."
);
//
}
}
}
}
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
9d1cc644
...
@@ -613,6 +613,7 @@ public class SelfCheckController {
...
@@ -613,6 +613,7 @@ public class SelfCheckController {
executor
.
execute
(()->
deviceLogService
.
addAllLog
(
deviceLogDtos
));
executor
.
execute
(()->
deviceLogService
.
addAllLog
(
deviceLogDtos
));
log
.
info
(
"[自查模块]:发起自查"
);
log
.
info
(
"[自查模块]:发起自查"
);
myWebSocket
.
sendMessage1
();
myWebSocket
.
sendMessage1
();
selfCheckBillService
.
update
(
selfExaminationBillEntity1
);
return
ResultUtil
.
success
(
selfExaminationBillEntity1
);
return
ResultUtil
.
success
(
selfExaminationBillEntity1
);
}
}
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/SelfCheckBillServiceImpl.java
浏览文件 @
9d1cc644
...
@@ -34,6 +34,7 @@ import com.tykj.dev.device.task.service.TaskService;
...
@@ -34,6 +34,7 @@ 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.vo.TaskLogUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskLogUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.task.subject.vo.TaskUserVo
;
import
com.tykj.dev.device.user.cache.UserCache
;
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.BlockBusinessEnum
;
...
@@ -109,6 +110,9 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
...
@@ -109,6 +110,9 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
@Resource
@Resource
UserPublicService
userPublicService
;
UserPublicService
userPublicService
;
@Resource
private
UserCache
userCache
;
@Override
@Override
public
SelfCheckBill
addEntity
(
SelfCheckBill
selfExaminationBillEntity
)
{
public
SelfCheckBill
addEntity
(
SelfCheckBill
selfExaminationBillEntity
)
{
SelfCheckBill
selfCheckBill
=
selfExaminationBillDao
.
save
(
selfExaminationBillEntity
);
SelfCheckBill
selfCheckBill
=
selfExaminationBillDao
.
save
(
selfExaminationBillEntity
);
...
@@ -420,22 +424,25 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
...
@@ -420,22 +424,25 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
SelfCheckBill
selfCheckBill1
=
JSON
.
parseObject
(
bcRecord
.
getData
().
getContent
(),
SelfCheckBill
.
class
);
SelfCheckBill
selfCheckBill1
=
JSON
.
parseObject
(
bcRecord
.
getData
().
getContent
(),
SelfCheckBill
.
class
);
BlockTraceabilityParsing
blockTraceabilityParsing
=
bcRecord
.
getData
().
toBlockTraceabilityParsing
();
BlockTraceabilityParsing
blockTraceabilityParsing
=
bcRecord
.
getData
().
toBlockTraceabilityParsing
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
List
<
String
>
seqList
=
getSeqList
(
selfCheckBill
);
stringBuffer
.
append
(
StringSplitUtil
.
stringListToString
(
selfCheckBill
.
getDeviceLibraries
().
stream
().
map
(
DeviceLibrary:
:
getSeqNumber
).
collect
(
Collectors
.
toList
())))
List
<
String
>
seqList1
=
getSeqList
(
selfCheckBill1
);
.
append
(
","
)
.
append
(
StringSplitUtil
.
stringListToString
(
selfCheckBill
.
getHistoryDeviceBills
().
stream
().
map
(
HistoryDeviceBill:
:
getSeqNumber
).
collect
(
Collectors
.
toList
())));
StringBuffer
stringBuffer1
=
new
StringBuffer
();
// StringBuffer stringBuffer=new StringBuffer();
stringBuffer1
.
append
(
StringSplitUtil
.
stringListToString
(
selfCheckBill1
.
getDeviceLibraries
().
stream
().
map
(
DeviceLibrary:
:
getSeqNumber
).
collect
(
Collectors
.
toList
())))
// stringBuffer.append(StringSplitUtil.stringListToString(selfCheckBill.getDeviceLibraries().stream().map(DeviceLibrary::getSeqNumber).collect(Collectors.toList())))
.
append
(
","
)
// .append(",")
.
append
(
StringSplitUtil
.
stringListToString
(
selfCheckBill1
.
getHistoryDeviceBills
().
stream
().
map
(
HistoryDeviceBill:
:
getSeqNumber
).
collect
(
Collectors
.
toList
())));
// .append(StringSplitUtil.stringListToString(selfCheckBill.getHistoryDeviceBills().stream().map(HistoryDeviceBill::getSeqNumber).collect(Collectors.toList())));
//
// StringBuffer stringBuffer1=new StringBuffer();
// stringBuffer1.append(StringSplitUtil.stringListToString(selfCheckBill1.getDeviceLibraries().stream().map(DeviceLibrary::getSeqNumber).collect(Collectors.toList())))
// .append(",")
// .append(StringSplitUtil.stringListToString(selfCheckBill1.getHistoryDeviceBills().stream().map(HistoryDeviceBill::getSeqNumber).collect(Collectors.toList())));
blockTraceabilityParsing
.
setBusinessTraceabilityParsingData
(
TraceabilityParsingData
.
builder
()
blockTraceabilityParsing
.
setBusinessTraceabilityParsingData
(
TraceabilityParsingData
.
builder
()
.
billTypeName
(
"自查"
)
//业务名称
.
billTypeName
(
"自查"
)
//业务名称
// .applyNumber(allotBill.getApplyNumber()) //申请文号
// .applyNumber(allotBill.getApplyNumber()) //申请文号
// .replayNumber(allotBill.getReplayNumber()) //批复文号
// .replayNumber(allotBill.getReplayNumber()) //批复文号
.
fileMd5
(
selfCheckBill
.
getFileMd5
())
.
fileMd5
(
selfCheckBill
.
getFileMd5
())
.
carrierIds
(
stringBuffer
.
toString
(
))
//序列号信息
.
carrierIds
(
String
.
join
(
","
,
seqList
))
//序列号信息
.
unitName
(
selfCheckBill
.
getCheckUnit
())
//发起单位
.
unitName
(
selfCheckBill
.
getCheckUnit
())
//发起单位
.
operationTime
(
DateUtil
.
getLocalDateTime
(
selfCheckBill
.
getCreateTime
()))
//发起时间
.
operationTime
(
DateUtil
.
getLocalDateTime
(
selfCheckBill
.
getCreateTime
()))
//发起时间
.
operatorUserName
(
operatorName
(
selfCheckBill
))
//相关人员
.
operatorUserName
(
operatorName
(
selfCheckBill
))
//相关人员
...
@@ -445,7 +452,7 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
...
@@ -445,7 +452,7 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
blockTraceabilityParsing
.
setBlockTraceabilityParsingData
(
TraceabilityParsingData
.
builder
()
blockTraceabilityParsing
.
setBlockTraceabilityParsingData
(
TraceabilityParsingData
.
builder
()
.
billTypeName
(
"自查"
)
.
billTypeName
(
"自查"
)
.
fileMd5
(
selfCheckBill1
.
getFileMd5
())
.
fileMd5
(
selfCheckBill1
.
getFileMd5
())
.
carrierIds
(
stringBuffer1
.
toString
(
))
//序列号信息
.
carrierIds
(
String
.
join
(
","
,
seqList1
))
//序列号信息
.
unitName
(
selfCheckBill1
.
getCheckUnit
())
//发起单位
.
unitName
(
selfCheckBill1
.
getCheckUnit
())
//发起单位
.
operationTime
(
DateUtil
.
getLocalDateTime
(
selfCheckBill1
.
getCreateTime
()))
//发起时间
.
operationTime
(
DateUtil
.
getLocalDateTime
(
selfCheckBill1
.
getCreateTime
()))
//发起时间
.
operatorUserName
(
operatorName
(
selfCheckBill1
))
//相关人员
.
operatorUserName
(
operatorName
(
selfCheckBill1
))
//相关人员
...
@@ -455,6 +462,19 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
...
@@ -455,6 +462,19 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
return
blockTraceabilityParsing
;
return
blockTraceabilityParsing
;
}
}
private
List
<
String
>
getSeqList
(
SelfCheckBill
selfCheckBill
)
{
List
<
String
>
allIds
=
new
ArrayList
<>();
List
<
String
>
notInIds
=
selfCheckBill
.
getDeviceLibraries
().
stream
().
map
(
DeviceLibrary:
:
getSeqNumber
).
collect
(
Collectors
.
toList
());
List
<
String
>
inIds
=
selfCheckBill
.
getHistoryDeviceBills
().
stream
().
map
(
HistoryDeviceBill:
:
getSeqNumber
).
collect
(
Collectors
.
toList
());
if
(
notInIds
.
size
()
>
0
){
allIds
.
addAll
(
notInIds
);
}
if
(
inIds
.
size
()
>
0
){
allIds
.
addAll
(
inIds
);
}
return
allIds
;
}
@Override
@Override
public
void
historyUpperChain
()
{
public
void
historyUpperChain
()
{
//历史数据 循环查询数据上链
//历史数据 循环查询数据上链
...
@@ -466,10 +486,10 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
...
@@ -466,10 +486,10 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
private
String
operatorName
(
SelfCheckBill
selfCheckBill
)
{
private
String
operatorName
(
SelfCheckBill
selfCheckBill
)
{
StringBuffer
buf
=
new
StringBuffer
();
StringBuffer
buf
=
new
StringBuffer
();
Integer
userbId
=
selfCheckBill
.
getUserbId
();
buf
.
append
(
selfCheckBill
.
getCheckUser
())
buf
.
append
(
selfCheckBill
.
getCheckUser
())
.
append
(
","
)
.
append
(
","
)
.
append
(
selfCheckBill
.
getConfirmUser
());
.
append
(
userbId
!=
null
?
userCache
.
findById
(
userbId
).
getName
()
:
"无"
);
return
buf
.
toString
();
return
buf
.
toString
();
}
}
...
...
dev-storage/src/main/java/com/tykj/dev/device/storage/service/impl/StorageBillServiceImpl.java
浏览文件 @
9d1cc644
...
@@ -211,13 +211,14 @@ public class StorageBillServiceImpl implements StorageBillService {
...
@@ -211,13 +211,14 @@ public class StorageBillServiceImpl implements StorageBillService {
* 拼写相关人员字符
* 拼写相关人员字符
*/
*/
private
String
operatorName
(
StorageBill
storageBill
)
{
private
String
operatorName
(
StorageBill
storageBill
)
{
Integer
receiveUseraId
=
storageBill
.
getReceiveUseraId
();
Integer
receiveUserbId
=
storageBill
.
getReceiveUserbId
();
StringBuffer
buf
=
new
StringBuffer
();
StringBuffer
buf
=
new
StringBuffer
();
buf
.
append
(
storageBill
.
getSendUserId
())
buf
.
append
(
storageBill
.
getSendUserId
())
.
append
(
","
)
.
append
(
","
)
.
append
(
userCache
.
findById
(
storageBill
.
getReceiveUseraId
()).
getName
()
)
.
append
(
receiveUseraId
!=
null
?
userCache
.
findById
(
receiveUseraId
).
getName
():
"无"
)
.
append
(
","
)
.
append
(
","
)
.
append
(
userCache
.
findById
(
storageBill
.
getReceiveUserbId
()).
getName
()
);
.
append
(
receiveUserbId
!=
null
?
userCache
.
findById
(
receiveUserbId
).
getName
():
"无"
);
return
buf
.
toString
();
return
buf
.
toString
();
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论