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
0a036e61
Commit
0a036e61
authored
Jun 24, 2020
by
shanqiyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校验
parent
20b83aaf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
EquipmentController.java
...oin/amos/fas/business/controller/EquipmentController.java
+4
-0
IEquipmentDao.java
...ejoin/amos/fas/business/dao/repository/IEquipmentDao.java
+4
-0
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+6
-0
IEquipmentService.java
...in/amos/fas/business/service/intfc/IEquipmentService.java
+2
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EquipmentController.java
View file @
0a036e61
...
...
@@ -73,6 +73,10 @@ public class EquipmentController extends BaseController {
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
String
[]
idArray
=
ids
.
split
(
","
);
if
(
iEquipService
.
countFemaRelation
(
idArray
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该重点设备已被FMEA绑定,请先删除绑定关系"
);
}
return
CommonResponseUtil
.
success
(
iEquipService
.
delete
(
idArray
));
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IEquipmentDao.java
View file @
0a036e61
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.dao.repository;
import
java.util.Optional
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
...
...
@@ -12,4 +13,7 @@ public interface IEquipmentDao extends BaseDao<Equipment, Long> {
Optional
<
Equipment
>
findById
(
Long
id
);
@Query
(
value
=
"SELECT count(1) FROM `f_fmea_equipment_point` WHERE important_equipment_id in ?1"
,
nativeQuery
=
true
)
int
countFemaRelation
(
String
[]
idArray
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
0a036e61
...
...
@@ -496,4 +496,10 @@ public class EquipmentServiceImpl implements IEquipmentService {
return
equipmentFireEquipmentDao
.
countImpEquipByIds
(
idArray
);
}
@Override
public
int
countFemaRelation
(
String
[]
idArray
)
{
return
iEquipmentDao
.
countFemaRelation
(
idArray
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IEquipmentService.java
View file @
0a036e61
...
...
@@ -105,4 +105,6 @@ public interface IEquipmentService {
int
countImpEquipByIds
(
String
[]
idArray
);
int
countFemaRelation
(
String
[]
idArray
);
}
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