Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
b99d91c2
提交
b99d91c2
authored
7月 04, 2022
作者:
ljj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs:增加喝茶查询快照的日志
上级
05a3e180
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
16 行增加
和
3 行删除
+16
-3
DeviceCheckController.java
...device/confirmcheck/controller/DeviceCheckController.java
+15
-2
FileController.java
...a/com/tykj/dev/device/file/Controller/FileController.java
+1
-1
没有找到文件。
dev-confirmcheck/src/main/java/com/tykj/dev/device/confirmcheck/controller/DeviceCheckController.java
浏览文件 @
b99d91c2
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.github.wenhao.jpa.Specifications
;
import
com.github.wenhao.jpa.Specifications
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.sun.tools.javadoc.Start
;
import
com.tykj.dev.config.GlobalMap
;
import
com.tykj.dev.config.GlobalMap
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.confirmcheck.common.CcNodeType
;
import
com.tykj.dev.device.confirmcheck.common.CcNodeType
;
...
@@ -70,6 +71,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -70,6 +71,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.util.StopWatch
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
...
@@ -347,6 +349,9 @@ public class DeviceCheckController {
...
@@ -347,6 +349,9 @@ public class DeviceCheckController {
@GetMapping
(
"/detail/{id}"
)
@GetMapping
(
"/detail/{id}"
)
public
ResponseEntity
<
ResultObj
<
CheckDetailVo
>>
findDetail
(
@PathVariable
Integer
id
)
{
public
ResponseEntity
<
ResultObj
<
CheckDetailVo
>>
findDetail
(
@PathVariable
Integer
id
)
{
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
Task
task
=
taskRepo
.
findByBillIdAndBusinessType
(
id
,
8
).
orElseThrow
(()
->
new
ApiException
(
"给出的bill id 不存在"
));
Task
task
=
taskRepo
.
findByBillIdAndBusinessType
(
id
,
8
).
orElseThrow
(()
->
new
ApiException
(
"给出的bill id 不存在"
));
if
(
task
.
getBillStatus
()
==
140
||
task
.
getBillStatus
()
==
160
)
{
if
(
task
.
getBillStatus
()
==
140
||
task
.
getBillStatus
()
==
160
)
{
log
.
info
(
"[核查] 刷新在库/不在库,bill id :{}"
,
id
);
log
.
info
(
"[核查] 刷新在库/不在库,bill id :{}"
,
id
);
...
@@ -356,7 +361,11 @@ public class DeviceCheckController {
...
@@ -356,7 +361,11 @@ public class DeviceCheckController {
CheckDetailVo
detailVoList
=
detailRepo
.
findById
(
id
)
CheckDetailVo
detailVoList
=
detailRepo
.
findById
(
id
)
.
map
(
transUtil:
:
CheckDetailDo2Vo
)
.
map
(
transUtil:
:
CheckDetailDo2Vo
)
.
orElse
(
null
);
.
orElse
(
null
);
return
ResponseEntity
.
ok
(
new
ResultObj
<>(
historyCheckDeviceService
.
replayHistoryDevice
(
detailVoList
,
id
)));
log
.
info
(
"[check] 原方法执行用时:{}ms"
,
stopWatch
.
getTotalTimeMillis
());
CheckDetailVo
checkDetailVo
=
historyCheckDeviceService
.
replayHistoryDevice
(
detailVoList
,
id
);
log
.
info
(
"[check] 查询快照所用的时间:{}ms"
,
stopWatch
.
getTotalTimeMillis
());
return
ResponseEntity
.
ok
(
new
ResultObj
<>(
checkDetailVo
));
}
}
/**
/**
...
@@ -477,8 +486,12 @@ public class DeviceCheckController {
...
@@ -477,8 +486,12 @@ public class DeviceCheckController {
detail
=
detailRepo
.
save
(
detail
);
detail
=
detailRepo
.
save
(
detail
);
CheckDetailVo
cdVo
=
transUtil
.
CheckDetailDo2Vo
(
detail
);
CheckDetailVo
cdVo
=
transUtil
.
CheckDetailDo2Vo
(
detail
);
CheckDetailVo
rs
=
historyCheckDeviceService
.
replayHistoryDevice
(
cdVo
,
id
);
// 查询快照
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
CheckDetailVo
rs
=
historyCheckDeviceService
.
replayHistoryDevice
(
cdVo
,
id
);
log
.
info
(
"[check] 查询快照所用的时间:{}ms"
,
stopWatch
.
getTotalTimeMillis
());
return
ResponseEntity
.
ok
(
new
ResultObj
<>(
rs
));
return
ResponseEntity
.
ok
(
new
ResultObj
<>(
rs
));
}
}
...
...
dev-file/src/main/java/com/tykj/dev/device/file/Controller/FileController.java
浏览文件 @
b99d91c2
...
@@ -259,7 +259,7 @@ public class FileController {
...
@@ -259,7 +259,7 @@ public class FileController {
/**
/**
* 文件下载
* 文件
xiaza
下载
*/
*/
@PostMapping
(
"/download"
)
@PostMapping
(
"/download"
)
public
void
download
(
@RequestBody
FileRet
fileRet
,
HttpServletResponse
response
,
HttpServletRequest
httpServletRequest
){
public
void
download
(
@RequestBody
FileRet
fileRet
,
HttpServletResponse
response
,
HttpServletRequest
httpServletRequest
){
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论