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
cfb13e91
Commit
cfb13e91
authored
May 08, 2020
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改设备点位新增编辑接口
parent
d37e24df
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
6 deletions
+31
-6
FireEquimtPointController.java
...os/fas/business/controller/FireEquimtPointController.java
+0
-1
IFireEquipmentPointDao.java
...s/fas/business/dao/repository/IFireEquipmentPointDao.java
+2
-0
FireEquipmentPointEntity.java
...fas/business/entity/mybatis/FireEquipmentPointEntity.java
+10
-0
FireEquipmentPointParam.java
...join/amos/fas/business/param/FireEquipmentPointParam.java
+1
-1
FireEquipPointServiceImpl.java
.../fas/business/service/impl/FireEquipPointServiceImpl.java
+16
-4
dbTemplate_fire_equippoint.xml
...c/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
+2
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireEquimtPointController.java
View file @
cfb13e91
...
...
@@ -44,7 +44,6 @@ public class FireEquimtPointController extends BaseController {
if
(
fireEquipmentPoint
==
null
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getName
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getFireEquipmentId
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getType
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
()))
throw
new
Exception
(
"数据校验失败."
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireEquipmentPointDao.java
View file @
cfb13e91
...
...
@@ -11,4 +11,6 @@ public interface IFireEquipmentPointDao extends BaseDao<FireEquipmentPoint, Long
FireEquipmentPoint
findOneByCode
(
String
pointCode
);
int
countByCode
(
String
code
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/entity/mybatis/FireEquipmentPointEntity.java
View file @
cfb13e91
...
...
@@ -30,6 +30,8 @@ public class FireEquipmentPointEntity extends FireEquipmentPointExtend {
private
Long
alarmType
;
private
String
alarmTypeName
;
private
String
fireEquipmentCode
;
public
Long
getId
()
{
...
...
@@ -135,4 +137,12 @@ public class FireEquipmentPointEntity extends FireEquipmentPointExtend {
public
void
setFireEquipmentCode
(
String
fireEquipmentCode
)
{
this
.
fireEquipmentCode
=
fireEquipmentCode
;
}
public
String
getAlarmTypeName
()
{
return
alarmTypeName
;
}
public
void
setAlarmTypeName
(
String
alarmTypeName
)
{
this
.
alarmTypeName
=
alarmTypeName
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/FireEquipmentPointParam.java
View file @
cfb13e91
...
...
@@ -29,7 +29,7 @@ public class FireEquipmentPointParam {
@Excel
(
name
=
"单位"
,
orderNum
=
"7"
,
width
=
12
)
private
String
unit
;
@Excel
(
name
=
"告警类型"
,
replace
=
{
"火灾告警_1"
,
"电源开关_2"
,
"换流变_6"
,
"液位_3"
,
"流量_4"
,
"容量_5"
},
orderNum
=
"8"
)
@Excel
(
name
=
"告警类型"
,
replace
=
{
"火灾告警_1"
,
"电源开关_2"
,
"换流变_6"
,
"液位_3"
,
"流量_4"
,
"容量_5"
,
"故障告警_7"
},
orderNum
=
"8"
)
private
Long
alarmType
;
public
Long
getId
()
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipPointServiceImpl.java
View file @
cfb13e91
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.op.core.common.response.CommonResponse
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.op.core.util.StringUtil
;
...
...
@@ -19,6 +20,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -39,6 +41,17 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
public
FireEquipmentPoint
savePoint
(
FireEquipmentPoint
fireEquipmentPoint
)
{
if
(
fireEquipmentPoint
.
getId
()
!=
0
){
FireEquipmentPoint
fEqPoint
=
fireEquipmentPointDao
.
findOneByCode
(
fireEquipmentPoint
.
getCode
());
if
(
fEqPoint
!=
null
){
throw
new
YeeException
(
"该编码已存在"
);
}
}
else
{
FireEquipmentPoint
fEqPoint
=
fireEquipmentPointDao
.
findOneByCode
(
fireEquipmentPoint
.
getCode
());
if
(
fEqPoint
.
getId
()
!=
fireEquipmentPoint
.
getId
()){
throw
new
YeeException
(
"该编码已存在"
);
}
}
return
fireEquipmentPointDao
.
save
(
fireEquipmentPoint
);
}
...
...
@@ -48,15 +61,14 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
}
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
List
<
FireEquipmentPoint
>
list
=
new
ArrayList
<
FireEquipmentPoint
>();
for
(
String
id
:
idArray
)
{
FireEquipmentPoint
fireEquipmentPoint
=
fireEquipmentPointDao
.
findById
(
Long
.
parseLong
(
id
));
if
(
fireEquipmentPoint
!=
null
)
{
this
.
fireEquipmentPointDao
.
delete
(
Long
.
parseLong
(
id
));
}
else
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
list
.
add
(
fireEquipmentPoint
);
}
}
fireEquipmentPointDao
.
delete
(
list
);
return
idArray
;
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
View file @
cfb13e91
...
...
@@ -132,12 +132,14 @@
a.unit,
a.org_code as orgCode,
a.alarm_type as alarmType,
fd.dict_name as alarmTypeName,
b.name as fireEquipmentName,
b.code as fireEquipmentCode
from
f_fire_equipment_point as a
left join
f_fire_equipment as b on a.fire_equipment_id = b.id
left join f_dict fd on fd.id = a.alarm_type
<where>
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
...
...
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