Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-05-16 15:24:48 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1f7335f70266c172acf66e7dbb90c31ef0bf90f5
1f7335f7
1 parent
7d9189ac
feat. processing message include dosage
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
server/src/lib/DataProcess.js
server/src/lib/DataProcess.js
View file @
1f7335f
...
...
@@ -57,8 +57,9 @@ const transPublishingTopicAndMessage = async(bottleId) => {
const
bottle
=
await
Bottle
.
findByBottleId
(
bottleId
);
const
recentOpen
=
bottle
.
getRecentOpenDate
();
const
dosage
=
bottle
.
getDosage
();
const
message
=
'res/'
+
await
transDate
(
recentOpen
);
const
message
=
'res/'
+
await
transDate
(
recentOpen
)
+
'/'
+
dosage
;
return
{
topic
,
...
...
@@ -66,9 +67,8 @@ const transPublishingTopicAndMessage = async(bottleId) => {
};
}
//날짜를
yy
mmdd로 변환해주는 함수
//날짜를 mmdd로 변환해주는 함수
const
transDate
=
(
date
)
=>
{
return
String
(
date
.
getFullYear
()).
substr
(
2
,
2
)
+
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
String
(
date
.
getMonth
()
+
1
)
:
String
(
date
.
getMonth
()
+
1
))
return
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
String
(
date
.
getMonth
()
+
1
)
:
String
(
date
.
getMonth
()
+
1
))
+
(
date
.
getDate
()
<
10
?
'0'
+
String
(
date
.
getDate
())
:
String
(
date
.
getDate
()));
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment