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
840f787c
Commit
840f787c
authored
Apr 02, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加td 电站数据存储
parent
eac91471
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
130 additions
and
1 deletion
+130
-1
TdJpStation.java
...ldapi/face/orm/houseapi/entity/tdeingine/TdJpStation.java
+23
-0
TdJpStationMapper.java
...seholdapi/face/orm/mapper/tdengine/TdJpStationMapper.java
+15
-0
GoLangDataAcquisitionServiceImpl.java
...i/face/service/impl/GoLangDataAcquisitionServiceImpl.java
+27
-0
ImasterDataServiceImpl.java
...ouseholdapi/face/service/impl/ImasterDataServiceImpl.java
+29
-1
KsolarDataAcquisitionServiceImpl.java
...i/face/service/impl/KsolarDataAcquisitionServiceImpl.java
+36
-0
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/houseapi/entity/tdeingine/TdJpStation.java
0 → 100644
View file @
840f787c
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
houseapi
.
entity
.
tdeingine
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @description:
* @author: tw
* @createDate: 2024/4/2
*/
@Data
@TableName
(
value
=
"td_hygf_jp_station"
,
autoResultMap
=
true
)
public
class
TdJpStation
implements
Serializable
{
private
Long
createdTime
;
private
String
thirdStationId
;
//采集电站id
private
String
regionalCompaniesCode
;
//区域公司code
private
String
amosCompanyCode
;
//经销商code
private
String
thirdCode
;
//厂商标识
}
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/orm/mapper/tdengine/TdJpStationMapper.java
0 → 100644
View file @
840f787c
package
com
.
yeejoin
.
amos
.
api
.
householdapi
.
face
.
orm
.
mapper
.
tdengine
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.api.householdapi.face.orm.houseapi.entity.tdeingine.TdJpStation
;
/**
* @description:
* @author: tw
* @createDate: 2024/4/2
*/
public
interface
TdJpStationMapper
extends
BaseMapper
<
TdJpStation
>
{
}
\ No newline at end of file
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/GoLangDataAcquisitionServiceImpl.java
View file @
840f787c
...
@@ -101,6 +101,10 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -101,6 +101,10 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
@Autowired
@Autowired
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
@Autowired
TdJpStationMapper
tdJpStationMapper
;
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Scheduled
(
cron
=
"${dataRequstScheduled.jinlangyun}"
)
@Async
@Async
...
@@ -204,6 +208,29 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
...
@@ -204,6 +208,29 @@ public class GoLangDataAcquisitionServiceImpl implements GoLangDataAcquisitionSe
}
else
{
}
else
{
jpStationMapper
.
insert
(
jpStation
);
jpStationMapper
.
insert
(
jpStation
);
}
}
//增加td 电站区域公司,经销商绑定表
TdJpStation
tdJpStation
=
tdJpStationMapper
.
selectOne
(
new
QueryWrapper
<
TdJpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
JLY
.
getCode
()).
eq
(
"third_station_id"
,
stationIds
.
get
(
i
)));
//判断是否存在
if
(
ObjectUtils
.
isEmpty
(
tdJpStation
))
{
tdJpStation
=
new
TdJpStation
();
}
tdJpStation
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdJpStation
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdJpStation
.
setThirdStationId
(
stationIds
.
get
(
i
));
tdJpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
tdJpStation
.
setCreatedTime
(
System
.
currentTimeMillis
());
if
(!
ObjectUtils
.
isEmpty
(
tdJpStation
.
getCreatedTime
()))
{
tdJpStationMapper
.
updateById
(
tdJpStation
);
}
else
{
tdJpStationMapper
.
insert
(
tdJpStation
);
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/ImasterDataServiceImpl.java
View file @
840f787c
...
@@ -114,7 +114,8 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -114,7 +114,8 @@ public class ImasterDataServiceImpl implements ImasterDataService {
private
TdHYGFStationYearGenerateMapper
tdHYGFStationYearGenerateMapper
;
private
TdHYGFStationYearGenerateMapper
tdHYGFStationYearGenerateMapper
;
@Autowired
@Autowired
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
@Autowired
TdJpStationMapper
tdJpStationMapper
;
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Scheduled
(
cron
=
"${dataRequstScheduled.huawei}"
)
@Override
@Override
...
@@ -299,6 +300,33 @@ public class ImasterDataServiceImpl implements ImasterDataService {
...
@@ -299,6 +300,33 @@ public class ImasterDataServiceImpl implements ImasterDataService {
}
else
{
}
else
{
jpStationMapper
.
insert
(
jpStation
);
jpStationMapper
.
insert
(
jpStation
);
}
}
//增加td 电站区域公司,经销商绑定表
TdJpStation
tdJpStation
=
tdJpStationMapper
.
selectOne
(
new
QueryWrapper
<
TdJpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
HUAWEI
.
getCode
()).
eq
(
"third_station_id"
,
imasterStationList
.
getPlantCode
()));
//判断是否存在
if
(
ObjectUtils
.
isEmpty
(
tdJpStation
))
{
tdJpStation
=
new
TdJpStation
();
}
tdJpStation
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdJpStation
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdJpStation
.
setThirdStationId
(
imasterStationList
.
getPlantCode
());
tdJpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
tdJpStation
.
setCreatedTime
(
System
.
currentTimeMillis
());
if
(!
ObjectUtils
.
isEmpty
(
tdJpStation
.
getCreatedTime
()))
{
tdJpStationMapper
.
updateById
(
tdJpStation
);
}
else
{
tdJpStationMapper
.
insert
(
tdJpStation
);
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/KsolarDataAcquisitionServiceImpl.java
View file @
840f787c
...
@@ -108,6 +108,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
...
@@ -108,6 +108,8 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
private
TdHYGFStationYearGenerateMapper
tdHYGFStationYearGenerateMapper
;
private
TdHYGFStationYearGenerateMapper
tdHYGFStationYearGenerateMapper
;
@Autowired
@Autowired
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
private
TdHYGFInverterTotalGenerateMapper
tdHYGFInverterTotalGenerateMapper
;
@Autowired
TdJpStationMapper
tdJpStationMapper
;
@Scheduled
(
cron
=
"${dataRequstScheduled.keshida}"
)
@Scheduled
(
cron
=
"${dataRequstScheduled.keshida}"
)
@Override
@Override
...
@@ -237,6 +239,40 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
...
@@ -237,6 +239,40 @@ public class KsolarDataAcquisitionServiceImpl implements KSolarDataAcquisitionSe
jpStationMapper
.
insert
(
jpStation
);
jpStationMapper
.
insert
(
jpStation
);
}
}
//增加td 电站区域公司,经销商绑定表
TdJpStation
tdJpStation
=
tdJpStationMapper
.
selectOne
(
new
QueryWrapper
<
TdJpStation
>().
eq
(
"third_code"
,
PVProducerInfoEnum
.
KSOLAR
.
getCode
()).
eq
(
"third_station_id"
,
ksolarStation
.
getStationId
()));
//判断是否存在
if
(
ObjectUtils
.
isEmpty
(
tdJpStation
))
{
tdJpStation
=
new
TdJpStation
();
}
tdJpStation
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
tdJpStation
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
tdJpStation
.
setThirdStationId
(
ksolarStation
.
getStationId
());
tdJpStation
.
setThirdCode
(
PVProducerInfoEnum
.
JLY
.
getCode
());
tdJpStation
.
setCreatedTime
(
System
.
currentTimeMillis
());
if
(!
ObjectUtils
.
isEmpty
(
tdJpStation
.
getCreatedTime
()))
{
tdJpStationMapper
.
updateById
(
tdJpStation
);
}
else
{
tdJpStationMapper
.
insert
(
tdJpStation
);
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
...
...
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