Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
cabb850f
Commit
cabb850f
authored
Oct 23, 2023
by
H2T
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
风险管控措施页面接口修改
parent
b4d4652c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
13 deletions
+33
-13
InputItemController.java
.../amos/patrol/business/controller/InputItemController.java
+14
-5
IInputItemDao.java
...in/amos/patrol/business/dao/repository/IInputItemDao.java
+9
-3
application.properties
...t-system-patrol/src/main/resources/application.properties
+1
-1
routeMapper.xml
...ystem-patrol/src/main/resources/db/mapper/routeMapper.xml
+9
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/InputItemController.java
View file @
cabb850f
...
...
@@ -713,13 +713,22 @@ public class InputItemController extends AbstractBaseController {
throw
new
BadRequest
(
"适用类型至少需选择一项"
);
}
}
if
(
StringUtil
.
isNotEmpty
(
param
.
getId
())
&&
param
.
getId
()
!=
0
)
{
if
(
inputItemDao
.
findByItemNoAndId
(
param
.
getItemNo
(),
param
.
getId
())
>
0
)
{
throw
new
BadRequest
(
"该编号已存在,请重新输入"
);
}
if
(
inputItemDao
.
findByItemNo
(
param
.
getItemNo
(),
param
.
getId
()
!=
0
?
String
.
valueOf
(
param
.
getId
())
:
null
)
>
0
)
{
throw
new
BadRequest
(
"该编号已存在,请重新输入"
);
}
if
(
inputItemDao
.
findByItemNameAndId
(
param
.
getName
(),
param
.
getId
())
>
0
)
{
throw
new
BadRequest
(
"该名称已存在,请重新输入"
);
}
}
else
{
if
(
inputItemDao
.
findByItemNo
(
param
.
getItemNo
())
>
0
)
{
throw
new
BadRequest
(
"该编号已存在,请重新输入"
);
}
if
(
inputItemDao
.
findByItemName
(
param
.
getName
(),
param
.
getId
()
!=
0
?
String
.
valueOf
(
param
.
getId
())
:
null
)
>
0
)
{
throw
new
BadRequest
(
"该名称已存在,请重新输入"
);
if
(
inputItemDao
.
findByItemName
(
param
.
getName
())
>
0
)
{
throw
new
BadRequest
(
"该名称已存在,请重新输入"
);
}
}
//如果为1则为否,顺应机场逻辑
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IInputItemDao.java
View file @
cabb850f
...
...
@@ -35,10 +35,16 @@ public interface IInputItemDao extends BaseDao<InputItem, Long> {
@Query
(
value
=
"delete * from p_input_item where is not null and is_delete =0"
,
nativeQuery
=
true
)
void
deleteAllByEquipmentNameIsNotNull
();
@Query
(
value
=
"select count(1) from p_input_item where item_no = :itemNo and is_delete = 0 and id != :id"
,
nativeQuery
=
true
)
int
findByItemNo
(
@Param
(
"itemNo"
)
String
itemNo
,
@Param
(
"id"
)
String
id
);
@Query
(
value
=
"select count(1) from p_input_item where item_no = :itemNo and is_delete = 0 "
,
nativeQuery
=
true
)
int
findByItemNo
(
@Param
(
"itemNo"
)
String
itemNo
);
@Query
(
value
=
"select count(1) from p_input_item where name = :name and is_delete = 0"
,
nativeQuery
=
true
)
int
findByItemName
(
@Param
(
"name"
)
String
name
);
@Query
(
value
=
"select count(1) from p_input_item where item_no = :itemNo and is_delete = 0 and id != :id "
,
nativeQuery
=
true
)
int
findByItemNoAndId
(
@Param
(
"itemNo"
)
String
itemNo
,
@Param
(
"id"
)
long
id
);
@Query
(
value
=
"select count(1) from p_input_item where name = :name and is_delete = 0 and id != :id"
,
nativeQuery
=
true
)
int
findByItemName
(
@Param
(
"name"
)
String
name
,
@Param
(
"id"
)
Stri
ng
id
);
int
findByItemName
AndId
(
@Param
(
"name"
)
String
name
,
@Param
(
"id"
)
lo
ng
id
);
}
amos-boot-system-patrol/src/main/resources/application.properties
View file @
cabb850f
...
...
@@ -31,7 +31,7 @@ mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
equip.fegin.name
=
AMOS-EQUIPMANAGE
equip.fegin.prefix
=
/equip
input.custom.prefix
=
QYZD
input.custom.prefix
=
input.statute.prefix
=
FG
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/routeMapper.xml
View file @
cabb850f
...
...
@@ -131,11 +131,16 @@
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
<delete
id=
"deleteReleInputItem"
>
delete b from p_point_inputitem a,p_route_point_item b where a.id = b.point_input_item_id and a.input_item_id in
<delete
id=
"deleteReleInputItem"
>
DELETE FROM p_route_point_item
WHERE point_input_item_id IN (
SELECT ID
FROM p_point_inputitem
WHERE input_item_id IN
<foreach
item=
"Id"
collection=
"array"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{Id}
</foreach>
#{Id}
</foreach>
);
</delete>
<select
id=
"queryRouteListByOrgCode"
resultType=
"Map"
>
SELECT temp.* FROM (
...
...
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