Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
f6d601f3
Commit
f6d601f3
authored
Dec 29, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改管材
parent
ea3e37ec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+23
-1
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
View file @
f6d601f3
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.*;
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.*;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.VerifyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.VerifyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.WeldMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService
;
import
com.yeejoin.amos.boot.module.ugp.biz.fegin.MaasServiceFeignClient
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
...
@@ -21,6 +22,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -21,6 +22,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
...
@@ -68,6 +71,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -68,6 +71,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
@Value
(
"${mqtt.topic.weldUpdate}"
)
@Value
(
"${mqtt.topic.weldUpdate}"
)
private
String
weldUpdate
;
private
String
weldUpdate
;
@Autowired
private
MaasServiceFeignClient
maasServiceFeignClient
;
/**
/**
* 分页查询
* 分页查询
...
@@ -340,7 +346,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -340,7 +346,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
verify
.
setCode
(
jsonObject
.
getString
(
"code"
));
verify
.
setCode
(
jsonObject
.
getString
(
"code"
));
//从图片中获取管材编号materialId
//从图片中获取管材编号materialId
//管材编号(暂时写死)
//管材编号(暂时写死)
String
materialCode
=
"1585520415743176365"
;
String
url
=
"http://172.16.10.220:9000/"
+
photo
;
String
materialCode
=
getMaterialCodeByOcr
(
url
);
verify
.
setStage
(
StageEnum
.
焊前管材质量
.
getStage
());
verify
.
setStage
(
StageEnum
.
焊前管材质量
.
getStage
());
/**校验*/
/**校验*/
Boolean
flag
=
false
;
Boolean
flag
=
false
;
...
@@ -660,6 +667,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -660,6 +667,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
return
VerifyEnum
.
已通过
.
getName
();
return
VerifyEnum
.
已通过
.
getName
();
}
}
/** cpp
/** cpp
* 校验失败需要添加的数据
* 校验失败需要添加的数据
* @param verify
* @param verify
...
@@ -1219,4 +1227,18 @@ return jsonArray;
...
@@ -1219,4 +1227,18 @@ return jsonArray;
objectPage1
.
setRecords
(
list2
);
objectPage1
.
setRecords
(
list2
);
return
objectPage1
;
return
objectPage1
;
}
}
public
String
getMaterialCodeByOcr
(
String
urlPath
){
JSONObject
param
=
new
JSONObject
();
JSONArray
urls
=
new
JSONArray
();
JSONObject
url
=
new
JSONObject
();
url
.
put
(
"url"
,
urlPath
);
urls
.
add
(
url
);
param
.
put
(
"data"
,
urls
);
ResponseModel
<
Object
>
result
=
maasServiceFeignClient
.
getPatrolDangerInfo
(
param
);
String
resultStr
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
result
.
getResult
())).
getJSONObject
(
"result1"
).
getJSONArray
(
"rows"
).
getJSONObject
(
0
).
getString
(
"ocrResult"
);
return
resultStr
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment