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
bc15e875
Commit
bc15e875
authored
Oct 23, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改日数据
parent
6f1a71f3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
5 deletions
+40
-5
JpCollectorHistoryMonthDto.java
.../boot/module/hygf/api/dto/JpCollectorHistoryMonthDto.java
+1
-1
TdHygfJpCollectorHistoryServiceImpl.java
...biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
+18
-0
TdHygfJpInvertorElecHistoryServiceImpl.java
.../service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
+21
-4
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpCollectorHistoryMonthDto.java
View file @
bc15e875
...
...
@@ -37,5 +37,5 @@ public class JpCollectorHistoryMonthDto {
@ApiModelProperty
(
value
=
"年月"
)
private
String
yearMonth
;
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 @
bc15e875
...
...
@@ -123,7 +123,25 @@ public class TdHygfJpCollectorHistoryServiceImpl
monthList
.
get
(
i
).
put
(
"year_month"
,
year
+
"-"
+
month
);
}
if
(!
monthList
.
isEmpty
())
{
List
<
JpCollectorHistoryMonthDto
>
listold
=
this
.
baseMapper
.
monthList
(
null
,
null
,
year
+
"-"
+
month
);
if
(
listold
!=
null
){
for
(
Map
<
String
,
Object
>
map
:
monthList
)
{
for
(
JpCollectorHistoryMonthDto
jpCollectorHistoryMonthDto
:
listold
)
{
if
(
map
.
get
(
"third_station_id"
).
toString
().
equals
(
jpCollectorHistoryMonthDto
.
getThirdStationId
())&&
map
.
get
(
"sn_code"
).
toString
().
equals
(
jpCollectorHistoryMonthDto
.
getSnCode
())){
map
.
put
(
"created_time"
,
jpCollectorHistoryMonthDto
.
getCreatedTime
())
;
}
}
}
this
.
baseMapper
.
updateMonth
(
monthList
);
}
else
{
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
));
...
...
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 @
bc15e875
...
...
@@ -6,16 +6,13 @@ import java.util.Date;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.TdHygfJpInvertorElecHistory
;
...
...
@@ -120,7 +117,27 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
monthList
.
get
(
i
).
put
(
"year_month"
,
year
+
"-"
+
month
);
}
if
(!
monthList
.
isEmpty
())
{
List
<
JpInvertorElecHistoryMonthDto
>
listold
=
this
.
baseMapper
.
monthList
(
null
,
null
,
year
+
"-"
+
month
);
if
(
listold
!=
null
)
{
for
(
Map
<
String
,
Object
>
map
:
monthList
)
{
for
(
JpInvertorElecHistoryMonthDto
jpInvertorElecHistoryMonthDto
:
listold
)
{
if
(
map
.
get
(
"third_station_id"
).
toString
().
equals
(
jpInvertorElecHistoryMonthDto
.
getThirdStationId
())&&
map
.
get
(
"sn_code"
).
toString
().
equals
(
jpInvertorElecHistoryMonthDto
.
getSnCode
()))
{
map
.
put
(
"created_time"
,
jpInvertorElecHistoryMonthDto
.
getCreatedTime
());
}
}
}
this
.
baseMapper
.
updateMonth
(
monthList
);
}
else
{
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
));
...
...
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