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
bf1a96c7
Commit
bf1a96c7
authored
Sep 20, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
84b0794c
f86040ee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
132 additions
and
4 deletions
+132
-4
TdHygfJpCollectorHistoryMapper.java
...gf/api/tdenginemapper/TdHygfJpCollectorHistoryMapper.java
+12
-2
TdHygfJpCollectorHistoryMapper.xml
...ources/mapper/tdengine/TdHygfJpCollectorHistoryMapper.xml
+40
-1
TdHygfJpCollectorHistoryController.java
...gf/biz/controller/TdHygfJpCollectorHistoryController.java
+38
-0
TdHygfJpCollectorHistoryServiceImpl.java
...biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
+42
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/TdHygfJpCollectorHistoryMapper.java
View file @
bf1a96c7
...
...
@@ -16,6 +16,16 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory;
*/
public
interface
TdHygfJpCollectorHistoryMapper
extends
BaseMapper
<
TdHygfJpCollectorHistory
>
{
List
<
TdHygfJpCollectorHistoryDto
>
dayList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"startTime"
)
long
startTime
,
@Param
(
"endTime"
)
long
endTime
);
List
<
TdHygfJpCollectorHistoryDto
>
dayList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"startTime"
)
long
startTime
,
@Param
(
"endTime"
)
long
endTime
);
List
<
TdHygfJpCollectorHistoryDto
>
monthList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"month"
)
String
month
);
List
<
TdHygfJpCollectorHistoryDto
>
yearList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"year"
)
String
year
);
List
<
TdHygfJpCollectorHistoryDto
>
allList
(
@Param
(
"snCode"
)
String
snCode
,
@Param
(
"thirdStationId"
)
String
thirdStationId
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/TdHygfJpCollectorHistoryMapper.xml
View file @
bf1a96c7
...
...
@@ -7,7 +7,7 @@
<if
test=
"snCode!=null"
>
AND `sn_code` = #{snCode}
</if>
<if
test=
"thirdStationId!=null"
>
<if
test=
"thirdStationId!=null"
>
AND `third_station_id` = #{thirdStationId}
</if>
<if
test=
"startTime!=null and endTime!=null"
>
...
...
@@ -15,4 +15,43 @@
</if>
</where>
</select>
<select
id=
"monthList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpCollectorHistoryMonthDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_collector_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.TdHygfJpCollectorHistoryYearDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_collector_history_month
<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=
"yearList"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpCollectorHistoryAllDto"
>
SELECT * FROM house_pv_data.td_hygf_jp_collector_history_month
<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/TdHygfJpCollectorHistoryController.java
View file @
bf1a96c7
...
...
@@ -131,4 +131,42 @@ public class TdHygfJpCollectorHistoryController extends BaseController {
@RequestParam
(
value
=
"day"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
day
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
dayList
(
id
,
day
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/month"
)
public
ResponseModel
<
List
<
TdHygfJpCollectorHistoryDto
>>
monthList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"month"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
Date
month
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
monthList
(
id
,
month
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/year"
)
public
ResponseModel
<
List
<
TdHygfJpCollectorHistoryDto
>>
yearList
(
@RequestParam
(
value
=
"id"
)
long
id
,
@RequestParam
(
value
=
"year"
)
@DateTimeFormat
(
pattern
=
"yyyy"
)
Date
year
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
yearList
(
id
,
year
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器历史表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器历史表列表全部数据查询"
)
@GetMapping
(
value
=
"/list/all"
)
public
ResponseModel
<
List
<
TdHygfJpCollectorHistoryDto
>>
allList
(
@RequestParam
(
value
=
"id"
)
long
id
)
{
return
ResponseHelper
.
buildResponse
(
tdHygfJpCollectorHistoryServiceImpl
.
allList
(
id
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
View file @
bf1a96c7
...
...
@@ -9,11 +9,13 @@ 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.TdHygfJpCollectorHistoryDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.TdHygfJpCollectorHistory
;
import
com.yeejoin.amos.boot.module.hygf.api.service.ITdHygfJpCollectorHistoryService
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.JpCollectorHistoryAllMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.JpCollectorHistoryMonthMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.JpCollectorHistoryYearMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpCollectorHistoryMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil
;
...
...
@@ -51,4 +53,42 @@ public class TdHygfJpCollectorHistoryServiceImpl
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpCollectorHistoryDto
>
monthList
(
long
id
,
Date
month
)
{
JpCollector
collector
=
jpCollectorServiceImpl
.
getById
(
id
);
if
(
collector
!=
null
)
{
return
this
.
baseMapper
.
monthList
(
collector
.
getSnCode
(),
collector
.
getThirdStationId
(),
month
.
toString
());
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpCollectorHistoryDto
>
yearList
(
long
id
,
Date
year
)
{
JpCollector
collector
=
jpCollectorServiceImpl
.
getById
(
id
);
if
(
collector
!=
null
)
{
return
this
.
baseMapper
.
yearList
(
collector
.
getSnCode
(),
collector
.
getThirdStationId
(),
year
.
toString
());
}
return
new
ArrayList
<>();
}
/**
* 列表查询 示例
*/
public
List
<
TdHygfJpCollectorHistoryDto
>
allList
(
long
id
)
{
JpCollector
collector
=
jpCollectorServiceImpl
.
getById
(
id
);
if
(
collector
!=
null
)
{
return
this
.
baseMapper
.
allList
(
collector
.
getSnCode
(),
collector
.
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