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
c098ea28
Commit
c098ea28
authored
Aug 01, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
a60d6dc2
8439db4e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
18 deletions
+54
-18
IdxBizFanWeightController.java
...odule/jxiop/biz/controller/IdxBizFanWeightController.java
+7
-6
IdxBizPvWeightController.java
...module/jxiop/biz/controller/IdxBizPvWeightController.java
+12
-11
IdxBizFanWeightMapper.java
.../boot/module/jxiop/biz/mapper2/IdxBizFanWeightMapper.java
+4
-0
IdxBizPvWeightMapper.java
...s/boot/module/jxiop/biz/mapper2/IdxBizPvWeightMapper.java
+4
-0
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+1
-1
IdxBizFanWeightMapper.xml
...c/main/resources/mapper/cluster/IdxBizFanWeightMapper.xml
+13
-0
IdxBizPvWeightMapper.xml
...rc/main/resources/mapper/cluster/IdxBizPvWeightMapper.xml
+13
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWeightController.java
View file @
c098ea28
...
...
@@ -126,7 +126,7 @@ public class IdxBizFanWeightController extends BaseController {
if
(!
ObjectUtils
.
isEmpty
(
stdUserEmpower
))
{
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
);
}
QueryWrapper
<
IdxBizFanWeight
>
qu
=
new
QueryWrapper
<>();
//
QueryWrapper< IdxBizFanWeight> qu=new QueryWrapper<>();
String
name
=
""
;
switch
(
type
){
case
"1"
:
...
...
@@ -160,11 +160,12 @@ public class IdxBizFanWeightController extends BaseController {
// qu.eq("POINT_NAME",pointName);
break
;
}
qu
.
like
(
"ORG_CODE"
,
orgCode
);
qu
.
isNotNull
(
name
);
qu
.
groupBy
(
name
);
qu
.
orderByAsc
(
name
);
List
<
IdxBizFanWeight
>
list
=
idxBizFanWeightMapper
.
selectList
(
qu
);
// qu.like("ORG_CODE",orgCode);
// qu.isNotNull(name);
// qu.groupBy(name);
// qu.orderByAsc(name);
// List<IdxBizFanWeight> list = idxBizFanWeightMapper.selectList(qu);
List
<
IdxBizFanWeight
>
list
=
idxBizFanWeightMapper
.
selectAllByParams
(
name
,
"%"
+
orgCode
+
"%"
);
return
ResponseHelper
.
buildResponse
(
list
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvWeightController.java
View file @
c098ea28
...
...
@@ -134,7 +134,7 @@ public class IdxBizPvWeightController extends BaseController {
if
(!
ObjectUtils
.
isEmpty
(
stdUserEmpower
))
{
orgCode
=
stdUserEmpower
.
getAmosOrgCode
().
get
(
0
);
}
QueryWrapper
<
IdxBizPvWeight
>
qu
=
new
QueryWrapper
<>();
//
QueryWrapper< IdxBizPvWeight> qu=new QueryWrapper<>();
String
name
=
""
;
IdxBizPvWeight
qt
=
new
IdxBizPvWeight
();
switch
(
type
){
...
...
@@ -170,11 +170,12 @@ public class IdxBizPvWeightController extends BaseController {
// qu.eq("POINT_NAME",pointName);
break
;
}
qu
.
like
(
"ORG_CODE"
,
orgCode
);
qu
.
isNotNull
(
name
);
qu
.
groupBy
(
name
);
qu
.
orderByAsc
(
name
);
List
<
IdxBizPvWeight
>
list
=
idxBizPvWeightMapper
.
selectList
(
qu
);
// qu.like("ORG_CODE",orgCode);
// qu.isNotNull(name);
// qu.groupBy(name);
// qu.orderByAsc(name);
// List<IdxBizPvWeight> list = idxBizPvWeightMapper.selectList(qu);
List
<
IdxBizPvWeight
>
list
=
idxBizPvWeightMapper
.
selectAllByParams
(
name
,
"%"
+
orgCode
+
"%"
);
return
ResponseHelper
.
buildResponse
(
list
);
}
...
...
@@ -211,11 +212,11 @@ public class IdxBizPvWeightController extends BaseController {
break
;
case
"3"
:
flagtype
=
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getSubarray
()
;
flagtype
=
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
;
break
;
case
"4"
:
flagtype
=
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
;
flagtype
=
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getSubarray
()
;
break
;
case
"5"
:
...
...
@@ -235,12 +236,12 @@ public class IdxBizPvWeightController extends BaseController {
}
break
;
case
"3"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getSubarray
()
))
{
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
))
{
throw
new
BadRequest
(
"配置权重必须是同一个层级的数据"
);
}
break
;
case
"4"
:
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
))
{
if
(!
flagtype
.
equals
(
idxBizFanWeight
.
getArae
()
+
idxBizFanWeight
.
getStation
()
+
idxBizFanWeight
.
getSubarray
()
))
{
throw
new
BadRequest
(
"配置权重必须是同一个层级的数据"
);
}
break
;
...
...
@@ -270,13 +271,13 @@ public class IdxBizPvWeightController extends BaseController {
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getType
()),
IdxBizPvWeight:
:
getType
,
reviewDto
.
getType
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getArae
()),
IdxBizPvWeight:
:
getArae
,
reviewDto
.
getArae
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getStation
()),
IdxBizPvWeight:
:
getStation
,
reviewDto
.
getStation
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getSubarray
()),
IdxBizPvWeight:
:
getSubarray
,
reviewDto
.
getSubarray
());
break
;
case
"4"
:
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getType
()),
IdxBizPvWeight:
:
getType
,
reviewDto
.
getType
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getArae
()),
IdxBizPvWeight:
:
getArae
,
reviewDto
.
getArae
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getStation
()),
IdxBizPvWeight:
:
getStation
,
reviewDto
.
getStation
());
qu
.
eq
(!
StringUtils
.
isEmpty
(
reviewDto
.
getSubarray
()),
IdxBizPvWeight:
:
getSubarray
,
reviewDto
.
getSubarray
());
break
;
case
"5"
:
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanWeightMapper.java
View file @
c098ea28
...
...
@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFelk
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @description:
...
...
@@ -10,4 +13,5 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFelk;
* @createDate: 2023/10/23
*/
public
interface
IdxBizFanWeightMapper
extends
BaseMapper
<
IdxBizFanWeight
>
{
List
<
IdxBizFanWeight
>
selectAllByParams
(
@Param
(
"name"
)
String
name
,
@Param
(
"orgCode"
)
String
orgCode
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizPvWeightMapper.java
View file @
c098ea28
...
...
@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @description:
...
...
@@ -11,4 +14,5 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight;
public
interface
IdxBizPvWeightMapper
extends
BaseMapper
<
IdxBizPvWeight
>
{
List
<
IdxBizPvWeight
>
selectAllByParams
(
@Param
(
"name"
)
String
name
,
@Param
(
"orgCode"
)
String
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 @
c098ea28
...
...
@@ -100,7 +100,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
tdid
=
address
+
"_"
+
idxBizFanPointProcessVariableClassification
.
getGatewayId
();
}
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd
'T'HH:mm:ss'Z'
"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
calendar
=
Calendar
.
getInstance
(
TimeZone
.
getTimeZone
(
"UTC"
));
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
//限制必须是区间时间段
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanWeightMapper.xml
0 → 100644
View file @
c098ea28
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWeightMapper"
>
<select
id=
"selectAllByParams"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWeight"
>
SELECT ibfw.sequence_nbr,FLAG,ORG_CODE,POINT_NAME,STATION,ARAE,EQUIPMENT_NAME,TYPE,VALUE,SUBARRAY
FROM (SELECT MIN(sequence_nbr) as sequence_nbr
FROM idx_biz_fan_weight WHERE (ORG_CODE LIKE #{orgCode} AND ${name} IS NOT NULL)
GROUP BY ${name} ORDER BY ${name} ASC)aa
LEFT JOIN idx_biz_fan_weight ibfw ON ibfw.sequence_nbr=aa.sequence_nbr
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizPvWeightMapper.xml
0 → 100644
View file @
c098ea28
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvWeightMapper"
>
<select
id=
"selectAllByParams"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight"
>
SELECT ibpw.sequence_nbr,FLAG,ORG_CODE,POINT_NAME,STATION,ARAE,EQUIPMENT_NAME,TYPE,VALUE,SUBARRAY
FROM (SELECT MIN(sequence_nbr) as sequence_nbr
FROM idx_biz_pv_weight WHERE (ORG_CODE LIKE #{orgCode} AND ${name} IS NOT NULL)
GROUP BY ${name} ORDER BY ${name} ASC)aa
LEFT JOIN idx_biz_pv_weight ibpw ON ibpw.sequence_nbr=aa.sequence_nbr
</select>
</mapper>
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