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
c6b43741
Commit
c6b43741
authored
Jan 26, 2022
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新气瓶接口
parent
87591a15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
CylinderDateInfoService.java
...mos/api/openapi/face/service/CylinderDateInfoService.java
+8
-11
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/CylinderDateInfoService.java
View file @
c6b43741
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
service
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.api.openapi.constant.Constant
;
import
com.yeejoin.amos.api.openapi.face.model.BizTokenModel
;
...
...
@@ -19,10 +17,7 @@ import com.yeejoin.amos.api.openapi.face.orm.entity.CylinderInspection;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderTags
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.CylinderUnit
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.OpenapiBizToken
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Scheduled
;
...
...
@@ -37,7 +32,6 @@ import java.util.ArrayList;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -88,7 +82,8 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
for
(
OpenapiBizToken
token
:
tokenList
)
{
try
{
Date
today
=
new
Date
();
String
todayStr
=
DateUtils
.
dateFormat
(
today
,
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
todayStr
=
sdf
.
format
(
today
);
List
<
CylinderDateInfo
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
CylinderDateInfo
>().
eq
(
CylinderDateInfo:
:
getSyncDate
,
todayStr
+
" 00:00:00"
));
if
(
list
.
size
()
==
0
)
{
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
...
...
@@ -138,7 +133,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
this
.
updateById
(
info
);
});
}
}
catch
(
Parse
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
...
...
@@ -337,7 +332,8 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
for
(
String
d
:
dateList
)
{
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
try
{
temp
.
setSyncDate
(
DateUtils
.
dateParse
(
d
,
"yyyy-MM-dd"
));
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
temp
.
setSyncDate
(
sdf
.
parse
(
d
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -388,7 +384,8 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
List
<
OpenapiBizToken
>
tokenList
=
openapiBizTokenService
.
list
(
new
LambdaQueryWrapper
<
OpenapiBizToken
>().
eq
(
OpenapiBizToken:
:
getDeveloperAgency
,
s
).
eq
(
OpenapiBizToken:
:
getDataType
,
"cyl"
));
for
(
OpenapiBizToken
token
:
tokenList
)
{
try
{
String
todayStr
=
DateUtils
.
dateFormat
(
date
,
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
todayStr
=
sdf
.
format
(
date
);
List
<
CylinderDateInfo
>
list
=
this
.
list
(
new
LambdaQueryWrapper
<
CylinderDateInfo
>().
eq
(
CylinderDateInfo:
:
getSyncDate
,
todayStr
+
" 00:00:00"
));
if
(
list
.
size
()
==
0
)
{
CylinderDateInfoModel
temp
=
new
CylinderDateInfoModel
();
...
...
@@ -438,7 +435,7 @@ public class CylinderDateInfoService extends BaseService<CylinderDateInfoModel,
this
.
updateById
(
info
);
});
}
}
catch
(
Parse
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
...
...
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