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
42c7c3cb
Commit
42c7c3cb
authored
May 25, 2020
by
吴江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规则修改
parent
4e81a21f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
40 deletions
+45
-40
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+6
-6
FireStrengthMapper.java
...join/amos/fas/business/dao/mapper/FireStrengthMapper.java
+7
-3
FireStrengthServiceImpl.java
...os/fas/business/service/impl/FireStrengthServiceImpl.java
+18
-29
FireStengthService.java
...n/amos/fas/business/service/intfc/FireStengthService.java
+3
-1
IRuleRunningSnapshotService.java
...s/business/service/intfc/IRuleRunningSnapshotService.java
+0
-1
dbTemplate_fier_stength.xml
.../src/main/resources/db/mapper/dbTemplate_fier_stength.xml
+11
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
42c7c3cb
...
...
@@ -23,7 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import
com.yeejoin.amos.fas.business.action.result.ActionResult
;
import
com.yeejoin.amos.fas.business.action.result.BubbleTipResult
;
import
com.yeejoin.amos.fas.business.action.result.message.ActionResultMessage
;
import
com.yeejoin.amos.fas.business.service.impl.
FireStrength
ServiceImpl
;
import
com.yeejoin.amos.fas.business.service.impl.
RuleRunigSnapshot
ServiceImpl
;
import
com.yeejoin.amos.fas.business.service.intfc.FireStengthService
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyRo
;
...
...
@@ -39,7 +39,7 @@ public class ContingencyAction implements CustomerAction {
@Autowired
private
IContingencyInstance
iContingencyInstance
;
@Autowired
private
FireStengthService
fireStrengthService
;
...
...
@@ -77,8 +77,8 @@ public class ContingencyAction implements CustomerAction {
Date
now
=
new
Date
();
String
time
=
sdf
.
format
(
now
);
List
<
FireStrength
>
strengths
=
null
;
//fireStrengthService.
List
<
FireStrength
>
strengths
=
fireStrengthService
.
queryForStrengthList
(
time
);
// List<FireStrength> strengths = iStrengthRepository.queryForStrengthList(time);
if
(!
CollectionUtils
.
isEmpty
(
strengths
))
...
...
@@ -424,8 +424,8 @@ public class ContingencyAction implements CustomerAction {
private
void
stopSnapshop
(
ContingencyRo
contingencyRo
)
{
//
if (RuleRunigSnapshotServiceImpl.getReplayBatchNo() != null && !RuleRunigSnapshotServiceImpl.getReplayBatchNo().equals(contingencyRo.getBatchNo()))
//
RuleRunigSnapshotServiceImpl.setReplayBatchNoToNull();
if
(
RuleRunigSnapshotServiceImpl
.
getReplayBatchNo
()
!=
null
&&
!
RuleRunigSnapshotServiceImpl
.
getReplayBatchNo
().
equals
(
contingencyRo
.
getBatchNo
()))
RuleRunigSnapshotServiceImpl
.
setReplayBatchNoToNull
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireStrengthMapper.java
View file @
42c7c3cb
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
public
interface
FireStrengthMapper
extends
BaseMapper
{
Map
queryOne
(
@Param
(
"id"
)
Long
id
);
List
<
Map
>
queryForPage
(
@Param
(
"username"
)
String
username
,
@Param
(
"code"
)
String
code
,
@Param
(
"start"
)
long
start
,
@Param
(
"length"
)
Integer
length
);
Long
queryCountForPage
(
@Param
(
"username"
)
String
username
,
@Param
(
"code"
)
String
code
);
List
<
FireStrength
>
queryForStrengthList
(
@Param
(
"time"
)
String
time
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireStrengthServiceImpl.java
View file @
42c7c3cb
...
...
@@ -17,57 +17,46 @@ import java.util.Optional;
@Service
(
"fireStengthService"
)
public
class
FireStrengthServiceImpl
implements
FireStengthService
{
@Autowired
private
FireStrengthPointDao
fireStrengthPointDao
;
@Autowired
private
FireStrengthMapper
fireStrengthMapper
;
public
FireStrength
savePoint
(
FireStrength
fireEquipmentPoint
)
{
public
FireStrength
savePoint
(
FireStrength
fireEquipmentPoint
)
{
return
fireStrengthPointDao
.
save
(
fireEquipmentPoint
);
}
public
Map
queryOne
(
Long
id
)
{
public
Map
queryOne
(
Long
id
)
{
return
fireStrengthMapper
.
queryOne
(
id
);
}
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id:
idArray
)
{
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id
:
idArray
)
{
Optional
<
FireStrength
>
fireEquipmentPoint1
=
fireStrengthPointDao
.
findById
(
Long
.
parseLong
(
id
));
FireStrength
fireEquipmentPoint
=
null
;
if
(
fireEquipmentPoint1
.
isPresent
())
{
fireEquipmentPoint
=
fireEquipmentPoint1
.
get
();
FireStrength
fireEquipmentPoint
=
null
;
if
(
fireEquipmentPoint1
.
isPresent
())
{
fireEquipmentPoint
=
fireEquipmentPoint1
.
get
();
}
if
(
fireEquipmentPoint
!=
null
)
{
if
(
fireEquipmentPoint
!=
null
)
{
this
.
fireStrengthPointDao
.
deleteById
(
Long
.
parseLong
(
id
));
}
else
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
}
else
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
}
}
return
idArray
;
}
public
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
)
{
Long
total
=
fireStrengthMapper
.
queryCountForPage
(
username
,
code
);
List
<
Map
>
content
=
fireStrengthMapper
.
queryForPage
(
username
,
code
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
public
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
)
{
Long
total
=
fireStrengthMapper
.
queryCountForPage
(
username
,
code
);
List
<
Map
>
content
=
fireStrengthMapper
.
queryForPage
(
username
,
code
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
return
result
;
}
public
List
<
FireStrength
>
queryForStrengthList
(
String
time
)
{
return
fireStrengthMapper
.
queryForStrengthList
(
time
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/FireStengthService.java
View file @
42c7c3cb
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.data.domain.Page
;
...
...
@@ -40,5 +41,6 @@ public interface FireStengthService {
*/
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
);
List
<
FireStrength
>
queryForStrengthList
(
String
time
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRuleRunningSnapshotService.java
View file @
42c7c3cb
...
...
@@ -15,5 +15,4 @@ public interface IRuleRunningSnapshotService
void
replay
(
String
batchNo
)
throws
Exception
;
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_stength.xml
View file @
42c7c3cb
...
...
@@ -62,5 +62,15 @@
<select
id=
"queryForStrengthList"
resultType=
"com.yeejoin.amos.fas.business.service.model.FireStrength"
>
SELECT
*
FROM
f_fire_strength t
WHERE
TIME_TO_SEC(#{time})
>
= TIME_TO_SEC( t.day_begin )
AND TIME_TO_SEC(#{time})
<
= TIME_TO_SEC(
t.day_end)
</select>
</mapper>
\ No newline at end of file
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