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
889f7e54
Commit
889f7e54
authored
Sep 21, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改曲线同步
parent
a26b01d7
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
84 additions
and
13 deletions
+84
-13
JpCollectorHistoryAllDto.java
...os/boot/module/hygf/api/dto/JpCollectorHistoryAllDto.java
+1
-0
JpCollectorHistoryYearDto.java
...s/boot/module/hygf/api/dto/JpCollectorHistoryYearDto.java
+3
-2
JpInvertorElecHistoryAllDto.java
...boot/module/hygf/api/dto/JpInvertorElecHistoryAllDto.java
+2
-0
JpInvertorElecHistoryMonthDto.java
...ot/module/hygf/api/dto/JpInvertorElecHistoryMonthDto.java
+1
-0
JpInvertorElecHistoryYearDto.java
...oot/module/hygf/api/dto/JpInvertorElecHistoryYearDto.java
+7
-6
TdHygfJpInvertorElecHistoryDto.java
...t/module/hygf/api/dto/TdHygfJpInvertorElecHistoryDto.java
+2
-0
TdHygfJpCollectorHistoryServiceImpl.java
...biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
+35
-2
TdHygfJpInvertorElecHistoryServiceImpl.java
.../service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
+33
-3
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpCollectorHistoryAllDto.java
View file @
889f7e54
...
...
@@ -35,4 +35,5 @@ public class JpCollectorHistoryAllDto {
@ApiModelProperty
(
value
=
"年"
)
private
String
year
;
private
long
createdTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpCollectorHistoryYearDto.java
View file @
889f7e54
...
...
@@ -14,12 +14,11 @@ import java.util.Date;
* @date 2023-09-20
*/
@Data
@ApiModel
(
value
=
"JpCollectorHistoryYearDto"
,
description
=
"户用光伏监盘采集器历史表"
)
@ApiModel
(
value
=
"JpCollectorHistoryYearDto"
,
description
=
"户用光伏监盘采集器历史表"
)
public
class
JpCollectorHistoryYearDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"sn编码"
)
private
String
snCode
;
...
...
@@ -38,4 +37,6 @@ public class JpCollectorHistoryYearDto {
@ApiModelProperty
(
value
=
"年"
)
private
String
year
;
private
long
createdTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInvertorElecHistoryAllDto.java
View file @
889f7e54
...
...
@@ -52,4 +52,6 @@ public class JpInvertorElecHistoryAllDto {
@ApiModelProperty
(
value
=
"年"
)
private
String
year
;
private
Long
createdTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInvertorElecHistoryMonthDto.java
View file @
889f7e54
...
...
@@ -56,4 +56,5 @@ public class JpInvertorElecHistoryMonthDto {
@ApiModelProperty
(
value
=
"年月"
)
private
String
yearMonth
;
private
Long
createdTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInvertorElecHistoryYearDto.java
View file @
889f7e54
...
...
@@ -15,12 +15,11 @@ import java.util.Date;
* @date 2023-09-20
*/
@Data
@ApiModel
(
value
=
"JpInvertorElecHistoryYearDto"
,
description
=
"户用光伏监盘逆变器电能历史表"
)
@ApiModel
(
value
=
"JpInvertorElecHistoryYearDto"
,
description
=
"户用光伏监盘逆变器电能历史表"
)
public
class
JpInvertorElecHistoryYearDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"sn编码"
)
private
String
snCode
;
...
...
@@ -48,10 +47,12 @@ public class JpInvertorElecHistoryYearDto {
@ApiModelProperty
(
value
=
"第三方厂商标识"
)
private
String
thirdCode
;
@ApiModelProperty
(
value
=
"日期"
)
private
String
day
;
@ApiModelProperty
(
value
=
"月"
)
private
String
month
;
@ApiModelProperty
(
value
=
"年"
)
private
String
year
;
@ApiModelProperty
(
value
=
"年月"
)
private
String
yearMonth
;
private
Long
createdTime
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/TdHygfJpInvertorElecHistoryDto.java
View file @
889f7e54
...
...
@@ -51,4 +51,6 @@ public class TdHygfJpInvertorElecHistoryDto {
@ApiModelProperty
(
value
=
"第三方厂商标识"
)
private
String
thirdCode
;
private
Long
createdTime
;
}
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 @
889f7e54
...
...
@@ -14,6 +14,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryYearDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInvertorElecHistoryYearDto
;
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
;
...
...
@@ -111,22 +113,52 @@ public class TdHygfJpCollectorHistoryServiceImpl
monthList
.
get
(
i
).
put
(
"day"
,
day
);
monthList
.
get
(
i
).
put
(
"year_month"
,
year
+
"-"
+
month
);
}
if
(!
monthList
.
isEmpty
())
{
this
.
baseMapper
.
updateMonth
(
monthList
);
// 年表
List
<
Map
<
String
,
Object
>>
yearList
=
this
.
baseMapper
.
monthToYear
(
String
.
valueOf
(
year
+
"-"
+
month
));
List
<
JpCollectorHistoryYearDto
>
oldYearList
=
this
.
baseMapper
.
yearList
(
null
,
null
,
String
.
valueOf
(
year
));
for
(
int
i
=
0
;
i
<
yearList
.
size
();
i
++)
{
yearList
.
get
(
i
).
put
(
"created_time"
,
dayTime
.
getTime
()
+
i
);
Map
<
String
,
Object
>
map
=
yearList
.
get
(
i
);
long
time
=
dayTime
.
getTime
()
+
i
;
for
(
JpCollectorHistoryYearDto
dto
:
oldYearList
)
{
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
))
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
))
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
))
&&
dto
.
getMonth
().
equals
(
map
.
get
(
"month"
)))
{
time
=
dto
.
getCreatedTime
();
break
;
}
}
yearList
.
get
(
i
).
put
(
"created_time"
,
time
);
yearList
.
get
(
i
).
put
(
"month"
,
month
);
yearList
.
get
(
i
).
put
(
"year"
,
year
);
}
if
(!
yearList
.
isEmpty
())
{
this
.
baseMapper
.
updateYear
(
yearList
);
// 总表
List
<
Map
<
String
,
Object
>>
allList
=
this
.
baseMapper
.
yearToAll
(
String
.
valueOf
(
year
));
List
<
JpCollectorHistoryAllDto
>
oldAllList
=
this
.
baseMapper
.
allList
(
null
,
null
);
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++)
{
allList
.
get
(
i
).
put
(
"created_time"
,
dayTime
.
getTime
()
+
i
);
Map
<
String
,
Object
>
map
=
allList
.
get
(
i
);
long
time
=
dayTime
.
getTime
()
+
i
;
for
(
JpCollectorHistoryAllDto
dto
:
oldAllList
)
{
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
))
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
))
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
)))
{
time
=
dto
.
getCreatedTime
();
break
;
}
}
allList
.
get
(
i
).
put
(
"created_time"
,
time
);
allList
.
get
(
i
).
put
(
"year"
,
year
);
}
if
(!
allList
.
isEmpty
())
{
this
.
baseMapper
.
updateAll
(
allList
);
}
}
}
return
null
;
}
}
\ No newline at end of file
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 @
889f7e54
...
...
@@ -96,7 +96,6 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
return
new
ArrayList
<>();
}
public
Object
syncData
()
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
add
(
Calendar
.
DATE
,
-
1
);
...
...
@@ -112,22 +111,52 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
monthList
.
get
(
i
).
put
(
"day"
,
day
);
monthList
.
get
(
i
).
put
(
"year_month"
,
year
+
"-"
+
month
);
}
if
(!
monthList
.
isEmpty
())
{
this
.
baseMapper
.
updateMonth
(
monthList
);
// 年表
List
<
Map
<
String
,
Object
>>
yearList
=
this
.
baseMapper
.
monthToYear
(
String
.
valueOf
(
year
+
"-"
+
month
));
List
<
JpInvertorElecHistoryYearDto
>
oldYearList
=
this
.
baseMapper
.
yearList
(
null
,
null
,
String
.
valueOf
(
year
));
for
(
int
i
=
0
;
i
<
yearList
.
size
();
i
++)
{
yearList
.
get
(
i
).
put
(
"created_time"
,
dayTime
.
getTime
()
+
i
);
Map
<
String
,
Object
>
map
=
yearList
.
get
(
i
);
long
time
=
dayTime
.
getTime
()
+
i
;
for
(
JpInvertorElecHistoryYearDto
dto
:
oldYearList
)
{
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
))
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
))
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
))
&&
dto
.
getMonth
().
equals
(
map
.
get
(
"month"
)))
{
time
=
dto
.
getCreatedTime
();
break
;
}
}
yearList
.
get
(
i
).
put
(
"created_time"
,
time
);
yearList
.
get
(
i
).
put
(
"month"
,
month
);
yearList
.
get
(
i
).
put
(
"year"
,
year
);
}
if
(!
yearList
.
isEmpty
())
{
this
.
baseMapper
.
updateYear
(
yearList
);
// 总表
List
<
Map
<
String
,
Object
>>
allList
=
this
.
baseMapper
.
yearToAll
(
String
.
valueOf
(
year
));
List
<
JpInvertorElecHistoryAllDto
>
oldAllList
=
this
.
baseMapper
.
allList
(
null
,
null
);
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++)
{
allList
.
get
(
i
).
put
(
"created_time"
,
dayTime
.
getTime
()
+
i
);
Map
<
String
,
Object
>
map
=
allList
.
get
(
i
);
long
time
=
dayTime
.
getTime
()
+
i
;
for
(
JpInvertorElecHistoryAllDto
dto
:
oldAllList
)
{
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
))
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
))
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
)))
{
time
=
dto
.
getCreatedTime
();
break
;
}
}
allList
.
get
(
i
).
put
(
"created_time"
,
time
);
allList
.
get
(
i
).
put
(
"year"
,
year
);
}
if
(!
allList
.
isEmpty
())
{
this
.
baseMapper
.
updateAll
(
allList
);
}
}
}
return
null
;
}
}
\ 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