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
e1bdb089
authored
Sep 26, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:修复bug
parent
09ae7133
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
96 additions
and
6 deletions
saas-module/src/main/java/com/makeit/controller/analysis/SaasModelManageController.java
saas-module/src/main/java/com/makeit/controller/analysis/SaasReportManageController.java
server-service/src/main/java/com/makeit/service/saas/SaasModelManageService.java
server-service/src/main/java/com/makeit/service/saas/SaasReportManageService.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasDiseaseEvaluateReportServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasDiseaseModelServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasElderReportConfigServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasModelManageServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasReportManageServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasSleepAnalysisModelServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasSleepEvaluateReportServiceImpl.java
saas-module/src/main/java/com/makeit/controller/analysis/SaasModelManageController.java
View file @
e1bdb089
...
@@ -2,7 +2,7 @@ package com.makeit.controller.analysis;
...
@@ -2,7 +2,7 @@ package com.makeit.controller.analysis;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.makeit.common.dto.
Base
NameDTO
;
import
com.makeit.common.dto.
Common
NameDTO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.entity.saas.analysis.SaasModelManage
;
import
com.makeit.entity.saas.analysis.SaasModelManage
;
...
@@ -39,7 +39,7 @@ public class SaasModelManageController {
...
@@ -39,7 +39,7 @@ public class SaasModelManageController {
@Action
(
module
=
"数据分析-模型管理"
,
name
=
"分页列表"
,
code
=
"saas:modelManage:page"
)
@Action
(
module
=
"数据分析-模型管理"
,
name
=
"分页列表"
,
code
=
"saas:modelManage:page"
)
@ApiOperation
(
"分页列表"
)
@ApiOperation
(
"分页列表"
)
@PostMapping
(
"list"
)
@PostMapping
(
"list"
)
public
ApiResponseEntity
<
List
<
SaasModelManage
>>
list
(
@RequestBody
Base
NameDTO
dto
)
{
public
ApiResponseEntity
<
List
<
SaasModelManage
>>
list
(
@RequestBody
Common
NameDTO
dto
)
{
return
ApiResponseUtils
.
success
(
saasModelManageService
.
list
(
new
QueryWrapper
<
SaasModelManage
>().
lambda
()
return
ApiResponseUtils
.
success
(
saasModelManageService
.
list
(
new
QueryWrapper
<
SaasModelManage
>().
lambda
()
.
like
(
StringUtils
.
isNotEmpty
(
dto
.
getName
()),
SaasModelManage:
:
getName
,
dto
.
getName
())));
.
like
(
StringUtils
.
isNotEmpty
(
dto
.
getName
()),
SaasModelManage:
:
getName
,
dto
.
getName
())));
}
}
...
...
saas-module/src/main/java/com/makeit/controller/analysis/SaasReportManageController.java
View file @
e1bdb089
...
@@ -2,13 +2,11 @@ package com.makeit.controller.analysis;
...
@@ -2,13 +2,11 @@ package com.makeit.controller.analysis;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.makeit.common.dto.
Base
NameDTO
;
import
com.makeit.common.dto.
Common
NameDTO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.entity.saas.analysis.SaasModelManage
;
import
com.makeit.entity.saas.analysis.SaasReportManage
;
import
com.makeit.entity.saas.analysis.SaasReportManage
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.global.annotation.Action
;
import
com.makeit.service.saas.SaasModelManageService
;
import
com.makeit.service.saas.SaasReportManageService
;
import
com.makeit.service.saas.SaasReportManageService
;
import
com.makeit.utils.old.StringUtils
;
import
com.makeit.utils.old.StringUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -41,7 +39,7 @@ public class SaasReportManageController {
...
@@ -41,7 +39,7 @@ public class SaasReportManageController {
@Action
(
module
=
"数据分析-报告管理"
,
name
=
"分页列表"
,
code
=
"saas:reportManage:page"
)
@Action
(
module
=
"数据分析-报告管理"
,
name
=
"分页列表"
,
code
=
"saas:reportManage:page"
)
@ApiOperation
(
"分页列表"
)
@ApiOperation
(
"分页列表"
)
@PostMapping
(
"list"
)
@PostMapping
(
"list"
)
public
ApiResponseEntity
<
List
<
SaasReportManage
>>
list
(
@RequestBody
Base
NameDTO
dto
){
public
ApiResponseEntity
<
List
<
SaasReportManage
>>
list
(
@RequestBody
Common
NameDTO
dto
){
return
ApiResponseUtils
.
success
(
saasReportManageService
.
list
(
new
QueryWrapper
<
SaasReportManage
>().
lambda
()
return
ApiResponseUtils
.
success
(
saasReportManageService
.
list
(
new
QueryWrapper
<
SaasReportManage
>().
lambda
()
.
like
(
StringUtils
.
isNotEmpty
(
dto
.
getName
()),
SaasReportManage:
:
getName
,
dto
.
getName
())));
.
like
(
StringUtils
.
isNotEmpty
(
dto
.
getName
()),
SaasReportManage:
:
getName
,
dto
.
getName
())));
}
}
...
...
server-service/src/main/java/com/makeit/service/saas/SaasModelManageService.java
View file @
e1bdb089
...
@@ -13,4 +13,5 @@ import com.makeit.entity.saas.analysis.SaasModelManage;
...
@@ -13,4 +13,5 @@ import com.makeit.entity.saas.analysis.SaasModelManage;
*/
*/
public
interface
SaasModelManageService
extends
IService
<
SaasModelManage
>
{
public
interface
SaasModelManageService
extends
IService
<
SaasModelManage
>
{
void
updateEntity
(
String
id
,
String
sleep
);
}
}
server-service/src/main/java/com/makeit/service/saas/SaasReportManageService.java
View file @
e1bdb089
...
@@ -13,4 +13,5 @@ import com.makeit.entity.saas.analysis.SaasReportManage;
...
@@ -13,4 +13,5 @@ import com.makeit.entity.saas.analysis.SaasReportManage;
*/
*/
public
interface
SaasReportManageService
extends
IService
<
SaasReportManage
>
{
public
interface
SaasReportManageService
extends
IService
<
SaasReportManage
>
{
void
updateEntity
(
String
id
,
String
sleep
);
}
}
server-service/src/main/java/com/makeit/service/saas/impl/SaasDiseaseEvaluateReportServiceImpl.java
View file @
e1bdb089
...
@@ -6,8 +6,11 @@ import com.makeit.dto.saas.analysis.SaasDiseaseEvaluateReportDTO;
...
@@ -6,8 +6,11 @@ import com.makeit.dto.saas.analysis.SaasDiseaseEvaluateReportDTO;
import
com.makeit.entity.saas.analysis.SaasDiseaseEvaluateReport
;
import
com.makeit.entity.saas.analysis.SaasDiseaseEvaluateReport
;
import
com.makeit.mapper.saas.analysis.SaasDiseaseEvaluateReportMapper
;
import
com.makeit.mapper.saas.analysis.SaasDiseaseEvaluateReportMapper
;
import
com.makeit.service.saas.SaasDiseaseEvaluateReportService
;
import
com.makeit.service.saas.SaasDiseaseEvaluateReportService
;
import
com.makeit.service.saas.SaasReportManageService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
/**
* <p>
* <p>
...
@@ -20,6 +23,8 @@ import org.springframework.stereotype.Service;
...
@@ -20,6 +23,8 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
SaasDiseaseEvaluateReportServiceImpl
extends
ServiceImpl
<
SaasDiseaseEvaluateReportMapper
,
SaasDiseaseEvaluateReport
>
implements
SaasDiseaseEvaluateReportService
{
public
class
SaasDiseaseEvaluateReportServiceImpl
extends
ServiceImpl
<
SaasDiseaseEvaluateReportMapper
,
SaasDiseaseEvaluateReport
>
implements
SaasDiseaseEvaluateReportService
{
@Autowired
private
SaasReportManageService
saasReportManageService
;
@Override
@Override
public
SaasDiseaseEvaluateReport
view
(
String
id
)
{
public
SaasDiseaseEvaluateReport
view
(
String
id
)
{
...
@@ -35,10 +40,14 @@ public class SaasDiseaseEvaluateReportServiceImpl extends ServiceImpl<SaasDiseas
...
@@ -35,10 +40,14 @@ public class SaasDiseaseEvaluateReportServiceImpl extends ServiceImpl<SaasDiseas
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
edit
(
SaasDiseaseEvaluateReportDTO
dto
)
{
public
void
edit
(
SaasDiseaseEvaluateReportDTO
dto
)
{
SaasDiseaseEvaluateReport
entity
=
getById
(
dto
.
getId
());
SaasDiseaseEvaluateReport
entity
=
getById
(
dto
.
getId
());
String
result
=
JSON
.
toJSONString
(
dto
.
getResultContent
());
String
result
=
JSON
.
toJSONString
(
dto
.
getResultContent
());
entity
.
setResultContent
(
result
);
entity
.
setResultContent
(
result
);
saveOrUpdate
(
entity
);
saveOrUpdate
(
entity
);
saasReportManageService
.
updateEntity
(
dto
.
getId
(),
"disease"
);
}
}
}
}
server-service/src/main/java/com/makeit/service/saas/impl/SaasDiseaseModelServiceImpl.java
View file @
e1bdb089
package
com
.
makeit
.
service
.
saas
.
impl
;
package
com
.
makeit
.
service
.
saas
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.makeit.dto.saas.analysis.SaasDiseaseModelDTO
;
import
com.makeit.dto.saas.analysis.SaasDiseaseModelDTO
;
import
com.makeit.entity.saas.analysis.SaasDiseaseModel
;
import
com.makeit.entity.saas.analysis.SaasDiseaseModel
;
import
com.makeit.entity.saas.analysis.SaasModelManage
;
import
com.makeit.mapper.saas.analysis.SaasDiseaseModelMapper
;
import
com.makeit.mapper.saas.analysis.SaasDiseaseModelMapper
;
import
com.makeit.service.saas.SaasDiseaseModelService
;
import
com.makeit.service.saas.SaasDiseaseModelService
;
import
com.makeit.service.saas.SaasModelManageService
;
import
com.makeit.utils.user.common.CommonUserUtil
;
import
com.makeit.utils.user.common.CommonUserVO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
...
@@ -20,6 +29,8 @@ import org.springframework.stereotype.Service;
...
@@ -20,6 +29,8 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
SaasDiseaseModelServiceImpl
extends
ServiceImpl
<
SaasDiseaseModelMapper
,
SaasDiseaseModel
>
implements
SaasDiseaseModelService
{
public
class
SaasDiseaseModelServiceImpl
extends
ServiceImpl
<
SaasDiseaseModelMapper
,
SaasDiseaseModel
>
implements
SaasDiseaseModelService
{
@Autowired
private
SaasModelManageService
saasModelManageService
;
@Override
@Override
public
SaasDiseaseModel
view
(
String
id
)
{
public
SaasDiseaseModel
view
(
String
id
)
{
...
@@ -34,9 +45,12 @@ public class SaasDiseaseModelServiceImpl extends ServiceImpl<SaasDiseaseModelMap
...
@@ -34,9 +45,12 @@ public class SaasDiseaseModelServiceImpl extends ServiceImpl<SaasDiseaseModelMap
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
edit
(
SaasDiseaseModelDTO
dto
)
{
public
void
edit
(
SaasDiseaseModelDTO
dto
)
{
SaasDiseaseModel
entity
=
getById
(
dto
.
getId
());
SaasDiseaseModel
entity
=
getById
(
dto
.
getId
());
BeanUtils
.
copyProperties
(
dto
,
entity
);
BeanUtils
.
copyProperties
(
dto
,
entity
);
saveOrUpdate
(
entity
);
saveOrUpdate
(
entity
);
saasModelManageService
.
updateEntity
(
dto
.
getId
(),
"sleep"
);
}
}
}
}
server-service/src/main/java/com/makeit/service/saas/impl/SaasElderReportConfigServiceImpl.java
View file @
e1bdb089
...
@@ -10,8 +10,11 @@ import com.makeit.entity.saas.analysis.SaasSleepEvaluateReport;
...
@@ -10,8 +10,11 @@ import com.makeit.entity.saas.analysis.SaasSleepEvaluateReport;
import
com.makeit.mapper.saas.analysis.SaasElderReportConfigMapper
;
import
com.makeit.mapper.saas.analysis.SaasElderReportConfigMapper
;
import
com.makeit.module.iot.vo.analysis.EvaluateReportVO
;
import
com.makeit.module.iot.vo.analysis.EvaluateReportVO
;
import
com.makeit.service.saas.SaasElderReportConfigService
;
import
com.makeit.service.saas.SaasElderReportConfigService
;
import
com.makeit.service.saas.SaasReportManageService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.List
;
...
@@ -26,6 +29,8 @@ import java.util.List;
...
@@ -26,6 +29,8 @@ import java.util.List;
@Service
@Service
public
class
SaasElderReportConfigServiceImpl
extends
ServiceImpl
<
SaasElderReportConfigMapper
,
SaasElderReportConfig
>
implements
SaasElderReportConfigService
{
public
class
SaasElderReportConfigServiceImpl
extends
ServiceImpl
<
SaasElderReportConfigMapper
,
SaasElderReportConfig
>
implements
SaasElderReportConfigService
{
@Autowired
private
SaasReportManageService
saasReportManageService
;
@Override
@Override
public
SaasElderReportConfig
view
(
String
id
)
{
public
SaasElderReportConfig
view
(
String
id
)
{
...
@@ -41,11 +46,15 @@ public class SaasElderReportConfigServiceImpl extends ServiceImpl<SaasElderRepor
...
@@ -41,11 +46,15 @@ public class SaasElderReportConfigServiceImpl extends ServiceImpl<SaasElderRepor
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
edit
(
SaasElderReportConfigDTO
dto
)
{
public
void
edit
(
SaasElderReportConfigDTO
dto
)
{
SaasElderReportConfig
entity
=
getById
(
dto
.
getId
());
SaasElderReportConfig
entity
=
getById
(
dto
.
getId
());
String
result
=
JSON
.
toJSONString
(
dto
.
getResultContent
());
String
result
=
JSON
.
toJSONString
(
dto
.
getResultContent
());
entity
.
setResultContent
(
result
);
entity
.
setResultContent
(
result
);
saveOrUpdate
(
entity
);
saveOrUpdate
(
entity
);
saasReportManageService
.
updateEntity
(
dto
.
getId
(),
"elder"
);
}
}
@Override
@Override
...
...
server-service/src/main/java/com/makeit/service/saas/impl/SaasModelManageServiceImpl.java
View file @
e1bdb089
package
com
.
makeit
.
service
.
saas
.
impl
;
package
com
.
makeit
.
service
.
saas
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.makeit.entity.saas.analysis.SaasModelManage
;
import
com.makeit.entity.saas.analysis.SaasModelManage
;
import
com.makeit.mapper.saas.analysis.SaasModelManageMapper
;
import
com.makeit.mapper.saas.analysis.SaasModelManageMapper
;
import
com.makeit.service.saas.SaasModelManageService
;
import
com.makeit.service.saas.SaasModelManageService
;
import
com.makeit.utils.user.common.CommonUserUtil
;
import
com.makeit.utils.user.common.CommonUserVO
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
* 模型管理 服务实现类
* 模型管理 服务实现类
...
@@ -17,4 +22,16 @@ import org.springframework.stereotype.Service;
...
@@ -17,4 +22,16 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
SaasModelManageServiceImpl
extends
ServiceImpl
<
SaasModelManageMapper
,
SaasModelManage
>
implements
SaasModelManageService
{
public
class
SaasModelManageServiceImpl
extends
ServiceImpl
<
SaasModelManageMapper
,
SaasModelManage
>
implements
SaasModelManageService
{
@Override
public
void
updateEntity
(
String
id
,
String
type
)
{
SaasModelManage
saasModelManage
=
getOne
(
new
QueryWrapper
<
SaasModelManage
>().
lambda
()
.
eq
(
SaasModelManage:
:
getModelId
,
id
)
.
eq
(
SaasModelManage:
:
getModelType
,
type
));
CommonUserVO
commonUserVO
=
CommonUserUtil
.
getUser
();
if
(
saasModelManage
!=
null
)
{
saasModelManage
.
setUpdateBy
(
commonUserVO
==
null
?
""
:
commonUserVO
.
getName
());
saasModelManage
.
setUpdateDate
(
LocalDateTime
.
now
());
}
}
}
}
server-service/src/main/java/com/makeit/service/saas/impl/SaasReportManageServiceImpl.java
View file @
e1bdb089
package
com
.
makeit
.
service
.
saas
.
impl
;
package
com
.
makeit
.
service
.
saas
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.makeit.entity.saas.analysis.SaasModelManage
;
import
com.makeit.entity.saas.analysis.SaasReportManage
;
import
com.makeit.entity.saas.analysis.SaasReportManage
;
import
com.makeit.mapper.saas.analysis.SaasReportManageMapper
;
import
com.makeit.mapper.saas.analysis.SaasReportManageMapper
;
import
com.makeit.service.saas.SaasReportManageService
;
import
com.makeit.service.saas.SaasReportManageService
;
import
com.makeit.utils.user.common.CommonUserUtil
;
import
com.makeit.utils.user.common.CommonUserVO
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
* 报告管理 服务实现类
* 报告管理 服务实现类
...
@@ -17,4 +23,16 @@ import org.springframework.stereotype.Service;
...
@@ -17,4 +23,16 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
SaasReportManageServiceImpl
extends
ServiceImpl
<
SaasReportManageMapper
,
SaasReportManage
>
implements
SaasReportManageService
{
public
class
SaasReportManageServiceImpl
extends
ServiceImpl
<
SaasReportManageMapper
,
SaasReportManage
>
implements
SaasReportManageService
{
@Override
public
void
updateEntity
(
String
id
,
String
type
)
{
SaasReportManage
saasReportManage
=
getOne
(
new
QueryWrapper
<
SaasReportManage
>().
lambda
()
.
eq
(
SaasReportManage:
:
getReportId
,
id
)
.
eq
(
SaasReportManage:
:
getReportType
,
type
));
CommonUserVO
commonUserVO
=
CommonUserUtil
.
getUser
();
if
(
saasReportManage
!=
null
)
{
saasReportManage
.
setUpdateBy
(
commonUserVO
==
null
?
""
:
commonUserVO
.
getName
());
saasReportManage
.
setUpdateDate
(
LocalDateTime
.
now
());
}
}
}
}
server-service/src/main/java/com/makeit/service/saas/impl/SaasSleepAnalysisModelServiceImpl.java
View file @
e1bdb089
package
com
.
makeit
.
service
.
saas
.
impl
;
package
com
.
makeit
.
service
.
saas
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.makeit.dto.saas.analysis.SaasSleepAnalysisModelDTO
;
import
com.makeit.dto.saas.analysis.SaasSleepAnalysisModelDTO
;
import
com.makeit.entity.saas.analysis.SaasModelManage
;
import
com.makeit.entity.saas.analysis.SaasSleepAnalysisModel
;
import
com.makeit.entity.saas.analysis.SaasSleepAnalysisModel
;
import
com.makeit.mapper.saas.analysis.SaasSleepAnalysisModelMapper
;
import
com.makeit.mapper.saas.analysis.SaasSleepAnalysisModelMapper
;
import
com.makeit.service.saas.SaasModelManageService
;
import
com.makeit.service.saas.SaasSleepAnalysisModelService
;
import
com.makeit.service.saas.SaasSleepAnalysisModelService
;
import
com.makeit.utils.user.common.CommonUserUtil
;
import
com.makeit.utils.user.common.CommonUserVO
;
import
com.makeit.utils.user.saas.SaasUserUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
/**
/**
* <p>
* <p>
...
@@ -20,6 +30,8 @@ import org.springframework.stereotype.Service;
...
@@ -20,6 +30,8 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
SaasSleepAnalysisModelServiceImpl
extends
ServiceImpl
<
SaasSleepAnalysisModelMapper
,
SaasSleepAnalysisModel
>
implements
SaasSleepAnalysisModelService
{
public
class
SaasSleepAnalysisModelServiceImpl
extends
ServiceImpl
<
SaasSleepAnalysisModelMapper
,
SaasSleepAnalysisModel
>
implements
SaasSleepAnalysisModelService
{
@Autowired
private
SaasModelManageService
saasModelManageService
;
@Override
@Override
public
SaasSleepAnalysisModel
view
(
String
id
)
{
public
SaasSleepAnalysisModel
view
(
String
id
)
{
...
@@ -34,9 +46,13 @@ public class SaasSleepAnalysisModelServiceImpl extends ServiceImpl<SaasSleepAnal
...
@@ -34,9 +46,13 @@ public class SaasSleepAnalysisModelServiceImpl extends ServiceImpl<SaasSleepAnal
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
edit
(
SaasSleepAnalysisModelDTO
dto
)
{
public
void
edit
(
SaasSleepAnalysisModelDTO
dto
)
{
SaasSleepAnalysisModel
entity
=
getById
(
dto
.
getId
());
SaasSleepAnalysisModel
entity
=
getById
(
dto
.
getId
());
BeanUtils
.
copyProperties
(
dto
,
entity
);
BeanUtils
.
copyProperties
(
dto
,
entity
);
saveOrUpdate
(
entity
);
saveOrUpdate
(
entity
);
saasModelManageService
.
updateEntity
(
dto
.
getId
(),
"disease"
);
}
}
}
}
server-service/src/main/java/com/makeit/service/saas/impl/SaasSleepEvaluateReportServiceImpl.java
View file @
e1bdb089
...
@@ -9,10 +9,12 @@ import com.makeit.entity.saas.analysis.SaasSleepEvaluateReport;
...
@@ -9,10 +9,12 @@ import com.makeit.entity.saas.analysis.SaasSleepEvaluateReport;
import
com.makeit.mapper.saas.analysis.SaasSleepEvaluateReportMapper
;
import
com.makeit.mapper.saas.analysis.SaasSleepEvaluateReportMapper
;
import
com.makeit.module.iot.vo.analysis.EvaluateReportVO
;
import
com.makeit.module.iot.vo.analysis.EvaluateReportVO
;
import
com.makeit.service.saas.SaasElderReportConfigService
;
import
com.makeit.service.saas.SaasElderReportConfigService
;
import
com.makeit.service.saas.SaasReportManageService
;
import
com.makeit.service.saas.SaasSleepEvaluateReportService
;
import
com.makeit.service.saas.SaasSleepEvaluateReportService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.List
;
...
@@ -29,6 +31,8 @@ public class SaasSleepEvaluateReportServiceImpl extends ServiceImpl<SaasSleepEva
...
@@ -29,6 +31,8 @@ public class SaasSleepEvaluateReportServiceImpl extends ServiceImpl<SaasSleepEva
@Autowired
@Autowired
private
SaasElderReportConfigService
saasElderReportConfigService
;
private
SaasElderReportConfigService
saasElderReportConfigService
;
@Autowired
private
SaasReportManageService
saasReportManageService
;
@Override
@Override
public
SaasSleepEvaluateReport
view
(
String
id
)
{
public
SaasSleepEvaluateReport
view
(
String
id
)
{
...
@@ -44,11 +48,14 @@ public class SaasSleepEvaluateReportServiceImpl extends ServiceImpl<SaasSleepEva
...
@@ -44,11 +48,14 @@ public class SaasSleepEvaluateReportServiceImpl extends ServiceImpl<SaasSleepEva
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
edit
(
SaasSleepEvaluateReportDTO
dto
)
{
public
void
edit
(
SaasSleepEvaluateReportDTO
dto
)
{
SaasSleepEvaluateReport
entity
=
getById
(
dto
.
getId
());
SaasSleepEvaluateReport
entity
=
getById
(
dto
.
getId
());
String
result
=
JSON
.
toJSONString
(
dto
.
getResultContent
());
String
result
=
JSON
.
toJSONString
(
dto
.
getResultContent
());
entity
.
setResultContent
(
result
);
entity
.
setResultContent
(
result
);
saveOrUpdate
(
entity
);
saveOrUpdate
(
entity
);
saasReportManageService
.
updateEntity
(
dto
.
getId
(),
"sleep"
);
}
}
@Override
@Override
...
...
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