Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
948cdc1e
Commit
948cdc1e
authored
May 22, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
da8857fb
f0fb7968
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
62 additions
and
25 deletions
+62
-25
DateUtils.java
...ava/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
+0
-0
JpStationDto.java
...m/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
+6
-0
DayGenerateMapper.java
...oot/module/hygf/api/tdenginemapper/DayGenerateMapper.java
+3
-3
DayGenerateMapper.xml
.../src/main/resources/mapper/tdengine/DayGenerateMapper.xml
+29
-0
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+3
-3
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+11
-8
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+6
-6
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+2
-2
FanHealthIndexDayMapper.java
...t/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
+2
-2
pom.xml
pom.xml
+0
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DateUtils.java
View file @
948cdc1e
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
View file @
948cdc1e
...
...
@@ -108,6 +108,12 @@ public class JpStationDto extends BaseDto {
@ExcelIgnore
private
String
type
;
/**
* 电站类型
*/
@ExcelIgnore
private
String
stationType
;
/**
* 组织编码
*/
@ExcelIgnore
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/tdenginemapper/DayGenerateMapper.java
View file @
948cdc1e
...
...
@@ -31,11 +31,11 @@ public interface DayGenerateMapper extends BaseMapper<DayGenerate> {
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
PowerCurveDto
>
getDayGeneratqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
List
<
PowerCurveDto
>
getDayGeneratqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"regionalCompaniesCode"
)
String
regionalCompaniesCode
,
@Param
(
"amosCompanyCode"
)
String
amosCompanyCode
,
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
PowerCurveDto
>
getMonthGenerateqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
List
<
PowerCurveDto
>
getMonthGenerateqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"regionalCompaniesCode"
)
String
regionalCompaniesCode
,
@Param
(
"amosCompanyCode"
)
String
amosCompanyCode
,
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
List
<
PowerCurveDto
>
getYearGenerateqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
List
<
PowerCurveDto
>
getYearGenerateqx
(
@Param
(
"date"
)
String
month
,
@Param
(
"regionalCompaniesCode"
)
String
regionalCompaniesCode
,
@Param
(
"amosCompanyCode"
)
String
amosCompanyCode
,
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"thirdStationId"
)
String
thirdStationId
,
@Param
(
"dto"
)
List
<
String
>
statioId
);
@UserEmpower
(
field
={
"regional_companies_code"
},
dealerField
={
"amos_company_code"
,
"regional_companies_code"
}
,
fieldConditions
={
"eq"
,
"in"
}
,
relationship
=
"and"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/tdengine/DayGenerateMapper.xml
View file @
948cdc1e
...
...
@@ -47,6 +47,15 @@
#{item}
</foreach>
</if>
<if
test=
"regionalCompaniesCode!=null and regionalCompaniesCode != ''"
>
and regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"amosCompanyCode!=null and amosCompanyCode != ''"
>
and amos_company_code = #{amosCompanyCode}
</if>
<if
test=
"stationType!=null and stationType != ''"
>
and stationType = #{stationType}
</if>
<if
test=
"thirdStationId!=null and thirdStationId != ''"
>
and third_station_id = #{thirdStationId}
...
...
@@ -72,6 +81,16 @@
</foreach>
</if>
<if
test=
"regionalCompaniesCode!=null and regionalCompaniesCode != ''"
>
and regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"amosCompanyCode!=null and amosCompanyCode != ''"
>
and amos_company_code = #{amosCompanyCode}
</if>
<if
test=
"stationType!=null and stationType != ''"
>
and stationType = #{stationType}
</if>
<if
test=
"thirdStationId!=null and thirdStationId != ''"
>
and third_station_id = #{thirdStationId}
</if>
...
...
@@ -96,6 +115,16 @@
</foreach>
</if>
<if
test=
"regionalCompaniesCode!=null and regionalCompaniesCode != ''"
>
and regional_companies_code = #{regionalCompaniesCode}
</if>
<if
test=
"amosCompanyCode!=null and amosCompanyCode != ''"
>
and amos_company_code = #{amosCompanyCode}
</if>
<if
test=
"stationType!=null and stationType != ''"
>
and stationType = #{stationType}
</if>
<if
test=
"thirdStationId!=null and thirdStationId != ''"
>
and third_station_id = #{thirdStationId}
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpStationServiceImpl.java
View file @
948cdc1e
...
...
@@ -241,17 +241,17 @@ public class JpStationServiceImpl extends BaseService<JpStationDto, JpStation, J
map
=
getDayListOfMonth
(
reviewDto
.
getTimeDateMonth
());
// if(statioId!=null&&!statioId.isEmpty()) {
data
=
dayGenerateMapper
.
getDayGeneratqx
(
reviewDto
.
getTimeDateMonth
(),
reviewDto
.
getThirdStationId
(),
null
);
data
=
dayGenerateMapper
.
getDayGeneratqx
(
reviewDto
.
getTimeDateMonth
(),
reviewDto
.
get
RegionalCompaniesCode
(),
reviewDto
.
getAmosCompanyCode
(),
reviewDto
.
getStationType
(),
reviewDto
.
get
ThirdStationId
(),
null
);
// }
}
else
if
(
type
.
equals
(
"year"
)){
map
=
getyearListOfMonth
(
reviewDto
.
getTimeDateYear
());
// if(statioId!=null&&!statioId.isEmpty()) {
data
=
dayGenerateMapper
.
getMonthGenerateqx
(
reviewDto
.
getTimeDateYear
(),
reviewDto
.
getThirdStationId
(),
null
);
data
=
dayGenerateMapper
.
getMonthGenerateqx
(
reviewDto
.
getTimeDateYear
(),
reviewDto
.
get
RegionalCompaniesCode
(),
reviewDto
.
getAmosCompanyCode
(),
reviewDto
.
getStationType
(),
reviewDto
.
get
ThirdStationId
(),
null
);
// }
}
else
{
map
=
getyearList
();
// if(statioId!=null&&!statioId.isEmpty()) {
data
=
dayGenerateMapper
.
getYearGenerateqx
(
null
,
reviewDto
.
getThirdStationId
(),
null
);
data
=
dayGenerateMapper
.
getYearGenerateqx
(
null
,
reviewDto
.
get
RegionalCompaniesCode
(),
reviewDto
.
getAmosCompanyCode
(),
reviewDto
.
getStationType
(),
reviewDto
.
get
ThirdStationId
(),
null
);
// }
}
listx
=
map
.
get
(
"x"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanHealthIndexController.java
View file @
948cdc1e
...
...
@@ -40,6 +40,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.POST
;
import
java.sql.Timestamp
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
...
...
@@ -759,16 +761,17 @@ public class IdxBizFanHealthIndexController extends BaseController {
List
<
String
>
gatewayIds
=
permissionService
.
getCurrentUserAmosOrgCodes
();
String
orgCode
=
"NULL"
;
if
(
gatewayIds
.
size
()>
0
){
orgCode
=
gatewayIds
.
get
(
0
)+
"%"
;
orgCode
=
gatewayIds
.
get
(
0
)+
'%'
;
}
if
(
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
date
Parse
(
endTimeTop
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
date
Parse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexDays
=
fanHealthIndexDays
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexDay:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
...
...
@@ -787,10 +790,10 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
endTimeTop
),
-
8
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexHour
>
fanHealthIndexHours
=
fanHealthIndexHourMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexHour:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
...
...
@@ -810,10 +813,10 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
else
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
endTimeTop
),
-
8
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexMoment
>
fanHealthIndexMoments
=
fanHealthIndexMomentMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvHealthIndexController.java
View file @
948cdc1e
...
...
@@ -424,11 +424,11 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
WarningPeriodEnum
.
DAY
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateParse
(
endTimeTop
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
date
AddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
date
Parse
(
startTimeTop
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexDay
>
fanHealthIndexDays
=
pvHealthIndexDayMapper
.
selectData
(
station
,
analysisType
,
indexAddress
,
healthLevel
,
area
,
analysisObjType
,
subarray
,
pointName
,
startTimeTop
,
endTimeTop
,
equipmentName
,
(
current
-
1
)
*
size
,
size
,
orgCode
);
...
...
@@ -448,10 +448,10 @@ public class IdxBizPvHealthIndexController extends BaseController {
}
else
if
(
WarningPeriodEnum
.
HOUR
.
getName
().
equals
(
requiredType
)){
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
endTimeTop
),
-
8
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexHour
>
fanHealthIndexHours
=
pvHealthIndexHourMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subarray
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
fanHealthIndexHours
=
fanHealthIndexHours
.
stream
().
sorted
(
Comparator
.
comparing
(
PvHealthIndexHour:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
...
...
@@ -474,10 +474,10 @@ public class IdxBizPvHealthIndexController extends BaseController {
SimpleDateFormat
formatterNYRSF
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
if
(
null
!=
endTimeTop
){
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
endTimeTop
),
-
8
);
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
endTimeTop
),
-
8
);
endTimeTop
=
formatter
.
format
(
endDate
);
}
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Dat
e
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
datePars
e
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
PvHealthIndexMoment
>
fanHealthIndexMoments
=
pvHealthIndexMomentMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subarray
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
,
orgCode
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
View file @
948cdc1e
...
...
@@ -112,8 +112,8 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
startTime
=
sdf
.
format
(
currentDayStartTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
}
else
{
Date
currentDayStartTime
=
dateFormat
.
p
arse
(
startTime
);
Date
currentDayEndTime
=
dateFormat
.
p
arse
(
endTime
);
Date
currentDayStartTime
=
DateUtils
.
dateP
arse
(
startTime
);
Date
currentDayEndTime
=
DateUtils
.
dateP
arse
(
endTime
);
startTime
=
sdf
.
format
(
currentDayStartTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
View file @
948cdc1e
...
...
@@ -22,7 +22,7 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
// "<if test='gatewayIds != null and gatewayIds.size() > 0'>AND GATEWAY_ID IN <foreach collection='gatewayIds' item='gatewayId' open='(' separator=',' close=')'>#{gatewayId}</foreach></if>" +
"<if test='orgCode!= null'>AND org_code like '
%${orgCode}%
' </if>"
+
"<if test='orgCode!= null'>AND org_code like '
${orgCode}
' </if>"
+
"order by health_index "
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
...
...
@@ -44,7 +44,7 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
"<if test='healthLevel!= null'>AND health_level = #{healthLevel} </if>"
+
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='orgCode!= null'>AND org_code like '
%${orgCode}%
' </if>"
+
"<if test='orgCode!= null'>AND org_code like '
${orgCode}
' </if>"
+
"</script>"
)
int
selectDataTotal
(
@Param
(
"healthLevel"
)
String
healthLevel
,
@Param
(
"area"
)
String
area
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"analysisType"
)
String
analysisType
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
,
@Param
(
"pointName"
)
String
pointName
,
@Param
(
"indexAddress"
)
String
indexAddress
,
@Param
(
"startTimeTop"
)
String
startTimeTop
,
@Param
(
"endTimeTop"
)
String
endTimeTop
,
@Param
(
"orgCode"
)
String
orgCode
);
...
...
pom.xml
View file @
948cdc1e
...
...
@@ -318,7 +318,6 @@
<modules>
<module>
amos-boot-biz-common
</module>
<module>
amos-boot-core
</module>
<module>
amos-boot-utils
</module>
<module>
amos-boot-data
</module>
<module>
amos-boot-system-jxiop
</module>
</modules>
...
...
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