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
8d417b64
Commit
8d417b64
authored
Sep 21, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加更新曲线接口
parent
c21ffff0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
19 deletions
+29
-19
TdHygfJpCollectorHistoryServiceImpl.java
...biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
+16
-10
TdHygfJpInvertorElecHistoryServiceImpl.java
.../service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
+13
-9
No files found.
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 @
8d417b64
...
@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.JpCollectorHistoryAllDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryMonthDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorHistoryMonthDto
;
...
@@ -120,19 +121,22 @@ public class TdHygfJpCollectorHistoryServiceImpl
...
@@ -120,19 +121,22 @@ public class TdHygfJpCollectorHistoryServiceImpl
List
<
JpCollectorHistoryYearDto
>
oldYearList
=
this
.
baseMapper
.
yearList
(
null
,
null
,
String
.
valueOf
(
year
));
List
<
JpCollectorHistoryYearDto
>
oldYearList
=
this
.
baseMapper
.
yearList
(
null
,
null
,
String
.
valueOf
(
year
));
for
(
int
i
=
0
;
i
<
yearList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
yearList
.
size
();
i
++)
{
Map
<
String
,
Object
>
map
=
yearList
.
get
(
i
);
Map
<
String
,
Object
>
map
=
yearList
.
get
(
i
);
map
.
put
(
"month"
,
month
);
map
.
put
(
"year"
,
year
);
long
time
=
dayTime
.
getTime
()
+
i
;
long
time
=
dayTime
.
getTime
()
+
i
;
for
(
JpCollectorHistoryYearDto
dto
:
oldYearList
)
{
for
(
JpCollectorHistoryYearDto
dto
:
oldYearList
)
{
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
))
&&
map
.
get
(
"third_station_id"
)
!=
null
&&
map
.
get
(
"sn_code"
)
!=
null
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
))
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
))
&&
map
.
get
(
"month"
)
!=
null
&&
map
.
get
(
"year"
)
!=
null
&&
dto
.
getMonth
().
equals
(
map
.
get
(
"month"
)))
{
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
).
toString
())
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
).
toString
())
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
).
toString
())
&&
dto
.
getMonth
().
equals
(
map
.
get
(
"month"
).
toString
()))
{
time
=
dto
.
getCreatedTime
();
time
=
dto
.
getCreatedTime
();
break
;
break
;
}
}
}
}
yearList
.
get
(
i
).
put
(
"created_time"
,
time
);
yearList
.
get
(
i
).
put
(
"created_time"
,
time
);
yearList
.
get
(
i
).
put
(
"month"
,
month
);
yearList
.
get
(
i
).
put
(
"year"
,
year
);
}
}
if
(!
yearList
.
isEmpty
())
{
if
(!
yearList
.
isEmpty
())
{
this
.
baseMapper
.
updateYear
(
yearList
);
this
.
baseMapper
.
updateYear
(
yearList
);
...
@@ -141,18 +145,20 @@ public class TdHygfJpCollectorHistoryServiceImpl
...
@@ -141,18 +145,20 @@ public class TdHygfJpCollectorHistoryServiceImpl
List
<
JpCollectorHistoryAllDto
>
oldAllList
=
this
.
baseMapper
.
allList
(
null
,
null
);
List
<
JpCollectorHistoryAllDto
>
oldAllList
=
this
.
baseMapper
.
allList
(
null
,
null
);
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++)
{
Map
<
String
,
Object
>
map
=
allList
.
get
(
i
);
Map
<
String
,
Object
>
map
=
allList
.
get
(
i
);
map
.
put
(
"year"
,
year
);
long
time
=
dayTime
.
getTime
()
+
i
;
long
time
=
dayTime
.
getTime
()
+
i
;
for
(
JpCollectorHistoryAllDto
dto
:
oldAllList
)
{
for
(
JpCollectorHistoryAllDto
dto
:
oldAllList
)
{
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
))
&&
map
.
get
(
"third_station_id"
)
!=
null
&&
map
.
get
(
"sn_code"
)
!=
null
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
))
&&
map
.
get
(
"year"
)
!=
null
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
)))
{
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
).
toString
())
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
).
toString
())
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
).
toString
()))
{
time
=
dto
.
getCreatedTime
();
time
=
dto
.
getCreatedTime
();
break
;
break
;
}
}
}
}
allList
.
get
(
i
).
put
(
"created_time"
,
time
);
map
.
put
(
"created_time"
,
time
);
allList
.
get
(
i
).
put
(
"year"
,
year
);
}
}
if
(!
allList
.
isEmpty
())
{
if
(!
allList
.
isEmpty
())
{
this
.
baseMapper
.
updateAll
(
allList
);
this
.
baseMapper
.
updateAll
(
allList
);
...
...
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 @
8d417b64
...
@@ -118,19 +118,21 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
...
@@ -118,19 +118,21 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
List
<
JpInvertorElecHistoryYearDto
>
oldYearList
=
this
.
baseMapper
.
yearList
(
null
,
null
,
String
.
valueOf
(
year
));
List
<
JpInvertorElecHistoryYearDto
>
oldYearList
=
this
.
baseMapper
.
yearList
(
null
,
null
,
String
.
valueOf
(
year
));
for
(
int
i
=
0
;
i
<
yearList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
yearList
.
size
();
i
++)
{
Map
<
String
,
Object
>
map
=
yearList
.
get
(
i
);
Map
<
String
,
Object
>
map
=
yearList
.
get
(
i
);
yearList
.
get
(
i
).
put
(
"year"
,
year
);
yearList
.
get
(
i
).
put
(
"month"
,
month
);
long
time
=
dayTime
.
getTime
()
+
i
;
long
time
=
dayTime
.
getTime
()
+
i
;
for
(
JpInvertorElecHistoryYearDto
dto
:
oldYearList
)
{
for
(
JpInvertorElecHistoryYearDto
dto
:
oldYearList
)
{
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
))
&&
map
.
get
(
"third_station_id"
)
!=
null
&&
map
.
get
(
"sn_code"
)
!=
null
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
))
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
))
&&
map
.
get
(
"month"
)
!=
null
&&
map
.
get
(
"year"
)
!=
null
&&
dto
.
getMonth
().
equals
(
map
.
get
(
"month"
)))
{
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
).
toString
())
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
).
toString
())
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
).
toString
())
&&
dto
.
getMonth
().
equals
(
map
.
get
(
"month"
).
toString
()))
{
time
=
dto
.
getCreatedTime
();
time
=
dto
.
getCreatedTime
();
break
;
break
;
}
}
}
}
yearList
.
get
(
i
).
put
(
"created_time"
,
time
);
yearList
.
get
(
i
).
put
(
"created_time"
,
time
);
yearList
.
get
(
i
).
put
(
"month"
,
month
);
yearList
.
get
(
i
).
put
(
"year"
,
year
);
}
}
if
(!
yearList
.
isEmpty
())
{
if
(!
yearList
.
isEmpty
())
{
this
.
baseMapper
.
updateYear
(
yearList
);
this
.
baseMapper
.
updateYear
(
yearList
);
...
@@ -139,18 +141,20 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
...
@@ -139,18 +141,20 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
List
<
JpInvertorElecHistoryAllDto
>
oldAllList
=
this
.
baseMapper
.
allList
(
null
,
null
);
List
<
JpInvertorElecHistoryAllDto
>
oldAllList
=
this
.
baseMapper
.
allList
(
null
,
null
);
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++)
{
Map
<
String
,
Object
>
map
=
allList
.
get
(
i
);
Map
<
String
,
Object
>
map
=
allList
.
get
(
i
);
allList
.
get
(
i
).
put
(
"year"
,
year
);
long
time
=
dayTime
.
getTime
()
+
i
;
long
time
=
dayTime
.
getTime
()
+
i
;
for
(
JpInvertorElecHistoryAllDto
dto
:
oldAllList
)
{
for
(
JpInvertorElecHistoryAllDto
dto
:
oldAllList
)
{
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
if
(
dto
.
getThirdStationId
()
!=
null
&&
dto
.
getSnCode
()
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
))
&&
map
.
get
(
"third_station_id"
)
!=
null
&&
map
.
get
(
"sn_code"
)
!=
null
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
))
&&
map
.
get
(
"year"
)
!=
null
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
)))
{
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
).
toString
())
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
).
toString
())
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
).
toString
()))
{
time
=
dto
.
getCreatedTime
();
time
=
dto
.
getCreatedTime
();
break
;
break
;
}
}
}
}
allList
.
get
(
i
).
put
(
"created_time"
,
time
);
allList
.
get
(
i
).
put
(
"created_time"
,
time
);
allList
.
get
(
i
).
put
(
"year"
,
year
);
}
}
if
(!
allList
.
isEmpty
())
{
if
(!
allList
.
isEmpty
())
{
this
.
baseMapper
.
updateAll
(
allList
);
this
.
baseMapper
.
updateAll
(
allList
);
...
...
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