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
799b3501
Commit
799b3501
authored
Apr 10, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首航采集
parent
5ab55f4d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
19 deletions
+68
-19
SofarDataAcquisitionService.java
...ouseholdapi/face/service/SofarDataAcquisitionService.java
+1
-1
SofarDataAcquisitionServiceImpl.java
...pi/face/service/impl/SofarDataAcquisitionServiceImpl.java
+29
-8
SunlightServiceImpl.java
...i/householdapi/face/service/impl/SunlightServiceImpl.java
+26
-9
HwSendSms.java
...om/yeejoin/amos/boot/module/hygf/api/hwsms/HwSendSms.java
+11
-0
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+1
-1
No files found.
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/SofarDataAcquisitionService.java
View file @
799b3501
...
@@ -19,7 +19,7 @@ public interface SofarDataAcquisitionService {
...
@@ -19,7 +19,7 @@ public interface SofarDataAcquisitionService {
/**
/**
* @descrption 采集器列表数据入库
* @descrption 采集器列表数据入库
*/
*/
void
collectorList
(
List
<
SofarStationList
>
jsonObject
);
void
collectorList
(
SofarStationList
jsonObject
);
/**
/**
* @descrption 采集器详情数据入库
* @descrption 采集器详情数据入库
*/
*/
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/SofarDataAcquisitionServiceImpl.java
View file @
799b3501
...
@@ -76,7 +76,8 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
...
@@ -76,7 +76,8 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
private
JpCollectorMapper
jpCollectorMapper
;
private
JpCollectorMapper
jpCollectorMapper
;
@Autowired
@Autowired
TdJpStationMapper
tdJpStationMapper
;
TdJpStationMapper
tdJpStationMapper
;
@Autowired
private
HYGFJPStationPowerHistoryMapper
hygfjpStationPowerHistoryMapper
;
@Autowired
@Autowired
private
HYGFJPDayPowerMapper
hygfjpDayPowerMapper
;
private
HYGFJPDayPowerMapper
hygfjpDayPowerMapper
;
...
@@ -274,7 +275,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
...
@@ -274,7 +275,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
//获取
月
发电量
//获取
年
发电量
Map
<
String
,
Object
>
requestInfoyn
=
new
HashMap
<>();
Map
<
String
,
Object
>
requestInfoyn
=
new
HashMap
<>();
requestInfoyn
.
put
(
"deviceSn"
,
jsonObject2
.
get
(
0
).
getDeviceSn
());
requestInfoyn
.
put
(
"deviceSn"
,
jsonObject2
.
get
(
0
).
getDeviceSn
());
requestInfoyn
.
put
(
"startTime"
,
year
+
""
);
requestInfoyn
.
put
(
"startTime"
,
year
+
""
);
...
@@ -300,9 +301,9 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
...
@@ -300,9 +301,9 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
if
(!
jsonObjectyfn
.
isEmpty
()){
if
(!
jsonObjectyfn
.
isEmpty
()){
for
(
Sofarhistorical
sofarhistorical
:
jsonObjectyfn
)
{
for
(
Sofarhistorical
sofarhistorical
:
jsonObjectyfn
)
{
if
(
sofarhistorical
.
getDataList
().
get
(
0
).
getKey
().
equals
(
"generation"
)){
if
(
sofarhistorical
.
getDataList
().
get
(
0
).
getKey
().
equals
(
"generation"
)){
//
月
发电量
//
年
发电量
jpStation
.
setYearGenerate
(
sofarhistorical
.
getDataList
().
get
(
0
).
getValue
()!=
null
?
Double
.
valueOf
(
sofarhistorical
.
getDataList
().
get
(
0
).
getValue
()):
null
);
jpStation
.
setYearGenerate
(
sofarhistorical
.
getDataList
().
get
(
0
).
getValue
()!=
null
?
Double
.
valueOf
(
sofarhistorical
.
getDataList
().
get
(
0
).
getValue
()):
null
);
// 月收益
//
年
月收益
jpStation
.
setYearIncome
(
jpStation
.
getYearGenerate
()!=
null
?
jpStation
.
getYearGenerate
()*
0.45
:
null
);
jpStation
.
setYearIncome
(
jpStation
.
getYearGenerate
()!=
null
?
jpStation
.
getYearGenerate
()*
0.45
:
null
);
}
}
...
@@ -343,6 +344,26 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
...
@@ -343,6 +344,26 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
hygfjpDayPowerMapper
.
insert
(
hygfjpDayPower
);
hygfjpDayPowerMapper
.
insert
(
hygfjpDayPower
);
}
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
hygfjpStationPowerHistory
.
setPower
(
jpStation
.
getRealTimePower
());
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
//新加
hygfjpStationPowerHistory
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpStationPowerHistory
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpStationPowerHistory
.
setStationName
(
jpStation
.
getName
());
hygfjpStationPowerHistory
.
setStationState
(
jpStation
.
getState
());
hygfjpStationPowerHistoryMapper
.
insert
(
hygfjpStationPowerHistory
);
//增加td 电站区域公司,经销商绑定表
//增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code",PVProducerInfoEnum.SH.getCode()).
// eq("third_code",PVProducerInfoEnum.SH.getCode()).
...
@@ -494,15 +515,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
...
@@ -494,15 +515,15 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
}
}
@Override
@Override
public
void
collectorList
(
List
<
SofarStationList
>
jsonObject
)
{
public
void
collectorList
(
SofarStationList
jsonObject
)
{
for
(
SofarStationList
sunlightDto
:
jsonObject
)
{
//获取所电站下采集器
//获取所电站下采集器
Map
<
String
,
Object
>
requestInfo2
=
new
HashMap
<>();
Map
<
String
,
Object
>
requestInfo2
=
new
HashMap
<>();
requestInfo2
.
put
(
"stationId"
,
sunlightDto
.
getId
());
requestInfo2
.
put
(
"stationId"
,
jsonObject
.
getId
());
requestInfo2
.
put
(
"deviceType"
,
"COLLECTOR"
);
requestInfo2
.
put
(
"deviceType"
,
"COLLECTOR"
);
String
param2
=
JSON
.
toJSONString
(
requestInfo2
);
String
param2
=
JSON
.
toJSONString
(
requestInfo2
);
List
<
SofarInverter
>
jsonObject2
=
requestUtil
.
getResPonse
(
List
<
SofarInverter
>
jsonObject2
=
requestUtil
.
getResPonse
(
...
@@ -586,7 +607,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
...
@@ -586,7 +607,7 @@ public class SofarDataAcquisitionServiceImpl implements SofarDataAcquisitionServ
// hygfjpCollectorHistoryMapper.insert(hygfjpCollectorHistory);
// hygfjpCollectorHistoryMapper.insert(hygfjpCollectorHistory);
// }
// }
}
...
...
amos-boot-data/amos-boot-data-housepvapi/src/main/java/com/yeejoin/amos/api/householdapi/face/service/impl/SunlightServiceImpl.java
View file @
799b3501
...
@@ -84,7 +84,8 @@ public class SunlightServiceImpl implements SunlightService {
...
@@ -84,7 +84,8 @@ public class SunlightServiceImpl implements SunlightService {
private
HYGFJPInverterWarnMapper
hygfjpInverterWarnMapper
;
private
HYGFJPInverterWarnMapper
hygfjpInverterWarnMapper
;
@Autowired
@Autowired
SunlightUtil
SunlightUtil
;
SunlightUtil
SunlightUtil
;
@Autowired
private
HYGFJPStationPowerHistoryMapper
hygfjpStationPowerHistoryMapper
;
@Autowired
@Autowired
TdJpStationMapper
tdJpStationMapper
;
TdJpStationMapper
tdJpStationMapper
;
@Autowired
@Autowired
...
@@ -142,9 +143,9 @@ public class SunlightServiceImpl implements SunlightService {
...
@@ -142,9 +143,9 @@ public class SunlightServiceImpl implements SunlightService {
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
SunlightDto
sunlightDto
=
list
.
get
(
i
);
SunlightDto
sunlightDto
=
list
.
get
(
i
);
if
(
i
==
160
){
//
if(i==160){
System
.
out
.
println
(
"22222"
);
//
System.out.println("22222");
}
//
}
// System.out.println(i+"====================================================");
// System.out.println(i+"====================================================");
JpStation
jpStation
=
null
;
JpStation
jpStation
=
null
;
...
@@ -332,6 +333,27 @@ public class SunlightServiceImpl implements SunlightService {
...
@@ -332,6 +333,27 @@ public class SunlightServiceImpl implements SunlightService {
hygfjpDayPowerMapper
.
insert
(
hygfjpDayPower
);
hygfjpDayPowerMapper
.
insert
(
hygfjpDayPower
);
}
}
HYGFJPStationPowerHistory
hygfjpStationPowerHistory
=
new
HYGFJPStationPowerHistory
();
hygfjpStationPowerHistory
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpStationPowerHistory
.
setThirdStationId
(
jpStation
.
getThirdStationId
());
hygfjpStationPowerHistory
.
setPower
(
jpStation
.
getRealTimePower
());
hygfjpStationPowerHistory
.
setThirdCode
(
jpStation
.
getThirdCode
());
hygfjpStationPowerHistory
.
setTime
(
System
.
currentTimeMillis
());
//新加
hygfjpStationPowerHistory
.
setAmosCompanyCode
(
jpStation
.
getAmosCompanyCode
());
hygfjpStationPowerHistory
.
setRegionalCompaniesCode
(
jpStation
.
getRegionalCompaniesCode
());
hygfjpStationPowerHistory
.
setStationName
(
jpStation
.
getName
());
hygfjpStationPowerHistory
.
setStationState
(
jpStation
.
getState
());
hygfjpStationPowerHistoryMapper
.
insert
(
hygfjpStationPowerHistory
);
//增加td 电站区域公司,经销商绑定表
//增加td 电站区域公司,经销商绑定表
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// TdJpStation tdJpStation = tdJpStationMapper.selectOne(new QueryWrapper<TdJpStation>().
// eq("third_code", PVProducerInfoEnum.YG.getCode()).
// eq("third_code", PVProducerInfoEnum.YG.getCode()).
...
@@ -903,11 +925,6 @@ public class SunlightServiceImpl implements SunlightService {
...
@@ -903,11 +925,6 @@ public class SunlightServiceImpl implements SunlightService {
}
}
try
{
try
{
TimeUnit
.
MINUTES
.
sleep
(
1
);
TimeUnit
.
MINUTES
.
sleep
(
1
);
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
hygfjpInverterWarn
.
setCreatedTime
(
System
.
currentTimeMillis
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/hwsms/HwSendSms.java
View file @
799b3501
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.api.hwsms;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.api.hwsms;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
springfox.bean.validators.plugins.schema.MinMaxAnnotationPlugin
;
import
javax.net.ssl.*
;
import
javax.net.ssl.*
;
import
java.io.*
;
import
java.io.*
;
...
@@ -151,6 +152,16 @@ public class HwSendSms {
...
@@ -151,6 +152,16 @@ public class HwSendSms {
}
}
}
}
public
static
void
main
(
String
[]
args
)
{
String
appSecret
=
"SnD8QvdkfDgNeLi8W2H6oDJnoNTZ"
;
String
appKey
=
"n7F6k8BorRkog9q5n6pq315reGk8"
;
String
wsseHeader
=
buildWsseHeader
(
appKey
,
appSecret
);
System
.
out
.
println
(
wsseHeader
);
}
/**
/**
* 构造请求Body体
* 构造请求Body体
* @param sender
* @param sender
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
View file @
799b3501
...
@@ -679,7 +679,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -679,7 +679,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
}
}
e
.
printStackTrace
();
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
...
...
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