Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ef50e72c
authored
Sep 15, 2023
by
杨伟程
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
老人月报
parent
50aa6365
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
5 deletions
server-module/src/main/java/com/makeit/module/controller/elder/PlatElderReportMonthController.java
server-service/src/main/java/com/makeit/dto/platform/elder/PlatElderReportDTO.java
server-service/src/main/java/com/makeit/service/platform/elder/PlatElderReportMonthService.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderDayReportDayServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderReportMonthServiceImpl.java
server-module/src/main/java/com/makeit/module/controller/elder/PlatElderReportMonthController.java
View file @
ef50e72c
...
...
@@ -2,18 +2,23 @@ package com.makeit.module.controller.elder;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.dto.platform.elder.PlatElderReportDTO
;
import
com.makeit.service.platform.elder.PlatElderReportMonthService
;
import
com.makeit.vo.platform.elder.report.day.PlatElderHeartRespiratoryEvaluationVO
;
import
com.makeit.vo.platform.elder.report.day.PlatElderReportMonthVO
;
import
com.makeit.vo.platform.elder.report.day.PlatElderSleepEvaluationVO
;
import
com.makeit.vo.platform.elder.report.week.PlatElderComprehensiveEvaluationVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* <p>
* 长者基本信息 前端控制器
...
...
@@ -27,6 +32,9 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
"/plat/elder/report/month"
)
public
class
PlatElderReportMonthController
{
@Autowired
private
PlatElderReportMonthService
platElderReportMonthService
;
@ApiOperation
(
"综合评价"
)
@PostMapping
(
"comprehensiveEvaluation"
)
public
ApiResponseEntity
<
PlatElderComprehensiveEvaluationVO
>
comprehensiveEvaluation
(
@RequestBody
PlatElderReportDTO
platElderIdDTO
)
{
...
...
@@ -48,8 +56,8 @@ public class PlatElderReportMonthController {
@ApiOperation
(
"月报表"
)
@PostMapping
(
"reportMonth"
)
public
ApiResponseEntity
<
PlatElderReportMonthVO
>
reportMonth
(
@RequestBody
PlatElderReportDTO
platElderIdDTO
)
{
return
null
;
public
ApiResponseEntity
<
List
<
PlatElderReportMonthVO
>
>
reportMonth
(
@RequestBody
PlatElderReportDTO
platElderIdDTO
)
{
return
ApiResponseUtils
.
success
(
platElderReportMonthService
.
reportMonth
(
platElderIdDTO
))
;
}
...
...
server-service/src/main/java/com/makeit/dto/platform/elder/PlatElderReportDTO.java
View file @
ef50e72c
...
...
@@ -11,7 +11,7 @@ import java.time.LocalDateTime;
/**
* <p>
* 长者基本信息
server-service/src/main/java/com/makeit/server/platform/elder/PlatElderPhysicalReportService.java
* 长者基本信息
* </p>
*
* @author eugene young
...
...
@@ -20,12 +20,18 @@ import java.time.LocalDateTime;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"Elder对象"
,
description
=
"长者基本信息"
)
public
class
PlatElderReportDTO
extends
PlatElderIdDTO
{
public
class
PlatElderReportDTO
extends
PlatElderIdDTO
{
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
"日期"
)
private
LocalDate
now
;
@ApiModelProperty
(
"月份"
)
private
Integer
year
;
@ApiModelProperty
(
"月份"
)
private
Integer
month
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
"开始时间"
)
private
LocalDateTime
startTime
;
...
...
server-service/src/main/java/com/makeit/service/platform/elder/PlatElderReportMonthService.java
View file @
ef50e72c
package
com
.
makeit
.
service
.
platform
.
elder
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.dto.platform.elder.PlatElderReportDTO
;
import
com.makeit.entity.platform.elder.PlatElderReportMonth
;
import
com.makeit.vo.platform.elder.report.day.PlatElderReportMonthVO
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
/**
* <p>
...
...
@@ -13,4 +19,7 @@ import com.makeit.entity.platform.elder.PlatElderReportMonth;
*/
public
interface
PlatElderReportMonthService
extends
IService
<
PlatElderReportMonth
>
{
List
<
PlatElderReportMonthVO
>
reportMonth
(
PlatElderReportDTO
platElderIdDTO
);
}
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderDayReportDayServiceImpl.java
View file @
ef50e72c
...
...
@@ -105,7 +105,7 @@ public class PlatElderDayReportDayServiceImpl implements PlatElderDayReportDaySe
LocalDateTime
start
=
dayStartNow
(
now
);
LocalDateTime
end
=
dayEndNow
(
now
);
List
<
PlatElderSleepDiagramVO
>
voList
=
new
ArrayList
<>(
10
)
;
List
<
PlatElderSleepDiagramVO
>
voList
;
String
nowString
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
).
format
(
now
);
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderReportMonthServiceImpl.java
View file @
ef50e72c
package
com
.
makeit
.
service
.
platform
.
elder
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.makeit.dto.platform.elder.PlatElderReportDTO
;
import
com.makeit.entity.platform.elder.PlatElderReportMonth
;
import
com.makeit.mapper.platform.elder.PlatElderReportMonthMapper
;
import
com.makeit.service.platform.elder.PlatElderReportMonthService
;
import
com.makeit.utils.data.convert.BeanDtoVoUtils
;
import
com.makeit.utils.data.convert.StreamUtil
;
import
com.makeit.utils.time.LocalDateTimeUtils
;
import
com.makeit.vo.platform.elder.report.day.PlatElderReportMonthVO
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
* <p>
* 长者月报 服务实现类
...
...
@@ -17,4 +26,20 @@ import org.springframework.stereotype.Service;
@Service
public
class
PlatElderReportMonthServiceImpl
extends
ServiceImpl
<
PlatElderReportMonthMapper
,
PlatElderReportMonth
>
implements
PlatElderReportMonthService
{
@Override
public
List
<
PlatElderReportMonthVO
>
reportMonth
(
PlatElderReportDTO
platElderIdDTO
)
{
LocalDate
start
=
LocalDate
.
of
(
platElderIdDTO
.
getYear
(),
platElderIdDTO
.
getMonth
(),
1
);
LocalDate
end
=
LocalDateTimeUtils
.
getMonthMax
(
start
);
List
<
PlatElderReportMonth
>
monthList
=
list
(
new
QueryWrapper
<
PlatElderReportMonth
>().
lambda
()
.
eq
(
PlatElderReportMonth:
:
getElderId
,
platElderIdDTO
.
getElderId
())
.
ge
(
PlatElderReportMonth:
:
getDay
,
start
)
.
le
(
PlatElderReportMonth:
:
getDay
,
end
)
);
List
<
PlatElderReportMonthVO
>
voList
=
BeanDtoVoUtils
.
listVo
(
monthList
,
PlatElderReportMonthVO
.
class
);
return
voList
;
}
}
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