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
1aebbe6d
Commit
1aebbe6d
authored
Sep 20, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加曲线接口
parent
23cab297
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
133 additions
and
12 deletions
+133
-12
TdHygfJpInvertorElecHistoryDto.java
...t/module/hygf/api/dto/TdHygfJpInvertorElecHistoryDto.java
+0
-3
TdHygfJpInvertorElecHistory.java
...t/module/hygf/api/entity/TdHygfJpInvertorElecHistory.java
+0
-6
TdHygfJpInvertorElecHistoryMapper.java
...api/tdenginemapper/TdHygfJpInvertorElecHistoryMapper.java
+12
-0
TdHygfJpInvertorElecHistoryMapper.xml
...ces/mapper/tdengine/TdHygfJpInvertorElecHistoryMapper.xml
+39
-0
TdHygfJpInvertorElecHistoryController.java
...biz/controller/TdHygfJpInvertorElecHistoryController.java
+41
-1
TdHygfJpInvertorElecHistoryServiceImpl.java
.../service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
+41
-2
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/TdHygfJpInvertorElecHistoryDto.java
View file @
1aebbe6d
...
...
@@ -42,9 +42,6 @@ public class TdHygfJpInvertorElecHistoryDto {
@ApiModelProperty
(
value
=
"W交流电流"
)
private
Double
wAcCurrent
;
@ApiModelProperty
(
value
=
"品牌"
)
private
String
brand
;
@ApiModelProperty
(
value
=
"时间"
)
private
Long
time
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/TdHygfJpInvertorElecHistory.java
View file @
1aebbe6d
...
...
@@ -64,12 +64,6 @@ public class TdHygfJpInvertorElecHistory {
private
Double
wAcCurrent
;
/**
* 品牌
*/
@TableField
(
"brand"
)
private
String
brand
;
/**
* 时间
*/
@TableField
(
"time"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHygfJpInvertorElecHistoryMapper.java
View file @
1aebbe6d
...
...
@@ -5,6 +5,9 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
...
...
@@ -19,4 +22,13 @@ public interface TdHygfJpInvertorElecHistoryMapper extends BaseMapper<TdHygfJpIn
List
<
TdHygfJpInvertorElecHistoryDto
>
dayList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"startTime"
)
long
startTime
,
@Param
(
"endTime"
)
long
endTime
);
List
<
JpInvertorElecHistoryMonthDto
>
monthList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"month"
)
String
month
);
List
<
JpInvertorElecHistoryYearDto
>
yearList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"year"
)
String
year
);
List
<
JpInvertorElecHistoryAllDto
>
allList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpInvertorElecHistoryMapper.xml
View file @
1aebbe6d
...
...
@@ -15,4 +15,43 @@
</if>
</where>
</select>
<select
id=
"monthList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryMonthDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_invertor_elec_history_month
<where>
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
</if>
<if
test=
"thirdStationId!=null"
>
AND `third_station_id` = #{thirdStationId}
</if>
<if
test=
"month!=null"
>
AND year_month = #{month}
</if>
</where>
</select>
<select
id=
"yearList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_invertor_elec_history_year
<where>
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
</if>
<if
test=
"thirdStationId!=null"
>
AND `third_station_id` = #{thirdStationId}
</if>
<if
test=
"year!=null"
>
AND year = #{year}
</if>
</where>
</select>
<select
id=
"allList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_invertor_elec_history_all
<where>
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
</if>
<if
test=
"thirdStationId!=null"
>
AND `third_station_id` = #{thirdStationId}
</if>
</where>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/TdHygfJpInvertorElecHistoryController.java
View file @
1aebbe6d
...
...
@@ -23,8 +23,10 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInvertorElecHistoryServiceImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -131,4 +133,42 @@ public class TdHygfJpInvertorElecHistoryController extends BaseController {
@RequestParam
(
value
=
"day"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
day
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
dayList
(
id
,
day
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/month"
)
public
ResponseModel
<
List
<
JpInvertorElecHistoryMonthDto
>>
monthList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"month"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
Date
month
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
monthList
(
id
,
month
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/year"
)
public
ResponseModel
<
List
<
JpInvertorElecHistoryYearDto
>>
yearList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"year"
)
@DateTimeFormat
(
pattern
=
"yyyy"
)
Date
year
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
yearList
(
id
,
year
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/all"
)
public
ResponseModel
<
List
<
JpInvertorElecHistoryAllDto
>>
allList
(
@RequestParam
(
value
=
"id"
)
long
id
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpInvertorElecHistoryServiceImpl
.
allList
(
id
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
View file @
1aebbe6d
...
...
@@ -9,10 +9,12 @@ import org.springframework.stereotype.Service;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInvertorElecHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpInvertorElecHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpInvertorElecHistoryService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInvertorElecHistoryMapper
;
...
...
@@ -51,4 +53,40 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
JpInvertorElecHistoryMonthDto
>
monthList
(
long
id
,
Date
month
)
{
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
monthList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
(),
month
.
toString
());
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
JpInvertorElecHistoryYearDto
>
yearList
(
long
id
,
Date
year
)
{
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
yearList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
(),
year
.
toString
());
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
JpInvertorElecHistoryAllDto
>
allList
(
long
id
)
{
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
allList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
());
}
return
new
ArrayList
<>();
}
}
\ No newline at end of file
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