Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
2e5862e3
Commit
2e5862e3
authored
Nov 21, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预案筛选逻辑更新
parent
2ac83103
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
8 deletions
+66
-8
ImportantEquipCodeEnum.java
...yeejoin/amos/fas/common/enums/ImportantEquipCodeEnum.java
+26
-0
PlanDetailMapper.java
...eejoin/amos/fas/business/dao/mapper/PlanDetailMapper.java
+2
-2
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+28
-2
PlanDetailMapper.xml
...ysStart/src/main/resources/db/mapper/PlanDetailMapper.xml
+10
-4
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/ImportantEquipCodeEnum.java
0 → 100644
View file @
2e5862e3
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* @author keyong
* @title: ImportantEquipCodeEnum
* <pre>
* @description: TODO
* </pre>
* @date 2024/11/20 18:31
*/
@Getter
@AllArgsConstructor
public
enum
ImportantEquipCodeEnum
{
HLB
(
"换流变"
,
"1850"
,
"AutosysPlanTop_HLB"
),
ZB
(
"主变"
,
"1851"
,
"AutosysPlanTop_ZB"
),
GK
(
"高抗"
,
"1852"
,
"AutosysPlanTop_GK"
);
private
String
name
;
private
String
code
;
private
String
topic
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanDetailMapper.java
View file @
2e5862e3
...
@@ -38,13 +38,13 @@ public interface PlanDetailMapper {
...
@@ -38,13 +38,13 @@ public interface PlanDetailMapper {
* 筛选预案获得总数
* 筛选预案获得总数
* @return
* @return
*/
*/
Integer
filterCount
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"categor
y"
)
String
category
);
Integer
filterCount
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"categor
ies"
)
List
<
String
>
categories
);
/**
/**
* 筛选预案获得分页记录
* 筛选预案获得分页记录
* @return
* @return
*/
*/
List
<
PlanDetailVo
>
filterList
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"categor
y"
)
String
category
);
List
<
PlanDetailVo
>
filterList
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"classifyId"
)
List
<
Long
>
classifyId
,
@Param
(
"planRange"
)
List
<
String
>
planRange
,
@Param
(
"editOrgName"
)
String
editOrgName
,
@Param
(
"implementationTimeLeft"
)
Date
implementationTimeLeft
,
@Param
(
"implementationTimeRight"
)
Date
implementationTimeRight
,
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"equipmentId"
)
String
equipmentId
,
@Param
(
"categor
ies"
)
List
<
String
>
categories
);
List
<
String
>
getRuleIdByEquipment
(
@Param
(
"id"
)
Long
id
);
List
<
String
>
getRuleIdByEquipment
(
@Param
(
"id"
)
Long
id
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
2e5862e3
...
@@ -702,7 +702,33 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -702,7 +702,33 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
allChildren
.
forEach
(
e
->
classifyIdList
.
add
(
e
.
getId
()));
allChildren
.
forEach
(
e
->
classifyIdList
.
add
(
e
.
getId
()));
}
}
}
}
int
total
=
planDetailMapper
.
filterCount
(
planName
,
classifyIdList
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
equipmentId
,
category
);
if
(
category
.
equals
(
ImportantEquipCodeEnum
.
ZB
.
getCode
()))
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
ImportantEquipCodeEnum
.
ZB
.
getTopic
(),
JSON
.
toJSONString
(
ImportantEquipCodeEnum
.
ZB
.
getName
()).
getBytes
(),
0
,
false
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
else
if
(
category
.
equals
(
ImportantEquipCodeEnum
.
GK
.
getCode
()))
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
ImportantEquipCodeEnum
.
GK
.
getTopic
(),
JSON
.
toJSONString
(
ImportantEquipCodeEnum
.
GK
.
getName
()).
getBytes
(),
0
,
false
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
else
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
ImportantEquipCodeEnum
.
HLB
.
getTopic
(),
JSON
.
toJSONString
(
ImportantEquipCodeEnum
.
HLB
.
getName
()).
getBytes
(),
0
,
false
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
String
[]
idArr
=
category
.
split
(
","
);
List
<
String
>
idList
=
new
ArrayList
();
for
(
String
id
:
idArr
)
{
if
(
id
.
trim
().
length
()
>
0
)
{
idList
.
add
(
id
.
trim
());
}
}
int
total
=
planDetailMapper
.
filterCount
(
planName
,
classifyIdList
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
equipmentId
,
idList
);
page
.
setTotal
(
total
);
page
.
setTotal
(
total
);
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
long
start
=
(
page
.
getCurrent
()
-
1
)
*
page
.
getSize
();
if
(
total
==
0
)
{
if
(
total
==
0
)
{
...
@@ -712,7 +738,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -712,7 +738,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
page
.
setCurrent
(
1
);
page
.
setCurrent
(
1
);
start
=
0
;
start
=
0
;
}
}
List
<
PlanDetailVo
>
planList
=
planDetailMapper
.
filterList
(
planName
,
classifyIdList
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
(
int
)
start
,
(
int
)
page
.
getSize
(),
equipmentId
,
category
);
List
<
PlanDetailVo
>
planList
=
planDetailMapper
.
filterList
(
planName
,
classifyIdList
,
planRange
,
editOrgName
,
implementationTimeLeft
,
implementationTimeRight
,
(
int
)
start
,
(
int
)
page
.
getSize
(),
equipmentId
,
idList
);
// 查询并插入绑定数据的信息
// 查询并插入绑定数据的信息
fillBindingInfo
(
planList
);
fillBindingInfo
(
planList
);
page
.
setRecords
(
planList
);
page
.
setRecords
(
planList
);
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanDetailMapper.xml
View file @
2e5862e3
...
@@ -51,8 +51,11 @@
...
@@ -51,8 +51,11 @@
<if
test=
"equipmentId != null and equipmentId != ''"
>
<if
test=
"equipmentId != null and equipmentId != ''"
>
AND cpe.fire_equipment_id = #{equipmentId}
AND cpe.fire_equipment_id = #{equipmentId}
</if>
</if>
<if
test=
"category != null and category != ''"
>
<if
test=
"categories != null and categories.size > 0 "
>
AND c.category = #{category}
AND c.category in
<foreach
collection=
"categories"
item=
"category"
open=
"("
close=
")"
separator=
","
>
#{category}
</foreach>
</if>
</if>
AND cpd.is_delete = 0
AND cpd.is_delete = 0
</where>
</where>
...
@@ -114,8 +117,11 @@
...
@@ -114,8 +117,11 @@
<if
test=
"equipmentId != null and equipmentId != ''"
>
<if
test=
"equipmentId != null and equipmentId != ''"
>
AND cpe.fire_equipment_id = #{equipmentId}
AND cpe.fire_equipment_id = #{equipmentId}
</if>
</if>
<if
test=
"category != null and category != ''"
>
<if
test=
"categories != null and categories.size > 0 "
>
AND c.category = #{category}
AND c.category in
<foreach
collection=
"categories"
item=
"category"
open=
"("
close=
")"
separator=
","
>
#{category}
</foreach>
</if>
</if>
AND cpd.is_delete = 0
AND cpd.is_delete = 0
</where>
</where>
...
...
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