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
7ea37991
Commit
7ea37991
authored
Jul 08, 2024
by
刘凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改:修改气瓶同步消息
parent
727a8d68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
CylinderController.java
...ejoin/amos/api/openapi/controller/CylinderController.java
+4
-1
CylinderFillingDataValidationService.java
...pi/face/service/CylinderFillingDataValidationService.java
+2
-1
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/CylinderController.java
View file @
7ea37991
...
...
@@ -114,6 +114,7 @@ public class CylinderController {
try
{
validateResult
=
cylinderFillingDataValidationService
.
validateFilling
(
jsonobject
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"液化气体气瓶充装信息上报,数据校验失败"
);
cylinderFillingMessage
.
setMessage
(
e
.
getMessage
());
}
...
...
@@ -131,7 +132,7 @@ public class CylinderController {
if
(!
ObjectUtils
.
isEmpty
(
validateResult
.
getRecordErrorData
()))
{
errorNumber
+=
validateResult
.
getRecordErrorData
().
size
();
error
.
put
(
"
充装
填充错误数据:"
,
validateResult
.
getRecordErrorData
());
error
.
put
(
"填充错误数据:"
,
validateResult
.
getRecordErrorData
());
message
.
add
(
"充装记录数据异常气瓶数:"
+
validateResult
.
getRecordErrorCylinderNumber
());
}
...
...
@@ -151,6 +152,8 @@ public class CylinderController {
throw
new
BadRequest
(
error
.
toString
());
}
}
else
{
throw
new
BadRequest
(
"数据校验失败!!!"
);
}
// Map<String, Class> classMap = new HashMap<>();
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/CylinderFillingDataValidationService.java
View file @
7ea37991
...
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.api.openapi.face.orm.dao.MidEquipRegistrationInfoMapper;
import
com.yeejoin.amos.api.openapi.face.orm.entity.MidEquipRegistrationInfo
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.TzBaseEnterpriseInfoDto
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONNull
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -375,7 +376,7 @@ public class CylinderFillingDataValidationService {
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
row
=
jsonArray
.
getJSONObject
(
i
);
for
(
String
key
:
keys
)
{
if
(!
row
.
containsKey
(
key
)
||
ObjectUtils
.
isEmpty
(
row
.
get
(
key
)
))
{
if
(!
row
.
containsKey
(
key
)
||
ObjectUtils
.
isEmpty
(
row
.
get
(
key
)
)
||
row
.
get
(
key
).
equals
(
JSONNull
.
getInstance
()
))
{
errorList
.
add
(
row
.
toString
());
}
}
...
...
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