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
Hide 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 {
...
@@ -44,7 +44,6 @@ public class FireEquimtPointController extends BaseController {
if
(
fireEquipmentPoint
==
null
if
(
fireEquipmentPoint
==
null
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getName
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getName
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getFireEquipmentId
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getType
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getType
())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
()))
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
()))
throw
new
Exception
(
"数据校验失败."
);
throw
new
Exception
(
"数据校验失败."
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireEquipmentPointDao.java
View file @
cfb13e91
...
@@ -10,5 +10,7 @@ public interface IFireEquipmentPointDao extends BaseDao<FireEquipmentPoint, Long
...
@@ -10,5 +10,7 @@ public interface IFireEquipmentPointDao extends BaseDao<FireEquipmentPoint, Long
FireEquipmentPoint
findById
(
Long
id
);
FireEquipmentPoint
findById
(
Long
id
);
FireEquipmentPoint
findOneByCode
(
String
pointCode
);
FireEquipmentPoint
findOneByCode
(
String
pointCode
);
int
countByCode
(
String
code
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/entity/mybatis/FireEquipmentPointEntity.java
View file @
cfb13e91
...
@@ -29,6 +29,8 @@ public class FireEquipmentPointEntity extends FireEquipmentPointExtend {
...
@@ -29,6 +29,8 @@ public class FireEquipmentPointEntity extends FireEquipmentPointExtend {
private
String
orgCode
;
private
String
orgCode
;
private
Long
alarmType
;
private
Long
alarmType
;
private
String
alarmTypeName
;
private
String
fireEquipmentCode
;
private
String
fireEquipmentCode
;
...
@@ -135,4 +137,12 @@ public class FireEquipmentPointEntity extends FireEquipmentPointExtend {
...
@@ -135,4 +137,12 @@ public class FireEquipmentPointEntity extends FireEquipmentPointExtend {
public
void
setFireEquipmentCode
(
String
fireEquipmentCode
)
{
public
void
setFireEquipmentCode
(
String
fireEquipmentCode
)
{
this
.
fireEquipmentCode
=
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 {
...
@@ -29,7 +29,7 @@ public class FireEquipmentPointParam {
@Excel
(
name
=
"单位"
,
orderNum
=
"7"
,
width
=
12
)
@Excel
(
name
=
"单位"
,
orderNum
=
"7"
,
width
=
12
)
private
String
unit
;
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
;
private
Long
alarmType
;
public
Long
getId
()
{
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;
...
@@ -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.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
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.common.response.CommonResponse
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.op.core.util.StringUtil
;
import
com.yeejoin.amos.op.core.util.StringUtil
;
...
@@ -19,6 +20,7 @@ import org.springframework.data.domain.Page;
...
@@ -19,6 +20,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -39,6 +41,17 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
...
@@ -39,6 +41,17 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
public
FireEquipmentPoint
savePoint
(
FireEquipmentPoint
fireEquipmentPoint
)
{
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
);
return
fireEquipmentPointDao
.
save
(
fireEquipmentPoint
);
}
}
...
@@ -48,15 +61,14 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
...
@@ -48,15 +61,14 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
}
}
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
List
<
FireEquipmentPoint
>
list
=
new
ArrayList
<
FireEquipmentPoint
>();
for
(
String
id
:
idArray
)
{
for
(
String
id
:
idArray
)
{
FireEquipmentPoint
fireEquipmentPoint
=
fireEquipmentPointDao
.
findById
(
Long
.
parseLong
(
id
));
FireEquipmentPoint
fireEquipmentPoint
=
fireEquipmentPointDao
.
findById
(
Long
.
parseLong
(
id
));
if
(
fireEquipmentPoint
!=
null
)
{
if
(
fireEquipmentPoint
!=
null
)
{
this
.
fireEquipmentPointDao
.
delete
(
Long
.
parseLong
(
id
));
list
.
add
(
fireEquipmentPoint
);
}
else
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
}
}
}
}
fireEquipmentPointDao
.
delete
(
list
);
return
idArray
;
return
idArray
;
}
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equippoint.xml
View file @
cfb13e91
...
@@ -132,12 +132,14 @@
...
@@ -132,12 +132,14 @@
a.unit,
a.unit,
a.org_code as orgCode,
a.org_code as orgCode,
a.alarm_type as alarmType,
a.alarm_type as alarmType,
fd.dict_name as alarmTypeName,
b.name as fireEquipmentName,
b.name as fireEquipmentName,
b.code as fireEquipmentCode
b.code as fireEquipmentCode
from
from
f_fire_equipment_point as a
f_fire_equipment_point as a
left join
left join
f_fire_equipment as b on a.fire_equipment_id = b.id
f_fire_equipment as b on a.fire_equipment_id = b.id
left join f_dict fd on fd.id = a.alarm_type
<where>
<where>
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
<if
test=
"searchValue!=null and searchValue.trim() != ''"
>
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
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