Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
0be4d503
提交
0be4d503
authored
7月 04, 2024
作者:
杨启发
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
磅单OCR识别需求
上级
1301cd42
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
9 行增加
和
0 行删除
+9
-0
OcrRecognition.java
...c/main/java/com/clx/performance/model/OcrRecognition.java
+6
-0
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+3
-0
没有找到文件。
performance-web/src/main/java/com/clx/performance/model/OcrRecognition.java
浏览文件 @
0be4d503
...
@@ -53,6 +53,12 @@ public class OcrRecognition implements HasKey<Integer> {
...
@@ -53,6 +53,12 @@ public class OcrRecognition implements HasKey<Integer> {
@ApiModelProperty
(
value
=
"皮重"
)
@ApiModelProperty
(
value
=
"皮重"
)
private
Double
tareWeight
;
private
Double
tareWeight
;
/**
* OCR识别的原始结果
*/
@ApiModelProperty
(
value
=
"OCR识别的原始结果"
)
private
String
originalResult
;
/**
/**
* 创建时间
* 创建时间
*/
*/
...
...
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
0be4d503
...
@@ -2743,10 +2743,12 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -2743,10 +2743,12 @@ public class OrderChildServiceImpl implements OrderChildService {
req
.
setImageUrl
(
ossDomain
+
param
.
getImageUrl
());
req
.
setImageUrl
(
ossDomain
+
param
.
getImageUrl
());
req
.
setItemNames
(
itemNames
);
req
.
setItemNames
(
itemNames
);
SmartStructuralOCRV2Response
resp
=
client
.
SmartStructuralOCRV2
(
req
);
SmartStructuralOCRV2Response
resp
=
client
.
SmartStructuralOCRV2
(
req
);
Map
<
String
,
String
>
originalResultMap
=
new
HashMap
<>();
for
(
GroupInfo
groupInfo
:
resp
.
getStructuralList
())
{
for
(
GroupInfo
groupInfo
:
resp
.
getStructuralList
())
{
ItemInfo
itemInfo
=
groupInfo
.
getGroups
()[
0
].
getLines
()[
0
];
ItemInfo
itemInfo
=
groupInfo
.
getGroups
()[
0
].
getLines
()[
0
];
String
autoName
=
itemInfo
.
getKey
().
getAutoName
();
String
autoName
=
itemInfo
.
getKey
().
getAutoName
();
String
autoContent
=
itemInfo
.
getValue
().
getAutoContent
();
String
autoContent
=
itemInfo
.
getValue
().
getAutoContent
();
originalResultMap
.
put
(
autoName
,
autoContent
);
if
(
NumberUtils
.
isCreatable
(
autoContent
))
{
if
(
NumberUtils
.
isCreatable
(
autoContent
))
{
if
(
"毛重"
.
equals
(
autoName
))
{
if
(
"毛重"
.
equals
(
autoName
))
{
vo
.
setGrossWeight
(
Double
.
valueOf
(
autoContent
));
vo
.
setGrossWeight
(
Double
.
valueOf
(
autoContent
));
...
@@ -2763,6 +2765,7 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -2763,6 +2765,7 @@ public class OrderChildServiceImpl implements OrderChildService {
ocrRecognition
.
setImageUrl
(
param
.
getImageUrl
());
ocrRecognition
.
setImageUrl
(
param
.
getImageUrl
());
ocrRecognition
.
setGrossWeight
(
vo
.
getGrossWeight
());
ocrRecognition
.
setGrossWeight
(
vo
.
getGrossWeight
());
ocrRecognition
.
setTareWeight
(
vo
.
getTareWeight
());
ocrRecognition
.
setTareWeight
(
vo
.
getTareWeight
());
ocrRecognition
.
setOriginalResult
(
JSONUtil
.
toJsonStr
(
originalResultMap
));
ocrRecognitionDao
.
saveEntity
(
ocrRecognition
);
ocrRecognitionDao
.
saveEntity
(
ocrRecognition
);
}
catch
(
TencentCloudSDKException
e
)
{
}
catch
(
TencentCloudSDKException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论