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
dd3002ec
Commit
dd3002ec
authored
Feb 01, 2021
by
田涛
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_upgrade-1225' into dev_upgrade-1225
parents
27d0d046
91249096
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
RiskModelController.java
...oin/amos/fas/business/controller/RiskModelController.java
+1
-1
IFmeaDao.java
...om/yeejoin/amos/fas/business/dao/repository/IFmeaDao.java
+2
-2
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskModelController.java
View file @
dd3002ec
...
@@ -165,7 +165,7 @@ public class RiskModelController extends BaseController {
...
@@ -165,7 +165,7 @@ public class RiskModelController extends BaseController {
public
CommonResponse
editFmea
(
@ApiParam
(
value
=
"Fmea模型对象"
,
required
=
true
)
@RequestBody
List
<
Fmea
>
params
)
{
public
CommonResponse
editFmea
(
@ApiParam
(
value
=
"Fmea模型对象"
,
required
=
true
)
@RequestBody
List
<
Fmea
>
params
)
{
try
{
try
{
params
.
forEach
(
param
->
{
params
.
forEach
(
param
->
{
int
i
=
iFmeaDao
.
checkIdAndName
(
param
.
getRiskSourceId
(),
param
.
getRiskFactorsId
());
int
i
=
iFmeaDao
.
checkIdAndName
(
param
.
getRiskSourceId
(),
param
.
getRiskFactorsId
()
,
param
.
getId
()
);
if
(
i
>
0
){
if
(
i
>
0
){
throw
new
YeeException
(
"危险因素重复"
);
throw
new
YeeException
(
"危险因素重复"
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFmeaDao.java
View file @
dd3002ec
...
@@ -49,6 +49,6 @@ public interface IFmeaDao extends BaseDao<Fmea, Long> {
...
@@ -49,6 +49,6 @@ public interface IFmeaDao extends BaseDao<Fmea, Long> {
@Query
(
value
=
"select * from `f_fmea` where id in ?1"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from `f_fmea` where id in ?1"
,
nativeQuery
=
true
)
List
<
Fmea
>
findAllByRiskSourceIds
(
List
<
Long
>
ids
);
List
<
Fmea
>
findAllByRiskSourceIds
(
List
<
Long
>
ids
);
@Query
(
value
=
"select count(1) from `f_fmea` where risk_source_id = ?1 and risk_factors_id = ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"select count(1) from `f_fmea` where risk_source_id = ?1 and risk_factors_id = ?2
and id != ?3
"
,
nativeQuery
=
true
)
int
checkIdAndName
(
Long
sId
,
Long
nId
);
int
checkIdAndName
(
Long
sId
,
Long
nId
,
Long
id
);
}
}
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