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
61767d5d
Commit
61767d5d
authored
Jan 11, 2021
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
fe42f92b
aa89ba54
Show whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
4429 additions
and
4425 deletions
+4429
-4425
FireEquipmentData.java
...va/com/yeejoin/amos/fas/dao/entity/FireEquipmentData.java
+152
-152
FireEquipmentPoint.java
...a/com/yeejoin/amos/fas/dao/entity/FireEquipmentPoint.java
+127
-127
FireStation.java
...ain/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
+209
-209
FireStationFireEquipment.java
...yeejoin/amos/fas/dao/entity/FireStationFireEquipment.java
+90
-90
FireStrength.java
...in/java/com/yeejoin/amos/fas/dao/entity/FireStrength.java
+171
-171
WaterResource.java
...n/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
+245
-245
WaterResourceEquipment.java
...m/yeejoin/amos/fas/dao/entity/WaterResourceEquipment.java
+68
-68
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+3
-3
ExcelController.java
...yeejoin/amos/fas/business/controller/ExcelController.java
+4
-3
FireEquimtPointController.java
...os/fas/business/controller/FireEquimtPointController.java
+101
-101
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+9
-9
FireStationController.java
...n/amos/fas/business/controller/FireStationController.java
+180
-180
FireStrengthController.java
.../amos/fas/business/controller/FireStrengthController.java
+93
-93
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+6
-6
WaterResourceController.java
...amos/fas/business/controller/WaterResourceController.java
+144
-144
FireEquipMapper.java
...yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
+1
-3
FireStationMapper.java
...ejoin/amos/fas/business/dao/mapper/FireStationMapper.java
+7
-7
FireStrengthMapper.java
...join/amos/fas/business/dao/mapper/FireStrengthMapper.java
+19
-19
WaterResourceMapper.java
...oin/amos/fas/business/dao/mapper/WaterResourceMapper.java
+42
-42
FireStrengthPointDao.java
...mos/fas/business/dao/repository/FireStrengthPointDao.java
+14
-14
IContingencyOriginalDataDao.java
.../business/dao/repository/IContingencyOriginalDataDao.java
+1
-1
IFireEquipmentDataDao.java
...os/fas/business/dao/repository/IFireEquipmentDataDao.java
+16
-16
IFireEquipmentPointDao.java
...s/fas/business/dao/repository/IFireEquipmentPointDao.java
+28
-28
IFireStationDao.java
...oin/amos/fas/business/dao/repository/IFireStationDao.java
+15
-15
IFireStationEquipmentDao.java
...fas/business/dao/repository/IFireStationEquipmentDao.java
+19
-19
IFmeaEquipmentPointDao.java
...s/fas/business/dao/repository/IFmeaEquipmentPointDao.java
+20
-20
IWaterResourceDao.java
...n/amos/fas/business/dao/repository/IWaterResourceDao.java
+17
-17
IWaterResourceEquipmentDao.java
...s/business/dao/repository/IWaterResourceEquipmentDao.java
+27
-27
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+2
-4
ExcelServiceImpl.java
...join/amos/fas/business/service/impl/ExcelServiceImpl.java
+40
-40
FireEquipPointServiceImpl.java
.../fas/business/service/impl/FireEquipPointServiceImpl.java
+55
-55
FireEquipServiceImpl.java
.../amos/fas/business/service/impl/FireEquipServiceImpl.java
+25
-29
FireStationServiceImpl.java
...mos/fas/business/service/impl/FireStationServiceImpl.java
+203
-196
FireStrengthServiceImpl.java
...os/fas/business/service/impl/FireStrengthServiceImpl.java
+62
-62
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+139
-142
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+38
-38
WaterResourceServiceImpl.java
...s/fas/business/service/impl/WaterResourceServiceImpl.java
+130
-130
FireStengthService.java
...n/amos/fas/business/service/intfc/FireStengthService.java
+46
-46
IBizMessageService.java
...n/amos/fas/business/service/intfc/IBizMessageService.java
+1
-1
IExcelService.java
...eejoin/amos/fas/business/service/intfc/IExcelService.java
+1
-1
IFireEquipPontService.java
...mos/fas/business/service/intfc/IFireEquipPontService.java
+7
-7
IFireEquipService.java
...in/amos/fas/business/service/intfc/IFireEquipService.java
+1
-1
IFireStationService.java
.../amos/fas/business/service/intfc/IFireStationService.java
+77
-77
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+1
-1
IWaterResourceService.java
...mos/fas/business/service/intfc/IWaterResourceService.java
+59
-59
fas-create-table.sql
...src/main/resources/db/changelog/init/fas-create-table.sql
+119
-119
dbTemplate_3d_plan_visual.xml
...rc/main/resources/db/mapper/dbTemplate_3d_plan_visual.xml
+87
-86
dbTemplate_fier_station.xml
.../src/main/resources/db/mapper/dbTemplate_fier_station.xml
+107
-106
dbTemplate_fier_station_equipment.xml
...resources/db/mapper/dbTemplate_fier_station_equipment.xml
+15
-14
dbTemplate_fier_stength.xml
.../src/main/resources/db/mapper/dbTemplate_fier_stength.xml
+76
-75
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+145
-144
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+988
-987
dbTemplate_waterResource.xml
...src/main/resources/db/mapper/dbTemplate_waterResource.xml
+177
-176
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireEquipmentData.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//package com.yeejoin.amos.fas.dao.entity;
//
import
javax.persistence.Column
;
//import javax.persistence.Column;
import
javax.persistence.Entity
;
//import javax.persistence.Entity;
import
javax.persistence.NamedQuery
;
//import javax.persistence.NamedQuery;
import
javax.persistence.Table
;
//import javax.persistence.Table;
//
//
/**
///**
* The persistent class for the fire_equipment database table.
// * The persistent class for the fire_equipment database table.
*
// *
*/
// */
@Entity
//@Entity
@Table
(
name
=
"f_fire_equipment_data"
)
//@Table(name="f_fire_equipment_data")
@NamedQuery
(
name
=
"FireEquipmentData.findAll"
,
query
=
"SELECT f FROM FireEquipmentData f"
)
//@NamedQuery(name="FireEquipmentData.findAll", query="SELECT f FROM FireEquipmentData f")
public
class
FireEquipmentData
extends
BasicEntity
{
//public class FireEquipmentData extends BasicEntity {
private
static
final
long
serialVersionUID
=
1L
;
// private static final long serialVersionUID = 1L;
//
@Column
(
name
=
"fire_equipment_id"
)
// @Column(name="fire_equipment_id")
private
Long
fireEquipmentId
;
// private Long fireEquipmentId;
//
@Column
(
name
=
"fire_equipment_point_id"
)
// @Column(name="fire_equipment_point_id")
private
Long
fireEquipmentPointId
;
// private Long fireEquipmentPointId;
//
@Column
(
name
=
"eq_point_name"
)
// @Column(name="eq_point_name")
private
String
eqPointName
;
// private String eqPointName;
//
@Column
(
name
=
"eq_point_unit"
)
// @Column(name="eq_point_unit")
private
String
eqPointUnit
;
// private String eqPointUnit;
//
@Column
(
name
=
"eq_point_code"
)
// @Column(name="eq_point_code")
private
String
eqPointCode
;
// private String eqPointCode;
//
private
String
type
=
"alarm"
;
// private String type="alarm";
//
/**
// /**
* 信息地址
// * 信息地址
*/
// */
@Column
(
name
=
"information_address"
)
// @Column(name="information_address")
private
String
informationAddress
;
// private String informationAddress;
/**
// /**
* 值
// * 值
*/
// */
@Column
(
name
=
"e_value"
)
// @Column(name="e_value")
private
String
eValue
;
// private String eValue;
//
private
int
soe
;
// private int soe;
//
@Column
(
name
=
"is_invalid"
)
// @Column(name="is_invalid")
private
int
isInvalid
;
// 是否有效
// private int isInvalid; // 是否有效
//
/**
// /**
* 机构
// * 机构
*/
// */
@Column
(
name
=
"org_code"
)
// @Column(name="org_code")
private
String
orgCode
;
// private String orgCode;
//
public
String
getOrgCode
()
{
// public String getOrgCode() {
return
orgCode
;
// return orgCode;
}
// }
//
public
void
setOrgCode
(
String
orgCode
)
{
// public void setOrgCode(String orgCode) {
this
.
orgCode
=
orgCode
;
// this.orgCode = orgCode;
}
// }
//
public
FireEquipmentData
()
{
// public FireEquipmentData() {
}
// }
//
public
Long
getFireEquipmentId
()
{
// public Long getFireEquipmentId() {
return
fireEquipmentId
;
// return fireEquipmentId;
}
// }
//
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
// public void setFireEquipmentId(Long fireEquipmentId) {
this
.
fireEquipmentId
=
fireEquipmentId
;
// this.fireEquipmentId = fireEquipmentId;
}
// }
//
public
Long
getFireEquipmentPointId
()
{
// public Long getFireEquipmentPointId() {
return
fireEquipmentPointId
;
// return fireEquipmentPointId;
}
// }
//
public
void
setFireEquipmentPointId
(
Long
fireEquipmentPointId
)
{
// public void setFireEquipmentPointId(Long fireEquipmentPointId) {
this
.
fireEquipmentPointId
=
fireEquipmentPointId
;
// this.fireEquipmentPointId = fireEquipmentPointId;
}
// }
//
public
String
getEqPointName
()
{
// public String getEqPointName() {
return
eqPointName
;
// return eqPointName;
}
// }
//
public
void
setEqPointName
(
String
eqPointName
)
{
// public void setEqPointName(String eqPointName) {
this
.
eqPointName
=
eqPointName
;
// this.eqPointName = eqPointName;
}
// }
//
public
String
getEqPointUnit
()
{
// public String getEqPointUnit() {
return
eqPointUnit
;
// return eqPointUnit;
}
// }
//
public
void
setEqPointUnit
(
String
eqPointUnit
)
{
// public void setEqPointUnit(String eqPointUnit) {
this
.
eqPointUnit
=
eqPointUnit
;
// this.eqPointUnit = eqPointUnit;
}
// }
//
public
String
getEqPointCode
()
{
// public String getEqPointCode() {
return
eqPointCode
;
// return eqPointCode;
}
// }
//
public
void
setEqPointCode
(
String
eqPointCode
)
{
// public void setEqPointCode(String eqPointCode) {
this
.
eqPointCode
=
eqPointCode
;
// this.eqPointCode = eqPointCode;
}
// }
//
public
String
getType
()
{
// public String getType() {
return
type
;
// return type;
}
// }
//
public
void
setType
(
String
type
)
{
// public void setType(String type) {
this
.
type
=
type
;
// this.type = type;
}
// }
//
public
String
getInformationAddress
()
{
// public String getInformationAddress() {
return
informationAddress
;
// return informationAddress;
}
// }
//
public
void
setInformationAddress
(
String
informationAddress
)
{
// public void setInformationAddress(String informationAddress) {
this
.
informationAddress
=
informationAddress
;
// this.informationAddress = informationAddress;
}
// }
//
public
String
geteValue
()
{
// public String geteValue() {
return
eValue
;
// return eValue;
}
// }
//
public
void
seteValue
(
String
eValue
)
{
// public void seteValue(String eValue) {
this
.
eValue
=
eValue
;
// this.eValue = eValue;
}
// }
//
public
int
getSoe
()
{
// public int getSoe() {
return
soe
;
// return soe;
}
// }
//
public
void
setSoe
(
int
soe
)
{
// public void setSoe(int soe) {
this
.
soe
=
soe
;
// this.soe = soe;
}
// }
//
public
int
getIsInvalid
()
{
// public int getIsInvalid() {
return
isInvalid
;
// return isInvalid;
}
// }
//
public
void
setIsInvalid
(
int
isInvalid
)
{
// public void setIsInvalid(int isInvalid) {
this
.
isInvalid
=
isInvalid
;
// this.isInvalid = isInvalid;
}
// }
//
//
//
}
//}
\ No newline at end of file
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireEquipmentPoint.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//package com.yeejoin.amos.fas.dao.entity;
//
import
javax.persistence.Column
;
//import javax.persistence.Column;
import
javax.persistence.Entity
;
//import javax.persistence.Entity;
import
javax.persistence.NamedQuery
;
//import javax.persistence.NamedQuery;
import
javax.persistence.Table
;
//import javax.persistence.Table;
//
import
org.springframework.data.annotation.Transient
;
//import org.springframework.data.annotation.Transient;
//
//
/**
///**
* The persistent class for the f_fire_equipment_point database table.
// * The persistent class for the f_fire_equipment_point database table.
*
// *
*/
// */
@Entity
//@Entity
@Table
(
name
=
"f_fire_equipment_point"
)
//@Table(name="f_fire_equipment_point")
@NamedQuery
(
name
=
"FireEquipmentPoint.findAll"
,
query
=
"SELECT f FROM FireEquipmentPoint f"
)
//@NamedQuery(name="FireEquipmentPoint.findAll", query="SELECT f FROM FireEquipmentPoint f")
public
class
FireEquipmentPoint
extends
BasicEntity
{
//public class FireEquipmentPoint extends BasicEntity {
private
static
final
long
serialVersionUID
=
1L
;
// private static final long serialVersionUID = 1L;
@Column
(
name
=
"code"
)
// @Column(name="code")
private
String
code
;
// private String code;
//
@Column
(
name
=
"create_by"
)
// @Column(name="create_by")
private
String
createBy
;
// private String createBy;
//
@Column
(
name
=
"fire_equipment_id"
)
// @Column(name="fire_equipment_id")
private
Long
fireEquipmentId
;
// private Long fireEquipmentId;
//
@Column
(
name
=
"name"
)
// @Column(name="name")
private
String
name
;
// private String name;
//
@Column
(
name
=
"remark"
)
// @Column(name="remark")
private
String
remark
;
// private String remark;
//
@Column
(
name
=
"type"
)
// @Column(name="type")
private
String
type
;
// private String type;
//
@Column
(
name
=
"value"
)
// @Column(name="value")
private
String
value
;
// private String value;
//
private
String
unit
;
// private String unit;
@Column
(
name
=
"alarm_type"
)
// @Column(name="alarm_type")
private
Long
alarmType
;
// private Long alarmType;
//
@Column
(
name
=
"org_code"
)
// @Column(name="org_code")
private
String
orgCode
;
// private String orgCode;
public
String
getCode
()
{
// public String getCode() {
return
code
;
// return code;
}
// }
//
public
void
setCode
(
String
code
)
{
// public void setCode(String code) {
this
.
code
=
code
;
// this.code = code;
}
// }
//
public
String
getCreateBy
()
{
// public String getCreateBy() {
return
createBy
;
// return createBy;
}
// }
//
public
void
setCreateBy
(
String
createBy
)
{
// public void setCreateBy(String createBy) {
this
.
createBy
=
createBy
;
// this.createBy = createBy;
}
// }
//
public
Long
getFireEquipmentId
()
{
// public Long getFireEquipmentId() {
return
fireEquipmentId
;
// return fireEquipmentId;
}
// }
//
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
// public void setFireEquipmentId(Long fireEquipmentId) {
this
.
fireEquipmentId
=
fireEquipmentId
;
// this.fireEquipmentId = fireEquipmentId;
}
// }
//
public
String
getName
()
{
// public String getName() {
return
name
;
// return name;
}
// }
//
public
void
setName
(
String
name
)
{
// public void setName(String name) {
this
.
name
=
name
;
// this.name = name;
}
// }
//
public
String
getRemark
()
{
// public String getRemark() {
return
remark
;
// return remark;
}
// }
//
public
void
setRemark
(
String
remark
)
{
// public void setRemark(String remark) {
this
.
remark
=
remark
;
// this.remark = remark;
}
// }
//
public
String
getType
()
{
// public String getType() {
return
type
;
// return type;
}
// }
//
public
void
setType
(
String
type
)
{
// public void setType(String type) {
this
.
type
=
type
;
// this.type = type;
}
// }
//
public
String
getValue
()
{
// public String getValue() {
return
value
;
// return value;
}
// }
//
public
void
setValue
(
String
value
)
{
// public void setValue(String value) {
this
.
value
=
value
;
// this.value = value;
}
// }
//
public
String
getUnit
()
{
// public String getUnit() {
return
unit
;
// return unit;
}
// }
//
public
void
setUnit
(
String
unit
)
{
// public void setUnit(String unit) {
this
.
unit
=
unit
;
// this.unit = unit;
}
// }
//
public
Long
getAlarmType
()
{
// public Long getAlarmType() {
return
alarmType
;
// return alarmType;
}
// }
//
public
void
setAlarmType
(
Long
alarmType
)
{
// public void setAlarmType(Long alarmType) {
this
.
alarmType
=
alarmType
;
// this.alarmType = alarmType;
}
// }
//
public
String
getOrgCode
()
{
// public String getOrgCode() {
return
orgCode
;
// return orgCode;
}
// }
//
public
void
setOrgCode
(
String
orgCode
)
{
// public void setOrgCode(String orgCode) {
this
.
orgCode
=
orgCode
;
// this.orgCode = orgCode;
}
// }
}
//}
\ No newline at end of file
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStation.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//
package com.yeejoin.amos.fas.dao.entity;
//
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
//
import
javax.persistence.*
;
//
import javax.persistence.*;
//
/**
/
//
**
* 消防站点
//
* 消防站点
* @author Administrator
//
* @author Administrator
*
//
*
*/
//
*/
@Entity
//
@Entity
@Table
(
name
=
"f_fire_station"
)
//
@Table(name="f_fire_station")
@NamedQuery
(
name
=
"FireStation.findAll"
,
query
=
"SELECT f FROM FireStation f"
)
//
@NamedQuery(name="FireStation.findAll", query="SELECT f FROM FireStation f")
public
class
FireStation
extends
BasicEntity
{
//
public class FireStation extends BasicEntity{
//
/**
//
/**
*
// *
*/
//
*/
private
static
final
long
serialVersionUID
=
1L
;
//
private static final long serialVersionUID = 1L;
//
/**
//
/**
* 名称
//
* 名称
*/
//
*/
private
String
name
;
//
private String name;
/**
//
/**
* 编号
//
* 编号
*/
//
*/
private
String
code
;
//
private String code;
//
/**
//
/**
* 类型 1:消防小室,2:消防泡沫间
//
* 类型 1:消防小室,2:消防泡沫间
*/
//
*/
private
String
type
;
//
private String type;
//
/**
//
/**
* 所属风险区域id
//
* 所属风险区域id
*/
//
*/
@Column
(
name
=
"risk_source_id"
)
//
@Column(name="risk_source_id")
private
Long
riskSourceId
;
//
private Long riskSourceId;
//
//
/**
//
/**
* 位置
//
* 位置
*/
//
*/
private
String
address
;
//
private String address;
//
/**
//
/**
* 3纬坐标
//
* 3纬坐标
*/
//
*/
private
String
position3d
;
//
private String position3d;
//
/**
//
/**
* 3维楼层
//
* 3维楼层
*/
//
*/
private
String
floor3d
;
// private String floor3d;
//
/**
//
/**
* 是否室内
//
* 是否室内
*/
//
*/
@Column
(
name
=
"is_indoor"
)
//
@Column(name="is_indoor")
private
Boolean
isIndoor
=
true
;
//
private Boolean isIndoor=true;
//
/**
//
/**
* 组织
//
* 组织
*/
//
*/
@Column
(
name
=
"org_code"
)
//
@Column(name="org_code")
private
String
orgCode
;
//
private String orgCode;
//
/**
//
/**
* 创建人
//
* 创建人
*/
//
*/
@Column
(
name
=
"create_by"
)
//
@Column(name="create_by")
private
String
createBy
;
//
private String createBy;
//
//
@Column
(
name
=
"picture"
)
//
@Column(name="picture")
private
String
picture
;
//
private String picture;
//
private
List
<
Map
>
fireEquipmentInfo
;
//
private List<Map> fireEquipmentInfo;
//
/**
//
/**
* ue4位置
//
* ue4位置
*/
//
*/
@Lob
//
@Lob
private
String
ue4Location
;
//
private String ue4Location;
//
/**
//
/**
* ue4旋转
//
* ue4旋转
*/
//
*/
@Lob
//
@Lob
private
String
ue4Rotation
;
//
private String ue4Rotation;
//
@Transient
//
@Transient
public
List
<
Map
>
getFireEquipmentInfo
()
{
//
public List<Map> getFireEquipmentInfo() {
return
fireEquipmentInfo
;
//
return fireEquipmentInfo;
}
//
}
//
public
void
setFireEquipmentInfo
(
List
<
Map
>
fireEquipmentInfo
)
{
//
public void setFireEquipmentInfo(List<Map> fireEquipmentInfo) {
this
.
fireEquipmentInfo
=
fireEquipmentInfo
;
//
this.fireEquipmentInfo = fireEquipmentInfo;
}
//
}
//
public
String
getName
()
{
//
public String getName() {
return
name
;
//
return name;
}
//
}
//
public
void
setName
(
String
name
)
{
//
public void setName(String name) {
this
.
name
=
name
;
//
this.name = name;
}
//
}
//
public
String
getCode
()
{
//
public String getCode() {
return
code
;
//
return code;
}
//
}
//
public
void
setCode
(
String
code
)
{
//
public void setCode(String code) {
this
.
code
=
code
;
//
this.code = code;
}
//
}
//
public
String
getType
()
{
//
public String getType() {
return
type
;
//
return type;
}
//
}
//
public
void
setType
(
String
type
)
{
//
public void setType(String type) {
this
.
type
=
type
;
//
this.type = type;
}
//
}
//
public
String
getAddress
()
{
//
public String getAddress() {
return
address
;
//
return address;
}
//
}
//
public
void
setAddress
(
String
address
)
{
//
public void setAddress(String address) {
this
.
address
=
address
;
//
this.address = address;
}
//
}
//
public
String
getPosition3d
()
{
//
public String getPosition3d() {
return
position3d
;
//
return position3d;
}
//
}
//
public
void
setPosition3d
(
String
position3d
)
{
//
public void setPosition3d(String position3d) {
this
.
position3d
=
position3d
;
//
this.position3d = position3d;
}
//
}
//
public
String
getFloor3d
()
{
//
public String getFloor3d() {
return
floor3d
;
//
return floor3d;
}
//
}
//
public
void
setFloor3d
(
String
floor3d
)
{
//
public void setFloor3d(String floor3d) {
this
.
floor3d
=
floor3d
;
//
this.floor3d = floor3d;
}
//
}
//
public
Boolean
getIsIndoor
()
{
//
public Boolean getIsIndoor() {
return
isIndoor
;
//
return isIndoor;
}
//
}
//
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
//
public void setIsIndoor(Boolean isIndoor) {
this
.
isIndoor
=
isIndoor
;
//
this.isIndoor = isIndoor;
}
//
}
//
public
String
getOrgCode
()
{
//
public String getOrgCode() {
return
orgCode
;
//
return orgCode;
}
//
}
//
public
void
setOrgCode
(
String
orgCode
)
{
//
public void setOrgCode(String orgCode) {
this
.
orgCode
=
orgCode
;
//
this.orgCode = orgCode;
}
//
}
//
public
String
getCreateBy
()
{
//
public String getCreateBy() {
return
createBy
;
//
return createBy;
}
//
}
//
public
void
setCreateBy
(
String
createBy
)
{
//
public void setCreateBy(String createBy) {
this
.
createBy
=
createBy
;
//
this.createBy = createBy;
}
//
}
//
public
String
getPicture
()
{
//
public String getPicture() {
return
picture
;
//
return picture;
}
//
}
//
public
void
setPicture
(
String
picture
)
{
//
public void setPicture(String picture) {
this
.
picture
=
picture
;
//
this.picture = picture;
}
//
}
//
public
Long
getRiskSourceId
()
{
//
public Long getRiskSourceId() {
return
riskSourceId
;
//
return riskSourceId;
}
//
}
//
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
//
public void setRiskSourceId(Long riskSourceId) {
this
.
riskSourceId
=
riskSourceId
;
//
this.riskSourceId = riskSourceId;
}
//
}
//
@Column
(
name
=
"ue4_location"
)
//
@Column(name = "ue4_location")
public
String
getUe4Location
()
{
//
public String getUe4Location() {
return
ue4Location
;
//
return ue4Location;
}
//
}
//
public
void
setUe4Location
(
String
ue4Location
)
{
//
public void setUe4Location(String ue4Location) {
this
.
ue4Location
=
ue4Location
;
//
this.ue4Location = ue4Location;
}
//
}
//
@Column
(
name
=
"ue4_rotation"
)
//
@Column(name = "ue4_rotation")
public
String
getUe4Rotation
()
{
//
public String getUe4Rotation() {
return
ue4Rotation
;
//
return ue4Rotation;
}
//
}
//
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
//
public void setUe4Rotation(String ue4Rotation) {
this
.
ue4Rotation
=
ue4Rotation
;
//
this.ue4Rotation = ue4Rotation;
}
//
}
}
//
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStationFireEquipment.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//
package com.yeejoin.amos.fas.dao.entity;
//
import
javax.persistence.Column
;
//
import javax.persistence.Column;
import
javax.persistence.Entity
;
//
import javax.persistence.Entity;
import
javax.persistence.NamedQuery
;
//
import javax.persistence.NamedQuery;
import
javax.persistence.Table
;
//
import javax.persistence.Table;
/**
/
//
**
* 消防站关联物资
//
* 消防站关联物资
* @author Administrator
//
* @author Administrator
*
//
*
*/
//
*/
@Entity
//
@Entity
@Table
(
name
=
"f_fire_station_equipment"
)
//
@Table(name="f_fire_station_equipment")
@NamedQuery
(
name
=
"FireStationFireEquipment.findAll"
,
query
=
"SELECT f FROM FireStationFireEquipment f"
)
//
@NamedQuery(name="FireStationFireEquipment.findAll", query="SELECT f FROM FireStationFireEquipment f")
public
class
FireStationFireEquipment
extends
BasicEntity
{
//
public class FireStationFireEquipment extends BasicEntity{
//
/**
//
/**
*
// *
*/
//
*/
private
static
final
long
serialVersionUID
=
1L
;
//
private static final long serialVersionUID = 1L;
//
/**
//
/**
* 消防站id
//
* 消防站id
*/
//
*/
@Column
(
name
=
"fire_station_id"
)
//
@Column(name="fire_station_id")
private
Long
fireStationId
;
//
private Long fireStationId;
//
/**
//
/**
* 消防资源
//
* 消防资源
*/
//
*/
@Column
(
name
=
"fire_equipment_id"
)
//
@Column(name="fire_equipment_id")
private
Long
fireEquipmentId
;
//
private Long fireEquipmentId;
//
/**
//
/**
* 个数
//
* 个数
*/
//
*/
private
Double
number
;
//
private Double number;
//
/**
//
/**
* 单位
//
* 单位
*/
//
*/
private
String
unit
;
//
private String unit;
//
/**
//
/**
* 创建人
//
* 创建人
*/
//
*/
@Column
(
name
=
"create_by"
)
//
@Column(name="create_by")
private
String
createBy
;
//
private String createBy;
//
public
Long
getFireStationId
()
{
//
public Long getFireStationId() {
return
fireStationId
;
//
return fireStationId;
}
//
}
//
public
void
setFireStationId
(
Long
fireStationId
)
{
//
public void setFireStationId(Long fireStationId) {
this
.
fireStationId
=
fireStationId
;
//
this.fireStationId = fireStationId;
}
//
}
//
public
Long
getFireEquipmentId
()
{
//
public Long getFireEquipmentId() {
return
fireEquipmentId
;
//
return fireEquipmentId;
}
//
}
//
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
//
public void setFireEquipmentId(Long fireEquipmentId) {
this
.
fireEquipmentId
=
fireEquipmentId
;
//
this.fireEquipmentId = fireEquipmentId;
}
//
}
//
public
Double
getNumber
()
{
//
public Double getNumber() {
return
number
;
//
return number;
}
//
}
//
public
void
setNumber
(
Double
number
)
{
//
public void setNumber(Double number) {
this
.
number
=
number
;
//
this.number = number;
}
//
}
//
public
String
getUnit
()
{
//
public String getUnit() {
return
unit
;
//
return unit;
}
//
}
//
public
void
setUnit
(
String
unit
)
{
//
public void setUnit(String unit) {
this
.
unit
=
unit
;
//
this.unit = unit;
}
//
}
//
public
String
getCreateBy
()
{
//
public String getCreateBy() {
return
createBy
;
//
return createBy;
}
//
}
//
public
void
setCreateBy
(
String
createBy
)
{
//
public void setCreateBy(String createBy) {
this
.
createBy
=
createBy
;
//
this.createBy = createBy;
}
//
}
//
}
//
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireStrength.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//
package com.yeejoin.amos.fas.dao.entity;
//
import
java.sql.Time
;
//
import java.sql.Time;
//
import
javax.persistence.Column
;
//
import javax.persistence.Column;
import
javax.persistence.Entity
;
//
import javax.persistence.Entity;
import
javax.persistence.NamedQuery
;
//
import javax.persistence.NamedQuery;
import
javax.persistence.Table
;
//
import javax.persistence.Table;
/**
/
//
**
* 消防力量
//
* 消防力量
* @author Administrator
//
* @author Administrator
*
//
*
*/
//
*/
@Entity
//
@Entity
@Table
(
name
=
"f_fire_strength"
)
//
@Table(name="f_fire_strength")
@NamedQuery
(
name
=
"FireStrength.findAll"
,
query
=
"SELECT f FROM FireStrength f"
)
//
@NamedQuery(name="FireStrength.findAll", query="SELECT f FROM FireStrength f")
public
class
FireStrength
extends
BasicEntity
{
//
public class FireStrength extends BasicEntity{
//
/**
//
/**
*
// *
*/
//
*/
private
static
final
long
serialVersionUID
=
1L
;
//
private static final long serialVersionUID = 1L;
//
/**
//
/**
* 编号
//
* 编号
*/
//
*/
private
String
code
;
//
private String code;
//
/**
//
/**
* 姓名
//
* 姓名
*/
//
*/
private
String
username
;
//
private String username;
//
/**
//
/**
* 职位
//
* 职位
*/
//
*/
private
String
position
;
//
private String position;
//
/**
//
/**
* 固话
//
* 固话
*/
//
*/
private
String
tel
;
//
private String tel;
//
/**
//
/**
* 开始时间
//
* 开始时间
*/
//
*/
@Column
(
name
=
"day_begin"
)
//
@Column(name="day_begin")
private
Time
dayBegin
;
//
private Time dayBegin;
/**
//
/**
* 结束时间
//
* 结束时间
*/
//
*/
@Column
(
name
=
"day_end"
)
//
@Column(name="day_end")
private
Time
dayEnd
;
//
private Time dayEnd;
/**
//
/**
* 手机
//
* 手机
*/
//
*/
@Column
(
name
=
"phone_num"
)
//
@Column(name="phone_num")
private
String
phoneNum
;
// private String phoneNum;
//
/**
//
/**
* 工作描述
//
* 工作描述
*/
//
*/
@Column
(
name
=
"job_des"
)
//
@Column(name="job_des")
private
String
jobDes
;
//
private String jobDes;
//
/**
//
/**
* 备注
//
* 备注
*/
//
*/
private
String
remark
;
//
private String remark;
//
/**
//
/**
* 组织
//
* 组织
*/
//
*/
@Column
(
name
=
"org_code"
)
//
@Column(name="org_code")
private
String
orgCode
;
//
private String orgCode;
//
/**
//
/**
* 创建人
//
* 创建人
*/
//
*/
@Column
(
name
=
"create_by"
)
//
@Column(name="create_by")
private
String
createBy
;
//
private String createBy;
//
public
String
getCode
()
{
//
public String getCode() {
return
code
;
//
return code;
}
//
}
//
public
void
setCode
(
String
code
)
{
//
public void setCode(String code) {
this
.
code
=
code
;
//
this.code = code;
}
//
}
//
public
String
getUsername
()
{
//
public String getUsername() {
return
username
;
//
return username;
}
//
}
//
public
void
setUsername
(
String
username
)
{
//
public void setUsername(String username) {
this
.
username
=
username
;
//
this.username = username;
}
//
}
//
public
String
getPosition
()
{
//
public String getPosition() {
return
position
;
//
return position;
}
//
}
//
public
void
setPosition
(
String
position
)
{
//
public void setPosition(String position) {
this
.
position
=
position
;
//
this.position = position;
}
//
}
//
public
String
getTel
()
{
//
public String getTel() {
return
tel
;
//
return tel;
}
//
}
//
public
void
setTel
(
String
tel
)
{
//
public void setTel(String tel) {
this
.
tel
=
tel
;
//
this.tel = tel;
}
//
}
//
public
String
getPhoneNum
()
{
//
public String getPhoneNum() {
return
phoneNum
;
//
return phoneNum;
}
//
}
//
public
void
setPhoneNum
(
String
phoneNum
)
{
//
public void setPhoneNum(String phoneNum) {
this
.
phoneNum
=
phoneNum
;
//
this.phoneNum = phoneNum;
}
//
}
//
public
String
getJobDes
()
{
//
public String getJobDes() {
return
jobDes
;
//
return jobDes;
}
//
}
//
public
void
setJobDes
(
String
jobDes
)
{
//
public void setJobDes(String jobDes) {
this
.
jobDes
=
jobDes
;
//
this.jobDes = jobDes;
}
//
}
//
public
String
getRemark
()
{
//
public String getRemark() {
return
remark
;
//
return remark;
}
//
}
//
public
void
setRemark
(
String
remark
)
{
//
public void setRemark(String remark) {
this
.
remark
=
remark
;
//
this.remark = remark;
}
//
}
//
public
String
getOrgCode
()
{
//
public String getOrgCode() {
return
orgCode
;
//
return orgCode;
}
//
}
//
public
void
setOrgCode
(
String
orgCode
)
{
//
public void setOrgCode(String orgCode) {
this
.
orgCode
=
orgCode
;
//
this.orgCode = orgCode;
}
//
}
//
public
String
getCreateBy
()
{
//
public String getCreateBy() {
return
createBy
;
//
return createBy;
}
//
}
//
public
void
setCreateBy
(
String
createBy
)
{
//
public void setCreateBy(String createBy) {
this
.
createBy
=
createBy
;
//
this.createBy = createBy;
}
//
}
//
public
Time
getDayBegin
()
{
//
public Time getDayBegin() {
return
dayBegin
;
//
return dayBegin;
}
//
}
//
public
void
setDayBegin
(
Time
dayBegin
)
{
//
public void setDayBegin(Time dayBegin) {
this
.
dayBegin
=
dayBegin
;
//
this.dayBegin = dayBegin;
}
//
}
//
public
Time
getDayEnd
()
{
//
public Time getDayEnd() {
return
dayEnd
;
//
return dayEnd;
}
//
}
//
public
void
setDayEnd
(
Time
dayEnd
)
{
//
public void setDayEnd(Time dayEnd) {
this
.
dayEnd
=
dayEnd
;
//
this.dayEnd = dayEnd;
}
//
}
//
}
//
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/WaterResource.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//
package com.yeejoin.amos.fas.dao.entity;
//
import
javax.persistence.*
;
//
import javax.persistence.*;
//
/**
/
//
**
* 水资源
//
* 水资源
* @author
//
* @author
*
//
*
*/
//
*/
@Entity
//
@Entity
@Table
(
name
=
"f_water_resource"
)
//
@Table(name="f_water_resource")
@NamedQuery
(
name
=
"WaterResource.findAll"
,
query
=
"SELECT f FROM WaterResource f"
)
//
@NamedQuery(name="WaterResource.findAll", query="SELECT f FROM WaterResource f")
public
class
WaterResource
extends
BasicEntity
{
//
public class WaterResource extends BasicEntity{
//
/**
//
/**
*
// *
*/
//
*/
private
static
final
long
serialVersionUID
=
1L
;
//
private static final long serialVersionUID = 1L;
//
/**
//
/**
* 名称
//
* 名称
*/
//
*/
private
String
name
;
//
private String name;
/**
//
/**
* 编号
//
* 编号
*/
//
*/
private
String
code
;
//
private String code;
//
/**
//
/**
* 类型 1:消火栓,2:消防水池,3:喷淋
//
* 类型 1:消火栓,2:消防水池,3:喷淋
*/
//
*/
private
String
type
;
//
private String type;
//
//
/**
//
/**
* 区域
//
* 区域
*/
//
*/
@Column
(
name
=
"production_area"
)
//
@Column(name="production_area")
private
String
productionArea
;
//
private String productionArea;
//
//
/**
//
/**
* 3纬坐标
//
* 3纬坐标
*/
//
*/
private
String
position3d
;
//
private String position3d;
//
/**
//
/**
* 3维楼层
//
* 3维楼层
*/
//
*/
private
String
floor3d
;
// private String floor3d;
//
/**
//
/**
* 是否室内
//
* 是否室内
*/
//
*/
@Column
(
name
=
"is_indoor"
)
//
@Column(name="is_indoor")
private
Boolean
isIndoor
=
true
;
//
private Boolean isIndoor=true;
/**
//
/**
* 所属风险区域id
//
* 所属风险区域id
*/
//
*/
@Column
(
name
=
"risk_source_id"
)
//
@Column(name="risk_source_id")
private
Long
riskSourceId
;
//
private Long riskSourceId;
//
/**
//
/**
* 房间
//
* 房间
*/
//
*/
private
String
room
;
//
private String room;
//
/**
//
/**
* 位置
//
* 位置
*/
//
*/
private
String
address
;
//
private String address;
//
//
/**
//
/**
* 组织
//
* 组织
*/
//
*/
@Column
(
name
=
"org_code"
)
//
@Column(name="org_code")
private
String
orgCode
;
//
private String orgCode;
//
/**
//
/**
* 创建人
//
* 创建人
*/
//
*/
@Column
(
name
=
"create_by"
)
//
@Column(name="create_by")
private
String
createBy
;
//
private String createBy;
//
@Column
(
name
=
"area"
)
//
@Column(name="area")
private
String
area
;
//
private String area;
//
@Column
(
name
=
"max_level"
)
//
@Column(name="max_level")
private
String
maxLevel
;
//
private String maxLevel;
//
@Column
(
name
=
"alarm_level"
)
//
@Column(name="alarm_level")
private
String
alarmLevel
;
//
private String alarmLevel;
//
/**
//
/**
* ue4位置
//
* ue4位置
*/
//
*/
@Lob
//
@Lob
private
String
ue4Location
;
//
private String ue4Location;
//
/**
//
/**
* ue4旋转
//
* ue4旋转
*/
//
*/
@Lob
//
@Lob
private
String
ue4Rotation
;
//
private String ue4Rotation;
//
public
String
getName
()
{
//
public String getName() {
return
name
;
//
return name;
}
//
}
//
public
void
setName
(
String
name
)
{
//
public void setName(String name) {
this
.
name
=
name
;
//
this.name = name;
}
//
}
//
public
String
getCode
()
{
//
public String getCode() {
return
code
;
//
return code;
}
//
}
//
public
void
setCode
(
String
code
)
{
//
public void setCode(String code) {
this
.
code
=
code
;
//
this.code = code;
}
//
}
//
public
String
getType
()
{
//
public String getType() {
return
type
;
//
return type;
}
//
}
//
public
void
setType
(
String
type
)
{
//
public void setType(String type) {
this
.
type
=
type
;
//
this.type = type;
}
//
}
//
public
String
getProductionArea
()
{
//
public String getProductionArea() {
return
productionArea
;
//
return productionArea;
}
//
}
//
public
void
setProductionArea
(
String
productionArea
)
{
//
public void setProductionArea(String productionArea) {
this
.
productionArea
=
productionArea
;
//
this.productionArea = productionArea;
}
//
}
//
public
String
getPosition3d
()
{
//
public String getPosition3d() {
return
position3d
;
//
return position3d;
}
//
}
//
public
void
setPosition3d
(
String
position3d
)
{
//
public void setPosition3d(String position3d) {
this
.
position3d
=
position3d
;
//
this.position3d = position3d;
}
//
}
//
public
String
getFloor3d
()
{
//
public String getFloor3d() {
return
floor3d
;
//
return floor3d;
}
//
}
//
public
void
setFloor3d
(
String
floor3d
)
{
//
public void setFloor3d(String floor3d) {
this
.
floor3d
=
floor3d
;
//
this.floor3d = floor3d;
}
//
}
//
public
Boolean
getIsIndoor
()
{
//
public Boolean getIsIndoor() {
return
isIndoor
;
//
return isIndoor;
}
//
}
//
public
void
setIsIndoor
(
Boolean
isIndoor
)
{
//
public void setIsIndoor(Boolean isIndoor) {
this
.
isIndoor
=
isIndoor
;
//
this.isIndoor = isIndoor;
}
//
}
//
//
public
String
getRoom
()
{
//
public String getRoom() {
return
room
;
//
return room;
}
//
}
//
public
void
setRoom
(
String
room
)
{
//
public void setRoom(String room) {
this
.
room
=
room
;
//
this.room = room;
}
//
}
//
public
Long
getRiskSourceId
()
{
//
public Long getRiskSourceId() {
return
riskSourceId
;
//
return riskSourceId;
}
//
}
//
public
void
setRiskSourceId
(
Long
riskSourceId
)
{
//
public void setRiskSourceId(Long riskSourceId) {
this
.
riskSourceId
=
riskSourceId
;
//
this.riskSourceId = riskSourceId;
}
//
}
//
public
String
getAddress
()
{
//
public String getAddress() {
return
address
;
//
return address;
}
//
}
//
public
void
setAddress
(
String
address
)
{
//
public void setAddress(String address) {
this
.
address
=
address
;
//
this.address = address;
}
//
}
//
public
String
getOrgCode
()
{
//
public String getOrgCode() {
return
orgCode
;
//
return orgCode;
}
//
}
//
public
void
setOrgCode
(
String
orgCode
)
{
//
public void setOrgCode(String orgCode) {
this
.
orgCode
=
orgCode
;
//
this.orgCode = orgCode;
}
//
}
//
public
String
getCreateBy
()
{
//
public String getCreateBy() {
return
createBy
;
//
return createBy;
}
//
}
//
public
void
setCreateBy
(
String
createBy
)
{
//
public void setCreateBy(String createBy) {
this
.
createBy
=
createBy
;
//
this.createBy = createBy;
}
//
}
//
@Column
(
name
=
"ue4_location"
)
//
@Column(name = "ue4_location")
public
String
getUe4Location
()
{
//
public String getUe4Location() {
return
ue4Location
;
//
return ue4Location;
}
//
}
//
public
void
setUe4Location
(
String
ue4Location
)
{
//
public void setUe4Location(String ue4Location) {
this
.
ue4Location
=
ue4Location
;
//
this.ue4Location = ue4Location;
}
//
}
//
@Column
(
name
=
"ue4_rotation"
)
//
@Column(name = "ue4_rotation")
public
String
getUe4Rotation
()
{
//
public String getUe4Rotation() {
return
ue4Rotation
;
//
return ue4Rotation;
}
//
}
//
public
void
setUe4Rotation
(
String
ue4Rotation
)
{
//
public void setUe4Rotation(String ue4Rotation) {
this
.
ue4Rotation
=
ue4Rotation
;
//
this.ue4Rotation = ue4Rotation;
}
//
}
//
public
String
getArea
()
{
//
public String getArea() {
return
area
;
//
return area;
}
//
}
//
public
void
setArea
(
String
area
)
{
//
public void setArea(String area) {
this
.
area
=
area
;
//
this.area = area;
}
//
}
//
public
String
getMaxLevel
()
{
//
public String getMaxLevel() {
return
maxLevel
;
//
return maxLevel;
}
//
}
//
public
void
setMaxLevel
(
String
maxLevel
)
{
//
public void setMaxLevel(String maxLevel) {
this
.
maxLevel
=
maxLevel
;
//
this.maxLevel = maxLevel;
}
//
}
//
public
String
getAlarmLevel
()
{
//
public String getAlarmLevel() {
return
alarmLevel
;
//
return alarmLevel;
}
//
}
//
public
void
setAlarmLevel
(
String
alarmLevel
)
{
//
public void setAlarmLevel(String alarmLevel) {
this
.
alarmLevel
=
alarmLevel
;
//
this.alarmLevel = alarmLevel;
}
//
}
}
//
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/WaterResourceEquipment.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//
package com.yeejoin.amos.fas.dao.entity;
//
import
javax.persistence.Column
;
//
import javax.persistence.Column;
import
javax.persistence.Entity
;
//
import javax.persistence.Entity;
import
javax.persistence.NamedQuery
;
//
import javax.persistence.NamedQuery;
import
javax.persistence.Table
;
//
import javax.persistence.Table;
/**
/
//
**
* 水资源设备表
//
* 水资源设备表
* @author
//
* @author
*
//
*
*/
//
*/
@Entity
//
@Entity
@Table
(
name
=
"f_water_resource_equipment"
)
//
@Table(name="f_water_resource_equipment")
@NamedQuery
(
name
=
"WaterResourceEquipment.findAll"
,
query
=
"SELECT f FROM WaterResourceEquipment f"
)
//
@NamedQuery(name="WaterResourceEquipment.findAll", query="SELECT f FROM WaterResourceEquipment f")
public
class
WaterResourceEquipment
extends
BasicEntity
{
//
public class WaterResourceEquipment extends BasicEntity{
//
/**
//
/**
*
// *
*/
//
*/
private
static
final
long
serialVersionUID
=
1L
;
//
private static final long serialVersionUID = 1L;
//
/**
//
/**
* 水源id
//
* 水源id
*/
//
*/
@Column
(
name
=
"waterResourceId"
)
//
@Column(name="waterResourceId")
private
Long
waterResourceId
;
//
private Long waterResourceId;
/**
//
/**
* 关联设备id
//
* 关联设备id
*/
//
*/
@Column
(
name
=
"fireEquipmentId"
)
//
@Column(name="fireEquipmentId")
private
Long
fireEquipmentId
;
//
private Long fireEquipmentId;
/**
//
/**
* 个数
//
* 个数
*/
//
*/
private
Double
number
=
1
d
;
//
private Double number=1d;
//
/**
//
/**
* 单位
//
* 单位
*/
//
*/
private
String
unit
;
//
private String unit;
//
//
public
Long
getWaterResourceId
()
{
//
public Long getWaterResourceId() {
return
waterResourceId
;
//
return waterResourceId;
}
//
}
public
void
setWaterResourceId
(
Long
waterResourceId
)
{
//
public void setWaterResourceId(Long waterResourceId) {
this
.
waterResourceId
=
waterResourceId
;
//
this.waterResourceId = waterResourceId;
}
//
}
public
Long
getFireEquipmentId
()
{
//
public Long getFireEquipmentId() {
return
fireEquipmentId
;
//
return fireEquipmentId;
}
//
}
public
void
setFireEquipmentId
(
Long
fireEquipmentId
)
{
//
public void setFireEquipmentId(Long fireEquipmentId) {
this
.
fireEquipmentId
=
fireEquipmentId
;
//
this.fireEquipmentId = fireEquipmentId;
}
//
}
public
Double
getNumber
()
{
//
public Double getNumber() {
return
number
;
//
return number;
}
//
}
public
void
setNumber
(
Double
number
)
{
//
public void setNumber(Double number) {
this
.
number
=
number
;
//
this.number = number;
}
//
}
public
String
getUnit
()
{
//
public String getUnit() {
return
unit
;
//
return unit;
}
//
}
public
void
setUnit
(
String
unit
)
{
//
public void setUnit(String unit) {
this
.
unit
=
unit
;
//
this.unit = unit;
}
//
}
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
61767d5d
...
@@ -47,7 +47,7 @@ import com.yeejoin.amos.fas.business.action.util.StepComparator;
...
@@ -47,7 +47,7 @@ import com.yeejoin.amos.fas.business.action.util.StepComparator;
import
com.yeejoin.amos.fas.business.feign.IDutyModeServer
;
import
com.yeejoin.amos.fas.business.feign.IDutyModeServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.service.impl.RuleRunigSnapshotServiceImpl
;
import
com.yeejoin.amos.fas.business.service.impl.RuleRunigSnapshotServiceImpl
;
import
com.yeejoin.amos.fas.business.service.intfc.FireStengthService
;
//
import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
...
@@ -81,8 +81,8 @@ public class ContingencyAction implements CustomerAction {
...
@@ -81,8 +81,8 @@ public class ContingencyAction implements CustomerAction {
@Autowired
@Autowired
private
IContingencyInstance
iContingencyInstance
;
private
IContingencyInstance
iContingencyInstance
;
@Autowired
//
@Autowired
private
FireStengthService
fireStrengthService
;
//
private FireStengthService fireStrengthService;
@Autowired
@Autowired
private
ContingencyLogPublisher
contingencyLogPublisher
;
private
ContingencyLogPublisher
contingencyLogPublisher
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ExcelController.java
View file @
61767d5d
...
@@ -121,10 +121,11 @@ public class ExcelController extends BaseController {
...
@@ -121,10 +121,11 @@ public class ExcelController extends BaseController {
if
(
"fireResource"
.
equals
(
type
))
{
//导入消防装备
if
(
"fireResource"
.
equals
(
type
))
{
//导入消防装备
List
<
FireEquipmentParam
>
list
=
FileHelper
.
importExcel
(
file
,
1
,
1
,
FireEquipmentParam
.
class
);
List
<
FireEquipmentParam
>
list
=
FileHelper
.
importExcel
(
file
,
1
,
1
,
FireEquipmentParam
.
class
);
iExcelService
.
importFireEquipment
(
list
);
iExcelService
.
importFireEquipment
(
list
);
}
else
if
(
"water"
.
equals
(
type
))
{
//导入水资源
List
<
WaterResourceParam
>
list
=
FileHelper
.
importExcel
(
file
,
1
,
1
,
WaterResourceParam
.
class
);
iExcelService
.
importWaterResource
(
list
);
}
}
// else if ("water".equals(type)) {//导入水资源
// List<WaterResourceParam> list = FileHelper.importExcel(file, 1, 1, WaterResourceParam.class);
// iExcelService.importWaterResource(list);
// }
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
catch
(
YeeException
e
)
{
}
catch
(
YeeException
e
)
{
logger
.
info
(
"导入数据异常"
,
e
);
logger
.
info
(
"导入数据异常"
,
e
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireEquimtPointController.java
View file @
61767d5d
...
@@ -10,7 +10,7 @@ import com.yeejoin.amos.fas.config.Permission;
...
@@ -10,7 +10,7 @@ import com.yeejoin.amos.fas.config.Permission;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
//
import com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint;
//import com.yeejoin.amos.security.authorization.Authorization;
//import com.yeejoin.amos.security.authorization.Authorization;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -44,60 +44,60 @@ public class FireEquimtPointController extends BaseController {
...
@@ -44,60 +44,60 @@ public class FireEquimtPointController extends BaseController {
@Autowired
@Autowired
private
FireEquipPointMapper
fireEquipPointMapper
;
private
FireEquipPointMapper
fireEquipPointMapper
;
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加风险点"
,
notes
=
"添加风险点"
)
//
@ApiOperation(httpMethod = "POST", value = "添加风险点", notes = "添加风险点")
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public
CommonResponse
createPoint
(
@RequestBody
FireEquipmentPoint
fireEquipmentPoint
)
throws
Exception
{
//
public CommonResponse createPoint(@RequestBody FireEquipmentPoint fireEquipmentPoint) throws Exception {
//
if
(
fireEquipmentPoint
==
null
//
if (fireEquipmentPoint == null
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getName
())
//
|| StringUtils.isEmpty(fireEquipmentPoint.getName())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getType
())
//
|| StringUtils.isEmpty(fireEquipmentPoint.getType())
||
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getCode
())
//
|| StringUtils.isEmpty(fireEquipmentPoint.getCode())
||
(
"ANALOGUE"
.
equals
(
fireEquipmentPoint
.
getType
())
&&
StringUtils
.
isEmpty
(
fireEquipmentPoint
.
getUnit
()))){
//
|| ("ANALOGUE".equals(fireEquipmentPoint.getType()) && StringUtils.isEmpty(fireEquipmentPoint.getUnit()))){
return
CommonResponseUtil
.
failure
(
"请检查必填字段"
);
//
return CommonResponseUtil.failure("请检查必填字段");
};
//
};
//
ReginParams
reginParams
=
getSelectedOrgInfo
();
//
ReginParams reginParams =getSelectedOrgInfo();
String
compCode
=
getOrgCode
(
reginParams
);
//
String compCode=getOrgCode(reginParams);
fireEquipmentPoint
.
setOrgCode
(
compCode
);
//
fireEquipmentPoint.setOrgCode(compCode);
fireEquipmentPoint
.
setCreateBy
(
getUserId
());
//
fireEquipmentPoint.setCreateBy(getUserId());
fireEquipmentPoint
.
setCreateDate
(
new
Date
());
//
fireEquipmentPoint.setCreateDate(new Date());
//
//
//根据编号查询监测点
//
//根据编号查询监测点
FireEquipmentPointEntity
pointEntity
=
fireEquipPointMapper
.
getByCode
(
fireEquipmentPoint
.
getCode
());
//
FireEquipmentPointEntity pointEntity = fireEquipPointMapper.getByCode(fireEquipmentPoint.getCode());
if
(
pointEntity
!=
null
)
{
//
if (pointEntity != null) {
return
CommonResponseUtil
.
failure
(
"监测点编号已经存在"
);
//
return CommonResponseUtil.failure("监测点编号已经存在");
}
//
}
//
return
CommonResponseUtil
.
success
(
fireEquipPontService
.
savePoint
(
fireEquipmentPoint
));
//
return CommonResponseUtil.success(fireEquipPontService.savePoint(fireEquipmentPoint));
}
//
}
@Permission
//
@Permission
// @Authorization(ingore = true)
//
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑风险点"
,
notes
=
"编辑风险点"
)
//
@ApiOperation(httpMethod = "PUT", value = "编辑风险点", notes = "编辑风险点")
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
//
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public
CommonResponse
udpatePoint
(
@PathVariable
Long
id
,
@RequestBody
FireEquipmentPoint
fireEquipmentPoint
)
{
//
public CommonResponse udpatePoint(@PathVariable Long id, @RequestBody FireEquipmentPoint fireEquipmentPoint) {
fireEquipmentPoint
.
setId
(
id
);
//
fireEquipmentPoint.setId(id);
return
CommonResponseUtil
.
success
(
fireEquipPontService
.
savePoint
(
fireEquipmentPoint
));
//
return CommonResponseUtil.success(fireEquipPontService.savePoint(fireEquipmentPoint));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个风险单"
,
notes
=
"查询单个风险单"
)
//
@ApiOperation(httpMethod = "GET", value = "查询单个风险单", notes = "查询单个风险单")
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
queryPoint
(
@PathVariable
Long
id
)
{
//
public CommonResponse queryPoint(@PathVariable Long id) {
//
return
CommonResponseUtil
.
success
(
fireEquipPontService
.
queryOne
(
id
));
//
return CommonResponseUtil.success(fireEquipPontService.queryOne(id));
}
//
}
//
@Permission
//
@Permission
//@Authorization(ingore = true)
//
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除风险点"
,
notes
=
"查询单个风险单"
)
//
@ApiOperation(httpMethod = "DELETE", value = "删除风险点", notes = "查询单个风险单")
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
//
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public
CommonResponse
deletePoint
(
@PathVariable
String
ids
)
throws
Exception
{
//
public CommonResponse deletePoint(@PathVariable String ids) throws Exception {
String
[]
idArray
=
ids
.
split
(
","
);
//
String[] idArray = ids.split(",");
return
CommonResponseUtil
.
success
(
fireEquipPontService
.
deletePoint
(
idArray
));
//
return CommonResponseUtil.success(fireEquipPontService.deletePoint(idArray));
}
//
}
@Permission
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"指定消防设备的风险点列表"
,
notes
=
"指定消防设备的风险点列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"指定消防设备的风险点列表"
,
notes
=
"指定消防设备的风险点列表"
)
...
@@ -155,52 +155,52 @@ public class FireEquimtPointController extends BaseController {
...
@@ -155,52 +155,52 @@ public class FireEquimtPointController extends BaseController {
List
<
Long
>
ids
=
Arrays
.
stream
(
pointIds
.
split
(
","
)).
map
(
s
->
Long
.
parseLong
(
s
.
trim
())).
collect
(
Collectors
.
toList
());
List
<
Long
>
ids
=
Arrays
.
stream
(
pointIds
.
split
(
","
)).
map
(
s
->
Long
.
parseLong
(
s
.
trim
())).
collect
(
Collectors
.
toList
());
return
fireEquipPontService
.
batchUnbindToEquipment
(
ids
);
return
fireEquipPontService
.
batchUnbindToEquipment
(
ids
);
}
}
//
@Permission
//
@Permission
@ApiOperation
(
value
=
"添加监测点"
,
notes
=
"添加监测点"
)
//
@ApiOperation(value = "添加监测点", notes = "添加监测点")
@PostMapping
(
value
=
"/save"
)
//
@PostMapping(value = "/save")
public
CommonResponse
save
(
@ApiParam
(
value
=
"监测点对象"
,
required
=
true
)
@RequestBody
FireEquipmentPointEntity
fireEquipmentPointEntity
)
{
//
public CommonResponse save(@ApiParam(value = "监测点对象", required = true) @RequestBody FireEquipmentPointEntity fireEquipmentPointEntity) {
if
(
fireEquipmentPointEntity
.
getFireEquipmentId
()
==
null
)
{
//
if (fireEquipmentPointEntity.getFireEquipmentId() == null) {
fireEquipmentPointEntity
.
setFireEquipmentId
(
0L
);
//
fireEquipmentPointEntity.setFireEquipmentId(0L);
}
//
}
//
//
//
//
return
fireEquipPontService
.
save
(
fireEquipmentPointEntity
);
//
return fireEquipPontService.save(fireEquipmentPointEntity);
}
//
}
@Permission
//
@Permission
@ApiOperation
(
value
=
"修改监测点"
,
notes
=
"修改监测点"
)
//
@ApiOperation(value = "修改监测点", notes = "修改监测点")
@PostMapping
(
value
=
"/update"
)
//
@PostMapping(value = "/update")
public
CommonResponse
update
(
@ApiParam
(
value
=
"监测点对象"
,
required
=
true
)
@RequestBody
FireEquipmentPointEntity
fireEquipmentPointEntity
)
{
//
public CommonResponse update(@ApiParam(value = "监测点对象", required = true) @RequestBody FireEquipmentPointEntity fireEquipmentPointEntity) {
FireEquipmentPoint
old
=
fireEquipPontService
.
queryOne
(
fireEquipmentPointEntity
.
getId
());
//
FireEquipmentPoint old = fireEquipPontService.queryOne(fireEquipmentPointEntity.getId());
//
if
(
old
.
getId
()
!=
0
)
{
//
if(old.getId() != 0 ) {
String
[]
idArray
=
new
String
[]
{
String
.
valueOf
(
old
.
getId
())
};
//
String[] idArray = new String[] { String.valueOf(old.getId()) };
if
(
fireEquipPontService
.
countImpEquipment
(
idArray
)
>
0
)
{
//
if(fireEquipPontService.countImpEquipment(idArray) > 0) {
String
riskSourceNames
=
fireEquipPontService
.
findBindRiskSourceStrByPointIds
(
idArray
);
//
String riskSourceNames = fireEquipPontService.findBindRiskSourceStrByPointIds(idArray);
return
CommonResponseUtil
.
failure
(
"该设备已被风险区域 ["
+
riskSourceNames
+
"] 绑定,请先删除绑定关系"
);
//
return CommonResponseUtil.failure("该设备已被风险区域 [" + riskSourceNames + "] 绑定,请先删除绑定关系");
}
//
}
}
//
}
return
fireEquipPontService
.
update
(
fireEquipmentPointEntity
);
//
return fireEquipPontService.update(fireEquipmentPointEntity);
}
//
}
@Permission
//
@Permission
@ApiOperation
(
value
=
"批量删除监测点"
,
notes
=
"批量删除监测点"
)
//
@ApiOperation(value = "批量删除监测点", notes = "批量删除监测点")
@GetMapping
(
value
=
"/batch/delete"
)
//
@GetMapping(value = "/batch/delete")
public
CommonResponse
batchDelete
(
@ApiParam
(
value
=
"监测点编号(多个逗号隔开)"
,
required
=
true
)
@RequestParam
String
pointIds
)
{
//
public CommonResponse batchDelete(@ApiParam(value = "监测点编号(多个逗号隔开)", required = true) @RequestParam String pointIds) {
if
(
StringUtils
.
isEmpty
(
pointIds
))
{
//
if (StringUtils.isEmpty(pointIds)) {
return
CommonResponseUtil
.
failure
(
"监测点编号必填"
);
//
return CommonResponseUtil.failure("监测点编号必填");
}
//
}
String
[]
idArray
=
pointIds
.
split
(
","
);
//
String[] idArray = pointIds.split(",");
if
(
fireEquipPontService
.
countImpEquipment
(
idArray
)
>
0
)
{
//
if(fireEquipPontService.countImpEquipment(idArray) > 0) {
String
riskSourceNames
=
fireEquipPontService
.
findBindRiskSourceStrByPointIds
(
idArray
);
//
String riskSourceNames = fireEquipPontService.findBindRiskSourceStrByPointIds(idArray);
return
CommonResponseUtil
.
failure
(
"该点位已被风险区域 ["
+
riskSourceNames
+
"] 绑定,请先删除绑定关系"
);
//
return CommonResponseUtil.failure("该点位已被风险区域 [" + riskSourceNames + "] 绑定,请先删除绑定关系");
}
//
}
List
<
Long
>
ids
=
Arrays
.
stream
(
pointIds
.
split
(
","
)).
map
(
s
->
Long
.
parseLong
(
s
.
trim
())).
collect
(
Collectors
.
toList
());
//
List<Long> ids = Arrays.stream(pointIds.split(",")).map(s -> Long.parseLong(s.trim())).collect(Collectors.toList());
return
fireEquipPontService
.
batchDelete
(
ids
);
//
return fireEquipPontService.batchDelete(ids);
}
//
}
@Permission
@Permission
@ApiOperation
(
value
=
"根据设备类型查询设备"
,
notes
=
"批量删除监测点"
)
@ApiOperation
(
value
=
"根据设备类型查询设备"
,
notes
=
"批量删除监测点"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
61767d5d
...
@@ -4,7 +4,7 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
...
@@ -4,7 +4,7 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireCarService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireCarService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
//
import com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.util.CommonPageParamUtil
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.config.Permission
;
...
@@ -36,8 +36,8 @@ public class FireSourceController extends BaseController {
...
@@ -36,8 +36,8 @@ public class FireSourceController extends BaseController {
private
IFireCarService
fireCarService
;
private
IFireCarService
fireCarService
;
@Autowired
@Autowired
private
IFireEquipService
iFireEquipService
;
private
IFireEquipService
iFireEquipService
;
@Autowired
//
@Autowired
private
IWaterResourceService
iWaterResourceService
;
////
private IWaterResourceService iWaterResourceService;
@Autowired
@Autowired
private
IEquipmentService
iEquipService
;
private
IEquipmentService
iEquipService
;
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
FireSourceController
.
class
);
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
FireSourceController
.
class
);
...
@@ -86,12 +86,12 @@ public class FireSourceController extends BaseController {
...
@@ -86,12 +86,12 @@ public class FireSourceController extends BaseController {
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
String
[]
idArray
=
ids
.
split
(
","
);
String
[]
idArray
=
ids
.
split
(
","
);
if
(
iWaterResourceService
.
countAssociatedEquipWaterByIds
(
idArray
)
>
0
)
{
//
if (iWaterResourceService.countAssociatedEquipWaterByIds(idArray) > 0) {
return
CommonResponseUtil
.
failure
(
"该设备已被灭火栓或消防水池绑定,请先删除绑定关系"
);
//
return CommonResponseUtil.failure("该设备已被灭火栓或消防水池绑定,请先删除绑定关系");
}
//
}
if
(
iFireEquipService
.
countAssociatedEquipStationByIds
(
idArray
)
>
0
)
{
//
if (iFireEquipService.countAssociatedEquipStationByIds(idArray) > 0) {
return
CommonResponseUtil
.
failure
(
"该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系"
);
//
return CommonResponseUtil.failure("该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系");
}
//
}
if
(
iEquipService
.
countImpEquipByIds
(
idArray
)
>
0
)
{
if
(
iEquipService
.
countImpEquipByIds
(
idArray
)
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该设备已被重点设备绑定,请先删除绑定关系"
);
return
CommonResponseUtil
.
failure
(
"该设备已被重点设备绑定,请先删除绑定关系"
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireStationController.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
//
package com.yeejoin.amos.fas.business.controller;
//
import
com.yeejoin.amos.fas.business.service.intfc.IFireStationService
;
//
import com.yeejoin.amos.fas.business.service.intfc.IFireStationService;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
//
import com.yeejoin.amos.fas.business.vo.ReginParams;
import
com.yeejoin.amos.fas.config.Permission
;
//
import com.yeejoin.amos.fas.config.Permission;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
//
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
//
import com.yeejoin.amos.fas.core.util.CommonResponse;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
//
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
//
import com.yeejoin.amos.fas.dao.entity.FireStation;
import
com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment
;
////
import com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment;
import
io.swagger.annotations.Api
;
//
import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
//
import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.ApiParam
;
//
import io.swagger.annotations.ApiParam;
import
org.apache.commons.lang3.StringUtils
;
//
import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.util.CollectionUtils
;
//
import org.springframework.util.CollectionUtils;
import
org.springframework.web.bind.annotation.*
;
//
import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
//
import org.springframework.web.multipart.MultipartFile;
//
import
java.util.Date
;
//
import java.util.Date;
import
java.util.List
;
//
import java.util.List;
//
@RestController
//
@RestController
@RequestMapping
(
value
=
"/api/firestation"
)
//
@RequestMapping(value = "/api/firestation")
@Api
(
tags
=
"消防小室API"
)
//
@Api(tags = "消防小室API")
public
class
FireStationController
extends
BaseController
{
//
public class FireStationController extends BaseController {
//
@Autowired
//
@Autowired
IFireStationService
iFireStationService
;
//
IFireStationService iFireStationService;
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防小室"
,
notes
=
"添加消防小室"
)
//
@ApiOperation(httpMethod = "POST", value = "添加消防小室", notes = "添加消防小室")
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public
CommonResponse
create
(
@RequestBody
FireStation
fireStation
)
throws
Exception
{
//
public CommonResponse create(@RequestBody FireStation fireStation) throws Exception {
//
if
(
fireStation
==
null
||
StringUtils
.
isEmpty
(
fireStation
.
getName
())
//
if (fireStation == null || StringUtils.isEmpty(fireStation.getName())
||
StringUtils
.
isEmpty
(
fireStation
.
getAddress
())
||
StringUtils
.
isEmpty
(
fireStation
.
getPosition3d
())
//
|| StringUtils.isEmpty(fireStation.getAddress()) || StringUtils.isEmpty(fireStation.getPosition3d())
||
StringUtils
.
isEmpty
(
fireStation
.
getCode
()))
//
|| StringUtils.isEmpty(fireStation.getCode()))
throw
new
Exception
(
"数据校验失败."
);
//
throw new Exception("数据校验失败.");
ReginParams
reginParams
=
getSelectedOrgInfo
();
//
ReginParams reginParams =getSelectedOrgInfo();
String
compCode
=
getOrgCode
(
reginParams
);
//
String compCode=getOrgCode(reginParams);
fireStation
.
setCreateBy
(
"0"
);
//
fireStation.setCreateBy("0");
fireStation
.
setCreateDate
(
new
Date
());
//
fireStation.setCreateDate(new Date());
fireStation
.
setOrgCode
(
compCode
);
//
fireStation.setOrgCode(compCode);
return
CommonResponseUtil
.
success
(
iFireStationService
.
save
(
fireStation
));
//
return CommonResponseUtil.success(iFireStationService.save(fireStation));
}
//
}
////
@Permission
////
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
////
@ApiOperation(httpMethod = "POST", value = "绑定消防设备", notes = "绑定消防设备")
@RequestMapping
(
value
=
"/fireequipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
////
@RequestMapping(value = "/fireequipmenet", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public
CommonResponse
createFireRelation
(
@RequestBody
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
////
public CommonResponse createFireRelation(@RequestBody List<FireStationFireEquipment> fireStationFireEquipments)
throws
Exception
{
////
throws Exception {
////
if
(
CollectionUtils
.
isEmpty
(
fireStationFireEquipments
))
////
if (CollectionUtils.isEmpty(fireStationFireEquipments))
throw
new
Exception
(
"数据校验失败."
);
////
throw new Exception("数据校验失败.");
////
for
(
FireStationFireEquipment
fireStationFireEquipment
:
fireStationFireEquipments
)
{
////
for (FireStationFireEquipment fireStationFireEquipment : fireStationFireEquipments) {
fireStationFireEquipment
.
setCreateBy
(
"0"
);
////
fireStationFireEquipment.setCreateBy("0");
fireStationFireEquipment
.
setCreateDate
(
new
Date
());
////
fireStationFireEquipment.setCreateDate(new Date());
}
////
}
try
{
////
try {
List
<
FireStationFireEquipment
>
fireStationFireEquipments1
=
iFireStationService
.
saveStationFireEquipment
(
fireStationFireEquipments
);
////
List<FireStationFireEquipment> fireStationFireEquipments1 = iFireStationService.saveStationFireEquipment(fireStationFireEquipments);
return
CommonResponseUtil
.
success
(
fireStationFireEquipments1
);
////
return CommonResponseUtil.success(fireStationFireEquipments1);
}
catch
(
Exception
e
){
////
} catch (Exception e){
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
////
return CommonResponseUtil.failure(e.getMessage());
}
////
}
}
////
}
//
@Permission
////
@Permission
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
////
@ApiOperation(httpMethod = "DELETE", value = "解除绑定消防设备", notes = "解除绑定消防设备")
@RequestMapping
(
value
=
"/fireequipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
////
@RequestMapping(value = "/fireequipmenet", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public
CommonResponse
deleteFireEqRelation
(
@RequestBody
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
////
public CommonResponse deleteFireEqRelation(@RequestBody List<FireStationFireEquipment> fireStationFireEquipments)
throws
Exception
{
////
throws Exception {
////
if
(
CollectionUtils
.
isEmpty
(
fireStationFireEquipments
))
////
if (CollectionUtils.isEmpty(fireStationFireEquipments))
throw
new
Exception
(
"数据校验失败."
);
////
throw new Exception("数据校验失败.");
iFireStationService
.
deleteStationFireEquipment
(
fireStationFireEquipments
);
////
iFireStationService.deleteStationFireEquipment(fireStationFireEquipments);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
////
return CommonResponseUtil.success("SUCCESS");
}
////
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑消防小室"
,
notes
=
"编辑消防小室"
)
//
@ApiOperation(httpMethod = "PUT", value = "编辑消防小室", notes = "编辑消防小室")
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
//
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
FireStation
fireStation
)
{
//
public CommonResponse udpate(@PathVariable Long id, @RequestBody FireStation fireStation) {
fireStation
.
setId
(
id
);
//
fireStation.setId(id);
return
CommonResponseUtil
.
success
(
iFireStationService
.
save
(
fireStation
));
//
return CommonResponseUtil.success(iFireStationService.save(fireStation));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个消防小室"
,
notes
=
"查询单个消防小室"
)
//
@ApiOperation(httpMethod = "GET", value = "查询单个消防小室", notes = "查询单个消防小室")
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
query
(
@PathVariable
Long
id
)
{
//
public CommonResponse query(@PathVariable Long id) {
//
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryOne
(
id
));
//
return CommonResponseUtil.success(iFireStationService.queryOne(id));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
//
@ApiOperation(httpMethod = "GET", value = "分页查询已经绑定的消防设备列表", notes = "分页查询已经绑定的消防设备列表")
@RequestMapping
(
value
=
"/{id}/fireequipmenet/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/{id}/fireequipmenet/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
queryForEuqimentList
(
@PathVariable
Long
id
,
@RequestParam
int
pageNumber
,
//
public CommonResponse queryForEuqimentList(@PathVariable Long id, @RequestParam int pageNumber,
@RequestParam
int
pageSize
)
{
//
@RequestParam int pageSize) {
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
//
CommonPageable commonPageable = new CommonPageable(pageNumber, pageSize);
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForFireEquemtPage
(
id
,
commonPageable
));
//
return CommonResponseUtil.success(iFireStationService.queryForFireEquemtPage(id, commonPageable));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除消防小室"
,
notes
=
"查询单个消防小室"
)
//
@ApiOperation(httpMethod = "DELETE", value = "删除消防小室", notes = "查询单个消防小室")
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
//
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
//
public CommonResponse delete(@PathVariable String ids) throws Exception {
String
[]
idArray
=
ids
.
split
(
","
);
//
String[] idArray = ids.split(",");
return
CommonResponseUtil
.
success
(
iFireStationService
.
delete
(
idArray
));
//
return CommonResponseUtil.success(iFireStationService.delete(idArray));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询消防小室"
,
notes
=
"分页查询消防小室"
)
//
@ApiOperation(httpMethod = "GET", value = "分页查询消防小室", notes = "分页查询消防小室")
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
forPage
(
//
public CommonResponse forPage(
@ApiParam
(
value
=
"名称模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
//
@ApiParam(value = "名称模糊查询", required = false) @RequestParam(required = false) String name,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
//
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false) String code,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
type
,
//
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false) String type,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
)
{
//
@RequestParam int pageNumber, @RequestParam int pageSize) {
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
//
CommonPageable commonPageable = new CommonPageable(pageNumber, pageSize);
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForPage
(
StringUtils
.
trimToNull
(
name
),
//
return CommonResponseUtil.success(iFireStationService.queryForPage(StringUtils.trimToNull(name),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
//
StringUtils.trimToNull(code), StringUtils.trimToNull(type), commonPageable));
}
//
}
//
@Permission
//
@Permission
//@Authorization(ingore = true)
//
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表查询消防小室"
,
notes
=
"分页查询消防小室"
)
//
@ApiOperation(httpMethod = "GET", value = "列表查询消防小室", notes = "分页查询消防小室")
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
forList
(
//
public CommonResponse forList(
@ApiParam
(
value
=
"名称模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
//
@ApiParam(value = "名称模糊查询", required = false) @RequestParam(required = false) String name,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
//
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false) String code,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
type
//
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false) String type
//
)
{
//
) {
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForList
(
StringUtils
.
trimToNull
(
name
),
//
return CommonResponseUtil.success(iFireStationService.queryForList(StringUtils.trimToNull(name),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
)));
//
StringUtils.trimToNull(code), StringUtils.trimToNull(type)));
}
//
}
//
@Permission
//
@Permission
//@Authorization(ingore = true)
//
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加消防小室及上传图片"
,
notes
=
"添加消防小室及上传图片"
)
//
@ApiOperation(httpMethod = "POST", value = "添加消防小室及上传图片", notes = "添加消防小室及上传图片")
@RequestMapping
(
value
=
"createAndSaveImg"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "createAndSaveImg", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public
CommonResponse
createAndSaveImg
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
[]
file
,
//
public CommonResponse createAndSaveImg(@RequestParam(value = "file", required = false) MultipartFile[] file,
FireStation
fireStation
)
throws
Exception
{
//
FireStation fireStation) throws Exception {
//
if
(
fireStation
==
null
||
StringUtils
.
isEmpty
(
fireStation
.
getName
())
//
if (fireStation == null || StringUtils.isEmpty(fireStation.getName())
||
StringUtils
.
isEmpty
(
fireStation
.
getAddress
())
// || StringUtils.isEmpty(fireStation.getAddress())
// || StringUtils.isEmpty(fireStation.getPosition3d())
//
//
|| StringUtils.isEmpty(fireStation.getPosition3d())
||
StringUtils
.
isEmpty
(
fireStation
.
getCode
()))
//
|| StringUtils.isEmpty(fireStation.getCode()))
throw
new
Exception
(
"数据校验失败."
);
//
throw new Exception("数据校验失败.");
long
id
=
fireStation
.
getId
();
//
long id = fireStation.getId();
if
(
id
==
0
l
)
{
//新增
//
if(id == 0l) {//新增
Boolean
existByCode
=
iFireStationService
.
isExistByCode
(
fireStation
.
getCode
());
//
Boolean existByCode = iFireStationService.isExistByCode(fireStation.getCode());
if
(
existByCode
)
{
//
if(existByCode) {
throw
new
Exception
(
"改编号已存在,请重试!"
);
//
throw new Exception("改编号已存在,请重试!");
}
//
}
}
//
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
//
ReginParams reginParams =getSelectedOrgInfo();
String
compCode
=
getOrgCode
(
reginParams
);
//
String compCode=getOrgCode(reginParams);
fireStation
.
setCreateBy
(
getUserId
());
//
fireStation.setCreateBy(getUserId());
fireStation
.
setCreateDate
(
new
Date
());
//
fireStation.setCreateDate(new Date());
fireStation
.
setOrgCode
(
compCode
);
//
fireStation.setOrgCode(compCode);
return
CommonResponseUtil
.
success
(
iFireStationService
.
saveAndUpd
(
fireStation
,
file
));
//
return CommonResponseUtil.success(iFireStationService.saveAndUpd(fireStation, file));
}
//
}
//
/**
//
/**
* 查询消防小室关联设备信息
//
* 查询消防小室关联设备信息
* @param id
//
* @param id
* @return
//
* @return
*/
//
*/
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
//
@ApiOperation(httpMethod = "GET", value = "分页查询已经绑定的消防设备列表", notes = "分页查询已经绑定的消防设备列表")
@RequestMapping
(
value
=
"/fireEquipments/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/fireEquipments/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
queryForEuqimentListById
(
@PathVariable
Long
id
)
{
//
public CommonResponse queryForEuqimentListById(@PathVariable Long id) {
return
CommonResponseUtil
.
success
(
iFireStationService
.
queryForEuqimentListById
(
id
));
//
return CommonResponseUtil.success(iFireStationService.queryForEuqimentListById(id));
}
//
}
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireStrengthController.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
//
package com.yeejoin.amos.fas.business.controller;
//
//
import
java.util.Date
;
//
import java.util.Date;
//
import
org.apache.commons.lang3.StringUtils
;
//
import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.PathVariable
;
//
import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestBody
;
//
import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
//
import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
//
import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
//
import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
//
import org.springframework.web.bind.annotation.RestController;
//
import
com.yeejoin.amos.fas.business.service.intfc.FireStengthService
;
//
import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
import
com.yeejoin.amos.fas.config.Permission
;
//
import com.yeejoin.amos.fas.config.Permission;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
//
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
//
import com.yeejoin.amos.fas.core.util.CommonResponse;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
//
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
////
import com.yeejoin.amos.fas.dao.entity.FireStrength;
import
io.swagger.annotations.Api
;
//
import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
//
import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.ApiParam
;
//
import io.swagger.annotations.ApiParam;
//
@RestController
//
@RestController
@RequestMapping
(
value
=
"/api/firestrength"
)
//
@RequestMapping(value = "/api/firestrength")
@Api
(
tags
=
"消防专职人API"
)
//
@Api(tags="消防专职人API")
public
class
FireStrengthController
extends
BaseController
{
//
public class FireStrengthController extends BaseController{
//
//
@Autowired
//
@Autowired
FireStengthService
fireStengthService
;
//
FireStengthService fireStengthService;
//@Authorization(ingore = true)
//
//@Authorization(ingore = true)
@Permission
////
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加专职人员"
,
notes
=
"添加专职人员"
)
////
@ApiOperation(httpMethod = "POST",value = "添加专职人员", notes = "添加专职人员")
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
////
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public
CommonResponse
createPoint
(
@RequestBody
FireStrength
fireStrength
)
throws
Exception
{
////
public CommonResponse createPoint(@RequestBody FireStrength fireStrength) throws Exception{
////
if
(
fireStrength
==
null
////
if(fireStrength == null
||
StringUtils
.
isEmpty
(
fireStrength
.
getUsername
())
////
|| StringUtils.isEmpty(fireStrength.getUsername())
||
StringUtils
.
isEmpty
(
fireStrength
.
getPhoneNum
())
////
|| StringUtils.isEmpty(fireStrength.getPhoneNum())
||
StringUtils
.
isEmpty
(
fireStrength
.
getPosition
())
////
|| StringUtils.isEmpty(fireStrength.getPosition())
||
StringUtils
.
isEmpty
(
fireStrength
.
getCode
()
))
////
|| StringUtils.isEmpty(fireStrength.getCode() ))
throw
new
Exception
(
"数据校验失败."
);
////
throw new Exception("数据校验失败.");
////
fireStrength
.
setCreateBy
(
"0"
);
////
fireStrength.setCreateBy("0");
fireStrength
.
setCreateDate
(
new
Date
());
////
fireStrength.setCreateDate(new Date());
return
CommonResponseUtil
.
success
(
fireStengthService
.
savePoint
(
fireStrength
));
////
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
////
}
//
@Permission
////
@Permission
// @Authorization(ingore = true)
////
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑专职人员"
,
notes
=
"编辑专职人员"
)
////
@ApiOperation(httpMethod = "PUT",value = "编辑专职人员", notes = "编辑专职人员")
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
////
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public
CommonResponse
udpatePoint
(
@PathVariable
Long
id
,
@RequestBody
FireStrength
fireStrength
)
{
////
public CommonResponse udpatePoint(@PathVariable Long id, @RequestBody FireStrength fireStrength) {
fireStrength
.
setId
(
id
);
////
fireStrength.setId(id);
return
CommonResponseUtil
.
success
(
fireStengthService
.
savePoint
(
fireStrength
));
////
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
////
}
//
@Permission
//
@Permission
//@Authorization(ingore = true)
//
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个专职人员"
,
notes
=
"查询单个专职人员"
)
//
@ApiOperation(httpMethod = "GET",value = "查询单个专职人员", notes = "查询单个专职人员")
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
queryPoint
(
@PathVariable
Long
id
)
{
//
public CommonResponse queryPoint(@PathVariable Long id) {
//
return
CommonResponseUtil
.
success
(
fireStengthService
.
queryOne
(
id
));
//
return CommonResponseUtil.success(fireStengthService.queryOne(id));
}
//
}
//
@Permission
//
@Permission
//@Authorization(ingore = true)
//
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除专职人员"
,
notes
=
"查询单个专职人员"
)
//
@ApiOperation(httpMethod = "DELETE",value = "删除专职人员", notes = "查询单个专职人员")
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
//
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public
CommonResponse
deletePoint
(
@PathVariable
String
ids
)
throws
Exception
{
//
public CommonResponse deletePoint(@PathVariable String ids) throws Exception {
String
[]
idArray
=
ids
.
split
(
","
);
//
String [] idArray = ids.split(",");
return
CommonResponseUtil
.
success
(
fireStengthService
.
deletePoint
(
idArray
));
//
return CommonResponseUtil.success(fireStengthService.deletePoint(idArray));
}
//
}
//
@Permission
//
@Permission
//@Authorization(ingore = true)
//
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询专职人员"
,
notes
=
"分页查询专职人员"
)
//
@ApiOperation(httpMethod = "GET",value = "分页查询专职人员", notes = "分页查询专职人员")
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
pointList
(
//
public CommonResponse pointList(
@ApiParam
(
value
=
"名称模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
//
@ApiParam(value = "名称模糊查询", required = false) @RequestParam(required = false)String name,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
//
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false)String code,
@RequestParam
int
pageNumber
,
//
@RequestParam int pageNumber,
@RequestParam
int
pageSize
//
@RequestParam int pageSize
)
{
//
) {
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
//
CommonPageable commonPageable = new CommonPageable(pageNumber,pageSize);
//
return
CommonResponseUtil
.
success
(
fireStengthService
.
queryByFireEquimt
(
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
commonPageable
));
//
return CommonResponseUtil.success(fireStengthService.queryByFireEquimt(StringUtils.trimToNull(name),StringUtils.trimToNull(code),commonPageable));
}
//
}
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
61767d5d
...
@@ -618,12 +618,12 @@ public class RiskSourceController extends BaseController {
...
@@ -618,12 +618,12 @@ public class RiskSourceController extends BaseController {
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"上传消防设备数据"
,
notes
=
"上传消防设备数据"
)
//
@ApiOperation(httpMethod = "POST", value = "上传消防设备数据", notes = "上传消防设备数据")
@RequestMapping
(
value
=
"/data/fireqeuiment/all"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/data/fireqeuiment/all", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public
CommonResponse
postFireEqumentData
(
@RequestBody
List
<
AlarmParam
>
deviceDatas
)
throws
Exception
{
//
public CommonResponse postFireEqumentData(@RequestBody List<AlarmParam> deviceDatas) throws Exception {
riskSourceService
.
saveData
(
deviceDatas
,
"all"
);
//
riskSourceService.saveData(deviceDatas, "all");
return
CommonResponseUtil
.
success
();
//
return CommonResponseUtil.success();
}
//
}
// @Permission
// @Permission
// @Authorization(ingore = true)
// @Authorization(ingore = true)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/WaterResourceController.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
//
package com.yeejoin.amos.fas.business.controller;
//
//
import
java.util.Date
;
//
import java.util.Date;
import
java.util.List
;
//
import java.util.List;
//
import
org.apache.commons.lang3.StringUtils
;
//
import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.util.CollectionUtils
;
//
import org.springframework.util.CollectionUtils;
import
org.springframework.web.bind.annotation.PathVariable
;
//
import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestBody
;
//
import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
//
import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
//
import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
//
import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
//
import org.springframework.web.bind.annotation.RestController;
//
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
//
import com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
//
import com.yeejoin.amos.fas.business.vo.ReginParams;
import
com.yeejoin.amos.fas.config.Permission
;
//
import com.yeejoin.amos.fas.config.Permission;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
//
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
//
import com.yeejoin.amos.fas.core.util.CommonResponse;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
//
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment
;
////
import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
//
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
//
import
io.swagger.annotations.Api
;
//
import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
//
import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.ApiParam
;
//
import io.swagger.annotations.ApiParam;
//
@RestController
//
@RestController
@RequestMapping
(
value
=
"/api/waterresource"
)
//
@RequestMapping(value = "/api/waterresource")
@Api
(
tags
=
"水资源API"
)
//
@Api(tags="水资源API")
public
class
WaterResourceController
extends
BaseController
{
//
public class WaterResourceController extends BaseController{
//
//
@Autowired
//
@Autowired
IWaterResourceService
iWaterResourceService
;
//
IWaterResourceService iWaterResourceService;
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"添加水资源"
,
notes
=
"添加水资源"
)
//
@ApiOperation(httpMethod = "POST",value = "添加水资源", notes = "添加水资源")
@RequestMapping
(
value
=
""
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public
CommonResponse
create
(
@RequestBody
WaterResource
waterResource
)
throws
Exception
{
//
public CommonResponse create(@RequestBody WaterResource waterResource) throws Exception{
//
if
(
waterResource
==
null
//
if(waterResource == null
||
StringUtils
.
isEmpty
(
waterResource
.
getType
())
//
|| StringUtils.isEmpty(waterResource.getType())
||
StringUtils
.
isEmpty
(
waterResource
.
getFloor3d
())
//
|| StringUtils.isEmpty(waterResource.getFloor3d())
// || StringUtils.isEmpty(waterResource.getPosition3d())
//
//
|| StringUtils.isEmpty(waterResource.getPosition3d())
||
StringUtils
.
isEmpty
(
waterResource
.
getCode
()
))
//
|| StringUtils.isEmpty(waterResource.getCode() ))
throw
new
Exception
(
"数据校验失败."
);
//
throw new Exception("数据校验失败.");
ReginParams
reginParams
=
getSelectedOrgInfo
();
//
ReginParams reginParams =getSelectedOrgInfo();
String
compCode
=
getOrgCode
(
reginParams
);
//
String compCode=getOrgCode(reginParams);
waterResource
.
setCreateBy
(
"0"
);
//
waterResource.setCreateBy("0");
waterResource
.
setCreateDate
(
new
Date
());
//
waterResource.setCreateDate(new Date());
waterResource
.
setOrgCode
(
compCode
);
//
waterResource.setOrgCode(compCode);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
save
(
waterResource
));
//
return CommonResponseUtil.success(iWaterResourceService.save(waterResource));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑水资源"
,
notes
=
"编辑水资源"
)
//
@ApiOperation(httpMethod = "PUT",value = "编辑水资源", notes = "编辑水资源")
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
//
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public
CommonResponse
udpate
(
@PathVariable
Long
id
,
@RequestBody
WaterResource
waterResource
)
{
//
public CommonResponse udpate(@PathVariable Long id, @RequestBody WaterResource waterResource) {
waterResource
.
setId
(
id
);
//
waterResource.setId(id);
ReginParams
reginParams
=
getSelectedOrgInfo
();
//
ReginParams reginParams =getSelectedOrgInfo();
String
compCode
=
getOrgCode
(
reginParams
);
//
String compCode=getOrgCode(reginParams);
waterResource
.
setOrgCode
(
compCode
);
//
waterResource.setOrgCode(compCode);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
save
(
waterResource
));
//
return CommonResponseUtil.success(iWaterResourceService.save(waterResource));
}
//
}
//
@Permission
//
@Permission
// @Authorization(ingore = true)
//
// @Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单个水资源"
,
notes
=
"查询单个水资源"
)
//
@ApiOperation(httpMethod = "GET",value = "查询单个水资源", notes = "查询单个水资源")
@RequestMapping
(
value
=
"/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
queryPoint
(
@PathVariable
Long
id
)
{
//
public CommonResponse queryPoint(@PathVariable Long id) {
//
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryOne
(
id
));
//
return CommonResponseUtil.success(iWaterResourceService.queryOne(id));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除水资源"
,
notes
=
"查询单个水资源"
)
//
@ApiOperation(httpMethod = "DELETE",value = "删除水资源", notes = "查询单个水资源")
@RequestMapping
(
value
=
"/{ids}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
//
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public
CommonResponse
delete
(
@PathVariable
String
ids
)
throws
Exception
{
//
public CommonResponse delete(@PathVariable String ids) throws Exception {
String
[]
idArray
=
ids
.
split
(
","
);
//
String [] idArray = ids.split(",");
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
delete
(
idArray
));
//
return CommonResponseUtil.success(iWaterResourceService.delete(idArray));
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询水资源"
,
notes
=
"分页查询水资源"
)
//
@ApiOperation(httpMethod = "GET",value = "分页查询水资源", notes = "分页查询水资源")
@RequestMapping
(
value
=
"/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
forPage
(
//
public CommonResponse forPage(
@ApiParam
(
value
=
"名称模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
name
,
//
@ApiParam(value = "名称模糊查询", required = false) @RequestParam(required = false)String name,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
code
,
//
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false)String code,
@ApiParam
(
value
=
"编号模糊查询"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
type
,
//
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false)String type,
@RequestParam
int
pageNumber
,
//
@RequestParam int pageNumber,
@RequestParam
int
pageSize
//
@RequestParam int pageSize
)
{
//
) {
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
//
CommonPageable commonPageable = new CommonPageable(pageNumber,pageSize);
ReginParams
reginParams
=
getSelectedOrgInfo
();
//
ReginParams reginParams =getSelectedOrgInfo();
String
compCode
=
getOrgCode
(
reginParams
);
//
String compCode = getOrgCode(reginParams);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForPage
(
compCode
,
StringUtils
.
trimToNull
(
name
),
StringUtils
.
trimToNull
(
code
),
StringUtils
.
trimToNull
(
type
),
commonPageable
));
//
return CommonResponseUtil.success(iWaterResourceService.queryForPage(compCode,StringUtils.trimToNull(name),StringUtils.trimToNull(code),StringUtils.trimToNull(type),commonPageable));
}
//
}
//
@Permission
//
@Permission
//@Authorization(ingore = true)
//
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询水资源"
,
notes
=
"分页查询水资源"
)
//
@ApiOperation(httpMethod = "GET",value = "查询水资源", notes = "分页查询水资源")
@RequestMapping
(
value
=
"/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/list", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
list
()
{
//
public CommonResponse list() {
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryForList
());
//
return CommonResponseUtil.success(iWaterResourceService.queryForList());
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"绑定消防设备"
,
notes
=
"绑定消防设备"
)
//
@ApiOperation(httpMethod = "POST", value = "绑定消防设备", notes = "绑定消防设备")
@RequestMapping
(
value
=
"/fireEquipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
//
@RequestMapping(value = "/fireEquipmenet", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public
CommonResponse
createFireRelation
(
@RequestBody
List
<
WaterResourceEquipment
>
waterResourceEquipments
)
//
public CommonResponse createFireRelation(@RequestBody List<WaterResourceEquipment> waterResourceEquipments)
throws
Exception
{
//
throws Exception {
//
if
(
CollectionUtils
.
isEmpty
(
waterResourceEquipments
))
//
if (CollectionUtils.isEmpty(waterResourceEquipments))
throw
new
Exception
(
"数据校验失败."
);
//
throw new Exception("数据校验失败.");
iWaterResourceService
.
saveBindFireEquipment
(
waterResourceEquipments
);
//
iWaterResourceService.saveBindFireEquipment(waterResourceEquipments);
return
CommonResponseUtil
.
success
();
//
return CommonResponseUtil.success();
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"解除绑定消防设备"
,
notes
=
"解除绑定消防设备"
)
//
@ApiOperation(httpMethod = "DELETE", value = "解除绑定消防设备", notes = "解除绑定消防设备")
@RequestMapping
(
value
=
"/fireEquipmenet"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
DELETE
)
//
@RequestMapping(value = "/fireEquipmenet", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public
CommonResponse
deleteFireEqRelation
(
@RequestBody
List
<
WaterResourceEquipment
>
waterResourceEquipments
)
//
public CommonResponse deleteFireEqRelation(@RequestBody List<WaterResourceEquipment> waterResourceEquipments)
throws
Exception
{
//
throws Exception {
//
if
(
CollectionUtils
.
isEmpty
(
waterResourceEquipments
))
//
if (CollectionUtils.isEmpty(waterResourceEquipments))
throw
new
Exception
(
"数据校验失败."
);
//
throw new Exception("数据校验失败.");
iWaterResourceService
.
deleteBindFireEquipment
(
waterResourceEquipments
);
//
iWaterResourceService.deleteBindFireEquipment(waterResourceEquipments);
return
CommonResponseUtil
.
success
();
//
return CommonResponseUtil.success();
}
//
}
//
@Permission
//
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询已经绑定的消防设备列表"
,
notes
=
"分页查询已经绑定的消防设备列表"
)
//
@ApiOperation(httpMethod = "GET", value = "分页查询已经绑定的消防设备列表", notes = "分页查询已经绑定的消防设备列表")
@RequestMapping
(
value
=
"/{waterResourceId}/fireEquipmenet/page"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
//
@RequestMapping(value = "/{waterResourceId}/fireEquipmenet/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public
CommonResponse
queryForEuqimentList
(
@PathVariable
Long
waterResourceId
,
@RequestParam
int
pageNumber
,
//
public CommonResponse queryForEuqimentList(@PathVariable Long waterResourceId, @RequestParam int pageNumber,
@RequestParam
int
pageSize
)
{
//
@RequestParam int pageSize) {
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
//
CommonPageable commonPageable = new CommonPageable(pageNumber, pageSize);
return
CommonResponseUtil
.
success
(
iWaterResourceService
.
queryBindFireEquemtPage
(
waterResourceId
,
commonPageable
));
//
return CommonResponseUtil.success(iWaterResourceService.queryBindFireEquemtPage(waterResourceId, commonPageable));
}
//
}
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
View file @
61767d5d
...
@@ -6,8 +6,6 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
...
@@ -6,8 +6,6 @@ import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import
com.yeejoin.amos.fas.business.param.FireEquipmentParam
;
import
com.yeejoin.amos.fas.business.param.FireEquipmentParam
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.business.vo.EquipCommunicationData
;
import
com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse
;
import
com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -90,5 +88,5 @@ public interface FireEquipMapper extends BaseMapper {
...
@@ -90,5 +88,5 @@ public interface FireEquipMapper extends BaseMapper {
FireEquipmentBo
findVideoById
(
@Param
(
"id"
)
Long
id
);
FireEquipmentBo
findVideoById
(
@Param
(
"id"
)
Long
id
);
FireStation
findFireStationById
(
@Param
(
"id"
)
Long
id
);
//
FireStation findFireStationById(@Param("id") Long id);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireStationMapper.java
View file @
61767d5d
...
@@ -9,12 +9,12 @@ public interface FireStationMapper extends BaseMapper {
...
@@ -9,12 +9,12 @@ public interface FireStationMapper extends BaseMapper {
Map
queryOne
(
@Param
(
"id"
)
Long
id
);
Map
queryOne
(
@Param
(
"id"
)
Long
id
);
List
<
Map
>
queryForFireEqumntPage
(
//
List<Map> queryForFireEqumntPage(
@Param
(
"fireStationId"
)
Long
fireStationId
,
//
@Param("fireStationId") Long fireStationId,
@Param
(
"start"
)
long
start
,
//
@Param("start") long start,
@Param
(
"length"
)
Integer
length
);
//
@Param("length") Integer length);
Long
queryCountForFireEqumntPage
(
//
Long queryCountForFireEqumntPage(
@Param
(
"fireStationId"
)
Long
fireStationId
);
//
@Param("fireStationId") Long fireStationId);
List
<
Map
>
queryForPage
(
@Param
(
"name"
)
String
name
,
List
<
Map
>
queryForPage
(
@Param
(
"name"
)
String
name
,
...
@@ -31,5 +31,5 @@ public interface FireStationMapper extends BaseMapper {
...
@@ -31,5 +31,5 @@ public interface FireStationMapper extends BaseMapper {
@Param
(
"code"
)
String
code
,
@Param
(
"code"
)
String
code
,
@Param
(
"type"
)
String
type
);
@Param
(
"type"
)
String
type
);
List
<
Map
>
queryEquipCountById
(
@Param
(
"id"
)
Long
id
);
//
List<Map> queryEquipCountById(@Param("id") Long id);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireStrengthMapper.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
//
package com.yeejoin.amos.fas.business.dao.mapper;
//
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
//
import
org.apache.ibatis.annotations.Param
;
//
import org.apache.ibatis.annotations.Param;
//
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
////
import com.yeejoin.amos.fas.dao.entity.FireStrength;
//
public
interface
FireStrengthMapper
extends
BaseMapper
{
//
public interface FireStrengthMapper extends BaseMapper {
//
Map
queryOne
(
@Param
(
"id"
)
Long
id
);
//
Map queryOne(@Param("id") Long id);
//
List
<
Map
>
queryForPage
(
@Param
(
"username"
)
String
username
,
@Param
(
"code"
)
String
code
,
@Param
(
"start"
)
long
start
,
@Param
(
"length"
)
Integer
length
);
//
List<Map> queryForPage(@Param("username") String username, @Param("code") String code, @Param("start") long start, @Param("length") Integer length);
//
Long
queryCountForPage
(
@Param
(
"username"
)
String
username
,
@Param
(
"code"
)
String
code
);
//
Long queryCountForPage(@Param("username") String username, @Param("code") String code);
//
List
<
FireStrength
>
queryForStrengthList
(
@Param
(
"time"
)
String
time
);
////
List<FireStrength> queryForStrengthList(@Param("time")String time);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/WaterResourceMapper.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
//
package com.yeejoin.amos.fas.business.dao.mapper;
//
import
com.yeejoin.amos.fas.business.param.WaterResourceParam
;
//
import com.yeejoin.amos.fas.business.param.WaterResourceParam;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
org.apache.ibatis.annotations.Param
;
//
import org.apache.ibatis.annotations.Param;
//
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
import
java.util.Set
;
//
import java.util.Set;
//
public
interface
WaterResourceMapper
extends
BaseMapper
{
//
public interface WaterResourceMapper extends BaseMapper {
//
Map
queryOne
(
@Param
(
"id"
)
Long
id
);
//
Map queryOne(@Param("id") Long id);
//
//
List
<
Map
>
queryForPage
(
//
List<Map> queryForPage(
@Param
(
"orgCode"
)
String
compCode
,
//
@Param("orgCode") String compCode,
@Param
(
"name"
)
String
name
,
//
@Param("name") String name,
@Param
(
"code"
)
String
code
,
//
@Param("code") String code,
@Param
(
"type"
)
String
type
,
//
@Param("type") String type,
@Param
(
"start"
)
long
start
,
//
@Param("start") long start,
@Param
(
"length"
)
Integer
length
);
//
@Param("length") Integer length);
Long
queryCountForPage
(
//
Long queryCountForPage(
@Param
(
"orgCode"
)
String
compCode
,
//
@Param("orgCode") String compCode,
@Param
(
"name"
)
String
name
,
//
@Param("name") String name,
@Param
(
"code"
)
String
code
,
//
@Param("code") String code,
@Param
(
"type"
)
String
type
);
//
@Param("type")String type);
//
List
<
Map
>
queryForBindFireEqumntPage
(
//
List<Map> queryForBindFireEqumntPage(
@Param
(
"waterResourceId"
)
Long
waterResourceId
,
//
@Param("waterResourceId") Long waterResourceId,
@Param
(
"start"
)
long
start
,
//
@Param("start") long start,
@Param
(
"length"
)
Integer
length
);
//
@Param("length") Integer length);
//
Long
queryCountForBindFireEqumntPage
(
//
Long queryCountForBindFireEqumntPage(
@Param
(
"waterResourceId"
)
Long
waterResourceId
);
//
@Param("waterResourceId") Long waterResourceId);
//
List
<
WaterResource
>
listByCodes
(
@Param
(
"codes"
)
Set
<
String
>
codes
);
//
List<WaterResource> listByCodes(@Param("codes") Set<String> codes);
//
void
saveBatch
(
List
<
WaterResourceParam
>
list
);
//
void saveBatch(List<WaterResourceParam> list);
//
void
updateBatch
(
List
<
WaterResourceParam
>
list
);
//
void updateBatch(List<WaterResourceParam> list);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/FireStrengthPointDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
//
import com.yeejoin.amos.fas.dao.entity.FireStrength;
//
import
java.util.Optional
;
//
import java.util.Optional;
//
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
//
@Repository
(
"fireStrengthPointDao"
)
//
@Repository("fireStrengthPointDao")
public
interface
FireStrengthPointDao
extends
BaseDao
<
FireStrength
,
Long
>
{
//
public interface FireStrengthPointDao extends BaseDao<FireStrength, Long> {
//
Optional
<
FireStrength
>
findById
(
Long
id
);
//
Optional<FireStrength> findById(Long id);
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IContingencyOriginalDataDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.FireStrength
;
//
import com.yeejoin.amos.fas.dao.entity.FireStrength;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireEquipmentDataDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
java.util.Optional
;
//
import java.util.Optional;
//
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
//
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentData
;
//
import com.yeejoin.amos.fas.dao.entity.FireEquipmentData;
//
@Repository
(
"iFireEquipmentDataDao"
)
//
@Repository("iFireEquipmentDataDao")
public
interface
IFireEquipmentDataDao
extends
BaseDao
<
FireEquipmentData
,
Long
>
{
//
public interface IFireEquipmentDataDao extends BaseDao<FireEquipmentData, Long> {
//
Optional
<
FireEquipmentData
>
findById
(
Long
id
);
//
Optional<FireEquipmentData> findById(Long id);
//
//
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireEquipmentPointDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
java.util.Optional
;
//
import java.util.Optional;
//
import
org.springframework.data.jpa.repository.Query
;
//
import org.springframework.data.jpa.repository.Query;
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
//
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
//
import com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint;
//
@Repository
(
"iFireEquipmentPointDao"
)
//
@Repository("iFireEquipmentPointDao")
public
interface
IFireEquipmentPointDao
extends
BaseDao
<
FireEquipmentPoint
,
Long
>
{
//
public interface IFireEquipmentPointDao extends BaseDao<FireEquipmentPoint, Long> {
//
Optional
<
FireEquipmentPoint
>
findById
(
Long
id
);
//
Optional<FireEquipmentPoint> findById(Long id);
//
FireEquipmentPoint
findOneByCode
(
String
pointCode
);
//
FireEquipmentPoint findOneByCode(String pointCode);
//
int
countByCode
(
String
code
);
//
int countByCode(String code);
//
@Query
(
value
=
"SELECT count(1) FROM `f_fmea_equipment_point` WHERE equipment_point_id in ?1"
,
nativeQuery
=
true
)
//
@Query(value = "SELECT count(1) FROM `f_fmea_equipment_point` WHERE equipment_point_id in ?1", nativeQuery = true)
int
countImpEquipment
(
String
[]
idArray
);
//
int countImpEquipment(String[] idArray);
//
@Query
(
value
=
"select group_CONCAT(r.name) from f_fmea_equipment_point ep "
+
// @Query(value = "select group_CONCAT(r.name) from f_fmea_equipment_point ep " +
"left join f_fmea f on f.id = ep.fmea_id "
+
// "left join f_fmea f on f.id = ep.fmea_id " +
"left join f_risk_source r on r.id = f.risk_source_id "
+
// "left join f_risk_source r on r.id = f.risk_source_id " +
" WHERE ep.equipment_point_id in ?1 "
,
nativeQuery
=
true
)
//
" WHERE ep.equipment_point_id in ?1 ", nativeQuery = true)
String
findBindRiskSourceStrByPointIds
(
String
[]
idArray
);
//
String findBindRiskSourceStrByPointIds(String[] idArray);
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireStationDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
java.util.Optional
;
//
import java.util.Optional;
//
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
//
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
//
import com.yeejoin.amos.fas.dao.entity.FireStation;
//
@Repository
(
"iFireStationDao"
)
//
@Repository("iFireStationDao")
public
interface
IFireStationDao
extends
BaseDao
<
FireStation
,
Long
>
{
//
public interface IFireStationDao extends BaseDao<FireStation, Long> {
//
Optional
<
FireStation
>
findById
(
Long
id
);
//
Optional<FireStation> findById(Long id);
//
Optional
<
FireStation
>
findByCode
(
String
code
);
//
Optional<FireStation> findByCode(String code);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireStationEquipmentDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment
;
//
import com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment;
//
import
org.springframework.data.jpa.repository.Modifying
;
//
import org.springframework.data.jpa.repository.Modifying;
import
org.springframework.data.jpa.repository.Query
;
//
import org.springframework.data.jpa.repository.Query;
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
import
org.springframework.transaction.annotation.Transactional
;
//
import org.springframework.transaction.annotation.Transactional;
//
@Repository
(
"iFireStationEquipmentDao"
)
//
@Repository("iFireStationEquipmentDao")
public
interface
IFireStationEquipmentDao
extends
BaseDao
<
FireStationFireEquipment
,
Long
>
{
//
public interface IFireStationEquipmentDao extends BaseDao<FireStationFireEquipment, Long> {
//
@Transactional
//
@Transactional
@Modifying
//
@Modifying
@Query
(
value
=
"delete FROM `f_fire_station_equipment` WHERE fire_station_id = ?1"
,
nativeQuery
=
true
)
//
@Query(value = "delete FROM `f_fire_station_equipment` WHERE fire_station_id = ?1", nativeQuery = true)
void
deleteByStationId
(
Long
id
);
//
void deleteByStationId(Long id);
//
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFmeaEquipmentPointDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
java.util.List
;
//
import java.util.List;
//
import
org.springframework.data.jpa.repository.Modifying
;
//
import org.springframework.data.jpa.repository.Modifying;
import
org.springframework.data.jpa.repository.Query
;
//
import org.springframework.data.jpa.repository.Query;
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
//
import
com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint
;
//
import com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint;
//
//
@Repository
(
"iFmeaEquipmentPointDao"
)
//
@Repository("iFmeaEquipmentPointDao")
public
interface
IFmeaEquipmentPointDao
extends
BaseDao
<
FmeaEquipmentPoint
,
Long
>{
//
public interface IFmeaEquipmentPointDao extends BaseDao<FmeaEquipmentPoint, Long>{
//
@Modifying
//
@Modifying
@Query
(
value
=
"DELETE fmep FROM `f_fmea_equipment_point` fmep"
+
//
@Query(value="DELETE fmep FROM `f_fmea_equipment_point` fmep"+
"LEFT JOIN f_fire_equipment_point fep ON fep.id = fmep.equipment_point_id"
+
//
"LEFT JOIN f_fire_equipment_point fep ON fep.id = fmep.equipment_point_id"+
"WHERE fep.fire_equipment_id = ?1 AND fmep.important_equipment_id = ?2"
,
nativeQuery
=
true
)
//
"WHERE fep.fire_equipment_id = ?1 AND fmep.important_equipment_id = ?2", nativeQuery = true)
void
removeByFireEquipIdAndEquipId
(
Long
fire_equipment_id
,
Long
importantEquipmentId
);
//
void removeByFireEquipIdAndEquipId(Long fire_equipment_id,Long importantEquipmentId);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IWaterResourceDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResource;
//
import
java.util.Optional
;
//
import java.util.Optional;
//
import
org.springframework.data.jpa.repository.Query
;
//
import org.springframework.data.jpa.repository.Query;
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
//
@Repository
(
"iWaterResourceDao"
)
//
@Repository("iWaterResourceDao")
public
interface
IWaterResourceDao
extends
BaseDao
<
WaterResource
,
Long
>
{
//
public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
//
Optional
<
WaterResource
>
findById
(
Long
id
);
//
Optional<WaterResource> findById(Long id);
//
@Query
(
value
=
"SELECT count(1) FROM `f_water_resource_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
//
@Query(value = "SELECT count(1) FROM `f_water_resource_equipment` WHERE fire_equipment_id in ?1", nativeQuery = true)
int
countAssociatedEquipWaterByIds
(
String
[]
ids
);
//
int countAssociatedEquipWaterByIds(String[] ids);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IWaterResourceEquipmentDao.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
repository
;
//
package com.yeejoin.amos.fas.business.dao.repository;
//
import
java.util.List
;
//
import java.util.List;
import
java.util.Optional
;
//
import java.util.Optional;
//
import
org.springframework.data.jpa.repository.Modifying
;
//
import org.springframework.data.jpa.repository.Modifying;
import
org.springframework.data.jpa.repository.Query
;
//
import org.springframework.data.jpa.repository.Query;
import
org.springframework.stereotype.Repository
;
//
import org.springframework.stereotype.Repository;
import
org.springframework.transaction.annotation.Transactional
;
//
import org.springframework.transaction.annotation.Transactional;
//
import
com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
//
@Repository
(
"iWaterResourceEquipmentDao"
)
//
@Repository("iWaterResourceEquipmentDao")
public
interface
IWaterResourceEquipmentDao
extends
BaseDao
<
WaterResourceEquipment
,
Long
>
{
//
public interface IWaterResourceEquipmentDao extends BaseDao<WaterResourceEquipment, Long> {
//
Optional
<
WaterResourceEquipment
>
findById
(
Long
id
);
//
Optional<WaterResourceEquipment> findById(Long id);
//
WaterResourceEquipment
findByWaterResourceIdAndFireEquipmentId
(
Long
waterResourceId
,
Long
fireEquipmentId
);
//
WaterResourceEquipment findByWaterResourceIdAndFireEquipmentId(Long waterResourceId,Long fireEquipmentId);
//
int
countByWaterResourceIdAndFireEquipmentId
(
Long
waterResourceId
,
Long
fireEquipmentId
);
//
int countByWaterResourceIdAndFireEquipmentId(Long waterResourceId,Long fireEquipmentId);
//
@Transactional
//
@Transactional
@Modifying
//
@Modifying
@Query
(
value
=
"delete FROM `f_water_resource_equipment` WHERE water_resource_id = ?1"
,
nativeQuery
=
true
)
//
@Query(value = "delete FROM `f_water_resource_equipment` WHERE water_resource_id = ?1", nativeQuery = true)
void
deleteByWaterSourceId
(
Long
id
);
//
void deleteByWaterSourceId(Long id);
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
61767d5d
...
@@ -40,7 +40,6 @@ import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper;
...
@@ -40,7 +40,6 @@ import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaEquipmentPointDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
import
com.yeejoin.amos.fas.business.param.ImgParam
;
...
@@ -54,7 +53,6 @@ import com.yeejoin.amos.fas.dao.entity.Equipment;
...
@@ -54,7 +53,6 @@ import com.yeejoin.amos.fas.dao.entity.Equipment;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.dao.entity.PreplanPicture
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
...
@@ -89,8 +87,8 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -89,8 +87,8 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Autowired
@Autowired
private
RedisTemplate
redisTemplate
;
private
RedisTemplate
redisTemplate
;
@Autowired
//
@Autowired
private
IFmeaEquipmentPointDao
iFmeaEquipmentPointDao
;
//
private IFmeaEquipmentPointDao iFmeaEquipmentPointDao;
// @Autowired
// @Autowired
// private MongoTemplate mongoTemplate;
// private MongoTemplate mongoTemplate;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ExcelServiceImpl.java
View file @
61767d5d
...
@@ -5,7 +5,7 @@ import com.google.common.collect.Maps;
...
@@ -5,7 +5,7 @@ import com.google.common.collect.Maps;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.WaterResourceMapper
;
//
import com.yeejoin.amos.fas.business.dao.mapper.WaterResourceMapper;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
...
@@ -17,7 +17,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService;
...
@@ -17,7 +17,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IFireEquipPontService;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -45,8 +45,8 @@ public class ExcelServiceImpl implements IExcelService {
...
@@ -45,8 +45,8 @@ public class ExcelServiceImpl implements IExcelService {
@Autowired
@Autowired
private
IFireEquipPontService
fireEquipPointService
;
private
IFireEquipPontService
fireEquipPointService
;
@Autowired
//
@Autowired
private
WaterResourceMapper
waterResourceMapper
;
//
private WaterResourceMapper waterResourceMapper;
@Autowired
@Autowired
private
IRiskSourceDao
riskSourceDao
;
private
IRiskSourceDao
riskSourceDao
;
...
@@ -151,40 +151,40 @@ public class ExcelServiceImpl implements IExcelService {
...
@@ -151,40 +151,40 @@ public class ExcelServiceImpl implements IExcelService {
return
pointExcelList
;
return
pointExcelList
;
}
}
@Override
//
@Override
public
void
importWaterResource
(
List
<
WaterResourceParam
>
list
)
{
//
public void importWaterResource(List<WaterResourceParam> list) {
List
<
String
>
codeList
=
Lists
.
transform
(
list
,
WaterResourceParam:
:
getCode
);
//
List<String> codeList = Lists.transform(list, WaterResourceParam::getCode);
Set
<
String
>
codeSet
=
Sets
.
newHashSet
(
codeList
);
//
Set<String> codeSet = Sets.newHashSet(codeList);
List
<
WaterResource
>
waterResources
=
waterResourceMapper
.
listByCodes
(
codeSet
);
//
List<WaterResource> waterResources = waterResourceMapper.listByCodes(codeSet);
Map
<
String
,
WaterResource
>
waterResourceMap
=
Maps
.
uniqueIndex
(
waterResources
,
WaterResource:
:
getCode
);
//
Map<String, WaterResource> waterResourceMap = Maps.uniqueIndex(waterResources, WaterResource::getCode);
List
<
WaterResourceParam
>
saveList
=
Lists
.
newArrayList
();
//
List<WaterResourceParam> saveList = Lists.newArrayList();
List
<
WaterResourceParam
>
updateList
=
Lists
.
newArrayList
();
//
List<WaterResourceParam> updateList = Lists.newArrayList();
list
.
forEach
(
warerRes
->
{
//
list.forEach(warerRes -> {
if
(!
StringUtil
.
isNotEmpty
(
warerRes
.
getName
())
//
if(!StringUtil.isNotEmpty(warerRes.getName())
||
!
StringUtil
.
isNotEmpty
(
warerRes
.
getCode
()))
{
//
|| !StringUtil.isNotEmpty(warerRes.getCode())) {
throw
new
YeeException
(
"请检查必填项是否为空!"
);
//
throw new YeeException("请检查必填项是否为空!");
}
//
}
String
riskSourceCode
=
warerRes
.
getRiskSourceCode
();
//
String riskSourceCode = warerRes.getRiskSourceCode();
Optional
<
RiskSource
>
riskSourceOptional
=
riskSourceDao
.
findByCode
(
riskSourceCode
);
//
Optional<RiskSource> riskSourceOptional = riskSourceDao.findByCode(riskSourceCode);
if
(
riskSourceOptional
.
isPresent
())
{
//
if(riskSourceOptional.isPresent()) {
warerRes
.
setRiskSourceId
(
riskSourceOptional
.
get
().
getId
());
//
warerRes.setRiskSourceId(riskSourceOptional.get().getId());
}
else
{
//
}else {
throw
new
YeeException
(
"编号: ["
+
riskSourceCode
+
"] 风险区域不存在!"
);
//
throw new YeeException("编号: [" + riskSourceCode + "] 风险区域不存在!");
}
//
}
String
code
=
warerRes
.
getCode
();
//
String code = warerRes.getCode();
WaterResource
waterResource
=
waterResourceMap
.
get
(
code
);
//
WaterResource waterResource = waterResourceMap.get(code);
if
(
waterResource
==
null
)
{
//
if (waterResource == null) {
saveList
.
add
(
warerRes
);
//
saveList.add(warerRes);
}
else
{
//
} else {
warerRes
.
setId
(
waterResource
.
getId
());
//
warerRes.setId(waterResource.getId());
updateList
.
add
(
warerRes
);
//
updateList.add(warerRes);
}
//
}
});
//
});
if
(!
CollectionUtils
.
isEmpty
(
saveList
))
{
//
if (!CollectionUtils.isEmpty(saveList)) {
waterResourceMapper
.
saveBatch
(
saveList
);
//
waterResourceMapper.saveBatch(saveList);
}
//
}
if
(!
CollectionUtils
.
isEmpty
(
updateList
))
{
//
if (!CollectionUtils.isEmpty(updateList)) {
waterResourceMapper
.
updateBatch
(
updateList
);
//
waterResourceMapper.updateBatch(updateList);
}
//
}
}
//
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipPointServiceImpl.java
View file @
61767d5d
...
@@ -2,7 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
...
@@ -2,7 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentPointDao
;
//
import com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentPointDao;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEquipmentService
;
...
@@ -12,7 +12,7 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
...
@@ -12,7 +12,7 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
//
import com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint;
import
org.assertj.core.util.Lists
;
import
org.assertj.core.util.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
...
@@ -26,8 +26,8 @@ import java.util.Optional;
...
@@ -26,8 +26,8 @@ import java.util.Optional;
@Service
(
"fireEquipPoint"
)
@Service
(
"fireEquipPoint"
)
public
class
FireEquipPointServiceImpl
implements
IFireEquipPontService
{
public
class
FireEquipPointServiceImpl
implements
IFireEquipPontService
{
@Autowired
//
@Autowired
private
IFireEquipmentPointDao
fireEquipmentPointDao
;
//
private IFireEquipmentPointDao fireEquipmentPointDao;
@Autowired
@Autowired
private
FireEquipPointMapper
fireEquipPointMapper
;
private
FireEquipPointMapper
fireEquipPointMapper
;
...
@@ -38,40 +38,40 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
...
@@ -38,40 +38,40 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
@Autowired
@Autowired
private
FireEquipMapper
fireEquipMapper
;
private
FireEquipMapper
fireEquipMapper
;
//
public
FireEquipmentPoint
savePoint
(
FireEquipmentPoint
fireEquipmentPoint
)
{
//
public FireEquipmentPoint savePoint(FireEquipmentPoint fireEquipmentPoint) {
return
fireEquipmentPointDao
.
save
(
fireEquipmentPoint
);
//
return fireEquipmentPointDao.save(fireEquipmentPoint);
}
//
}
public
FireEquipmentPoint
queryOne
(
Long
id
)
{
//
public FireEquipmentPoint queryOne(Long id) {
Optional
<
FireEquipmentPoint
>
fireCar1
=
fireEquipmentPointDao
.
findById
(
id
);
//
Optional<FireEquipmentPoint> fireCar1= fireEquipmentPointDao.findById(id);
FireEquipmentPoint
fireCar
=
null
;
//
FireEquipmentPoint fireCar=null;
if
(
fireCar1
.
isPresent
()){
//
if(fireCar1.isPresent()){
fireCar
=
fireCar1
.
get
();
//
fireCar=fireCar1.get();
}
//
}
return
fireCar
;
//
return fireCar;
}
//
}
@Override
//
@Override
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
//
public String[] deletePoint(String[] idArray) throws Exception {
for
(
String
id
:
idArray
)
{
//
for (String id : idArray) {
Optional
<
FireEquipmentPoint
>
fireEquipmentPoint1
=
fireEquipmentPointDao
.
findById
(
Long
.
parseLong
(
id
));
//
Optional<FireEquipmentPoint> fireEquipmentPoint1 = fireEquipmentPointDao.findById(Long.parseLong(id));
FireEquipmentPoint
fireEquipmentPoint
=
null
;
//
FireEquipmentPoint fireEquipmentPoint=null;
//
if
(
fireEquipmentPoint1
.
isPresent
()){
//
if(fireEquipmentPoint1.isPresent()){
fireEquipmentPoint
=
fireEquipmentPoint1
.
get
();
//
fireEquipmentPoint=fireEquipmentPoint1.get();
}
//
}
//
if
(
fireEquipmentPoint
!=
null
)
{
//
if (fireEquipmentPoint != null) {
this
.
fireEquipmentPointDao
.
deleteById
(
Long
.
parseLong
(
id
));
//
this.fireEquipmentPointDao.deleteById(Long.parseLong(id));
}
else
{
//
} else {
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
//
throw new Exception("找不到指定的监测点:" + id);
}
//
}
}
//
}
//
return
idArray
;
//
return idArray;
}
//
}
public
Page
queryByFireEquimt
(
Long
fireEqumntId
,
String
name
,
CommonPageable
pageable
)
{
public
Page
queryByFireEquimt
(
Long
fireEqumntId
,
String
name
,
CommonPageable
pageable
)
{
...
@@ -116,15 +116,15 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
...
@@ -116,15 +116,15 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
}
@Override
//
@Override
public
CommonResponse
save
(
FireEquipmentPointEntity
fireEquipmentPointEntity
)
{
//
public CommonResponse save(FireEquipmentPointEntity fireEquipmentPointEntity) {
FireEquipmentPointEntity
pointEntity
=
fireEquipPointMapper
.
getByCode
(
fireEquipmentPointEntity
.
getCode
());
//
FireEquipmentPointEntity pointEntity = fireEquipPointMapper.getByCode(fireEquipmentPointEntity.getCode());
if
(
pointEntity
!=
null
)
{
//
if (pointEntity != null) {
return
CommonResponseUtil
.
failure
(
"监测点编号已经存在"
);
//
return CommonResponseUtil.failure("监测点编号已经存在");
}
//
}
fireEquipPointMapper
.
save
(
fireEquipmentPointEntity
);
//
fireEquipPointMapper.save(fireEquipmentPointEntity);
return
CommonResponseUtil
.
success
();
//
return CommonResponseUtil.success();
}
//
}
@Override
@Override
public
CommonResponse
update
(
FireEquipmentPointEntity
fireEquipmentPointEntity
)
{
public
CommonResponse
update
(
FireEquipmentPointEntity
fireEquipmentPointEntity
)
{
...
@@ -156,14 +156,14 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
...
@@ -156,14 +156,14 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
}
}
@Override
//
@Override
public
int
countImpEquipment
(
String
[]
idArray
)
{
//
public int countImpEquipment(String[] idArray) {
return
fireEquipmentPointDao
.
countImpEquipment
(
idArray
);
//
return fireEquipmentPointDao.countImpEquipment(idArray);
}
//
}
@Override
//
@Override
public
String
findBindRiskSourceStrByPointIds
(
String
[]
idArray
)
{
//
public String findBindRiskSourceStrByPointIds(String[] idArray) {
return
fireEquipmentPointDao
.
findBindRiskSourceStrByPointIds
(
idArray
);
//
return fireEquipmentPointDao.findBindRiskSourceStrByPointIds(idArray);
}
//
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipServiceImpl.java
View file @
61767d5d
...
@@ -12,15 +12,12 @@ import org.springframework.stereotype.Service;
...
@@ -12,15 +12,12 @@ import org.springframework.stereotype.Service;
import
com.yeejoin.amos.fas.business.bo.FireEquipmentBo
;
import
com.yeejoin.amos.fas.business.bo.FireEquipmentBo
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IWaterResourceDao
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireEquipService
;
import
com.yeejoin.amos.fas.business.util.FireEquipmentType
;
import
com.yeejoin.amos.fas.business.util.FireEquipmentType
;
import
com.yeejoin.amos.fas.common.enums.EquipClassifyEnum
;
import
com.yeejoin.amos.fas.common.enums.EquipClassifyEnum
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.CommonPage
;
import
com.yeejoin.amos.fas.core.common.response.CommonPage
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
@Service
(
"fireEquipService"
)
@Service
(
"fireEquipService"
)
public
class
FireEquipServiceImpl
implements
IFireEquipService
{
public
class
FireEquipServiceImpl
implements
IFireEquipService
{
...
@@ -31,11 +28,11 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -31,11 +28,11 @@ public class FireEquipServiceImpl implements IFireEquipService {
@Autowired
@Autowired
ImpEquipMapper
impEquipMapper
;
ImpEquipMapper
impEquipMapper
;
@Autowired
//
@Autowired
IWaterResourceDao
iWaterResourceDao
;
//
IWaterResourceDao iWaterResourceDao;
@Autowired
//
@Autowired
IFireStationDao
iFireStationDao
;
//
IFireStationDao iFireStationDao;
// public FireEquipment save(FireEquipment fireEquipment) {
// public FireEquipment save(FireEquipment fireEquipment) {
// Long id = fireEquipment.getId();
// Long id = fireEquipment.getId();
...
@@ -140,24 +137,24 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -140,24 +137,24 @@ public class FireEquipServiceImpl implements IFireEquipService {
switch
(
fireEquipmentType
)
switch
(
fireEquipmentType
)
{
{
case
pool:
//
case pool:
FireStation
fireStation
=
fireEquipMapper
.
findFireStationById
(
id
);
//
FireStation fireStation = fireEquipMapper.findFireStationById(id);
fireStation
.
setType
(
"2"
);
//
fireStation.setType("2");
fireStation
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
//
fireStation.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity
=
fireStation
;
//
returnEntity = fireStation;
break
;
//
break;
case
fireFoamRoom:
//
case fireFoamRoom:
FireStation
fireStation1
=
fireEquipMapper
.
findFireStationById
(
id
);
//
FireStation fireStation1 = fireEquipMapper.findFireStationById(id);
fireStation1
.
setType
(
"2"
);
//
fireStation1.setType("2");
fireStation1
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
//
fireStation1.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity
=
fireStation1
;
//
returnEntity = fireStation1;
break
;
//
break;
case
fireChamber:
//
case fireChamber:
FireStation
fireStation11
=
fireEquipMapper
.
findFireStationById
(
id
);
//
FireStation fireStation11 = fireEquipMapper.findFireStationById(id);
fireStation11
.
setType
(
"1"
);
//
fireStation11.setType("1");
fireStation11
.
setFireEquipmentInfo
(
this
.
fireEquipMapper
.
queryStorageEquips
(
id
));
//
fireStation11.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity
=
fireStation11
;
//
returnEntity = fireStation11;
break
;
//
break;
case
extinguisher:
case
extinguisher:
case
hydrant:
case
hydrant:
case
monitorEquipment:
case
monitorEquipment:
...
@@ -184,11 +181,10 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -184,11 +181,10 @@ public class FireEquipServiceImpl implements IFireEquipService {
return
returnEntity
;
return
returnEntity
;
}
}
@Override
//
@Override
public
int
countAssociatedEquipStationByIds
(
String
[]
ids
)
{
//
public int countAssociatedEquipStationByIds(String[] ids) {
// return iFireEquipmentDao.countAssociatedEquipStationByIds(ids);
// return iFireEquipmentDao.countAssociatedEquipStationByIds(ids);
return
0
;
// }
}
// @Override
// @Override
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireStationServiceImpl.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
//package com.yeejoin.amos.fas.business.service.impl;
//
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
//import com.yeejoin.amos.fas.business.constants.FasConstant;
import
com.yeejoin.amos.fas.business.dao.mapper.FireStationEquipmentMapper
;
//import com.yeejoin.amos.fas.business.dao.mapper.FireStationEquipmentMapper;
import
com.yeejoin.amos.fas.business.dao.mapper.FireStationMapper
;
//import com.yeejoin.amos.fas.business.dao.mapper.FireStationMapper;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao
;
//import com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationDao
;
//import com.yeejoin.amos.fas.business.dao.repository.IFireEquipmentDao;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationEquipmentDao
;
//import com.yeejoin.amos.fas.business.dao.repository.IFireStationDao;
import
com.yeejoin.amos.fas.business.service.intfc.IFireStationService
;
//import com.yeejoin.amos.fas.business.dao.repository.IFireStationEquipmentDao;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
//import com.yeejoin.amos.fas.business.service.intfc.IFireStationService;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
//import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment
;
//import com.yeejoin.amos.fas.dao.entity.FireEquipment;
import
com.yeejoin.amos.fas.exception.YeeException
;
//import com.yeejoin.amos.fas.dao.entity.FireStation;
import
org.springframework.beans.factory.annotation.Autowired
;
//import com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment;
import
org.springframework.beans.factory.annotation.Value
;
//import com.yeejoin.amos.fas.exception.YeeException;
import
org.springframework.data.domain.Page
;
//import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.data.domain.PageImpl
;
//import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
//import org.springframework.data.domain.Page;
import
org.springframework.transaction.annotation.Transactional
;
//import org.springframework.data.domain.PageImpl;
import
org.springframework.util.CollectionUtils
;
//import org.springframework.stereotype.Service;
import
org.springframework.web.multipart.MultipartFile
;
//import org.springframework.transaction.annotation.Transactional;
//import org.springframework.util.CollectionUtils;
import
java.io.File
;
//import org.springframework.web.multipart.MultipartFile;
import
java.io.IOException
;
//
import
java.io.UnsupportedEncodingException
;
//import java.io.File;
import
java.net.URLEncoder
;
//import java.io.IOException;
import
java.util.*
;
//import java.io.UnsupportedEncodingException;
//import java.net.URLEncoder;
@Service
(
"fireStationService"
)
//import java.util.*;
public
class
FireStationServiceImpl
implements
IFireStationService
{
//
//@Service("fireStationService")
@Autowired
//public class FireStationServiceImpl implements IFireStationService {
IFireStationDao
iFireStationDao
;
//
// @Autowired
@Autowired
// IFireStationDao iFireStationDao;
FireStationMapper
fireStationMapper
;
//
// @Autowired
@Autowired
// FireStationMapper fireStationMapper;
FireStationEquipmentMapper
fireStationEquipmentMapper
;
//
// @Autowired
@Autowired
// FireStationEquipmentMapper fireStationEquipmentMapper;
IFireStationEquipmentDao
iFireStationEquipmentDao
;
//
// @Autowired
// IFireStationEquipmentDao iFireStationEquipmentDao;
@Value
(
"${windows.img.path}"
)
//
private
String
winImgPath
;
// @Autowired
// IFireEquipmentDao iFireEquipmentDao;
@Value
(
"${linux.img.path}"
)
//
private
String
linuxImgPath
;
// @Value("${windows.img.path}")
// private String winImgPath;
public
FireStation
save
(
FireStation
fireStation
)
{
//
Long
id
=
fireStation
.
getId
();
// @Value("${linux.img.path}")
iFireStationDao
.
saveAndFlush
(
fireStation
);
// private String linuxImgPath;
return
fireStation
;
//
}
// public FireStation save(FireStation fireStation) {
// Long id = fireStation.getId();
public
List
<
FireStationFireEquipment
>
saveStationFireEquipment
(
// iFireStationDao.saveAndFlush(fireStation);
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
{
// return fireStation;
// }
//
// public List<FireStationFireEquipment> saveStationFireEquipment(
// List<FireStationFireEquipment> fireStationFireEquipments) throws Exception {
//
// for (FireStationFireEquipment fireStationFireEquipment : fireStationFireEquipments) {
// for (FireStationFireEquipment fireStationFireEquipment : fireStationFireEquipments) {
// Optional<FireStation> fireStation1 = iFireStationDao.findById(fireStationFireEquipment.getFireStationId());
// Optional<FireStation> fireStation1 = iFireStationDao.findById(fireStationFireEquipment.getFireStationId());
// Optional<FireEquipment> fireEquipment1 = iFireEquipmentDao.findById(fireStationFireEquipment.getFireEquipmentId());
// Optional<FireEquipment> fireEquipment1 = iFireEquipmentDao.findById(fireStationFireEquipment.getFireEquipmentId());
...
@@ -68,11 +72,13 @@ public class FireStationServiceImpl implements IFireStationService {
...
@@ -68,11 +72,13 @@ public class FireStationServiceImpl implements IFireStationService {
// if(fireEquipment1.isPresent()){
// if(fireEquipment1.isPresent()){
// fireEquipment=fireEquipment1.get();
// fireEquipment=fireEquipment1.get();
// }
// }
//
//
// if (fireStation == null)
// if (fireStation == null)
// throw new Exception("找不到指定的消防站");
// throw new Exception("找不到指定的消防站");
// if (fireEquipment == null)
// if (fireEquipment == null)
// throw new Exception("消防设备不存在");
// throw new Exception("消防设备不存在");
//
//
//// if (!CollectionUtils.isEmpty(map))
//// if (!CollectionUtils.isEmpty(map))
//// throw new Exception("绑定关系已经存在.");
//// throw new Exception("绑定关系已经存在.");
...
@@ -81,6 +87,7 @@ public class FireStationServiceImpl implements IFireStationService {
...
@@ -81,6 +87,7 @@ public class FireStationServiceImpl implements IFireStationService {
// fireStationFireEquipment.getFireEquipmentId());
// fireStationFireEquipment.getFireEquipmentId());
// if (!CollectionUtils.isEmpty(map)) {
// if (!CollectionUtils.isEmpty(map)) {
// if(fireEquipment.getEquipClassify() == 1) {//耗材类
// if(fireEquipment.getEquipClassify() == 1) {//耗材类
//
//
// Long stationEquiId = (Long) map.get("id");
// Long stationEquiId = (Long) map.get("id");
// Double number = (Double) map.get("number");//当前数量
// Double number = (Double) map.get("number");//当前数量
...
@@ -103,141 +110,141 @@ public class FireStationServiceImpl implements IFireStationService {
...
@@ -103,141 +110,141 @@ public class FireStationServiceImpl implements IFireStationService {
//
//
//
//
// }
// }
return
fireStationFireEquipments
;
// return fireStationFireEquipments;
}
public
void
deleteStationFireEquipment
(
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
{
for
(
FireStationFireEquipment
fireStationFireEquipment
:
fireStationFireEquipments
)
{
Map
map
=
fireStationEquipmentMapper
.
queryRelation
(
fireStationFireEquipment
.
getFireStationId
(),
fireStationFireEquipment
.
getFireEquipmentId
());
if
(!
CollectionUtils
.
isEmpty
(
map
))
{
Long
id
=
Long
.
parseLong
(
String
.
valueOf
(
map
.
get
(
"id"
)));
this
.
iFireStationEquipmentDao
.
deleteById
(
id
);
}
else
{
throw
new
Exception
(
"指定的数据不存在."
);
}
}
}
public
Map
queryOne
(
Long
id
)
{
return
fireStationMapper
.
queryOne
(
id
);
}
public
Page
queryForFireEquemtPage
(
Long
fireStationId
,
CommonPageable
pageable
)
{
Long
total
=
fireStationMapper
.
queryCountForFireEqumntPage
(
fireStationId
);
List
<
Map
>
content
=
fireStationMapper
.
queryForFireEqumntPage
(
fireStationId
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
return
result
;
}
@Transactional
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id
:
idArray
)
{
Optional
<
FireStation
>
fireStation1
=
iFireStationDao
.
findById
(
Long
.
parseLong
(
id
));
FireStation
fireStation
=
null
;
if
(
fireStation1
.
isPresent
()){
fireStation
=
fireStation1
.
get
();
}
iFireStationEquipmentDao
.
deleteByStationId
(
Long
.
valueOf
(
id
));
if
(
fireStation
!=
null
)
{
this
.
iFireStationDao
.
deleteById
(
Long
.
parseLong
(
id
));
}
else
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
}
}
return
idArray
;
}
public
Page
queryForPage
(
String
username
,
String
code
,
String
type
,
CommonPageable
pageable
)
{
Long
total
=
fireStationMapper
.
queryCountForPage
(
username
,
code
,
type
);
List
<
Map
>
content
=
fireStationMapper
.
queryForPage
(
username
,
code
,
type
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
return
result
;
}
public
List
<
Map
>
queryForList
(
String
username
,
String
code
,
String
type
)
{
List
<
Map
>
content
=
fireStationMapper
.
queryForList
(
username
,
code
,
type
);
return
content
;
}
@Override
public
FireStation
saveAndUpd
(
FireStation
fireStation
,
MultipartFile
[]
files
)
{
fireStation
.
setCreateDate
(
new
Date
());
fireStation
=
save
(
fireStation
);
if
(
files
!=
null
&&
files
.
length
>
0
)
{
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
String
picture
=
fireStation
.
getPicture
();
MultipartFile
file
=
files
[
i
];
if
(
file
.
isEmpty
())
{
continue
;
}
String
path
=
FasConstant
.
UPLOAD_ROOT_PATH
+
File
.
separator
+
FasConstant
.
UPLOAD_FIRESTATION_PATH
+
File
.
separator
+
fireStation
.
getName
();
String
filePath
=
getRootPath
()
+
path
;
String
fileName
=
File
.
separator
+
file
.
getOriginalFilename
();
try
{
File
dest
=
new
File
(
filePath
+
File
.
separator
+
fileName
);
if
(!
dest
.
exists
())
{
if
(
dest
.
getParentFile
()
!=
null
&&
!
dest
.
getParentFile
().
exists
())
{
dest
.
getParentFile
().
mkdirs
();
}
dest
.
createNewFile
();
}
file
.
transferTo
(
dest
);
}
catch
(
IOException
e
)
{
throw
new
YeeException
(
"上传图片失败"
);
}
String
photoFile
=
path
+
fileName
;
// try{
// photoFile = URLEncoder.encode(photoFile, "utf-8");
// } catch (UnsupportedEncodingException e){
// throw new YeeException("字符转义失败 ");
// }
// }
//
if
(
picture
!=
null
&&
picture
!=
""
)
{
// public void deleteStationFireEquipment(List<FireStationFireEquipment> fireStationFireEquipments) throws Exception {
picture
+=
","
+
photoFile
;
//
}
else
{
// for (FireStationFireEquipment fireStationFireEquipment : fireStationFireEquipments) {
picture
=
photoFile
;
// Map map = fireStationEquipmentMapper.queryRelation(fireStationFireEquipment.getFireStationId(),
}
// fireStationFireEquipment.getFireEquipmentId());
fireStation
.
setPicture
(
picture
);
// if (!CollectionUtils.isEmpty(map)) {
}
// Long id = Long.parseLong(String.valueOf(map.get("id")));
fireStation
=
save
(
fireStation
);
// this.iFireStationEquipmentDao.deleteById(id);
//
}
// } else {
// throw new Exception("指定的数据不存在.");
return
fireStation
;
// }
}
// }
// }
private
String
getRootPath
()
{
//
String
localPath
=
""
;
// public Map queryOne(Long id) {
if
(
"\\"
.
equals
(
File
.
separator
))
{
// return fireStationMapper.queryOne(id);
localPath
+=
winImgPath
;
// }
}
else
if
(
"/"
.
equals
(
File
.
separator
))
{
//
localPath
+=
linuxImgPath
;
// public Page queryForFireEquemtPage(Long fireStationId, CommonPageable pageable) {
}
// Long total = fireStationMapper.queryCountForFireEqumntPage(fireStationId);
return
localPath
.
trim
();
// List<Map> content = fireStationMapper.queryForFireEqumntPage(fireStationId, pageable.getOffset(),
}
// pageable.getPageSize());
// Page result = new PageImpl(content, pageable, total);
@Override
// return result;
public
Map
queryForEuqimentListById
(
Long
id
)
{
// }
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
//
result
.
put
(
"fireStation"
,
fireStationMapper
.
queryOne
(
id
));
// @Transactional
result
.
put
(
"EquipmentList"
,
fireStationMapper
.
queryEquipCountById
(
id
));
// public String[] delete(String[] idArray) throws Exception {
return
result
;
// for (String id : idArray) {
}
// Optional<FireStation> fireStation1 = iFireStationDao.findById(Long.parseLong(id));
// FireStation fireStation=null;
@Override
// if(fireStation1.isPresent()){
public
Boolean
isExistByCode
(
String
code
)
{
// fireStation=fireStation1.get();
Optional
<
FireStation
>
optional
=
iFireStationDao
.
findByCode
(
code
);
// }
return
optional
.
isPresent
();
// iFireStationEquipmentDao.deleteByStationId(Long.valueOf(id));
}
// if (fireStation != null) {
// this.iFireStationDao.deleteById(Long.parseLong(id));
}
// } else {
// throw new Exception("找不到指定的监测点:" + id);
// }
// }
//
// return idArray;
// }
//
// public Page queryForPage(String username, String code, String type, CommonPageable pageable) {
// Long total = fireStationMapper.queryCountForPage(username, code, type);
// List<Map> content = fireStationMapper.queryForPage(username, code, type, pageable.getOffset(),
// pageable.getPageSize());
// Page result = new PageImpl(content, pageable, total);
// return result;
// }
//
// public List<Map> queryForList(String username, String code, String type) {
// List<Map> content = fireStationMapper.queryForList(username, code, type);
//
// return content;
// }
//
// @Override
// public FireStation saveAndUpd(FireStation fireStation, MultipartFile[] files) {
// fireStation.setCreateDate(new Date());
// fireStation = save(fireStation);
// if (files != null && files.length > 0) {
// for (int i = 0; i < files.length; i++) {
// String picture = fireStation.getPicture();
// MultipartFile file = files[i];
// if (file.isEmpty()) {
// continue;
// }
// String path = FasConstant.UPLOAD_ROOT_PATH + File.separator + FasConstant.UPLOAD_FIRESTATION_PATH+
// File.separator +fireStation.getName();
//
// String filePath = getRootPath() + path;
// String fileName = File.separator + file.getOriginalFilename();
// try {
// File dest = new File(filePath + File.separator + fileName);
// if (!dest.exists()) {
// if (dest.getParentFile() != null && !dest.getParentFile().exists()) {
// dest.getParentFile().mkdirs();
// }
// dest.createNewFile();
// }
// file.transferTo(dest);
// } catch (IOException e) {
// throw new YeeException("上传图片失败");
// }
//
// String photoFile = path + fileName;
//// try{
//// photoFile = URLEncoder.encode(photoFile, "utf-8");
//// } catch (UnsupportedEncodingException e){
//// throw new YeeException("字符转义失败 ");
//// }
//
// if ( picture != null && picture != "") {
// picture += "," + photoFile;
// } else {
// picture = photoFile;
// }
// fireStation.setPicture(picture);
// }
// fireStation = save(fireStation);
//
// }
//
// return fireStation;
// }
//
// private String getRootPath() {
// String localPath = "";
// if ("\\".equals(File.separator)) {
// localPath += winImgPath;
// } else if ("/".equals(File.separator)) {
// localPath += linuxImgPath;
// }
// return localPath.trim();
// }
//
// @Override
// public Map queryForEuqimentListById(Long id) {
// Map<String,Object> result = new HashMap<String, Object>();
// result.put("fireStation", fireStationMapper.queryOne(id));
// result.put("EquipmentList", fireStationMapper.queryEquipCountById(id));
// return result;
// }
//
// @Override
// public Boolean isExistByCode(String code) {
// Optional<FireStation> optional = iFireStationDao.findByCode(code);
// return optional.isPresent();
// }
//
//}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireStrengthServiceImpl.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
//
package com.yeejoin.amos.fas.business.service.impl;
//
import
com.yeejoin.amos.fas.business.dao.mapper.FireStrengthMapper
;
//
import com.yeejoin.amos.fas.business.dao.mapper.FireStrengthMapper;
import
com.yeejoin.amos.fas.business.dao.repository.FireStrengthPointDao
;
//
import com.yeejoin.amos.fas.business.dao.repository.FireStrengthPointDao;
import
com.yeejoin.amos.fas.business.service.intfc.FireStengthService
;
//
import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
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.FireStrength
;
//
import com.yeejoin.amos.fas.dao.entity.FireStrength;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.data.domain.Page
;
//
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.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
import
java.util.Optional
;
//
import java.util.Optional;
//
@Service
(
"fireStengthService"
)
//
@Service("fireStengthService")
public
class
FireStrengthServiceImpl
implements
FireStengthService
{
//
public class FireStrengthServiceImpl implements FireStengthService {
//
@Autowired
//
@Autowired
private
FireStrengthPointDao
fireStrengthPointDao
;
//
private FireStrengthPointDao fireStrengthPointDao;
@Autowired
//
@Autowired
private
FireStrengthMapper
fireStrengthMapper
;
//
private FireStrengthMapper fireStrengthMapper;
//
public
FireStrength
savePoint
(
FireStrength
fireEquipmentPoint
)
{
//
public FireStrength savePoint(FireStrength fireEquipmentPoint) {
return
fireStrengthPointDao
.
save
(
fireEquipmentPoint
);
//
return fireStrengthPointDao.save(fireEquipmentPoint);
}
//
}
//
public
Map
queryOne
(
Long
id
)
{
//
public Map queryOne(Long id) {
return
fireStrengthMapper
.
queryOne
(
id
);
//
return fireStrengthMapper.queryOne(id);
}
//
}
//
public
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
{
//
public String[] deletePoint(String[] idArray) throws Exception {
for
(
String
id
:
idArray
)
{
//
for (String id : idArray) {
Optional
<
FireStrength
>
fireEquipmentPoint1
=
fireStrengthPointDao
.
findById
(
Long
.
parseLong
(
id
));
//
Optional<FireStrength> fireEquipmentPoint1 = fireStrengthPointDao.findById(Long.parseLong(id));
FireStrength
fireEquipmentPoint
=
null
;
//
FireStrength fireEquipmentPoint = null;
if
(
fireEquipmentPoint1
.
isPresent
())
{
//
if (fireEquipmentPoint1.isPresent()) {
fireEquipmentPoint
=
fireEquipmentPoint1
.
get
();
//
fireEquipmentPoint = fireEquipmentPoint1.get();
}
//
}
if
(
fireEquipmentPoint
!=
null
)
{
//
if (fireEquipmentPoint != null) {
this
.
fireStrengthPointDao
.
deleteById
(
Long
.
parseLong
(
id
));
//
this.fireStrengthPointDao.deleteById(Long.parseLong(id));
}
else
{
//
} else {
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
//
throw new Exception("找不到指定的监测点:" + id);
}
//
}
}
//
}
//
return
idArray
;
//
return idArray;
}
//
}
//
public
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
)
{
//
public Page queryByFireEquimt(String username, String code, CommonPageable pageable) {
Long
total
=
fireStrengthMapper
.
queryCountForPage
(
username
,
code
);
//
Long total = fireStrengthMapper.queryCountForPage(username, code);
List
<
Map
>
content
=
fireStrengthMapper
.
queryForPage
(
username
,
code
,
pageable
.
getOffset
(),
//
List<Map> content = fireStrengthMapper.queryForPage(username, code, pageable.getOffset(),
pageable
.
getPageSize
());
//
pageable.getPageSize());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
//
Page result = new PageImpl(content, pageable, total);
return
result
;
//
return result;
}
//
}
//
public
List
<
FireStrength
>
queryForStrengthList
(
String
time
)
{
//
public List<FireStrength> queryForStrengthList(String time) {
return
fireStrengthMapper
.
queryForStrengthList
(
time
);
//
return fireStrengthMapper.queryForStrengthList(time);
}
//
}
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
61767d5d
...
@@ -139,11 +139,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -139,11 +139,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
@Autowired
IContingencyOriginalDataDao
iContingencyOriginalDataDao
;
IContingencyOriginalDataDao
iContingencyOriginalDataDao
;
@Autowired
//
@Autowired
IFireEquipmentPointDao
iFireEquipmentPointDao
;
//
IFireEquipmentPointDao iFireEquipmentPointDao;
@Autowired
//
@Autowired
IFireEquipmentDataDao
iFireEquipmentDataDao
;
//
IFireEquipmentDataDao iFireEquipmentDataDao;
@Autowired
@Autowired
private
RemoteWebSocketServer
remoteWebSocketServer
;
private
RemoteWebSocketServer
remoteWebSocketServer
;
...
@@ -834,7 +834,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -834,7 +834,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// cacheMap.setex(TOKE, toke, times);
// cacheMap.setex(TOKE, toke, times);
// }
// }
// log.error("rule token ", toke.toString());
// log.error("rule token ", toke.toString());
processDeivceData
(
deviceData
);
//
processDeivceData(deviceData);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"parse alarmParam happened error"
,
e
);
log
.
error
(
"parse alarmParam happened error"
,
e
);
// 失败处理
// 失败处理
...
@@ -846,52 +846,52 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -846,52 +846,52 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
private
void
processDeivceData
(
AlarmParam
deviceData
)
{
//
private void processDeivceData(AlarmParam deviceData) {
//处理设备和巡检数据
//
//处理设备和巡检数据
deviceData
.
setNodeState
(
deviceData
.
getState
());
//
deviceData.setNodeState(deviceData.getState());
FireEquipmentPoint
fireEquipmentPoint
=
iFireEquipmentPointDao
.
findOneByCode
(
deviceData
.
getPointCode
());
//
FireEquipmentPoint fireEquipmentPoint = iFireEquipmentPointDao.findOneByCode(deviceData.getPointCode());
if
(!
ObjectUtils
.
isEmpty
(
fireEquipmentPoint
))
{
//
if (!ObjectUtils.isEmpty(fireEquipmentPoint)) {
//
fireEquipmentPoint
.
setValue
(
deviceData
.
getState
());
//
fireEquipmentPoint.setValue(deviceData.getState());
updateFirePointValue
(
fireEquipmentPoint
.
getId
(),
deviceData
.
getState
());
//不需要
//
updateFirePointValue(fireEquipmentPoint.getId(), deviceData.getState());//不需要
//
String
fireEquipmentPointType
=
null
;
//
String fireEquipmentPointType = null;
if
(!
ObjectUtils
.
isEmpty
(
fireEquipmentPoint
.
getAlarmType
()))
{
//
if (!ObjectUtils.isEmpty(fireEquipmentPoint.getAlarmType())) {
Dict
dict
=
dictDao
.
getOne
(
fireEquipmentPoint
.
getAlarmType
());
//
Dict dict = dictDao.getOne(fireEquipmentPoint.getAlarmType());
fireEquipmentPointType
=
dict
.
getDictValue
();
//
fireEquipmentPointType = dict.getDictValue();
}
//
}
//
// 根据监测点获取监测点设备信息
//
// 根据监测点获取监测点设备信息
Optional
<
FireEquipment
>
fireEquipment1
=
this
.
iFireEquipmentDao
.
findById
(
fireEquipmentPoint
.
getFireEquipmentId
());
//
Optional<FireEquipment> fireEquipment1 = this.iFireEquipmentDao.findById(fireEquipmentPoint.getFireEquipmentId());
FireEquipment
fireEquipment
=
null
;
//
FireEquipment fireEquipment = null;
if
(
fireEquipment1
.
isPresent
())
{
//
if (fireEquipment1.isPresent()) {
fireEquipment
=
fireEquipment1
.
get
();
//
fireEquipment = fireEquipment1.get();
}
//
}
//
Equipment
equipment
=
null
;
//
Equipment equipment = null;
if
(
fireEquipment
!=
null
)
{
//
if (fireEquipment != null) {
Toke
toke
=
remoteSecurityService
.
getServerToken
();
//
Toke toke = remoteSecurityService.getServerToken();
//保存实时数据
//
//保存实时数据
// 根据监测点设备信息获取保护的重点装备
//
// 根据监测点设备信息获取保护的重点装备
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
fireEquipmentPoint
.
getFireEquipmentId
());
//
equipment = impAndFireEquipMapper.queryImpEqumtByFireEquipmt(fireEquipmentPoint.getFireEquipmentId());
deviceData
.
setMonitor
(
equipment
!=
null
?
equipment
.
getName
()
:
""
);
//
deviceData.setMonitor(equipment != null ? equipment.getName() : "");
deviceData
.
setId
(
String
.
valueOf
(
fireEquipment
.
getId
()));
//
deviceData.setId(String.valueOf(fireEquipment.getId()));
deviceData
.
setCode
(
fireEquipment
.
getCode
());
//
deviceData.setCode(fireEquipment.getCode());
saveFireEquipmentData
(
fireEquipmentPoint
,
fireEquipment
,
deviceData
,
fireEquipmentPointType
,
toke
);
//
saveFireEquipmentData(fireEquipmentPoint, fireEquipment, deviceData, fireEquipmentPointType, toke);
DeviceRo
deviceRo
=
new
DeviceRo
();
//
DeviceRo deviceRo = new DeviceRo();
deviceRo
.
setEquipmentId
(
equipment
.
getId
());
//
deviceRo.setEquipmentId(equipment.getId());
deviceRo
.
setPointCode
(
deviceData
.
getPointCode
());
//
deviceRo.setPointCode(deviceData.getPointCode());
deviceRo
.
setValue
(
deviceData
.
getState
());
//
deviceRo.setValue(deviceData.getState());
triggerPlanDevice
(
deviceRo
,
equipment
,
toke
);
//
triggerPlanDevice(deviceRo, equipment, toke);
Boolean
have
=
impAndFireEquipMapper
.
existsAlarmPointByEqpPointIdAndEquipId
(
fireEquipmentPoint
.
getId
(),
equipment
.
getId
());
//判断重点设备关联该指标项,需要修改为新查询
//
Boolean have = impAndFireEquipMapper.existsAlarmPointByEqpPointIdAndEquipId(fireEquipmentPoint.getId(), equipment.getId());//判断重点设备关联该指标项,需要修改为新查询
if
(!
ObjectUtils
.
isEmpty
(
have
)
&&
have
)
{
//
if (!ObjectUtils.isEmpty(have) && have) {
//动态预案执行
//
//动态预案执行
dynamicPlan
(
deviceData
,
equipment
,
fireEquipment
,
toke
);
//
dynamicPlan(deviceData, equipment, fireEquipment, toke);
}
//
}
}
//
}
}
//
}
//
}
//
}
/**
/**
* 预案执行
* 预案执行
...
@@ -902,7 +902,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -902,7 +902,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
* @param toke
* @param toke
*/
*/
@Async
@Async
void
dynamicPlan
(
AlarmParam
deviceData
,
Equipment
equipment
,
FireEquipment
fireEquipment
,
Toke
toke
)
{
void
dynamicPlan
(
AlarmParam
deviceData
,
Equipment
equipment
,
FireEquipment
Bo
fireEquipment
,
Toke
toke
)
{
Object
contingencyRo
=
redisTemplate
.
opsForValue
().
get
(
"contingencyRo"
);
Object
contingencyRo
=
redisTemplate
.
opsForValue
().
get
(
"contingencyRo"
);
String
batchNo
=
null
;
String
batchNo
=
null
;
// if (!ObjectUtils.isEmpty(contingencyRo)) {
// if (!ObjectUtils.isEmpty(contingencyRo)) {
...
@@ -978,12 +978,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -978,12 +978,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
deviceData
.
setNodeState
(
deviceData
.
getValue
());
deviceData
.
setNodeState
(
deviceData
.
getValue
());
String
batchNo
=
UUID
.
randomUUID
().
toString
();
String
batchNo
=
UUID
.
randomUUID
().
toString
();
deviceData
.
setBatchNo
(
batchNo
);
deviceData
.
setBatchNo
(
batchNo
);
Optional
<
FireEquipment
>
fireEquipment1
=
this
.
iFireEquipmentDao
.
findById
(
deviceData
.
getFireEquimentId
());
//
Optional<FireEquipment> fireEquipment1 = this.iFireEquipmentDao.findById(deviceData.getFireEquimentId());
FireEquipment
fireEquipment
=
null
;
FireEquipment
Bo
fireEquipment
=
null
;
if
(
fireEquipment1
.
isPresent
())
{
fireEquipment
=
fireEquipment1
.
get
();
}
Equipment
equipment
=
null
;
Equipment
equipment
=
null
;
if
(
fireEquipment
!=
null
)
{
if
(
fireEquipment
!=
null
)
{
deviceData
.
setCode
(
fireEquipment
.
getCode
());
deviceData
.
setCode
(
fireEquipment
.
getCode
());
...
@@ -1027,7 +1024,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1027,7 +1024,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
private
void
saveFireEquipmentData
(
FireEquipmentPoint
fireEquipmentPoint
,
FireEquipment
fireEquipment
,
AlarmParam
deviceData
,
String
fireEquipmentPointType
,
Toke
toke
)
{
//
private void saveFireEquipmentData(FireEquipmentPoint fireEquipmentPoint, FireEquipment fireEquipment, AlarmParam deviceData, String fireEquipmentPointType, Toke toke) {
// if ("alarm_type_fire".equals(fireEquipmentPointType) || "alarm_type_trouble".equals(fireEquipmentPointType)) {
// if ("alarm_type_fire".equals(fireEquipmentPointType) || "alarm_type_trouble".equals(fireEquipmentPointType)) {
// Alarm alarm = iAlarmDao.findByStatusTrueAndFireEquipmentPointCode(deviceData.getPointCode());
// Alarm alarm = iAlarmDao.findByStatusTrueAndFireEquipmentPointCode(deviceData.getPointCode());
// if (alarm != null) {
// if (alarm != null) {
...
@@ -1110,96 +1107,96 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1110,96 +1107,96 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
// list.add(deviceData);
// list.add(deviceData);
// //保存所有数据(遥测,遥信)到mongo
// //保存所有数据(遥测,遥信)到mongo
// saveData(list, "soe");
// saveData(list, "soe");
}
//
}
@Override
//
@Override
public
void
saveData
(
List
<
AlarmParam
>
deviceDatas
,
String
type
)
{
//
public void saveData(List<AlarmParam> deviceDatas, String type) {
List
<
EquipCommunicationData
>
list
=
deviceDatas
.
stream
().
map
(
param
->
{
//
List<EquipCommunicationData> list = deviceDatas.stream().map(param -> {
//
log
.
debug
(
"pointCode=="
+
param
.
getPointCode
()
+
" InformationAddress=="
+
param
.
getInformationAddress
());
//
log.debug("pointCode==" + param.getPointCode() + " InformationAddress==" + param.getInformationAddress());
//
// 格式化发送数据
//
// 格式化发送数据
sendRiskSourceData
(
param
);
//
sendRiskSourceData(param);
//
if
(
ObjectUtils
.
isEmpty
(
param
.
getPointCode
()))
{
//
if (ObjectUtils.isEmpty(param.getPointCode())) {
EquipCommunicationData
data
=
new
EquipCommunicationData
();
//
EquipCommunicationData data = new EquipCommunicationData();
data
.
setIsInvalid
(
param
.
getIsInvalid
());
//
data.setIsInvalid(param.getIsInvalid());
data
.
setInformationAddress
(
param
.
getInformationAddress
());
//
data.setInformationAddress(param.getInformationAddress());
data
.
setRecDate
(
new
Date
());
//
data.setRecDate(new Date());
data
.
setState
(
param
.
getState
());
//
data.setState(param.getState());
data
.
setSoe
(
param
.
getSoe
());
//
data.setSoe(param.getSoe());
data
.
setServiceId
(
param
.
getServiceId
());
//
data.setServiceId(param.getServiceId());
return
data
;
//
return data;
}
//
}
EquipCommunicationData
data
=
equipmentService
.
findFireEquipmentByPointCode
(
param
.
getPointCode
());
//
EquipCommunicationData data = equipmentService.findFireEquipmentByPointCode(param.getPointCode());
if
(
ObjectUtils
.
isEmpty
(
data
))
{
//
if (ObjectUtils.isEmpty(data)) {
return
null
;
//
return null;
}
//
}
data
.
setIsInvalid
(
param
.
getIsInvalid
());
//
data.setIsInvalid(param.getIsInvalid());
data
.
setInformationAddress
(
param
.
getInformationAddress
());
//
data.setInformationAddress(param.getInformationAddress());
data
.
setRecDate
(
new
Date
());
//
data.setRecDate(new Date());
data
.
setState
(
param
.
getState
());
//
data.setState(param.getState());
data
.
setSoe
(
param
.
getSoe
());
//
data.setSoe(param.getSoe());
data
.
setServiceId
(
param
.
getServiceId
());
//
data.setServiceId(param.getServiceId());
//
if
(
"all"
.
equals
(
type
))
{
//
if ("all".equals(type)) {
FireEquipmentPoint
fireEquipmentPoint
=
iFireEquipmentPointDao
.
findOneByCode
(
param
.
getPointCode
());
//
FireEquipmentPoint fireEquipmentPoint = iFireEquipmentPointDao.findOneByCode(param.getPointCode());
Dict
dict
=
null
;
//
Dict dict = null;
if
(
fireEquipmentPoint
.
getAlarmType
()
!=
null
)
{
//
if (fireEquipmentPoint.getAlarmType() != null) {
Optional
<
Dict
>
dict1
=
dictDao
.
findById
(
fireEquipmentPoint
.
getAlarmType
());
//
Optional<Dict> dict1 = dictDao.findById(fireEquipmentPoint.getAlarmType());
if
(
dict1
.
isPresent
())
{
//
if (dict1.isPresent()) {
dict
=
dict1
.
get
();
//
dict = dict1.get();
}
//
}
}
//
}
if
(!
param
.
getState
().
equals
(
fireEquipmentPoint
.
getValue
()))
{
//
if (!param.getState().equals(fireEquipmentPoint.getValue())) {
fireEquipmentPoint
.
setValue
(
param
.
getState
());
//
fireEquipmentPoint.setValue(param.getState());
updateFirePointValue
(
fireEquipmentPoint
.
getId
(),
param
.
getState
());
//
updateFirePointValue(fireEquipmentPoint.getId(), param.getState());
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
valueOf
(
data
.
getFireEquipmentId
()));
//
Equipment equipment = impAndFireEquipMapper.queryImpEqumtByFireEquipmt(Long.valueOf(data.getFireEquipmentId()));
if
(!
ObjectUtils
.
isEmpty
(
equipment
))
{
//
if (!ObjectUtils.isEmpty(equipment)) {
if
(
dict
!=
null
&&
dict
.
getDictValue
().
equals
(
"alarm_type_trouble"
))
{
//
if (dict != null && dict.getDictValue().equals("alarm_type_trouble")) {
notifyAlarm
(
fireEquipmentPoint
,
param
);
//
notifyAlarm(fireEquipmentPoint, param);
}
//
}
}
//
}
}
//
}
}
//
}
if
(
"ANALOGUE"
.
equals
(
data
.
getType
()))
{
//
if ("ANALOGUE".equals(data.getType())) {
sendAnalogue
(
data
);
//
sendAnalogue(data);
}
//
}
//
return
data
;
//
return data;
}).
filter
(
param
->
!
ObjectUtils
.
isEmpty
(
param
)).
collect
(
Collectors
.
toList
());
//
}).filter(param -> !ObjectUtils.isEmpty(param)).collect(Collectors.toList());
// equipCommunicationDao.saveAll(list);
//
//
equipCommunicationDao.saveAll(list);
}
//
}
/**
/**
* 设备告警触发fema的sod值
* 设备告警触发fema的sod值
*/
*/
private
void
notifyAlarm
(
FireEquipmentPoint
fireEquipmentPoint
,
AlarmParam
param
)
{
//
private void notifyAlarm(FireEquipmentPoint fireEquipmentPoint, AlarmParam param) {
List
<
FmeaEquipmentPoint
>
fmeaEquipmentPoints
=
fmeaEquipmentPointMapper
.
listByEquipmentPointId
(
fireEquipmentPoint
.
getId
());
//
List<FmeaEquipmentPoint> fmeaEquipmentPoints = fmeaEquipmentPointMapper.listByEquipmentPointId(fireEquipmentPoint.getId());
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
//
Set<Long> fmeaIds = Sets.newHashSet();
List
<
Long
>
ids
=
Lists
.
newArrayList
();
//
List<Long> ids = Lists.newArrayList();
fmeaEquipmentPoints
.
forEach
(
fmeaEquipmentPoint
->
{
//
fmeaEquipmentPoints.forEach(fmeaEquipmentPoint -> {
ids
.
add
(
fmeaEquipmentPoint
.
getId
());
//
ids.add(fmeaEquipmentPoint.getId());
fmeaIds
.
add
(
fmeaEquipmentPoint
.
getFmeaId
());
//
fmeaIds.add(fmeaEquipmentPoint.getFmeaId());
});
//
});
Integer
state
=
null
;
//
Integer state = null;
if
(
param
.
getState
().
equals
(
"true"
))
{
//
if (param.getState().equals("true")) {
state
=
1
;
//
state = 1;
}
else
if
(
param
.
getState
().
equals
(
"false"
))
{
//
} else if (param.getState().equals("false")) {
state
=
0
;
//
state = 0;
}
//
}
//
if
(
state
!=
null
)
{
//
if (state != null) {
if
(
ids
.
size
()
>
0
)
{
//
if (ids.size() > 0) {
fmeaEquipmentPointMapper
.
updateStateByIds
(
state
,
ids
);
//
fmeaEquipmentPointMapper.updateStateByIds(state, ids);
}
//
}
final
Integer
st
=
state
;
//
final Integer st = state;
String
monitor
=
fireEquipMapper
.
findById
(
fireEquipPointMapper
.
getByCode
(
param
.
getPointCode
()).
getFireEquipmentId
()).
getName
();
//
String monitor = fireEquipMapper.findById(fireEquipPointMapper.getByCode(param.getPointCode()).getFireEquipmentId()).getName();
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
//
RsDataQueue rsDataQueue = RsDataQueue.getInstance();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addEquipmentMessage
(
fmeaId
,
monitor
,
st
));
//
fmeaIds.forEach(fmeaId -> rsDataQueue.addEquipmentMessage(fmeaId, monitor, st));
}
//
}
}
//
}
@Autowired
@Autowired
private
WebMqttComponent
webMqttComponent
;
private
WebMqttComponent
webMqttComponent
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
61767d5d
...
@@ -46,11 +46,10 @@ import com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper;
...
@@ -46,11 +46,10 @@ import com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.View3dMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.View3dMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.ISafetyIndexChangeLogDao
;
import
com.yeejoin.amos.fas.business.dao.repository.ISafetyIndexChangeLogDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IWaterResourceDao
;
//
import com.yeejoin.amos.fas.business.dao.repository.IWaterResourceDao;
import
com.yeejoin.amos.fas.business.feign.IDutyModeServer
;
import
com.yeejoin.amos.fas.business.feign.IDutyModeServer
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService
;
...
@@ -79,11 +78,11 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
...
@@ -79,11 +78,11 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
//
import com.yeejoin.amos.fas.dao.entity.FireStation;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskLevel
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
com.yeejoin.amos.fas.dao.entity.SafetyIndexChangeLog
;
import
com.yeejoin.amos.fas.dao.entity.SafetyIndexChangeLog
;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
...
@@ -99,12 +98,13 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -99,12 +98,13 @@ public class View3dServiceImpl implements IView3dService {
private
View3dMapper
view3dMapper
;
private
View3dMapper
view3dMapper
;
@Autowired
@Autowired
private
IRiskSourceDao
iRiskSourceDao
;
private
IRiskSourceDao
iRiskSourceDao
;
@Autowired
private
IFireStationDao
iFireStationDao
;
@Autowired
@Autowired
private
IEquipmentDao
iEquipmentDao
;
private
IEquipmentDao
iEquipmentDao
;
@Autowired
//
@Autowired
private
IWaterResourceDao
iWaterResourceDao
;
//
private IWaterResourceDao iWaterResourceDao;
@Autowired
@Autowired
private
PatrolMapper
patrolMapper
;
private
PatrolMapper
patrolMapper
;
@Autowired
@Autowired
...
@@ -157,11 +157,11 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -157,11 +157,11 @@ public class View3dServiceImpl implements IView3dService {
this
.
updateFireCarPosition
(
pointBo
);
this
.
updateFireCarPosition
(
pointBo
);
case
"fireChamber"
:
case
"fireChamber"
:
case
"fireFoamRoom"
:
case
"fireFoamRoom"
:
this
.
updateFireStationPosition
(
pointBo
);
//
this.updateFireStationPosition(pointBo);
break
;
//
break;
case
"hydrant"
:
case
"hydrant"
:
case
"pool"
:
//
case "pool":
this
.
updateWaterSourcePosition
(
pointBo
);
//
this.updateWaterSourcePosition(pointBo);
break
;
break
;
default
:
default
:
log
.
error
(
"不支持的类型-->"
+
pointType
);
log
.
error
(
"不支持的类型-->"
+
pointType
);
...
@@ -183,33 +183,33 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -183,33 +183,33 @@ public class View3dServiceImpl implements IView3dService {
// }
// }
}
}
public
void
updateWaterSourcePosition
(
BindPointBo
pointBo
)
{
//
public void updateWaterSourcePosition(BindPointBo pointBo) {
Optional
<
WaterResource
>
data
=
iWaterResourceDao
.
findById
(
pointBo
.
getPointId
());
//
Optional<WaterResource> data = iWaterResourceDao.findById(pointBo.getPointId());
if
(
data
.
isPresent
()){
//
if(data.isPresent()){
WaterResource
waterResource
=
data
.
get
();
//
WaterResource waterResource = data.get();
String
ue4Location
=
pointBo
.
getUe4Location
();
//
String ue4Location = pointBo.getUe4Location();
String
ue4Rotation
=
pointBo
.
getUe4Rotation
();
//
String ue4Rotation = pointBo.getUe4Rotation();
String
position3d
=
pointBo
.
getPosition3d
();
//
String position3d = pointBo.getPosition3d();
if
(
ue4Location
!=
null
)
waterResource
.
setUe4Location
(
ue4Location
);
//
if(ue4Location != null) waterResource.setUe4Location(ue4Location);
if
(
ue4Rotation
!=
null
)
waterResource
.
setUe4Rotation
(
ue4Rotation
);
//
if(ue4Rotation != null) waterResource.setUe4Rotation(ue4Rotation);
if
(
position3d
!=
null
)
waterResource
.
setPosition3d
(
position3d
);
//
if(position3d != null) waterResource.setPosition3d(position3d);
iWaterResourceDao
.
save
(
waterResource
);
//
iWaterResourceDao.save(waterResource);
}
//
}
}
//
}
public
void
updateFireStationPosition
(
BindPointBo
pointBo
)
{
//
public void updateFireStationPosition(BindPointBo pointBo) {
Optional
<
FireStation
>
data
=
iFireStationDao
.
findById
(
pointBo
.
getPointId
());
//
Optional<FireStation> data = iFireStationDao.findById(pointBo.getPointId());
if
(
data
.
isPresent
()){
//
if(data.isPresent()){
FireStation
fireStation
=
data
.
get
();
//
FireStation fireStation = data.get();
String
ue4Location
=
pointBo
.
getUe4Location
();
//
String ue4Location = pointBo.getUe4Location();
String
ue4Rotation
=
pointBo
.
getUe4Rotation
();
//
String ue4Rotation = pointBo.getUe4Rotation();
String
position3d
=
pointBo
.
getPosition3d
();
//
String position3d = pointBo.getPosition3d();
if
(
ue4Location
!=
null
)
fireStation
.
setUe4Location
(
ue4Location
);
//
if(ue4Location != null) fireStation.setUe4Location(ue4Location);
if
(
ue4Rotation
!=
null
)
fireStation
.
setUe4Rotation
(
ue4Rotation
);
//
if(ue4Rotation != null) fireStation.setUe4Rotation(ue4Rotation);
if
(
position3d
!=
null
)
fireStation
.
setPosition3d
(
position3d
);
//
if(position3d != null) fireStation.setPosition3d(position3d);
iFireStationDao
.
save
(
fireStation
);
//
iFireStationDao.save(fireStation);
}
//
}
}
//
}
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
// Optional<FireEquipment> data = iFireEquipmentDao.findById(pointBo.getPointId());
// Optional<FireEquipment> data = iFireEquipmentDao.findById(pointBo.getPointId());
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/WaterResourceServiceImpl.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
//
package com.yeejoin.amos.fas.business.service.impl;
//
import
com.yeejoin.amos.fas.business.dao.mapper.WaterResourceMapper
;
//
import com.yeejoin.amos.fas.business.dao.mapper.WaterResourceMapper;
import
com.yeejoin.amos.fas.business.dao.repository.IWaterResourceDao
;
//
import com.yeejoin.amos.fas.business.dao.repository.IWaterResourceDao;
import
com.yeejoin.amos.fas.business.dao.repository.IWaterResourceEquipmentDao
;
//
import com.yeejoin.amos.fas.business.dao.repository.IWaterResourceEquipmentDao;
import
com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService
;
//
import com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
//
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
//
import com.yeejoin.amos.fas.core.util.StringUtil;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.data.domain.Page
;
//
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
org.springframework.transaction.annotation.Transactional
;
//
import org.springframework.transaction.annotation.Transactional;
//
import
java.util.ArrayList
;
//
import java.util.ArrayList;
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
import
java.util.Optional
;
//
import java.util.Optional;
//
@Service
(
"waterResourceService"
)
//
@Service("waterResourceService")
public
class
WaterResourceServiceImpl
implements
IWaterResourceService
{
//
public class WaterResourceServiceImpl implements IWaterResourceService {
//
//
//
@Autowired
//
@Autowired
IWaterResourceDao
iWaterResourceDao
;
//
IWaterResourceDao iWaterResourceDao;
//
@Autowired
//
@Autowired
WaterResourceMapper
waterResourceMapper
;
//
WaterResourceMapper waterResourceMapper;
//
@Autowired
//
@Autowired
IWaterResourceEquipmentDao
iWaterResourceEquipmentDao
;
//
IWaterResourceEquipmentDao iWaterResourceEquipmentDao;
//
@Override
//
@Override
public
WaterResource
save
(
WaterResource
waterResource
)
//
public WaterResource save(WaterResource waterResource)
{
//
{
Long
id
=
waterResource
.
getId
();
//
Long id = waterResource.getId();
waterResource
=
iWaterResourceDao
.
saveAndFlush
(
waterResource
);
//
waterResource = iWaterResourceDao.saveAndFlush(waterResource);
return
waterResource
;
//
return waterResource;
}
//
}
//
//
public
Map
queryOne
(
Long
id
)
//
public Map queryOne(Long id)
{
//
{
return
waterResourceMapper
.
queryOne
(
id
);
//
return waterResourceMapper.queryOne(id);
}
//
}
//
@Transactional
//
@Transactional
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
//
public String [] delete(String []idArray) throws Exception
{
//
{
for
(
String
id:
idArray
)
//
for(String id:idArray)
{
//
{
Optional
<
WaterResource
>
waterResource1
=
iWaterResourceDao
.
findById
(
Long
.
parseLong
(
id
));
//
Optional<WaterResource> waterResource1 = iWaterResourceDao.findById(Long.parseLong(id));
WaterResource
waterResource
=
null
;
//
WaterResource waterResource = null;
if
(
waterResource1
.
isPresent
()){
//
if(waterResource1.isPresent()){
waterResource
=
waterResource1
.
get
();
//
waterResource=waterResource1.get();
}
//
}
iWaterResourceEquipmentDao
.
deleteByWaterSourceId
(
Long
.
valueOf
(
id
));
//
iWaterResourceEquipmentDao.deleteByWaterSourceId(Long.valueOf(id));
if
(
waterResource
!=
null
)
//
if(waterResource != null)
{
//
{
this
.
iWaterResourceDao
.
deleteById
(
Long
.
parseLong
(
id
));
//
this.iWaterResourceDao.deleteById(Long.parseLong(id));
}
else
//
}else
{
//
{
throw
new
Exception
(
"找不到指定的监测点:"
+
id
);
//
throw new Exception("找不到指定的监测点:"+id);
}
//
}
}
//
}
//
return
idArray
;
//
return idArray;
}
//
}
//
//
public
Page
queryForPage
(
String
compCode
,
String
username
,
String
code
,
String
type
,
CommonPageable
pageable
)
//
public Page queryForPage(String compCode, String username,String code,String type, CommonPageable pageable)
{
//
{
Long
total
=
waterResourceMapper
.
queryCountForPage
(
compCode
,
username
,
code
,
type
);
//
Long total = waterResourceMapper.queryCountForPage(compCode,username,code,type);
List
<
Map
>
content
=
waterResourceMapper
.
queryForPage
(
compCode
,
username
,
code
,
type
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
//
List<Map> content = waterResourceMapper.queryForPage(compCode,username,code,type,pageable.getOffset(),pageable.getPageSize());
Page
result
=
new
PageImpl
(
content
,
pageable
,
total
);
//
Page result = new PageImpl(content,pageable,total);
return
result
;
//
return result;
}
//
}
//
//
@Override
//
@Override
public
void
saveBindFireEquipment
(
List
<
WaterResourceEquipment
>
waterResourceEquipments
)
{
//
public void saveBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments) {
// TODO Auto-generated method stub
//
// TODO Auto-generated method stub
List
<
WaterResourceEquipment
>
saveList
=
new
ArrayList
<
WaterResourceEquipment
>();
//
List<WaterResourceEquipment> saveList = new ArrayList<WaterResourceEquipment>();
for
(
WaterResourceEquipment
waterResourceEquipment:
waterResourceEquipments
){
//
for(WaterResourceEquipment waterResourceEquipment:waterResourceEquipments){
int
count
=
iWaterResourceEquipmentDao
.
countByWaterResourceIdAndFireEquipmentId
(
waterResourceEquipment
.
getWaterResourceId
(),
waterResourceEquipment
.
getFireEquipmentId
());
//
int count = iWaterResourceEquipmentDao.countByWaterResourceIdAndFireEquipmentId(waterResourceEquipment.getWaterResourceId(),waterResourceEquipment.getFireEquipmentId());
if
(
count
==
0
){
//
if(count==0){
saveList
.
add
(
waterResourceEquipment
);
//
saveList.add(waterResourceEquipment);
}
//
}
}
//
}
iWaterResourceEquipmentDao
.
saveAll
(
saveList
);
//
iWaterResourceEquipmentDao.saveAll(saveList);
}
//
}
//
//
@Override
//
@Override
public
void
deleteBindFireEquipment
(
List
<
WaterResourceEquipment
>
waterResourceEquipments
)
{
//
public void deleteBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments) {
// TODO Auto-generated method stub
//
// TODO Auto-generated method stub
List
<
WaterResourceEquipment
>
deleteList
=
new
ArrayList
<
WaterResourceEquipment
>();
//
List<WaterResourceEquipment> deleteList = new ArrayList<WaterResourceEquipment>();
for
(
WaterResourceEquipment
waterResourceEquipment:
waterResourceEquipments
){
//
for(WaterResourceEquipment waterResourceEquipment:waterResourceEquipments){
WaterResourceEquipment
saveWaterResourceEquipment
=
iWaterResourceEquipmentDao
.
findByWaterResourceIdAndFireEquipmentId
(
waterResourceEquipment
.
getWaterResourceId
(),
waterResourceEquipment
.
getFireEquipmentId
());
//
WaterResourceEquipment saveWaterResourceEquipment = iWaterResourceEquipmentDao.findByWaterResourceIdAndFireEquipmentId(waterResourceEquipment.getWaterResourceId(),waterResourceEquipment.getFireEquipmentId());
if
(
StringUtil
.
isNotEmpty
(
saveWaterResourceEquipment
)){
//
if(StringUtil.isNotEmpty(saveWaterResourceEquipment)){
deleteList
.
add
(
saveWaterResourceEquipment
);
//
deleteList.add(saveWaterResourceEquipment);
}
//
}
}
//
}
iWaterResourceEquipmentDao
.
deleteAll
(
deleteList
);
//
iWaterResourceEquipmentDao.deleteAll(deleteList);
}
//
}
//
//
@Override
//
@Override
public
Page
queryBindFireEquemtPage
(
Long
waterResourceId
,
CommonPageable
pageable
)
{
//
public Page queryBindFireEquemtPage(Long waterResourceId, CommonPageable pageable) {
Long
total
=
waterResourceMapper
.
queryCountForBindFireEqumntPage
(
waterResourceId
);
//
Long total = waterResourceMapper.queryCountForBindFireEqumntPage(waterResourceId);
List
<
Map
>
content
=
waterResourceMapper
.
queryForBindFireEqumntPage
(
waterResourceId
,
pageable
.
getOffset
(),
//
List<Map> content = waterResourceMapper.queryForBindFireEqumntPage(waterResourceId, pageable.getOffset(),
pageable
.
getPageSize
());
//
pageable.getPageSize());
return
new
PageImpl
(
content
,
pageable
,
total
);
//
return new PageImpl(content, pageable, total);
}
//
}
//
//
@Override
//
@Override
public
Object
queryForList
()
{
//
public Object queryForList() {
return
iWaterResourceDao
.
findAll
();
//
return iWaterResourceDao.findAll();
}
//
}
//
//
@Override
//
@Override
public
int
countAssociatedEquipWaterByIds
(
String
[]
ids
)
{
//
public int countAssociatedEquipWaterByIds(String[] ids) {
return
iWaterResourceDao
.
countAssociatedEquipWaterByIds
(
ids
);
//
return iWaterResourceDao.countAssociatedEquipWaterByIds(ids);
}
//
}
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/FireStengthService.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
//
package com.yeejoin.amos.fas.business.service.intfc;
//
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
//
import
org.springframework.data.domain.Page
;
//
import org.springframework.data.domain.Page;
//
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.FireStrength
;
////
import com.yeejoin.amos.fas.dao.entity.FireStrength;
//
public
interface
FireStengthService
{
//
public interface FireStengthService {
//
/**
//
/**
* 保存或者更新风险点
//
* 保存或者更新风险点
* @param fireEquipmentPoint
//
* @param fireEquipmentPoint
* @return
//
* @return
*/
//
*/
FireStrength
savePoint
(
FireStrength
fireEquipmentPoint
);
//
FireStrength savePoint(FireStrength fireEquipmentPoint);
//
//
/**
//
/**
* 查询单个风险点
//
* 查询单个风险点
* @param id
//
* @param id
* @return
//
* @return
*/
//
*/
Map
queryOne
(
Long
id
);
//
Map queryOne(Long id);
//
//
/**
//
/**
* 删除单个风险点
//
* 删除单个风险点
* @return
//
* @return
* @throws Exception
//
* @throws Exception
*/
//
*/
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
;
//
String [] deletePoint(String[] idArray) throws Exception;
//
//
/**
//
/**
* 查询指定设备的风险点列表
//
* 查询指定设备的风险点列表
* @param fireEqumntId
//
* @param fireEqumntId
* @return
//
* @return
*/
//
*/
Page
queryByFireEquimt
(
String
username
,
String
code
,
CommonPageable
pageable
);
//
Page queryByFireEquimt(String username,String code, CommonPageable pageable);
//
//
List
<
FireStrength
>
queryForStrengthList
(
String
time
);
//
List<FireStrength> queryForStrengthList(String time);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IBizMessageService.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
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.WaterResource
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
java.util.Map
;
import
java.util.Map
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IExcelService.java
View file @
61767d5d
...
@@ -15,5 +15,5 @@ public interface IExcelService {
...
@@ -15,5 +15,5 @@ public interface IExcelService {
List
<?>
exportPointData
(
Map
<
String
,
Object
>
paramsMap
);
List
<?>
exportPointData
(
Map
<
String
,
Object
>
paramsMap
);
void
importWaterResource
(
List
<
WaterResourceParam
>
list
);
//
void importWaterResource(List<WaterResourceParam> list);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireEquipPontService.java
View file @
61767d5d
...
@@ -3,7 +3,7 @@ package com.yeejoin.amos.fas.business.service.intfc;
...
@@ -3,7 +3,7 @@ package com.yeejoin.amos.fas.business.service.intfc;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint
;
//
import com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
java.util.List
;
import
java.util.List
;
...
@@ -17,7 +17,7 @@ public interface IFireEquipPontService {
...
@@ -17,7 +17,7 @@ public interface IFireEquipPontService {
* @param fireEquipmentPoint
* @param fireEquipmentPoint
* @return
* @return
*/
*/
FireEquipmentPoint
savePoint
(
FireEquipmentPoint
fireEquipmentPoint
);
//
FireEquipmentPoint savePoint(FireEquipmentPoint fireEquipmentPoint);
/**
/**
...
@@ -26,7 +26,7 @@ public interface IFireEquipPontService {
...
@@ -26,7 +26,7 @@ public interface IFireEquipPontService {
* @param id
* @param id
* @return
* @return
*/
*/
FireEquipmentPoint
queryOne
(
Long
id
);
//
FireEquipmentPoint queryOne(Long id);
/**
/**
...
@@ -35,7 +35,7 @@ public interface IFireEquipPontService {
...
@@ -35,7 +35,7 @@ public interface IFireEquipPontService {
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
String
[]
deletePoint
(
String
[]
idArray
)
throws
Exception
;
//
String[] deletePoint(String[] idArray) throws Exception;
/**
/**
...
@@ -52,7 +52,7 @@ public interface IFireEquipPontService {
...
@@ -52,7 +52,7 @@ public interface IFireEquipPontService {
CommonResponse
batchUnbindToEquipment
(
List
<
Long
>
pointIds
);
CommonResponse
batchUnbindToEquipment
(
List
<
Long
>
pointIds
);
CommonResponse
save
(
FireEquipmentPointEntity
fireEquipmentPointEntity
);
//
CommonResponse save(FireEquipmentPointEntity fireEquipmentPointEntity);
CommonResponse
update
(
FireEquipmentPointEntity
fireEquipmentPointEntity
);
CommonResponse
update
(
FireEquipmentPointEntity
fireEquipmentPointEntity
);
...
@@ -61,8 +61,8 @@ public interface IFireEquipPontService {
...
@@ -61,8 +61,8 @@ public interface IFireEquipPontService {
CommonResponse
listByType
(
Integer
type
);
CommonResponse
listByType
(
Integer
type
);
int
countImpEquipment
(
String
[]
idArray
);
//
int countImpEquipment(String[] idArray);
String
findBindRiskSourceStrByPointIds
(
String
[]
idArray
);
//
String findBindRiskSourceStrByPointIds(String[] idArray);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireEquipService.java
View file @
61767d5d
...
@@ -42,7 +42,7 @@ public interface IFireEquipService {
...
@@ -42,7 +42,7 @@ public interface IFireEquipService {
* @param ids
* @param ids
* @return
* @return
*/
*/
int
countAssociatedEquipStationByIds
(
String
[]
ids
);
//
int countAssociatedEquipStationByIds(String[] ids);
// Boolean isExistByCode(String code);
// Boolean isExistByCode(String code);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireStationService.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
//
package com.yeejoin.amos.fas.business.service.intfc;
//
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.FireStation
;
//
import com.yeejoin.amos.fas.dao.entity.FireStation;
import
com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment
;
//
import com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment;
import
org.springframework.data.domain.Page
;
//
import org.springframework.data.domain.Page;
import
org.springframework.web.multipart.MultipartFile
;
//
import org.springframework.web.multipart.MultipartFile;
//
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
//
public
interface
IFireStationService
{
//
public interface IFireStationService {
//
/**
//
/**
* 保存或者更新风险点
//
* 保存或者更新风险点
* @param fireStation
//
* @param fireStation
* @return
//
* @return
*/
//
*/
FireStation
save
(
FireStation
fireStation
);
//
FireStation save(FireStation fireStation);
//
/**
//
/**
* 保存或者更新消防小室
//
* 保存或者更新消防小室
* @param fireStation
//
* @param fireStation
* @return
//
* @return
*/
//
*/
FireStation
saveAndUpd
(
FireStation
fireStation
,
MultipartFile
[]
file
);
//
FireStation saveAndUpd(FireStation fireStation,MultipartFile[] file);
//
/**
//
/**
* 关联消防设备
//
* 关联消防设备
* @param fireStationFireEquipments
//
* @param fireStationFireEquipments
* @return
//
* @return
*/
//
*/
List
<
FireStationFireEquipment
>
saveStationFireEquipment
(
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
;
//
List<FireStationFireEquipment> saveStationFireEquipment(List<FireStationFireEquipment> fireStationFireEquipments) throws Exception;
//
//
/**
//
/**
* 查询单个风险点
//
* 查询单个风险点
* @param id
//
* @param id
* @return
//
* @return
*/
//
*/
Map
queryOne
(
Long
id
);
//
Map queryOne(Long id);
//
/**
//
/**
* 查询已经绑定的消防设备列表
//
* 查询已经绑定的消防设备列表
* @param fireStationId
//
* @param fireStationId
* @return
//
* @return
*/
//
*/
Page
queryForFireEquemtPage
(
Long
fireStationId
,
CommonPageable
pageable
);
//
Page queryForFireEquemtPage(Long fireStationId,CommonPageable pageable);
void
deleteStationFireEquipment
(
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
;
//
void deleteStationFireEquipment(List<FireStationFireEquipment> fireStationFireEquipments) throws Exception;
//
/**
//
/**
* 删除单个风险点
//
* 删除单个风险点
* @return
//
* @return
* @throws Exception
//
* @throws Exception
*/
//
*/
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
//
String [] delete(String[] idArray) throws Exception;
//
//
/**
//
/**
* 查询指定设备的风险点列表
//
* 查询指定设备的风险点列表
* @return
//
* @return
*/
//
*/
Page
queryForPage
(
String
username
,
String
code
,
String
type
,
CommonPageable
pageable
);
//
Page queryForPage(String username, String code,String type, CommonPageable pageable);
//
//
List
<
Map
>
queryForList
(
String
username
,
String
code
,
String
type
);
//
List<Map> queryForList(String username, String code,String type);
//
/**
//
/**
* 获取消防小室配置装备数据
//
* 获取消防小室配置装备数据
* @param id
//
* @param id
* @return
//
* @return
*/
//
*/
Map
queryForEuqimentListById
(
Long
id
);
//
Map queryForEuqimentListById(Long id);
//
Boolean
isExistByCode
(
String
code
);
//
Boolean isExistByCode(String code);
//
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
61767d5d
...
@@ -136,7 +136,7 @@ public interface IRiskSourceService {
...
@@ -136,7 +136,7 @@ public interface IRiskSourceService {
String
processFireEqumtData
(
AlarmParam
deviceData
)
throws
Exception
;
String
processFireEqumtData
(
AlarmParam
deviceData
)
throws
Exception
;
void
saveData
(
List
<
AlarmParam
>
deviceDatas
,
String
type
);
//
void saveData(List<AlarmParam> deviceDatas, String type);
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
(
String
compCode
);
List
<
HashMap
<
String
,
Object
>>
queryRiskSourceSecondLevel
(
String
compCode
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IWaterResourceService.java
View file @
61767d5d
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
//
package com.yeejoin.amos.fas.business.service.intfc;
//
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.WaterResource
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import
com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment
;
//
import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
//
import
org.springframework.data.domain.Page
;
//
import org.springframework.data.domain.Page;
//
import
java.util.List
;
//
import java.util.List;
import
java.util.Map
;
//
import java.util.Map;
//
public
interface
IWaterResourceService
{
//
public interface IWaterResourceService {
//
/**
//
/**
* 保存或者更新风险点
//
* 保存或者更新风险点
* @param waterResource
//
* @param waterResource
* @return
//
* @return
*/
//
*/
WaterResource
save
(
WaterResource
waterResource
);
//
WaterResource save(WaterResource waterResource);
//
//
/**
//
/**
* 查询单个风险点
//
* 查询单个风险点
* @param id
//
* @param id
* @return
//
* @return
*/
//
*/
Map
queryOne
(
Long
id
);
//
Map queryOne(Long id);
//
//
/**
//
/**
* 删除单个风险点
//
* 删除单个风险点
* @return
//
* @return
* @throws Exception
//
* @throws Exception
*/
//
*/
String
[]
delete
(
String
[]
idArray
)
throws
Exception
;
//
String [] delete(String[] idArray) throws Exception;
//
//
/**
//
/**
* 查询指定设备的风险点列表
//
* 查询指定设备的风险点列表
* @return
//
* @return
*/
//
*/
Page
queryForPage
(
String
compCode
,
String
username
,
String
code
,
String
type
,
CommonPageable
pageable
);
//
Page queryForPage(String compCode,String username, String code, String type,CommonPageable pageable);
//
void
saveBindFireEquipment
(
List
<
WaterResourceEquipment
>
waterResourceEquipments
);
//
void saveBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments);
//
void
deleteBindFireEquipment
(
List
<
WaterResourceEquipment
>
waterResourceEquipments
);
//
void deleteBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments);
//
/**
//
/**
* 查询已经绑定的消防设备列表
//
* 查询已经绑定的消防设备列表
* @param waterResourceId
//
* @param waterResourceId
* @return
//
* @return
*/
//
*/
Page
queryBindFireEquemtPage
(
Long
waterResourceId
,
CommonPageable
pageable
);
//
Page queryBindFireEquemtPage(Long waterResourceId,CommonPageable pageable);
//
//
Object
queryForList
();
//
Object queryForList();
//
int
countAssociatedEquipWaterByIds
(
String
[]
ids
);
//
int countAssociatedEquipWaterByIds(String[] ids);
}
//
}
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/init/fas-create-table.sql
View file @
61767d5d
...
@@ -178,110 +178,110 @@ CREATE TABLE `f_fire_equipment` (
...
@@ -178,110 +178,110 @@ CREATE TABLE `f_fire_equipment` (
-- ----------------------------
-- ----------------------------
-- Table structure for f_fire_equipment_data
-- Table structure for f_fire_equipment_data
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_data`
;
--
DROP TABLE IF EXISTS `f_fire_equipment_data`;
CREATE
TABLE
`f_fire_equipment_data`
(
--
CREATE TABLE `f_fire_equipment_data` (
`id`
bigint
(
20
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
--
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防监测设备id'
,
--
`fire_equipment_id` bigint(20) NOT NULL COMMENT '消防监测设备id',
`fire_equipment_point_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防监测设备信息地址id'
,
--
`fire_equipment_point_id` bigint(20) NOT NULL COMMENT '消防监测设备信息地址id',
`eq_point_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'指标名称'
,
--
`eq_point_name` varchar(255) DEFAULT NULL COMMENT '指标名称',
`eq_point_unit`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'指标单位'
,
--
`eq_point_unit` varchar(255) DEFAULT NULL COMMENT '指标单位',
`type`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'数据类型:alarm(报警),monitor(监测)'
,
--
`type` varchar(50) DEFAULT NULL COMMENT '数据类型:alarm(报警),monitor(监测)',
`common_address`
int
(
11
)
DEFAULT
NULL
COMMENT
'公共地址'
,
--
`common_address` int(11) DEFAULT NULL COMMENT '公共地址',
`information_address`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'信息地址'
,
--
`information_address` bigint(11) DEFAULT NULL COMMENT '信息地址',
`e_value`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'值'
,
--
`e_value` varchar(255) DEFAULT NULL COMMENT '值',
`data_type`
int
(
11
)
DEFAULT
NULL
COMMENT
'数据类型:浮点型,整数,布尔类型'
,
--
`data_type` int(11) DEFAULT NULL COMMENT '数据类型:浮点型,整数,布尔类型',
`create_date`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
--
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`occur_time`
datetime
DEFAULT
NULL
COMMENT
'品质描述'
,
--
`occur_time` datetime DEFAULT NULL COMMENT '品质描述',
`quality`
longtext
,
--
`quality` longtext,
`is_blocked`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否被锁'
,
--
`is_blocked` bit(1) DEFAULT b'0' COMMENT '是否被锁',
`isSubstituted`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否被取代'
,
--
`isSubstituted` bit(1) DEFAULT b'0' COMMENT '是否被取代',
`isNotTopical`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否非当前值'
,
--
`isNotTopical` bit(1) DEFAULT b'0' COMMENT '是否非当前值',
`isInvalid`
int
(
11
)
DEFAULT
'0'
COMMENT
'是否有效'
,
--
`isInvalid` int(11) DEFAULT '0' COMMENT '是否有效',
`isOverflow`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否越界'
,
--
`isOverflow` bit(1) DEFAULT b'0' COMMENT '是否越界',
`soe`
int
(
11
)
DEFAULT
'0'
,
--
`soe` int(11) DEFAULT '0',
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
--
`org_code` varchar(50) DEFAULT NULL COMMENT '组织',
`alarm_type`
varchar
(
255
)
DEFAULT
NULL
,
--
`alarm_type` varchar(255) DEFAULT NULL,
`eq_point_code`
varchar
(
225
)
DEFAULT
''
COMMENT
'点位编码'
,
--
`eq_point_code` varchar(225) DEFAULT '' COMMENT '点位编码',
`is_invalid`
int
(
11
)
DEFAULT
'0'
COMMENT
'是否有效'
,
--
`is_invalid` int(11) DEFAULT '0' COMMENT '是否有效',
PRIMARY
KEY
(
`id`
)
USING
BTREE
--
PRIMARY KEY (`id`) USING BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
14912
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点资源表'
;
--
) ENGINE=InnoDB AUTO_INCREMENT=14912 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='消防站点资源表';
-- ----------------------------
-- ----------------------------
-- Table structure for f_fire_equipment_point
-- Table structure for f_fire_equipment_point
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_point`
;
--
DROP TABLE IF EXISTS `f_fire_equipment_point`;
CREATE
TABLE
`f_fire_equipment_point`
(
--
CREATE TABLE `f_fire_equipment_point` (
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
--
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
--
`name` varchar(255) DEFAULT NULL COMMENT '名称',
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
--
`code` varchar(255) DEFAULT NULL COMMENT '编号',
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
--
`fire_equipment_id` bigint(20) NOT NULL COMMENT '消防装备id',
`create_by`
varchar
(
225
)
DEFAULT
'0'
COMMENT
'创建者'
,
--
`create_by` varchar(225) DEFAULT '0' COMMENT '创建者',
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建日期'
,
--
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建日期',
`remark`
varchar
(
255
)
DEFAULT
NULL
,
--
`remark` varchar(255) DEFAULT NULL,
`type`
varchar
(
32
)
NOT
NULL
COMMENT
'类型:模拟量ANALOGUE,开关量SWITCH'
,
--
`type` varchar(32) NOT NULL COMMENT '类型:模拟量ANALOGUE,开关量SWITCH',
`value`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'当前值保存时若为开关量(1,0)默认为1'
,
--
`value` varchar(50) DEFAULT NULL COMMENT '当前值保存时若为开关量(1,0)默认为1',
`unit`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'指标项名称'
,
--
`unit` varchar(50) DEFAULT NULL COMMENT '指标项名称',
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
--
`org_code` varchar(50) DEFAULT NULL COMMENT '组织',
`alarm_type`
bigint
(
20
)
DEFAULT
NULL
,
--
`alarm_type` bigint(20) DEFAULT NULL,
PRIMARY
KEY
(
`id`
)
USING
BTREE
--
PRIMARY KEY (`id`) USING BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5734
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防装备点表'
;
--
) ENGINE=InnoDB AUTO_INCREMENT=5734 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='消防装备点表';
-- ----------------------------
-- ----------------------------
-- Table structure for f_fire_station
-- Table structure for f_fire_station
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_station`
;
--
DROP TABLE IF EXISTS `f_fire_station`;
CREATE
TABLE
`f_fire_station`
(
--
CREATE TABLE `f_fire_station` (
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
--
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
--
`name` varchar(100) NOT NULL COMMENT '名称',
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
--
`code` varchar(50) DEFAULT NULL COMMENT '编码',
`type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'类型 1:消防小室,2:消防泡沫间'
,
--
`type` varchar(10) DEFAULT NULL COMMENT '类型 1:消防小室,2:消防泡沫间',
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
--
`address` varchar(255) DEFAULT NULL COMMENT '位置',
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
--
`floor3d` varchar(100) DEFAULT NULL COMMENT '楼层',
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
--
`position3d` varchar(100) DEFAULT NULL COMMENT '3维坐标',
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
--
`is_indoor` bit(1) DEFAULT b'1' COMMENT '是否室内点:默认是',
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
--
`org_code` varchar(50) DEFAULT NULL COMMENT '组织',
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
--
`create_by` varchar(255) DEFAULT '0' COMMENT '维护人员',
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
--
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
`picture`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'图片'
,
--
`picture` varchar(1000) DEFAULT NULL COMMENT '图片',
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
--
`risk_source_id` bigint(20) DEFAULT '0' COMMENT '风险区域id',
PRIMARY
KEY
(
`id`
)
USING
BTREE
--
PRIMARY KEY (`id`) USING BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
23
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点'
;
--
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='消防站点';
-- ----------------------------
-- ----------------------------
-- Table structure for f_fire_station_equipment
-- Table structure for f_fire_station_equipment
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_station_equipment`
;
--
DROP TABLE IF EXISTS `f_fire_station_equipment`;
CREATE
TABLE
`f_fire_station_equipment`
(
--
CREATE TABLE `f_fire_station_equipment` (
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
--
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`fire_station_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防站id'
,
--
`fire_station_id` bigint(20) NOT NULL COMMENT '消防站id',
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防物资id'
,
--
`fire_equipment_id` bigint(20) NOT NULL COMMENT '消防物资id',
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
--
`number` double DEFAULT NULL COMMENT '个数',
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
--
`create_by` varchar(255) DEFAULT '0' COMMENT '维护人员',
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
--
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
`unit`
varchar
(
32
)
DEFAULT
NULL
,
--
`unit` varchar(32) DEFAULT NULL,
PRIMARY
KEY
(
`id`
)
USING
BTREE
--
PRIMARY KEY (`id`) USING BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
56
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点资源表'
;
--
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='消防站点资源表';
-- ----------------------------
-- ----------------------------
-- Table structure for f_fire_strength
-- Table structure for f_fire_strength
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_strength`
;
--
DROP TABLE IF EXISTS `f_fire_strength`;
CREATE
TABLE
`f_fire_strength`
(
--
CREATE TABLE `f_fire_strength` (
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
--
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`username`
varchar
(
50
)
NOT
NULL
COMMENT
'名称'
,
--
`username` varchar(50) NOT NULL COMMENT '名称',
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
--
`code` varchar(50) DEFAULT NULL COMMENT '编码',
`position`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'职位'
,
--
`position` varchar(50) DEFAULT NULL COMMENT '职位',
`tel`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'固话'
,
--
`tel` varchar(20) DEFAULT NULL COMMENT '固话',
`phone_num`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'移动号码'
,
--
`phone_num` varchar(20) DEFAULT NULL COMMENT '移动号码',
`job_des`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'工作描述'
,
--
`job_des` varchar(500) DEFAULT NULL COMMENT '工作描述',
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
--
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
`org_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'组织'
,
--
`org_code` varchar(255) DEFAULT NULL COMMENT '组织',
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
--
`create_by` varchar(255) DEFAULT '0' COMMENT '维护人员',
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
--
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
`day_end`
time
DEFAULT
NULL
COMMENT
'结束时间'
,
--
`day_end` time DEFAULT NULL COMMENT '结束时间',
`day_begin`
time
DEFAULT
NULL
COMMENT
'开始时间'
,
--
`day_begin` time DEFAULT NULL COMMENT '开始时间',
PRIMARY
KEY
(
`id`
)
USING
BTREE
--
PRIMARY KEY (`id`) USING BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
40
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防力量'
;
--
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='消防力量';
-- ----------------------------
-- ----------------------------
-- Table structure for f_fmea
-- Table structure for f_fmea
...
@@ -551,41 +551,41 @@ CREATE TABLE `f_topography_node_detail` (
...
@@ -551,41 +551,41 @@ CREATE TABLE `f_topography_node_detail` (
-- ----------------------------
-- ----------------------------
-- Table structure for f_water_resource
-- Table structure for f_water_resource
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_water_resource`
;
--
DROP TABLE IF EXISTS `f_water_resource`;
CREATE
TABLE
`f_water_resource`
(
--
CREATE TABLE `f_water_resource` (
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
--
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
--
`name` varchar(100) NOT NULL COMMENT '名称',
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
--
`code` varchar(50) DEFAULT NULL COMMENT '编码',
`type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'类型: 1:消火栓,2:消防水池,3:喷淋'
,
--
`type` varchar(10) DEFAULT NULL COMMENT '类型: 1:消火栓,2:消防水池,3:喷淋',
`production_area`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'区域'
,
--
`production_area` varchar(255) DEFAULT NULL COMMENT '区域',
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
--
`floor3d` varchar(100) DEFAULT NULL COMMENT '楼层',
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间'
,
--
`room` varchar(255) DEFAULT NULL COMMENT '房间',
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
--
`address` varchar(255) DEFAULT NULL COMMENT '位置',
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
--
`position3d` varchar(100) DEFAULT NULL COMMENT '3维坐标',
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
--
`org_code` varchar(50) DEFAULT NULL COMMENT '组织',
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'维护人员'
,
--
`create_by` varchar(255) DEFAULT '0' COMMENT '维护人员',
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
--
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
--
`is_indoor` bit(1) DEFAULT b'1' COMMENT '是否室内点:默认是',
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
--
`risk_source_id` bigint(20) DEFAULT '0' COMMENT '风险区域id',
`max_level`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'最大液位'
,
--
`max_level` varchar(255) DEFAULT '0' COMMENT '最大液位',
`alarm_level`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'告警液位'
,
--
`alarm_level` varchar(255) DEFAULT '0' COMMENT '告警液位',
`area`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'水池面積'
,
--
`area` varchar(255) DEFAULT '0' COMMENT '水池面積',
PRIMARY
KEY
(
`id`
)
USING
BTREE
--
PRIMARY KEY (`id`) USING BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
36
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'水资源表'
;
--
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='水资源表';
-- ----------------------------
-- ----------------------------
-- Table structure for f_water_resource_equipment
-- Table structure for f_water_resource_equipment
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_water_resource_equipment`
;
--
DROP TABLE IF EXISTS `f_water_resource_equipment`;
CREATE
TABLE
`f_water_resource_equipment`
(
--
CREATE TABLE `f_water_resource_equipment` (
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
--
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`water_resource_id`
bigint
(
20
)
NOT
NULL
,
--
`water_resource_id` bigint(20) NOT NULL,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
,
--
`fire_equipment_id` bigint(20) NOT NULL,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
--
`number` double DEFAULT NULL COMMENT '个数',
`unit`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'单位'
,
--
`unit` varchar(16) DEFAULT NULL COMMENT '单位',
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
--
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
PRIMARY
KEY
(
`id`
)
USING
BTREE
--
PRIMARY KEY (`id`) USING BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'水资源设备表'
;
--
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='水资源设备表';
-- ----------------------------
-- ----------------------------
-- Table structure for contingency_original_data
-- Table structure for contingency_original_data
-- ----------------------------
-- ----------------------------
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_3d_plan_visual.xml
View file @
61767d5d
...
@@ -3,91 +3,91 @@
...
@@ -3,91 +3,91 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper"
>
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper"
>
<!--查询 0-设备类;1-耗材类;2-视频监控;3-灭火器材'-->
<!--查询 0-设备类;1-耗材类;2-视频监控;3-灭火器材'-->
<select
id=
"getResourceListByType"
resultType=
"java.util.HashMap"
>
<!-- <select id="getResourceListByType" resultType="java.util.HashMap">-->
<!-- -->
<!-- SELECT-->
<!-- rs.id as `key` ,-->
<!-- rs.id AS `value`,-->
<!-- rs.name as label,-->
<!-- rs.code ,-->
<!-- 'id' as dataType-->
<!-- from-->
<!-- <choose>-->
<!-- <when test="type=='fireCar'">-->
<!-- (SELECT a.id,a.name,a.car_num as code FROM `f_fire_car` a) as rs-->
<!-- </when>-->
<!-- <when test="type=='monitorEquipment'">-->
<!-- (select a.id,a.name,a.code from f_fire_equipment a where a.equip_classify = 0) as rs-->
<!-- </when>-->
<!-- <when test="type=='fireConsumables'">-->
<!-- (select a.id,a.name,a.code from f_fire_equipment a where a.equip_classify = 1) as rs-->
<!-- </when>-->
<!-- <when test="type=='video'">-->
<!-- (select a.id,a.name,a.code from f_fire_equipment a where a.equip_classify = 2) as rs-->
<!-- </when>-->
<!-- <when test="type=='fireEquipment'">-->
<!-- (select a.id,a.name,a.code from f_fire_equipment a where a.equip_classify = 3) as rs-->
<!-- </when>-->
<!-- <when test="type=='impEquipment'">-->
<!-- (select a.id,a.`name`,a.`code` from f_equipment a) as rs-->
<!-- </when>-->
<!-- <when test="type=='fireStrength'">-->
<!-- (select a.id,a.`username` as name ,a.`code` from f_fire_strength a) as rs-->
<!-- </when>-->
<!-- <when test="type=='fireChamber'">-->
<!-- (select a.id,a.`name`,a.`code` from f_fire_station a where a.type = '1') as rs-->
<!-- </when>-->
<!-- <when test="type=='fireFoamRoom'">-->
<!-- (select a.id,a.`name`,a.`code` from f_fire_station a where a.type = '2') as rs-->
<!-- </when>-->
<!-- <when test="type=='hydrant'">-->
<!-- (SELECT a.id,a.`name`,a.code FROM `f_water_resource` a where a.type = '1') as rs-->
<!-- </when>-->
<!-- <when test="type=='pool'">-->
<!-- (SELECT a.id,a.`name`,a.code FROM `f_water_resource` a where a.type = '2') as rs-->
<!-- </when>-->
<!-- </choose>-->
<!-- </select>-->
<!-- SELECT
<!-- <select id="queryOneByTypeAndId" resultType="hashmap">-->
rs.id as `key` ,
<!-- SELECT-->
rs.id AS `value`,
<!-- *-->
rs.name as label,
<!-- from-->
rs.code ,
<!-- <choose>-->
'id' as dataType
<!-- <when test="type=='fireCar'">-->
from
<!-- (SELECT * FROM `f_fire_car` a) as rs-->
<choose>
<!-- </when>-->
<when test="type=='fireCar'">
<!-- <when test="type=='monitorEquipment'">-->
(SELECT a.id,a.name,a.car_num as code FROM `f_fire_car` a) as rs
<!-- (select * from f_fire_equipment a where a.equip_classify = 0) as rs-->
</when>
<!-- </when>-->
<when test="type=='monitorEquipment'">
<!-- <when test="type=='fireConsumables'">-->
(select a.id,a.name,a.code from f_fire_equipment a where a.equip_classify = 0) as rs
<!-- (select * from f_fire_equipment a where a.equip_classify = 1) as rs-->
</when>
<!-- </when>-->
<when test="type=='fireConsumables'">
<!-- <when test="type=='video'">-->
(select a.id,a.name,a.code from f_fire_equipment a where a.equip_classify = 1) as rs
<!-- (select * from f_fire_equipment a where a.equip_classify = 2) as rs-->
</when>
<!-- </when>-->
<when test="type=='video'">
<!-- <when test="type=='fireEquipment'">-->
(select a.id,a.name,a.code from f_fire_equipment a where a.equip_classify = 2) as rs
<!-- (select * from f_fire_equipment a where a.equip_classify = 3) as rs-->
</when>
<!-- </when>-->
<when test="type=='fireEquipment'">
<!-- <when test="type=='impEquipment'">-->
(select a.id,a.name,a.code from f_fire_equipment a where a.equip_classify = 3) as rs
<!-- (select * from f_equipment a) as rs-->
</when>
<!-- </when>-->
<when test="type=='impEquipment'">
<!-- <when test="type=='fireStrength'">-->
(select a.id,a.`name`,a.`code` from f_equipment a) as rs
<!-- (select * from f_fire_strength a) as rs-->
</when>
<!-- </when>-->
<when test="type=='fireStrength'">
<!-- <when test="type=='fireChamber'">-->
(select a.id,a.`username` as name ,a.`code` from f_fire_strength a) as rs
<!-- (select * from f_fire_station a where a.type = '1') as rs-->
</when>
<!-- </when>-->
<when test="type=='fireChamber'">
<!-- <when test="type=='fireFoamRoom'">-->
(select a.id,a.`name`,a.`code` from f_fire_station a where a.type = '1') as rs
<!-- (select * from f_fire_station a where a.type = '2') as rs-->
</when>
<!-- </when>-->
<when test="type=='fireFoamRoom'">
<!-- <when test="type=='hydrant'">-->
(select a.id,a.`name`,a.`code` from f_fire_station a where a.type = '2') as rs
<!-- (SELECT * FROM `f_water_resource` a where a.type = '1') as rs-->
</when>
<!-- </when>-->
<when test="type=='hydrant'">
<!-- <when test="type=='pool'">-->
(SELECT a.id,a.`name`,a.code FROM `f_water_resource` a where a.type = '1') as rs
<!-- (SELECT * FROM `f_water_resource` a where a.type = '2') as rs-->
</when>
<!-- </when>-->
<when test="type=='pool'">
<!-- </choose>-->
(SELECT a.id,a.`name`,a.code FROM `f_water_resource` a where a.type = '2') as rs
<!-- where rs.id = #{id}-->
</when>
<!-- </select>-->
</choose> -->
</select>
<select
id=
"queryOneByTypeAndId"
resultType=
"hashmap"
>
<!-- SELECT
*
from
<choose>
<when test="type=='fireCar'">
(SELECT * FROM `f_fire_car` a) as rs
</when>
<when test="type=='monitorEquipment'">
(select * from f_fire_equipment a where a.equip_classify = 0) as rs
</when>
<when test="type=='fireConsumables'">
(select * from f_fire_equipment a where a.equip_classify = 1) as rs
</when>
<when test="type=='video'">
(select * from f_fire_equipment a where a.equip_classify = 2) as rs
</when>
<when test="type=='fireEquipment'">
(select * from f_fire_equipment a where a.equip_classify = 3) as rs
</when>
<when test="type=='impEquipment'">
(select * from f_equipment a) as rs
</when>
<when test="type=='fireStrength'">
(select * from f_fire_strength a) as rs
</when>
<when test="type=='fireChamber'">
(select * from f_fire_station a where a.type = '1') as rs
</when>
<when test="type=='fireFoamRoom'">
(select * from f_fire_station a where a.type = '2') as rs
</when>
<when test="type=='hydrant'">
(SELECT * FROM `f_water_resource` a where a.type = '1') as rs
</when>
<when test="type=='pool'">
(SELECT * FROM `f_water_resource` a where a.type = '2') as rs
</when>
</choose>
where rs.id = #{id}-->
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_station.xml
View file @
61767d5d
...
@@ -4,98 +4,98 @@
...
@@ -4,98 +4,98 @@
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireStationMapper"
>
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireStationMapper"
>
<select
id=
"queryOne"
resultType=
"java.util.Map"
>
<!-- <select id="queryOne" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
fs.id,
<!-- fs.id,-->
fs.name,
<!-- fs.name,-->
fs.code,
<!-- fs.code,-->
fs.type,
<!-- fs.type,-->
fs.address,
<!-- fs.address,-->
fs.floor3d,
<!-- fs.floor3d,-->
fs.position3d,
<!-- fs.position3d,-->
fs.is_indoor AS isIndoor,
<!-- fs.is_indoor AS isIndoor,-->
fs.picture,
<!-- fs.picture,-->
fs.risk_source_id as riskSourceId
<!-- fs.risk_source_id as riskSourceId-->
FROM
<!-- FROM-->
f_fire_station fs
<!-- f_fire_station fs-->
WHERE
<!-- WHERE-->
fs.id = ${id}
<!-- fs.id = ${id}-->
</select
>
<!-- </select>--
>
<select
id=
"queryCountForFireEqumntPage"
resultType=
"long"
>
<!-- <select id="queryCountForFireEqumntPage" resultType="long">--
>
SELECT
<!-- SELECT-->
count(1)
<!-- count(1)-->
FROM
<!-- FROM-->
f_fire_station_equipment fs
<!-- f_fire_station_equipment fs-->
JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id
<!-- JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id-->
WHERE
<!-- WHERE-->
fs.fire_station_id = ${fireStationId}
<!-- fs.fire_station_id = ${fireStationId}-->
</select
>
<!-- </select>--
>
<select
id=
"queryForFireEqumntPage"
resultType=
"java.util.Map"
>
<!-- <select id="queryForFireEqumntPage" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
fs.fire_station_id,
<!-- fs.fire_station_id,-->
fs.number numberInStation,
<!-- fs.number numberInStation,-->
fs.unit unitInStation,
<!-- fs.unit unitInStation,-->
f.*,
<!-- f.*,-->
frs.name riskSourceName
<!-- frs.name riskSourceName-->
FROM
<!-- FROM-->
f_fire_station_equipment fs
<!-- f_fire_station_equipment fs-->
left join f_fire_equipment f ON fs.fire_equipment_id = f.id
<!-- left join f_fire_equipment f ON fs.fire_equipment_id = f.id-->
left join f_risk_source frs on frs.id = f.risk_source_id
<!-- left join f_risk_source frs on frs.id = f.risk_source_id-->
WHERE
<!-- WHERE-->
fs.fire_station_id = ${fireStationId}
<!-- fs.fire_station_id = ${fireStationId}-->
and f.id is not null
<!-- and f.id is not null-->
LIMIT ${start}, ${length};
<!-- LIMIT ${start}, ${length};-->
</select
>
<!-- </select>--
>
<select
id=
"queryCountForPage"
resultType=
"long"
>
<!-- <select id="queryCountForPage" resultType="long">--
>
SELECT
<!-- SELECT-->
COUNT(1)
<!-- COUNT(1)-->
FROM
<!-- FROM-->
f_fire_station fs
<!-- f_fire_station fs-->
WHERE
<!-- WHERE-->
1=1
<!-- 1=1-->
<if
test=
"name!=null"
>
<!-- <if test="name!=null">--
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
<!-- AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')-->
</if
>
<!-- </if>--
>
<if
test=
"code!=null"
>
<!-- <if test="code!=null">--
>
AND fs.`code` LIKE '%${code}%'
<!-- AND fs.`code` LIKE '%${code}%'-->
</if
>
<!-- </if>--
>
<if
test=
"type!=null"
>
<!-- <if test="type!=null">--
>
AND fs.`type` LIKE '%${type}%';
<!-- AND fs.`type` LIKE '%${type}%';-->
</if
>
<!-- </if>--
>
</select
>
<!-- </select>--
>
<select
id=
"queryForPage"
resultType=
"java.util.Map"
>
<!-- <select id="queryForPage" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
fs.id,
<!-- fs.id,-->
fs.name,
<!-- fs.name,-->
fs.code,
<!-- fs.code,-->
fs.type,
<!-- fs.type,-->
fs.address,
<!-- fs.address,-->
fs.floor3d,
<!-- fs.floor3d,-->
fs.position3d,
<!-- fs.position3d,-->
fs.is_indoor as isIndoor,
<!-- fs.is_indoor as isIndoor,-->
frs.name riskSourceName
<!-- frs.name riskSourceName-->
FROM
<!-- FROM-->
f_fire_station fs
<!-- f_fire_station fs-->
left join f_risk_source frs on frs.id = fs.risk_source_id
<!-- left join f_risk_source frs on frs.id = fs.risk_source_id-->
WHERE
<!-- WHERE-->
1=1
<!-- 1=1-->
<if
test=
"name!=null"
>
<!-- <if test="name!=null">--
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
<!-- AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')-->
</if
>
<!-- </if>--
>
<if
test=
"code!=null"
>
<!-- <if test="code!=null">--
>
AND fs.`code` LIKE '%${code}%'
<!-- AND fs.`code` LIKE '%${code}%'-->
</if
>
<!-- </if>--
>
<if
test=
"type!=null"
>
<!-- <if test="type!=null">--
>
AND fs.`type` LIKE '%${type}%'
<!-- AND fs.`type` LIKE '%${type}%'-->
</if
>
<!-- </if>--
>
LIMIT ${start},${length} ;
<!-- LIMIT ${start},${length} ;-->
</select
>
<!-- </select>--
>
<select
id=
"queryForList"
resultType=
"java.util.Map"
>
<select
id=
"queryForList"
resultType=
"java.util.Map"
>
...
@@ -139,19 +139,19 @@
...
@@ -139,19 +139,19 @@
</select>
</select>
<select
id=
"queryEquipCountById"
resultType=
"java.util.Map"
>
<!-- <select id="queryEquipCountById" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
fe.`name`,
<!-- fe.`name`,-->
SUM(fse.number) count,
<!-- SUM(fse.number) count,-->
fe.unit
<!-- fe.unit-->
FROM
<!-- FROM-->
`f_fire_station_equipment` fse
<!-- `f_fire_station_equipment` fse-->
LEFT JOIN f_fire_equipment fe ON fe.id = fse.fire_equipment_id
<!-- LEFT JOIN f_fire_equipment fe ON fe.id = fse.fire_equipment_id-->
WHERE
<!-- WHERE-->
fire_station_id = #{id}
<!-- fire_station_id = #{id}-->
GROUP BY
<!-- GROUP BY-->
fe.`name`,fe.unit
<!-- fe.`name`,fe.unit-->
</select
>
<!-- </select>--
>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_station_equipment.xml
View file @
61767d5d
...
@@ -4,19 +4,19 @@
...
@@ -4,19 +4,19 @@
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireStationEquipmentMapper"
>
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireStationEquipmentMapper"
>
<select
id=
"queryRelation"
resultType=
"java.util.Map"
>
<!-- <select id="queryRelation" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
*
<!-- *-->
FROM
<!-- FROM-->
f_fire_station_equipment se
<!-- f_fire_station_equipment se-->
WHERE
<!-- WHERE-->
se.fire_equipment_id = ${fireEquipmentId}
<!-- se.fire_equipment_id = ${fireEquipmentId}-->
AND se.fire_station_id = ${fireStationId};
<!-- AND se.fire_station_id = ${fireStationId};-->
</select
>
<!-- </select>--
>
<!-- -->
<update
id=
"updateNumberById"
>
<!-- <update id="updateNumberById">--
>
update f_fire_station_equipment set number = #{diff}
<!-- update f_fire_station_equipment set number = #{diff}-->
where id = #{stationEquiId}
<!-- where id = #{stationEquiId}-->
</update
>
<!-- </update>--
>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fier_stength.xml
View file @
61767d5d
...
@@ -4,90 +4,90 @@
...
@@ -4,90 +4,90 @@
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireStrengthMapper"
>
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.FireStrengthMapper"
>
<select
id=
"queryOne"
resultType=
"java.util.Map"
>
<!-- <select id="queryOne" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
id,
<!-- id,-->
username,
<!-- username,-->
`code`,
<!-- `code`,-->
position,
<!-- position,-->
tel,
<!-- tel,-->
phone_num,
<!-- phone_num,-->
job_des,
<!-- job_des,-->
remark,
<!-- remark,-->
org_code,
<!-- org_code,-->
create_by,
<!-- create_by,-->
create_date,
<!-- create_date,-->
day_end dayEnd,
<!-- day_end dayEnd,-->
day_begin dayBegin
<!-- day_begin dayBegin-->
FROM
<!-- FROM-->
f_fire_strength
<!-- f_fire_strength-->
WHERE
<!-- WHERE-->
id = #{id}
<!-- id = #{id}-->
</select
>
<!-- </select>--
>
<select
id=
"queryCountForPage"
resultType=
"long"
>
<!-- <select id="queryCountForPage" resultType="long">--
>
SELECT
<!-- SELECT-->
COUNT(1)
<!-- COUNT(1)-->
FROM
<!-- FROM-->
f_fire_strength fs
<!-- f_fire_strength fs-->
WHERE
<!-- WHERE-->
1=1
<!-- 1=1-->
<if
test=
"username!=null"
>
<!-- <if test="username!=null">--
>
AND (fs.username LIKE '%${username}%' or fs.`code` LIKE '%${username}%')
<!-- AND (fs.username LIKE '%${username}%' or fs.`code` LIKE '%${username}%')-->
</if
>
<!-- </if>--
>
<if
test=
"code!=null"
>
<!-- <if test="code!=null">--
>
AND fs.`code` LIKE '%${code}%';
<!-- AND fs.`code` LIKE '%${code}%';-->
</if
>
<!-- </if>--
>
</select
>
<!-- </select>--
>
<select
id=
"queryForPage"
resultType=
"java.util.Map"
>
<!-- <select id="queryForPage" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
*
<!-- *-->
FROM
<!-- FROM-->
f_fire_strength fs
<!-- f_fire_strength fs-->
WHERE
<!-- WHERE-->
1=1
<!-- 1=1-->
<if
test=
"username!=null"
>
<!-- <if test="username!=null">--
>
AND (fs.username LIKE '%${username}%' or fs.`code` LIKE '%${username}%')
<!-- AND (fs.username LIKE '%${username}%' or fs.`code` LIKE '%${username}%')-->
</if
>
<!-- </if>--
>
<if
test=
"code!=null"
>
<!-- <if test="code!=null">--
>
AND fs.`code` LIKE '%${code}%';
<!-- AND fs.`code` LIKE '%${code}%';-->
</if
>
<!-- </if>--
>
LIMIT ${start},${length} ;
<!-- LIMIT ${start},${length} ;-->
</select
>
<!-- </select>--
>
<select
id=
"queryForStrengthList"
resultType=
"com.yeejoin.amos.fas.dao.entity.FireStrength"
>
<!-- <select id="queryForStrengthList" resultType="com.yeejoin.amos.fas.dao.entity.FireStrength">--
>
SELECT
<!-- SELECT-->
*
<!-- * -->
FROM
<!-- FROM-->
f_fire_strength t
<!-- f_fire_strength t -->
WHERE
<!-- WHERE-->
TIME_TO_SEC(#{time})
>
= TIME_TO_SEC( t.day_begin )
<!-- TIME_TO_SEC(#{time}) >= TIME_TO_SEC( t.day_begin ) -->
AND TIME_TO_SEC(#{time})
<
= TIME_TO_SEC(
<!-- AND TIME_TO_SEC(#{time}) <= TIME_TO_SEC(-->
t.day_end)
<!-- t.day_end)-->
</select
>
<!-- </select>--
>
<insert
id=
"save"
parameterType=
"com.yeejoin.amos.fas.dao.entity.FireStrength"
>
<!-- <insert id="save" parameterType="com.yeejoin.amos.fas.dao.entity.FireStrength">--
>
INSERT INTO f_fire_strength
<!-- INSERT INTO f_fire_strength-->
username,
<!-- username,-->
`code`,
<!-- `code`,-->
position,
<!-- position,-->
tel,
<!-- tel,-->
phone_num,
<!-- phone_num,-->
job_des,
<!-- job_des,-->
remark,
<!-- remark,-->
org_code,
<!-- org_code,-->
create_by,
<!-- create_by,-->
create_date,
<!-- create_date,-->
day_end ,
<!-- day_end ,-->
day_begin
<!-- day_begin -->
VALUES(#{username},#{code},#{position},#{tel},#{phoneNum},#{jobDes},#{remark},#{orgCode},#{createBy},NOW(),#{dayEnd},#{dayBegin})
<!-- VALUES(#{username},#{code},#{position},#{tel},#{phoneNum},#{jobDes},#{remark},#{orgCode},#{createBy},NOW(),#{dayEnd},#{dayBegin})-->
</insert
>
<!-- </insert>--
>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
61767d5d
...
@@ -202,90 +202,90 @@
...
@@ -202,90 +202,90 @@
</select>
</select>
<select
id=
"queryForEquipmentPageCount"
resultType=
"long"
>
<!-- <select id="queryForEquipmentPageCount" resultType="long">--
>
select
<!-- select-->
count(1)
<!-- count(1)-->
from f_fire_equipment fe
<!-- from f_fire_equipment fe-->
where
<!-- where-->
1=1
<!-- 1=1-->
<if
test=
"equipClassify!=null"
>
<!-- <if test="equipClassify!=null">--
>
and fe.equip_classify in ( ${equipClassify} )
<!-- and fe.equip_classify in ( ${equipClassify} )-->
</if
>
<!-- </if>--
>
<if
test=
"code!=null"
>
<!-- <if test="code!=null">--
>
and fe.`code` like '%${code}%'
<!-- and fe.`code` like '%${code}%'-->
</if
>
<!-- </if>--
>
<if
test=
"name!=null"
>
<!-- <if test="name!=null">--
>
and (fe.`name` like '%${name}%' or fe.`code` like '%${name}%')
<!-- and (fe.`name` like '%${name}%' or fe.`code` like '%${name}%')-->
</if
>
<!-- </if>--
>
<!-- 筛选未绑定的配套设施
<!-- <!– 筛选未绑定的配套设施-->
-->
<!-- –>
-->
<if
test=
"bindStation != null and bindStation == 'false'"
>
<!-- <if test="bindStation != null and bindStation == 'false'">--
>
AND (select true from
<!-- AND (select true from-->
f_fire_station_equipment fse
<!-- f_fire_station_equipment fse-->
left join f_fire_equipment e on fse.fire_equipment_id = e.id
<!-- left join f_fire_equipment e on fse.fire_equipment_id = e.id-->
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) is not true
<!-- where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) is not true-->
</if
>
<!-- </if>--
>
</select
>
<!-- </select>--
>
<select
id=
"queryForEquipmentPage"
resultType=
"map"
>
<!-- <select id="queryForEquipmentPage" resultType="map">--
>
select * from (
<!-- select * from (-->
select
<!-- select-->
fe.*, (
<!-- fe.*, (-->
SELECT
<!-- SELECT-->
'YES'
<!-- 'YES'-->
FROM
<!-- FROM-->
f_equipment_fire_equipment efe
<!-- f_equipment_fire_equipment efe-->
WHERE
<!-- WHERE-->
efe.fire_equipment_id = fe.id limit 0,1
<!-- efe.fire_equipment_id = fe.id limit 0,1-->
) isBind,
<!-- ) isBind,-->
frs.name riskSourceName,
<!-- frs.name riskSourceName,-->
(select true from
<!-- (select true from-->
f_fire_station_equipment fse
<!-- f_fire_station_equipment fse-->
left join f_fire_equipment e on fse.fire_equipment_id = e.id
<!-- left join f_fire_equipment e on fse.fire_equipment_id = e.id-->
where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) as bindStation
<!-- where fse.fire_equipment_id = fe.id AND e.equip_classify != 1 limit 0,1) as bindStation-->
from f_fire_equipment fe
<!-- from f_fire_equipment fe-->
left join f_risk_source frs on frs.id = fe.risk_source_id
<!-- left join f_risk_source frs on frs.id = fe.risk_source_id-->
where 1=1) tmp
<!-- where 1=1) tmp-->
<where
>
<!-- <where>--
>
<if
test=
"equipClassify!=null"
>
<!-- <if test="equipClassify!=null">--
>
and tmp.equip_classify in ( ${equipClassify} )
<!-- and tmp.equip_classify in ( ${equipClassify} )-->
</if
>
<!-- </if>--
>
<if
test=
"code!=null"
>
<!-- <if test="code!=null">--
>
and tmp.`code` like '%${code}%'
<!-- and tmp.`code` like '%${code}%'-->
</if
>
<!-- </if>--
>
<if
test=
"name!=null"
>
<!-- <if test="name!=null">--
>
and (tmp.`name` like '%${name}%' or tmp.`code` like '%${name}%')
<!-- and (tmp.`name` like '%${name}%' or tmp.`code` like '%${name}%')-->
</if
>
<!-- </if>--
>
<!-- 筛选未绑定的配套设施
<!-- <!– 筛选未绑定的配套设施-->
-->
<!-- –>
-->
<if
test=
"bindStation != null and bindStation == 'false'"
>
<!-- <if test="bindStation != null and bindStation == 'false'">--
>
AND tmp.bindStation is not true
<!-- AND tmp.bindStation is not true-->
</if
>
<!-- </if>--
>
</where
>
<!-- </where>--
>
LIMIT ${start},${length}
<!-- LIMIT ${start},${length}-->
</select
>
<!-- </select>--
>
<select
id=
"queryForGroupCount"
resultType=
"map"
>
<!-- <select id="queryForGroupCount" resultType="map">--
>
SELECT
<!-- SELECT-->
fe.`name`,
<!-- fe.`name`,-->
fe.unit,
<!-- fe.unit,-->
count(1) fireEquipmentCount
<!-- count(1) fireEquipmentCount-->
FROM
<!-- FROM-->
f_fire_equipment fe
<!-- f_fire_equipment fe-->
WHERE
<!-- WHERE-->
EXISTS (
<!-- EXISTS (-->
SELECT
<!-- SELECT-->
1
<!-- 1-->
FROM
<!-- FROM-->
f_fire_station_equipment se
<!-- f_fire_station_equipment se-->
WHERE
<!-- WHERE-->
se.fire_station_id = ${fireStationId}
<!-- se.fire_station_id = ${fireStationId}-->
AND se.fire_equipment_id = fe.id
<!-- AND se.fire_equipment_id = fe.id-->
)
<!-- )-->
</select
>
<!-- </select>--
>
<select
id=
"queryStorageEquips"
resultType=
"map"
>
<select
id=
"queryStorageEquips"
resultType=
"map"
>
SELECT
SELECT
...
@@ -306,38 +306,38 @@
...
@@ -306,38 +306,38 @@
wed.`name`
wed.`name`
</select>
</select>
<select
id=
"findEquipDetailsById"
resultType=
"com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse"
>
<!-- <select id="findEquipDetailsById" resultType="com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse">--
>
SELECT
<!-- SELECT-->
eq.`name`,
<!-- eq.`name`,-->
eq.`code`,
<!-- eq.`code`,-->
eq.address,
<!-- eq.address,-->
fs.`name` stationName,
<!-- fs.`name` stationName,-->
eq.charge_user_id userId
<!-- eq.charge_user_id userId-->
FROM
<!-- FROM-->
f_equipment eq
<!-- f_equipment eq-->
LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id
<!-- LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id-->
<where
>
<!-- <where>--
>
<if
test=
"id!=null"
>
AND eq.id = #{id}
</if
>
<!-- <if test="id!=null">AND eq.id = #{id}</if>--
>
</where
>
<!-- </where>--
>
</select
>
<!-- </select>--
>
<select
id=
"findOneByPointCode"
resultType=
"com.yeejoin.amos.fas.business.vo.EquipCommunicationData"
>
<!-- <select id="findOneByPointCode" resultType="com.yeejoin.amos.fas.business.vo.EquipCommunicationData">--
>
SELECT
<!-- SELECT-->
p.`code` pointCode,
<!-- p.`code` pointCode,-->
p.`name` pointName,
<!-- p.`name` pointName,-->
e.id fireEquipmentId,
<!-- e.id fireEquipmentId,-->
e.`name` fireEquipmentName,
<!-- e.`name` fireEquipmentName,-->
e.code fireEquipmentCode,
<!-- e.code fireEquipmentCode,-->
p.type,
<!-- p.type,-->
d.dict_value alarmType,
<!-- d.dict_value alarmType,-->
p.unit
<!-- p.unit-->
FROM
<!-- FROM-->
f_fire_equipment_point p
<!-- f_fire_equipment_point p-->
LEFT JOIN f_fire_equipment e ON e.id = p.fire_equipment_id
<!-- LEFT JOIN f_fire_equipment e ON e.id = p.fire_equipment_id-->
LEFT JOIN f_dict d on d.id = p.alarm_type
<!-- LEFT JOIN f_dict d on d.id = p.alarm_type-->
where p.`code` = #{code}
<!-- where p.`code` = #{code}-->
</select
>
<!-- </select>--
>
<select
id=
"listByCodes"
resultType=
"com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity"
>
<select
id=
"listByCodes"
resultType=
"com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity"
>
select
select
...
@@ -603,39 +603,39 @@
...
@@ -603,39 +603,39 @@
</if>
</if>
</select>
</select>
<select
id=
"findFireStationById"
resultType=
"com.yeejoin.amos.fas.dao.entity.FireStation"
>
<!-- <select id="findFireStationById" resultType="com.yeejoin.amos.fas.dao.entity.FireStation">--
>
SELECT
<!-- SELECT-->
*
<!-- *-->
FROM
<!-- FROM-->
(
<!-- (-->
SELECT
<!-- SELECT-->
a.instance_id AS id,
<!-- a.instance_id AS id,-->
MAX(
<!-- MAX(-->
CASE
<!-- CASE-->
WHEN a.field_name = 'name' THEN
<!-- WHEN a.field_name = 'name' THEN-->
a.field_value
<!-- a.field_value-->
END
<!-- END-->
) AS name,
<!-- ) AS name,-->
MAX(
<!-- MAX(-->
CASE
<!-- CASE-->
WHEN a.field_name = 'code' THEN
<!-- WHEN a.field_name = 'code' THEN-->
a.field_value
<!-- a.field_value-->
END
<!-- END-->
) AS code,
<!-- ) AS code,-->
MAX(
<!-- MAX(-->
CASE
<!-- CASE-->
WHEN a.field_name = 'address' THEN
<!-- WHEN a.field_name = 'address' THEN-->
a.field_value
<!-- a.field_value-->
END
<!-- END-->
) AS address
<!-- ) AS address-->
FROM
<!-- FROM-->
`wl_form_instance` a
<!-- `wl_form_instance` a-->
WHERE
<!-- WHERE-->
a.group_code IN ('pool','r_pool','fireFoamRoom', 'r_fireFoamRoom','fireRoom','r_fireRoom')
<!-- a.group_code IN ('pool','r_pool','fireFoamRoom', 'r_fireFoamRoom','fireRoom','r_fireRoom')-->
GROUP BY
<!-- GROUP BY-->
a.instance_id
<!-- a.instance_id-->
) s,
<!-- ) s,-->
f_risk_source r
<!-- f_risk_source r-->
where s.id = r.source_id and s.id = #{id}
<!-- where s.id = r.source_id and s.id = #{id}-->
</select
>
<!-- </select>--
>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
61767d5d
...
@@ -3,323 +3,323 @@
...
@@ -3,323 +3,323 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.View3dMapper"
>
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.View3dMapper"
>
<select
id=
"getPointByType"
resultType=
"com.yeejoin.amos.fas.core.common.response.RegionTreeResponse"
>
<!-- <select id="getPointByType" resultType="com.yeejoin.amos.fas.core.common.response.RegionTreeResponse">--
>
<choose
>
<!-- <choose>--
>
<when
test=
"type == 'riskSource'"
>
<!-- <when test="type == 'riskSource'">--
>
select
<!-- select-->
R.id,R.name,R.code,R.parent_id,R.ue4_location,R.ue4_rotation,R.ue4_extent,
<!-- R.id,R.name,R.code,R.parent_id,R.ue4_location,R.ue4_rotation,R.ue4_extent,-->
<choose
>
<!-- <choose>--
>
<when
test=
"channelType == '3dpage'"
>
<!-- <when test="channelType == '3dpage'">--
>
IF(ISNULL(position3d) || LENGTH(trim(position3d))
<![CDATA[ <]]>
1,0,1) as is_bind,
<!-- IF(ISNULL(position3d) || LENGTH(trim(position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,-->
</when
>
<!-- </when>--
>
<otherwise
>
<!-- <otherwise>--
>
IF(ISNULL(IF(replace(trim(ue4_rotation),'[]','')='',NULL,R.ue4_rotation))
<!-- IF(ISNULL(IF(replace(trim(ue4_rotation),'[]','')='',NULL,R.ue4_rotation))-->
AND ISNULL(IF(replace(trim(ue4_location),'[]','')='',NULL,R.ue4_location)),0,1) as is_bind,
<!-- AND ISNULL(IF(replace(trim(ue4_location),'[]','')='',NULL,R.ue4_location)),0,1) as is_bind,-->
</otherwise
>
<!-- </otherwise>--
>
</choose
>
<!-- </choose>--
>
#{type} as type,
<!-- #{type} as type,-->
route_path,
<!-- route_path,-->
rl.level,
<!-- rl.level,-->
CONCAT('level_',rl.level) as level_str,
<!-- CONCAT('level_',rl.level) as level_str,-->
0 as is_region,
<!-- 0 as is_region,-->
R.position3d
<!-- R.position3d-->
from f_risk_source R
<!-- from f_risk_source R-->
left join f_risk_level rl on rl.id = R.risk_level_id
<!-- left join f_risk_level rl on rl.id = R.risk_level_id-->
where 1=1
<!-- where 1=1-->
AND R.risk_level_id is not null
<!-- AND R.risk_level_id is not null-->
AND R.is_region = 'FALSE'
<!-- AND R.is_region = 'FALSE'-->
</when
>
<!-- </when>--
>
<when
test=
"type == 'patrol'"
>
<!-- <when test="type == 'patrol'">--
>
select
<!-- select-->
B.id,B.risk_source_id as parent_id,
<!-- B.id,B.risk_source_id as parent_id,-->
<choose
>
<!-- <choose>--
>
<when
test=
"channelType == '3dpage'"
>
<!-- <when test="channelType == '3dpage'">--
>
IF(ISNULL(B.coordinates) || LENGTH(trim(B.coordinates))
<![CDATA[ <]]>
1,0,1) as is_bind,
<!-- IF(ISNULL(B.coordinates) || LENGTH(trim(B.coordinates)) <![CDATA[ <]]> 1,0,1) as is_bind,-->
</when
>
<!-- </when>--
>
<otherwise
>
<!-- <otherwise>--
>
IF(ISNULL(IF(replace(trim(B.ue4_rotation),'[]','')='',NULL,B.ue4_rotation))
<!-- IF(ISNULL(IF(replace(trim(B.ue4_rotation),'[]','')='',NULL,B.ue4_rotation))-->
AND ISNULL(IF(replace(trim(B.ue4_location),'[]','')='',NULL,B.ue4_location)),0,1) as is_bind,
<!-- AND ISNULL(IF(replace(trim(B.ue4_location),'[]','')='',NULL,B.ue4_location)),0,1) as is_bind,-->
</otherwise
>
<!-- </otherwise>--
>
</choose
>
<!-- </choose>--
>
#{type} as type,
<!-- #{type} as type,-->
B.name as name,B.point_no as code,B.ue4_location,B.ue4_rotation,
<!-- B.name as name,B.point_no as code,B.ue4_location,B.ue4_rotation,-->
0 as is_region,
<!-- 0 as is_region,-->
B.coordinates as position3d,
<!-- B.coordinates as position3d,-->
B.status as level,
<!-- B.status as level,-->
CONCAT('level_',B.status) as level_str
<!-- CONCAT('level_',B.status) as level_str-->
from f_risk_source R
<!-- from f_risk_source R-->
left join p_point B on B.risk_source_id = R.id AND R.is_region='TRUE'
<!-- left join p_point B on B.risk_source_id = R.id AND R.is_region='TRUE'-->
where 1=1
<!-- where 1=1-->
AND B.id is not null AND B.is_delete = 0
<!-- AND B.id is not null AND B.is_delete = 0-->
</when
>
<!-- </when>--
>
<when
test=
"type == 'impEquipment'"
>
<!-- <when test="type == 'impEquipment'">--
>
select
<!-- select-->
B.id,B.risk_source_id as parent_id,
<!-- B.id,B.risk_source_id as parent_id,-->
<choose
>
<!-- <choose>--
>
<when
test=
"channelType == '3dpage'"
>
<!-- <when test="channelType == '3dpage'">--
>
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d))
<![CDATA[ <]]>
1,0,1) as is_bind,
<!-- IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,-->
</when
>
<!-- </when>--
>
<otherwise
>
<!-- <otherwise>--
>
IF(ISNULL(IF(replace(trim(B.ue4_rotation),'[]','')='',NULL,B.ue4_rotation))
<!-- IF(ISNULL(IF(replace(trim(B.ue4_rotation),'[]','')='',NULL,B.ue4_rotation))-->
AND ISNULL(IF(replace(trim(B.ue4_location),'[]','')='',NULL,B.ue4_location)),0,1) as is_bind,
<!-- AND ISNULL(IF(replace(trim(B.ue4_location),'[]','')='',NULL,B.ue4_location)),0,1) as is_bind,-->
</otherwise
>
<!-- </otherwise>--
>
</choose
>
<!-- </choose>--
>
#{type} as type,
<!-- #{type} as type,-->
B.name,B.code,B.ue4_location,B.ue4_rotation,
<!-- B.name,B.code,B.ue4_location,B.ue4_rotation,-->
0 as is_region,
<!-- 0 as is_region,-->
B.position3d
<!-- B.position3d-->
from f_risk_source R
<!-- from f_risk_source R-->
left join f_equipment B on B.risk_source_id = R.id AND R.is_region='TRUE'
<!-- left join f_equipment B on B.risk_source_id = R.id AND R.is_region='TRUE'-->
where 1=1
<!-- where 1=1-->
AND B.id is not null
<!-- AND B.id is not null-->
</when
>
<!-- </when>--
>
<when
test=
"type == 'monitorEquipment'"
>
<!-- <when test="type == 'monitorEquipment'">--
>
select
<!-- select-->
B.id,B.risk_source_id as parent_id,
<!-- B.id,B.risk_source_id as parent_id,-->
<choose
>
<!-- <choose>--
>
<when
test=
"channelType == '3dpage'"
>
<!-- <when test="channelType == '3dpage'">--
>
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d))
<![CDATA[ <]]>
1,0,1) as is_bind,
<!-- IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,-->
</when
>
<!-- </when>--
>
<otherwise
>
<!-- <otherwise>--
>
IF(ISNULL(IF(replace(trim(B.ue4_rotation),'[]','')='',NULL,B.ue4_rotation))
<!-- IF(ISNULL(IF(replace(trim(B.ue4_rotation),'[]','')='',NULL,B.ue4_rotation))-->
AND ISNULL(IF(replace(trim(B.ue4_location),'[]','')='',NULL,B.ue4_location)),0,1) as is_bind,
<!-- AND ISNULL(IF(replace(trim(B.ue4_location),'[]','')='',NULL,B.ue4_location)),0,1) as is_bind,-->
</otherwise
>
<!-- </otherwise>--
>
</choose
>
<!-- </choose>--
>
#{type} as type,
<!-- #{type} as type,-->
B.name,B.code,B.ue4_location,B.ue4_rotation,
<!-- B.name,B.code,B.ue4_location,B.ue4_rotation,-->
0 as is_region,
<!-- 0 as is_region,-->
B.position3d
<!-- B.position3d-->
from f_risk_source R
<!-- from f_risk_source R-->
left join f_fire_equipment B on B.risk_source_id = R.id AND B.equip_classify = 0
<!-- left join f_fire_equipment B on B.risk_source_id = R.id AND B.equip_classify = 0-->
where 1=1
<!-- where 1=1-->
AND B.id is not null
<!-- AND B.id is not null-->
</when
>
<!-- </when>--
>
<when
test=
"type == 'video'"
>
<!-- <when test="type == 'video'">--
>
select
<!-- select-->
B.id,B.risk_source_id as parent_id,
<!-- B.id,B.risk_source_id as parent_id,-->
<choose
>
<!-- <choose>--
>
<when
test=
"channelType == '3dpage'"
>
<!-- <when test="channelType == '3dpage'">--
>
IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d))
<![CDATA[ <]]>
1,0,1) as is_bind,
<!-- IF(ISNULL(B.position3d) || LENGTH(trim(B.position3d)) <![CDATA[ <]]> 1,0,1) as is_bind,-->
</when
>
<!-- </when>--
>
<otherwise
>
<!-- <otherwise>--
>
IF(ISNULL(IF(replace(trim(B.ue4_rotation),'[]','')='',NULL,B.ue4_rotation))
<!-- IF(ISNULL(IF(replace(trim(B.ue4_rotation),'[]','')='',NULL,B.ue4_rotation))-->
AND ISNULL(IF(replace(trim(B.ue4_location),'[]','')='',NULL,B.ue4_location)),0,1) as is_bind,
<!-- AND ISNULL(IF(replace(trim(B.ue4_location),'[]','')='',NULL,B.ue4_location)),0,1) as is_bind,-->
</otherwise
>
<!-- </otherwise>--
>
</choose
>
<!-- </choose>--
>
#{type} as type,
<!-- #{type} as type,-->
B.name,B.code,B.ue4_location,B.ue4_rotation,
<!-- B.name,B.code,B.ue4_location,B.ue4_rotation,-->
0 as is_region,
<!-- 0 as is_region,-->
B.position3d
<!-- B.position3d-->
from f_risk_source R
<!-- from f_risk_source R-->
left join f_fire_equipment B on B.risk_source_id = R.id AND B.equip_classify = 2
<!-- left join f_fire_equipment B on B.risk_source_id = R.id AND B.equip_classify = 2-->
where 1=1
<!-- where 1=1-->
AND B.id is not null
<!-- AND B.id is not null-->
</when
>
<!-- </when>--
>
<when
test=
"type == 'fireEquipment'"
>
<!-- <when test="type == 'fireEquipment'">--
>
select tmp.id,tmp.name,tmp.type,tmp.position3d,tmp.ue4_rotation,tmp.ue4_location,tmp.code,R.id as parent_id,
<!-- select tmp.id,tmp.name,tmp.type,tmp.position3d,tmp.ue4_rotation,tmp.ue4_location,tmp.code,R.id as parent_id,-->
<choose
>
<!-- <choose>--
>
<when
test=
"channelType == '3dpage'"
>
<!-- <when test="channelType == '3dpage'">--
>
IF(ISNULL(tmp.position3d) || LENGTH(trim(tmp.position3d))
<![CDATA[ <]]>
1,0,1) as isBind
<!-- IF(ISNULL(tmp.position3d) || LENGTH(trim(tmp.position3d)) <![CDATA[ <]]> 1,0,1) as isBind-->
</when
>
<!-- </when>--
>
<otherwise
>
<!-- <otherwise>--
>
IF(ISNULL(IF(replace(trim(tmp.ue4_rotation),'[]','')='',NULL,tmp.ue4_rotation))
<!-- IF(ISNULL(IF(replace(trim(tmp.ue4_rotation),'[]','')='',NULL,tmp.ue4_rotation))-->
AND ISNULL(IF(replace(trim(tmp.ue4_location),'[]','')='',NULL,tmp.ue4_location)),0,1) as isBind
<!-- AND ISNULL(IF(replace(trim(tmp.ue4_location),'[]','')='',NULL,tmp.ue4_location)),0,1) as isBind-->
</otherwise
>
<!-- </otherwise>--
>
</choose
>
<!-- </choose>--
>
from (
<!-- from (-->
select id,name,'fireCar' as type,position3d,car_num as code,ue4_location,ue4_rotation,risk_source_id
<!-- select id,name,'fireCar' as type,position3d,car_num as code,ue4_location,ue4_rotation,risk_source_id-->
from f_fire_car
<!-- from f_fire_car-->
union all
<!-- union all-->
select id,name,'fireEquipment' as type,position3d,code,ue4_location,ue4_rotation,risk_source_id
<!-- select id,name,'fireEquipment' as type,position3d,code,ue4_location,ue4_rotation,risk_source_id-->
from f_fire_equipment
<!-- from f_fire_equipment-->
where equip_classify =3
<!-- where equip_classify =3-->
union all
<!-- union all-->
select id,name,CASE
<!-- select id,name,CASE-->
WHEN S.type = 1 then 'fireChamber'
<!-- WHEN S.type = 1 then 'fireChamber'-->
WHEN S.type = 2 then 'fireFoamRoom'
<!-- WHEN S.type = 2 then 'fireFoamRoom'-->
END as type,position3d,code,ue4_location,ue4_rotation,risk_source_id
<!-- END as type,position3d,code,ue4_location,ue4_rotation,risk_source_id-->
from f_fire_station s
<!-- from f_fire_station s-->
union all
<!-- union all-->
select id,name,
<!-- select id,name,-->
CASE
<!-- CASE-->
WHEN W.type = 1 then 'hydrant'
<!-- WHEN W.type = 1 then 'hydrant'-->
WHEN W.type = 2 then 'pool'
<!-- WHEN W.type = 2 then 'pool'-->
END as type,position3d,code,ue4_location,ue4_rotation,risk_source_id
<!-- END as type,position3d,code,ue4_location,ue4_rotation,risk_source_id-->
from f_water_resource w
<!-- from f_water_resource w-->
) tmp
<!-- ) tmp-->
left join f_risk_source R on R.id = tmp.risk_source_id
<!-- left join f_risk_source R on R.id = tmp.risk_source_id-->
</when
>
<!-- </when>--
>
</choose
>
<!-- </choose>--
>
<if
test=
"orgCode != null"
>
<!-- <if test="orgCode != null">--
>
AND (R.org_code = #{orgCode} OR R.org_code like CONCAT(#{orgCode},'-%'))
<!-- AND (R.org_code = #{orgCode} OR R.org_code like CONCAT(#{orgCode},'-%'))-->
</if
>
<!-- </if>--
>
</select
>
<!-- </select>--
>
<select
id=
"getPointDetailByTypeAndId"
resultType=
"java.util.HashMap"
>
<!-- <select id="getPointDetailByTypeAndId" resultType="java.util.HashMap">--
>
<choose
>
<!-- <choose>--
>
<when
test=
"type == 'riskSource'"
>
<!-- <when test="type == 'riskSource'">--
>
select rs.id,rs.name,rs.code,rs.ue4_location as ue4Location,rs.ue4_rotation as ue4Rotation,rs.position3d,
<!-- select rs.id,rs.name,rs.code,rs.ue4_location as ue4Location,rs.ue4_rotation as ue4Rotation,rs.position3d,-->
rl.level,rl.name as levelStr,rs.floor3d ,rs.is_indoor as isIndoor,
<!-- rl.level,rl.name as levelStr,rs.floor3d ,rs.is_indoor as isIndoor,-->
rs.flicker_frequency as frequency,
<!-- rs.flicker_frequency as frequency,-->
true as 'showInfo',
<!-- true as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
rs.rpn as title
<!-- rs.rpn as title-->
from f_risk_source rs
<!-- from f_risk_source rs-->
left join f_risk_level rl ON rl.id = rs.risk_level_id
<!-- left join f_risk_level rl ON rl.id = rs.risk_level_id-->
where 1=1
<!-- where 1=1-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND rs.id = #{pointId}
<!-- AND rs.id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'patrol'"
>
<!-- <when test="type == 'patrol'">--
>
select id,name,point_no as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,coordinates as position3d,
<!-- select id,name,point_no as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,coordinates as position3d,-->
status,floor as floor3d,is_indoor as isIndoor,
<!-- status,floor as floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
case p.status
<!-- case p.status-->
when '0' then false
<!-- when '0' then false-->
when '1' then false
<!-- when '1' then false-->
else true
<!-- else true-->
end as `showInfo`,
<!-- end as `showInfo`,-->
case p.status
<!-- case p.status-->
when '0' then '未计划'
<!-- when '0' then '未计划'-->
when '1' then '合格'
<!-- when '1' then '合格'-->
when '2' then '不合格'
<!-- when '2' then '不合格'-->
when '3' then '漏检'
<!-- when '3' then '漏检'-->
end as title,
<!-- end as title,-->
case p.status
<!-- case p.status-->
when '0' then '未计划'
<!-- when '0' then '未计划'-->
when '1' then '合格'
<!-- when '1' then '合格'-->
when '2' then '不合格'
<!-- when '2' then '不合格'-->
when '3' then '漏检'
<!-- when '3' then '漏检'-->
end as levelStr,
<!-- end as levelStr,-->
#{type} as type,
<!-- #{type} as type,-->
status as level
<!-- status as level-->
from p_point p
<!-- from p_point p-->
where 1=1 and is_delete = 0
<!-- where 1=1 and is_delete = 0-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'impEquipment'"
>
<!-- <when test="type == 'impEquipment'">--
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
false as 'showInfo',
<!-- false as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_equipment
<!-- from f_equipment-->
where 1=1
<!-- where 1=1-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'monitorEquipment'"
>
<!-- <when test="type == 'monitorEquipment'">--
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
false as 'showInfo',
<!-- false as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_fire_equipment
<!-- from f_fire_equipment-->
where equip_classify = 0
<!-- where equip_classify = 0-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'video'"
>
<!-- <when test="type == 'video'">--
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
false as 'showInfo',
<!-- false as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_fire_equipment
<!-- from f_fire_equipment-->
where equip_classify = 2
<!-- where equip_classify = 2-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'hydrant'"
>
<!-- <when test="type == 'hydrant'">--
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
false as 'showInfo',
<!-- false as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_water_resource
<!-- from f_water_resource-->
where type = 1
<!-- where type = 1-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'pool'"
>
<!-- <when test="type == 'pool'">--
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
false as 'showInfo',
<!-- false as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_water_resource
<!-- from f_water_resource-->
where type = 2
<!-- where type = 2-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'fireCar'"
>
<!-- <when test="type == 'fireCar'">--
>
select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
true as 'showInfo',
<!-- true as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_fire_car
<!-- from f_fire_car-->
where 1=1
<!-- where 1=1-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'fireEquipment'"
>
<!-- <when test="type == 'fireEquipment'">--
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
true as 'showInfo',
<!-- true as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_fire_equipment
<!-- from f_fire_equipment-->
where equip_classify = 3
<!-- where equip_classify = 3-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'fireChamber'"
>
<!-- <when test="type == 'fireChamber'">--
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
true as 'showInfo',
<!-- true as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_fire_station
<!-- from f_fire_station-->
where type = 1
<!-- where type = 1-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
<when
test=
"type == 'fireFoamRoom'"
>
<!-- <when test="type == 'fireFoamRoom'">--
>
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,position3d,-->
floor3d,is_indoor as isIndoor,
<!-- floor3d,is_indoor as isIndoor,-->
0 as frequency,
<!-- 0 as frequency,-->
true as 'showInfo',
<!-- true as 'showInfo',-->
#{type} as type,
<!-- #{type} as type,-->
name as 'title'
<!-- name as 'title'-->
from f_fire_station
<!-- from f_fire_station-->
where type = 2
<!-- where type = 2-->
<if
test=
"pointId != null"
>
<!-- <if test="pointId != null">--
>
AND id = #{pointId}
<!-- AND id = #{pointId}-->
</if
>
<!-- </if>--
>
</when
>
<!-- </when>--
>
</choose
>
<!-- </choose>--
>
</select
>
<!-- </select>--
>
<select
id=
"getSafetyIndexWeek"
resultType=
"java.util.HashMap"
>
<select
id=
"getSafetyIndexWeek"
resultType=
"java.util.HashMap"
>
<![CDATA[
<![CDATA[
...
@@ -523,226 +523,226 @@
...
@@ -523,226 +523,226 @@
limit 0,5
limit 0,5
</select>
</select>
<select
id=
"getPintsByType"
resultType=
"hashmap"
>
<!-- <select id="getPintsByType" resultType="hashmap">--
>
select CONCAT(type,'-',id) as `key`,sp.* from
<!-- select CONCAT(type,'-',id) as `key`,sp.* from-->
(select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'riskSource' as type,org_code as orgCode,
<!-- (select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'riskSource' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_risk_source where is_region = 'FALSE'
<!-- from f_risk_source where is_region = 'FALSE'-->
UNION all
<!-- UNION all-->
select id,name,point_no as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'patrol' as type,org_code as orgCode,
<!-- select id,name,point_no as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'patrol' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from p_point WHERE is_delete = FALSE
<!-- from p_point WHERE is_delete = FALSE-->
UNION all
<!-- UNION all-->
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode,-->
tmp.relationKeys
<!-- tmp.relationKeys-->
from f_equipment e
<!-- from f_equipment e-->
LEFT JOIN
<!-- LEFT JOIN-->
(select GROUP_CONCAT(fire_equipment_id) as relationKeys,equipment_id from f_equipment_fire_equipment GROUP BY equipment_id) tmp
<!-- (select GROUP_CONCAT(fire_equipment_id) as relationKeys,equipment_id from f_equipment_fire_equipment GROUP BY equipment_id) tmp-->
ON TMP.equipment_id = e.id
<!-- ON TMP.equipment_id = e.id-->
UNION all
<!-- UNION all-->
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'monitorEquipment' as type,org_code as orgCode,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'monitorEquipment' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_fire_equipment where equip_classify = 0
<!-- from f_fire_equipment where equip_classify = 0-->
UNION all
<!-- UNION all-->
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'video' as type,org_code as orgCode,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'video' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_fire_equipment where equip_classify = 2
<!-- from f_fire_equipment where equip_classify = 2-->
UNION all
<!-- UNION all-->
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'hydrant' as type,org_code as orgCode,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'hydrant' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_water_resource where type = 1
<!-- from f_water_resource where type = 1-->
UNION all
<!-- UNION all-->
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'pool' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_water_resource where type = 2
<!-- from f_water_resource where type = 2-->
UNION all
<!-- UNION all-->
select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode,
<!-- select id,name,car_num as code,ue4_location as ue4Location,ue4_rotation as ue4Rotation, 'fireCar' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_fire_car
<!-- from f_fire_car-->
UNION all
<!-- UNION all-->
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation,'fireEquipment' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_fire_equipment where equip_classify = 3
<!-- from f_fire_equipment where equip_classify = 3-->
UNION all
<!-- UNION all-->
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation , 'fireChamber' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_fire_station where type = 2
<!-- from f_fire_station where type = 2-->
UNION all
<!-- UNION all-->
select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode,
<!-- select id,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'fireFoamRoom' as type,org_code as orgCode,-->
null as relationKeys
<!-- null as relationKeys-->
from f_fire_station where type = 1
<!-- from f_fire_station where type = 1-->
) as sp
<!-- ) as sp-->
where
<!-- where-->
sp.orgCode = #{orgCode}
<!-- sp.orgCode = #{orgCode}-->
<if
test=
"type!=null"
>
and sp.type =#{type}
</if
>
<!-- <if test="type!=null">and sp.type =#{type}</if>--
>
</select
>
<!-- </select>--
>
<select
id=
"getImpEqu3dPoints"
resultType=
"com.yeejoin.amos.fas.business.vo.View3dNodeVo"
>
<!-- <select id="getImpEqu3dPoints" resultType="com.yeejoin.amos.fas.business.vo.View3dNodeVo">--
>
SELECT id,name,code,ue4_location,ue4_rotation,
<!-- SELECT id,name,code,ue4_location,ue4_rotation,-->
case
<!-- case-->
when equip_classify= 0 then 'monitorEquipment'
<!-- when equip_classify= 0 then 'monitorEquipment'-->
when equip_classify= 2 then 'video'
<!-- when equip_classify= 2 then 'video'-->
when equip_classify= 3 then 'fireEquipment'
<!-- when equip_classify= 3 then 'fireEquipment'-->
end as type,
<!-- end as type,-->
case
<!-- case-->
when equip_classify= 0 then 'monitorEquipment'
<!-- when equip_classify= 0 then 'monitorEquipment'-->
when equip_classify= 2 then 'video'
<!-- when equip_classify= 2 then 'video'-->
when equip_classify= 3 then 'fireEquipment'
<!-- when equip_classify= 3 then 'fireEquipment'-->
end as level,
<!-- end as level,-->
null as relationKeys,
<!-- null as relationKeys,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(fe.position3d) || LENGTH(trim(fe.position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(fe.position3d) || LENGTH(trim(fe.position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(fe.position3d, ',', 1),
<!-- substring_index(fe.position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(fe.position3d, ',', - 2),
<!-- substring_index(fe.position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(fe.position3d, ',', - 1),
<!-- substring_index(fe.position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END position,
<!-- END position,-->
concat('monitorEquipment-',fe.id) as `key`
<!-- concat('monitorEquipment-',fe.id) as `key`-->
FROM f_fire_equipment fe
<!-- FROM f_fire_equipment fe-->
WHERE fe.id IN (
<!-- WHERE fe.id IN (-->
select fire_equipment_id from f_equipment_fire_equipment
<!-- select fire_equipment_id from f_equipment_fire_equipment-->
) AND (org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%'))
<!-- ) AND (org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%'))-->
AND fe.equip_classify
<![CDATA[ <> ]]>
1
<!-- AND fe.equip_classify <![CDATA[ <> ]]> 1-->
UNION ALL
<!-- UNION ALL-->
SELECT e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,'impEquipment' as type,'impEquipment' as level,
<!-- SELECT e.id,e.name,e.code,e.ue4_location,e.ue4_rotation,'impEquipment' as type,'impEquipment' as level,-->
TMP.relationKeys,
<!-- TMP.relationKeys,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(e.position3d) || LENGTH(trim(e.position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(e.position3d) || LENGTH(trim(e.position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(e.position3d, ',', 1),
<!-- substring_index(e.position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(e.position3d, ',', - 2),
<!-- substring_index(e.position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(e.position3d, ',', - 1),
<!-- substring_index(e.position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END position,
<!-- END position,-->
concat('impEquipment-',e.id) as `key`
<!-- concat('impEquipment-',e.id) as `key`-->
FROM f_equipment e
<!-- FROM f_equipment e-->
LEFT JOIN
<!-- LEFT JOIN-->
(select GROUP_CONCAT(fire_equipment_id) as relationKeys,equipment_id from f_equipment_fire_equipment GROUP BY equipment_id) tmp
<!-- (select GROUP_CONCAT(fire_equipment_id) as relationKeys,equipment_id from f_equipment_fire_equipment GROUP BY equipment_id) tmp-->
ON TMP.equipment_id = e.id
<!-- ON TMP.equipment_id = e.id-->
WHERE e.org_code = #{orgCode} OR e.org_code like CONCAT(#{orgCode},'-%')
<!-- WHERE e.org_code = #{orgCode} OR e.org_code like CONCAT(#{orgCode},'-%')-->
UNION ALL
<!-- UNION ALL-->
SELECT id,name,code,ue4_location,ue4_rotation,
<!-- SELECT id,name,code,ue4_location,ue4_rotation,-->
case type
<!-- case type-->
when 1 then 'hydrant'
<!-- when 1 then 'hydrant'-->
when 2 then 'pool'
<!-- when 2 then 'pool'-->
end as type,
<!-- end as type,-->
case type
<!-- case type-->
when 1 then 'hydrant'
<!-- when 1 then 'hydrant'-->
when 2 then 'pool'
<!-- when 2 then 'pool'-->
end as level,
<!-- end as level,-->
null as relationKeys,
<!-- null as relationKeys,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(position3d) || LENGTH(trim(position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(position3d) || LENGTH(trim(position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(position3d, ',', 1),
<!-- substring_index(position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(position3d, ',', - 2),
<!-- substring_index(position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(position3d, ',', - 1),
<!-- substring_index(position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END position,
<!-- END position,-->
case type
<!-- case type-->
when 1 then concat('hydrant-',id)
<!-- when 1 then concat('hydrant-',id)-->
when 2 then concat('pool-',id)
<!-- when 2 then concat('pool-',id)-->
end as `key`
<!-- end as `key`-->
FROM f_water_resource
<!-- FROM f_water_resource-->
WHERE org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%')
<!-- WHERE org_code = #{orgCode} OR org_code like CONCAT(#{orgCode},'-%')-->
UNION ALL
<!-- UNION ALL-->
SELECT id,name,code,ue4_location,ue4_rotation,
<!-- SELECT id,name,code,ue4_location,ue4_rotation,-->
case
<!-- case-->
when type = 1 then 'fireChamber'
<!-- when type = 1 then 'fireChamber'-->
when type = 2 then 'fireFoamRoom'
<!-- when type = 2 then 'fireFoamRoom'-->
end as type,
<!-- end as type,-->
case
<!-- case-->
when type = 1 then 'fireChamber'
<!-- when type = 1 then 'fireChamber'-->
when type = 2 then 'fireFoamRoom'
<!-- when type = 2 then 'fireFoamRoom'-->
end as level,
<!-- end as level,-->
null as relationKeys,
<!-- null as relationKeys,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(position3d) || LENGTH(trim(position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(position3d) || LENGTH(trim(position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(position3d, ',', 1),
<!-- substring_index(position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(position3d, ',', - 2),
<!-- substring_index(position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(position3d, ',', - 1),
<!-- substring_index(position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END position,
<!-- END position,-->
concat('fireChamber-',id) as `key`
<!-- concat('fireChamber-',id) as `key`-->
FROM f_fire_station
<!-- FROM f_fire_station-->
WHERE org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%')
<!-- WHERE org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%')-->
UNION ALL
<!-- UNION ALL-->
SELECT id,name,car_num as code,ue4_location,ue4_rotation,'fireCar' as type,'fireCar' as level,
<!-- SELECT id,name,car_num as code,ue4_location,ue4_rotation,'fireCar' as type,'fireCar' as level,-->
null as relationKeys,
<!-- null as relationKeys,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(position3d) || LENGTH(trim(position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(position3d) || LENGTH(trim(position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(position3d, ',', 1),
<!-- substring_index(position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(position3d, ',', - 2),
<!-- substring_index(position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(position3d, ',', - 1),
<!-- substring_index(position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END position,
<!-- END position,-->
concat('fireCar-',id) as `key`
<!-- concat('fireCar-',id) as `key`-->
FROM f_fire_car
<!-- FROM f_fire_car-->
WHERE org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%')
<!-- WHERE org_code = #{orgCode} OR org_code LIKE CONCAT(#{orgCode},'-%')-->
</select
>
<!-- </select>--
>
<select
id=
"initViewErrorNode"
resultType=
"com.yeejoin.amos.fas.business.vo.View3dNodeVo"
>
<select
id=
"initViewErrorNode"
resultType=
"com.yeejoin.amos.fas.business.vo.View3dNodeVo"
>
select * from (
select * from (
...
@@ -811,409 +811,409 @@
...
@@ -811,409 +811,409 @@
</if>
</if>
</select>
</select>
<select
id=
"findViewDataByType"
resultType=
"com.yeejoin.amos.fas.core.common.response.Node3DVoResponse"
>
<!-- <select id="findViewDataByType" resultType="com.yeejoin.amos.fas.core.common.response.Node3DVoResponse">--
>
SELECT
<!-- SELECT-->
*
<!-- *-->
FROM
<!-- FROM-->
(
<!-- (-->
SELECT
<!-- SELECT-->
rs.code,
<!-- rs.code,-->
rs.id,
<!-- rs.id,-->
rs.is_indoor inDoor,
<!-- rs.is_indoor inDoor,-->
CONCAT('riskSource-', rs.id) 'key',
<!-- CONCAT('riskSource-', rs.id) 'key',-->
rs.`name` label,
<!-- rs.`name` label,-->
rl.`level` 'level',
<!-- rl.`level` 'level',-->
CONCAT('level_', rl.`level`) levelStr,
<!-- CONCAT('level_', rl.`level`) levelStr,-->
CONCAT('floor_1', floor3d) objKey,
<!-- CONCAT('floor_1', floor3d) objKey,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(rs.position3d) || LENGTH(trim(rs.position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(rs.position3d) || LENGTH(trim(rs.position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(rs.position3d, ',', 1),
<!-- substring_index(rs.position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(rs.position3d, ',', - 2),
<!-- substring_index(rs.position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(rs.position3d, ',', - 1),
<!-- substring_index(rs.position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END positionDTO,
<!-- END positionDTO,-->
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
<!-- '{ "x": 0, "y": 0, "z": 0 }' rotationDTO,-->
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
<!-- '{ "x": 1, "y": 1, "z": 1 }' scaleDTO,-->
true as showInfo,
<!-- true as showInfo,-->
rs.rpn as title,
<!-- rs.rpn as title,-->
'riskSource' type,
<!-- 'riskSource' type,-->
rs.org_code as orgCode,
<!-- rs.org_code as orgCode,-->
rs.id as riskSourceId,
<!-- rs.id as riskSourceId,-->
rs.flicker_frequency as frequency,
<!-- rs.flicker_frequency as frequency,-->
if('NORMAL'=rs.status,FALSE,TRUE) as twinkle
<!-- if('NORMAL'=rs.status,FALSE,TRUE) as twinkle-->
FROM
<!-- FROM-->
f_risk_source rs
<!-- f_risk_source rs-->
LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id
<!-- LEFT JOIN f_risk_level rl ON rl.id = rs.risk_level_id-->
WHERE
<!-- WHERE-->
rs.position3d IS NOT NULL
<!-- rs.position3d IS NOT NULL-->
AND rs.position3d != ''
<!-- AND rs.position3d != ''-->
AND rs.risk_level_id is not null
<!-- AND rs.risk_level_id is not null-->
<if
test=
"abnormalStatus != false"
>
<!-- <if test="abnormalStatus != false">--
>
AND rs.status = 'ANOMALY'
<!-- AND rs.status = 'ANOMALY'-->
</if
>
<!-- </if>--
>
AND rs.is_region
<![CDATA[<>]]>
'TRUE'
<!-- AND rs.is_region <![CDATA[<>]]> 'TRUE'-->
UNION ALL
<!-- UNION ALL-->
SELECT
<!-- SELECT-->
eq.code,
<!-- eq.code,-->
id,
<!-- id,-->
is_indoor inDoor,
<!-- is_indoor inDoor,-->
CONCAT('impEquipment-', id) 'key',
<!-- CONCAT('impEquipment-', id) 'key',-->
`name` label,
<!-- `name` label,-->
'0' LEVEL,
<!-- '0' LEVEL,-->
'level_0' levelStr,
<!-- 'level_0' levelStr,-->
CONCAT('floor_1', floor3d) objKey,
<!-- CONCAT('floor_1', floor3d) objKey,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(eq.position3d) || LENGTH(trim(eq.position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(eq.position3d) || LENGTH(trim(eq.position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(eq.position3d, ',', 1),
<!-- substring_index(eq.position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(eq.position3d, ',', - 2),
<!-- substring_index(eq.position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(eq.position3d, ',', - 1),
<!-- substring_index(eq.position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END positionDTO,
<!-- END positionDTO,-->
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
<!-- '{ "x": 0, "y": 0, "z": 0 }' rotationDTO,-->
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
<!-- '{ "x": 1, "y": 1, "z": 1 }' scaleDTO,-->
FALSE as showInfo,
<!-- FALSE as showInfo,-->
name as title,
<!-- name as title,-->
'impEquipment' type,
<!-- 'impEquipment' type,-->
eq.org_code as orgCode,
<!-- eq.org_code as orgCode,-->
eq.risk_source_id as riskSourceId,
<!-- eq.risk_source_id as riskSourceId,-->
0 as frequency,
<!-- 0 as frequency,-->
FALSE as twinkle
<!-- FALSE as twinkle-->
FROM
<!-- FROM-->
f_equipment eq
<!-- f_equipment eq-->
WHERE
<!-- WHERE-->
position3d IS NOT NULL
<!-- position3d IS NOT NULL-->
AND eq.risk_source_id in (select id from f_risk_source where is_region='TRUE')
<!-- AND eq.risk_source_id in (select id from f_risk_source where is_region='TRUE')-->
AND position3d != ''
<!-- AND position3d != ''-->
<if
test=
"abnormalStatus != false"
>
<!-- <if test="abnormalStatus != false">--
>
AND eq.id in
<!-- AND eq.id in-->
(select equipment_id from f_equipment_fire_equipment fefe
<!-- (select equipment_id from f_equipment_fire_equipment fefe-->
left join f_fire_equipment fe ON fe.id = fefe.fire_equipment_id
<!-- left join f_fire_equipment fe ON fe.id = fefe.fire_equipment_id-->
where fe.equip_status = 1)
<!-- where fe.equip_status = 1)-->
</if
>
<!-- </if>--
>
UNION ALL
<!-- UNION ALL-->
select
<!-- select-->
p.point_no code,
<!-- p.point_no code,-->
p.id,
<!-- p.id,-->
p.is_indoor as inDoor,
<!-- p.is_indoor as inDoor,-->
CONCAT('patrol',p.id) as `key`,
<!-- CONCAT('patrol',p.id) as `key`,-->
p.name,
<!-- p.name,-->
p.status as LEVEL,
<!-- p.status as LEVEL,-->
CONCAT('level_',p.status) as levelStr,
<!-- CONCAT('level_',p.status) as levelStr,-->
CONCAT('floor',p.floor) as objKey,
<!-- CONCAT('floor',p.floor) as objKey,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(p.coordinates) || LENGTH(trim(p.coordinates))
<![CDATA[ <]]>
1
<!-- ISNULL(p.coordinates) || LENGTH(trim(p.coordinates)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(p.coordinates, ',', 1),
<!-- substring_index(p.coordinates, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(p.coordinates, ',', - 2),
<!-- substring_index(p.coordinates, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(p.coordinates, ',', - 1),
<!-- substring_index(p.coordinates, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END positionDTO,
<!-- END positionDTO,-->
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
<!-- '{ "x": 0, "y": 0, "z": 0 }' rotationDTO,-->
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
<!-- '{ "x": 1, "y": 1, "z": 1 }' scaleDTO,-->
case p.status
<!-- case p.status-->
when '0'
<!-- when '0'-->
then false
<!-- then false-->
else
<!-- else-->
true
<!-- true-->
end as `showInfo`,
<!-- end as `showInfo`,-->
p.name as title,
<!-- p.name as title,-->
'patrol' as type,
<!-- 'patrol' as type,-->
p.org_code as orgCode,
<!-- p.org_code as orgCode,-->
p.risk_source_id as riskSourceId,
<!-- p.risk_source_id as riskSourceId,-->
0 as frequency,
<!-- 0 as frequency,-->
if(p.status > 1 ,TRUE,FALSE) as twinkle
<!-- if(p.status > 1 ,TRUE,FALSE) as twinkle-->
from
<!-- from-->
p_point p
<!-- p_point p-->
left join f_risk_source rs on p.risk_source_id = rs.id AND rs.is_region='TRUE'
<!-- left join f_risk_source rs on p.risk_source_id = rs.id AND rs.is_region='TRUE'-->
where rs.id is not null
<!-- where rs.id is not null-->
<if
test=
"abnormalStatus != false"
>
<!-- <if test="abnormalStatus != false">--
>
AND p.status in ('0','2','3')
<!-- AND p.status in ('0','2','3')-->
</if
>
<!-- </if>--
>
AND p.coordinates != '' AND p.coordinates is not null AND p.is_delete = 0
<!-- AND p.coordinates != '' AND p.coordinates is not null AND p.is_delete = 0-->
UNION ALL
<!-- UNION ALL-->
select
<!-- select-->
fe.code,
<!-- fe.code,-->
fe.id,
<!-- fe.id,-->
fe.is_indoor as inDoor,
<!-- fe.is_indoor as inDoor,-->
case
<!-- case-->
when fe.equip_classify = 0 then CONCAT('monitorEquipment',fe.id)
<!-- when fe.equip_classify = 0 then CONCAT('monitorEquipment',fe.id)-->
when fe.equip_classify = 3 then CONCAT('fireEquipment',fe.id)
<!-- when fe.equip_classify = 3 then CONCAT('fireEquipment',fe.id)-->
end as `key`,
<!-- end as `key`,-->
fe.name,
<!-- fe.name,-->
'' as LEVEL,
<!-- '' as LEVEL,-->
'' as levelStr,
<!-- '' as levelStr,-->
CONCAT('floor',fe.floor3d) as objKey,
<!-- CONCAT('floor',fe.floor3d) as objKey,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(fe.position3d) || LENGTH(trim(fe.position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(fe.position3d) || LENGTH(trim(fe.position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(fe.position3d, ',', 1),
<!-- substring_index(fe.position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(fe.position3d, ',', - 2),
<!-- substring_index(fe.position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(fe.position3d, ',', - 1),
<!-- substring_index(fe.position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END positionDTO,
<!-- END positionDTO,-->
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
<!-- '{ "x": 0, "y": 0, "z": 0 }' rotationDTO,-->
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
<!-- '{ "x": 1, "y": 1, "z": 1 }' scaleDTO,-->
false as `showInfo`,
<!-- false as `showInfo`,-->
fe.name as title,
<!-- fe.name as title,-->
case
<!-- case-->
when fe.equip_classify = 0 then 'monitorEquipment'
<!-- when fe.equip_classify = 0 then 'monitorEquipment'-->
when fe.equip_classify = 3 then 'fireEquipment'
<!-- when fe.equip_classify = 3 then 'fireEquipment'-->
end as type,
<!-- end as type,-->
fe.org_code as orgCode,
<!-- fe.org_code as orgCode,-->
fe.risk_source_id as riskSourceId,
<!-- fe.risk_source_id as riskSourceId,-->
0 as frequency,
<!-- 0 as frequency,-->
false as twinkle
<!-- false as twinkle-->
from
<!-- from-->
f_fire_equipment fe
<!-- f_fire_equipment fe-->
left join f_risk_source rs on fe.risk_source_id = rs.id AND rs.is_region='TRUE'
<!-- left join f_risk_source rs on fe.risk_source_id = rs.id AND rs.is_region='TRUE'-->
where rs.id is not null
<!-- where rs.id is not null-->
<if
test=
"abnormalStatus != false"
>
<!-- <if test="abnormalStatus != false">--
>
AND fe.equip_status = 1
<!-- AND fe.equip_status = 1-->
</if
>
<!-- </if>--
>
AND fe.equip_classify in (0,2,3)
<!-- AND fe.equip_classify in (0,2,3)-->
AND fe.position3d != '' AND fe.position3d is not null
<!-- AND fe.position3d != '' AND fe.position3d is not null-->
UNION ALL
<!-- UNION ALL-->
select
<!-- select-->
c.car_num code,
<!-- c.car_num code,-->
c.id,
<!-- c.id,-->
c.is_indoor as inDoor,
<!-- c.is_indoor as inDoor,-->
CONCAT('fireCar',c.id) as `key`,
<!-- CONCAT('fireCar',c.id) as `key`,-->
c.name,
<!-- c.name,-->
'' as LEVEL,
<!-- '' as LEVEL,-->
'' as levelStr,
<!-- '' as levelStr,-->
CONCAT('floor',c.floor3d) as objKey,
<!-- CONCAT('floor',c.floor3d) as objKey,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(c.position3d) || LENGTH(trim(c.position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(c.position3d) || LENGTH(trim(c.position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(c.position3d, ',', 1),
<!-- substring_index(c.position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(c.position3d, ',', - 2),
<!-- substring_index(c.position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(c.position3d, ',', - 1),
<!-- substring_index(c.position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END positionDTO,
<!-- END positionDTO,-->
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
<!-- '{ "x": 0, "y": 0, "z": 0 }' rotationDTO,-->
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
<!-- '{ "x": 1, "y": 1, "z": 1 }' scaleDTO,-->
false as `showInfo`,
<!-- false as `showInfo`,-->
c.name as title,
<!-- c.name as title,-->
'fireCar' as type,
<!-- 'fireCar' as type,-->
c.org_code as orgCode,
<!-- c.org_code as orgCode,-->
c.risk_source_id as riskSourceId,
<!-- c.risk_source_id as riskSourceId,-->
0 as frequency,
<!-- 0 as frequency,-->
false as twinkle
<!-- false as twinkle-->
from f_fire_car c
<!-- from f_fire_car c-->
left join f_risk_source rs on c.risk_source_id = rs.id AND rs.is_region='TRUE'
<!-- left join f_risk_source rs on c.risk_source_id = rs.id AND rs.is_region='TRUE'-->
where rs.id is not null
<!-- where rs.id is not null-->
AND c.position3d != '' AND c.position3d is not null
<!-- AND c.position3d != '' AND c.position3d is not null-->
UNION ALL
<!-- UNION ALL-->
select
<!-- select-->
s.code,
<!-- s.code,-->
s.id,
<!-- s.id,-->
s.is_indoor as inDoor,
<!-- s.is_indoor as inDoor,-->
case
<!-- case-->
when S.type = 1 then CONCAT('fireChamber',s.id)
<!-- when S.type = 1 then CONCAT('fireChamber',s.id)-->
when S.type = 2 then CONCAT('fireFoamRoom',s.id)
<!-- when S.type = 2 then CONCAT('fireFoamRoom',s.id)-->
end as `key`,
<!-- end as `key`,-->
s.name,
<!-- s.name,-->
'' as LEVEL,
<!-- '' as LEVEL,-->
'' as levelStr,
<!-- '' as levelStr,-->
CONCAT('floor',s.floor3d) as objKey,
<!-- CONCAT('floor',s.floor3d) as objKey,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(s.position3d) || LENGTH(trim(s.position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(s.position3d) || LENGTH(trim(s.position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(s.position3d, ',', 1),
<!-- substring_index(s.position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(s.position3d, ',', - 2),
<!-- substring_index(s.position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(s.position3d, ',', - 1),
<!-- substring_index(s.position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END positionDTO,
<!-- END positionDTO,-->
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
<!-- '{ "x": 0, "y": 0, "z": 0 }' rotationDTO,-->
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
<!-- '{ "x": 1, "y": 1, "z": 1 }' scaleDTO,-->
false as `showInfo`,
<!-- false as `showInfo`,-->
s.name as title,
<!-- s.name as title,-->
case
<!-- case-->
when S.type = 1 then 'fireChamber'
<!-- when S.type = 1 then 'fireChamber'-->
when S.type = 2 then 'fireFoamRoom'
<!-- when S.type = 2 then 'fireFoamRoom'-->
end as type,
<!-- end as type,-->
s.org_code as orgCode,
<!-- s.org_code as orgCode,-->
s.risk_source_id as riskSourceId,
<!-- s.risk_source_id as riskSourceId,-->
0 as frequency,
<!-- 0 as frequency,-->
false as twinkle
<!-- false as twinkle-->
from
<!-- from-->
f_fire_station s
<!-- f_fire_station s-->
left join f_risk_source rs on s.risk_source_id = rs.id AND rs.is_region='TRUE'
<!-- left join f_risk_source rs on s.risk_source_id = rs.id AND rs.is_region='TRUE'-->
where rs.id is not null
<!-- where rs.id is not null-->
AND s.position3d != '' AND s.position3d is not null
<!-- AND s.position3d != '' AND s.position3d is not null-->
UNION ALL
<!-- UNION ALL-->
SELECT
<!-- SELECT-->
wlv.CODE,
<!-- wlv.CODE,-->
wlv.id,
<!-- wlv.id,-->
'' AS inDoor,
<!-- '' AS inDoor,-->
CONCAT( 'video', wlv.id ) AS `key`,
<!-- CONCAT( 'video', wlv.id ) AS `key`,-->
wlv.NAME,
<!-- wlv.NAME,-->
'' AS LEVEL,
<!-- '' AS LEVEL,-->
'' AS levelStr,
<!-- '' AS levelStr,-->
'' AS objKey,
<!-- '' AS objKey,-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index( wlv.position3d, ',', 1 ),
<!-- substring_index( wlv.position3d, ',', 1 ),-->
',"y":',
<!-- ',"y":',-->
substring_index( substring_index( wlv.position3d, ',', - 2 ), ',', 1 ),
<!-- substring_index( substring_index( wlv.position3d, ',', - 2 ), ',', 1 ),-->
',"z":',
<!-- ',"z":',-->
substring_index( wlv.position3d, ',', - 1 ),
<!-- substring_index( wlv.position3d, ',', - 1 ),-->
'}'
<!-- '}'-->
)
<!-- )-->
as positionDTO,
<!-- as positionDTO,-->
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
<!-- '{ "x": 0, "y": 0, "z": 0 }' rotationDTO,-->
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
<!-- '{ "x": 1, "y": 1, "z": 1 }' scaleDTO,-->
FALSE AS `showInfo`,
<!-- FALSE AS `showInfo`,-->
wlv.NAME AS title,
<!-- wlv.NAME AS title,-->
'video' AS type,
<!-- 'video' AS type,-->
wlv.org_code AS orgCode,
<!-- wlv.org_code AS orgCode,-->
'' AS riskSourceId,
<!-- '' AS riskSourceId,-->
0 AS frequency,
<!-- 0 AS frequency,-->
FALSE AS twinkle
<!-- FALSE AS twinkle-->
FROM
<!-- FROM-->
wl_video wlv
<!-- wl_video wlv-->
WHERE
<!-- WHERE-->
wlv.position3d != ''
<!-- wlv.position3d != ''-->
AND wlv.position3d IS NOT NULL
<!-- AND wlv.position3d IS NOT NULL-->
union all
<!-- union all-->
select
<!-- select-->
w.code,
<!-- w.code,-->
w.id,
<!-- w.id,-->
w.is_indoor as inDoor,
<!-- w.is_indoor as inDoor,-->
case
<!-- case-->
when w.type = 1 then CONCAT('hydrant',w.id)
<!-- when w.type = 1 then CONCAT('hydrant',w.id)-->
when w.type = 2 then CONCAT('pool',w.id)
<!-- when w.type = 2 then CONCAT('pool',w.id)-->
end as `key`,
<!-- end as `key`,-->
w.name,
<!-- w.name,-->
'' as LEVEL,
<!-- '' as LEVEL,-->
'' as levelStr,
<!-- '' as levelStr,-->
CONCAT('floor',w.floor3d) as objKey,
<!-- CONCAT('floor',w.floor3d) as objKey,-->
CASE
<!-- CASE-->
WHEN (
<!-- WHEN (-->
ISNULL(w.position3d) || LENGTH(trim(w.position3d))
<![CDATA[ <]]>
1
<!-- ISNULL(w.position3d) || LENGTH(trim(w.position3d)) <![CDATA[ <]]> 1-->
) THEN
<!-- ) THEN-->
NULL
<!-- NULL-->
ELSE
<!-- ELSE-->
CONCAT(
<!-- CONCAT(-->
'{"x":',
<!-- '{"x":',-->
substring_index(w.position3d, ',', 1),
<!-- substring_index(w.position3d, ',', 1),-->
',"y":',
<!-- ',"y":',-->
substring_index(
<!-- substring_index(-->
substring_index(w.position3d, ',', - 2),
<!-- substring_index(w.position3d, ',', - 2),-->
',',
<!-- ',',-->
1
<!-- 1-->
),
<!-- ),-->
',"z":',
<!-- ',"z":',-->
substring_index(w.position3d, ',', - 1),
<!-- substring_index(w.position3d, ',', - 1),-->
'}'
<!-- '}'-->
)
<!-- )-->
END positionDTO,
<!-- END positionDTO,-->
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
<!-- '{ "x": 0, "y": 0, "z": 0 }' rotationDTO,-->
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
<!-- '{ "x": 1, "y": 1, "z": 1 }' scaleDTO,-->
false as `showInfo`,
<!-- false as `showInfo`,-->
w.name as title,
<!-- w.name as title,-->
case
<!-- case-->
when w.type = 1 then 'hydrant'
<!-- when w.type = 1 then 'hydrant'-->
when w.type = 2 then 'pool'
<!-- when w.type = 2 then 'pool'-->
end as type,
<!-- end as type,-->
w.org_code as orgCode,
<!-- w.org_code as orgCode,-->
w.risk_source_id as riskSourceId,
<!-- w.risk_source_id as riskSourceId,-->
0 as frequency,
<!-- 0 as frequency,-->
false as twinkle
<!-- false as twinkle-->
from
<!-- from-->
f_water_resource w
<!-- f_water_resource w-->
left join f_risk_source rs on w.risk_source_id = rs.id AND rs.is_region='TRUE'
<!-- left join f_risk_source rs on w.risk_source_id = rs.id AND rs.is_region='TRUE'-->
where rs.id is not null
<!-- where rs.id is not null-->
AND w.position3d != '' AND w.position3d is not null
<!-- AND w.position3d != '' AND w.position3d is not null-->
) temp
<!-- ) temp-->
WHERE 1=1
<!-- WHERE 1=1-->
<if
test=
"riskSourceId != null"
>
<!-- <if test="riskSourceId != null">--
>
AND FIND_IN_SET(temp.riskSourceId,queryRiskSourceChildrenIds(#{riskSourceId}))
<!-- AND FIND_IN_SET(temp.riskSourceId,queryRiskSourceChildrenIds(#{riskSourceId}))-->
</if
>
<!-- </if>--
>
<if
test=
"type != null and type !='fireResource' and type !=''"
>
<!-- <if test="type != null and type !='fireResource' and type !=''">--
>
AND temp.type = #{type}
<!-- AND temp.type = #{type}-->
</if
>
<!-- </if>--
>
<if
test=
"type == 'fireResource'"
>
<!-- <if test="type == 'fireResource'">--
>
AND temp.type in ('fireCar','fireEquipment','fireChamber','fireFoamRoom','hydrant','pool')
<!-- AND temp.type in ('fireCar','fireEquipment','fireChamber','fireFoamRoom','hydrant','pool')-->
</if
>
<!-- </if>--
>
<if
test=
"orgCode != null"
>
<!-- <if test="orgCode != null">--
>
AND (temp.orgCode = #{orgCode} OR temp.orgCode LIKE CONCAT(#{orgCode},'-%'))
<!-- AND (temp.orgCode = #{orgCode} OR temp.orgCode LIKE CONCAT(#{orgCode},'-%'))-->
</if
>
<!-- </if>--
>
</select
>
<!-- </select>--
>
<select
id=
"retrieveAllCount"
resultType=
"long"
>
<select
id=
"retrieveAllCount"
resultType=
"long"
>
...
@@ -1827,54 +1827,54 @@
...
@@ -1827,54 +1827,54 @@
</where>
</where>
LIMIT ${start},${length}
LIMIT ${start},${length}
</select>
</select>
<select
id=
"getAllPointInRegions"
resultType=
"java.util.Map"
>
<!-- <select id="getAllPointInRegions" resultType="java.util.Map">--
>
select
<!-- select-->
CONCAT(type,'-',id) as `key`,
<!-- CONCAT(type,'-',id) as `key`,-->
id as pointId,
<!-- id as pointId,-->
name,
<!-- name,-->
type,
<!-- type,-->
risk_source_id as regionId,
<!-- risk_source_id as regionId,-->
position3d
<!-- position3d-->
from
<!-- from-->
(select id,name,'riskSource' as type, parent_id as risk_source_id,position3d
<!-- (select id,name,'riskSource' as type, parent_id as risk_source_id,position3d-->
from f_risk_source where is_region = 'FALSE'
<!-- from f_risk_source where is_region = 'FALSE'-->
UNION all
<!-- UNION all-->
select id,name,'patrol' as type,risk_source_id,coordinates as position3d
<!-- select id,name,'patrol' as type,risk_source_id,coordinates as position3d-->
from p_point WHERE is_delete = FALSE
<!-- from p_point WHERE is_delete = FALSE-->
UNION all
<!-- UNION all-->
select id,name ,'impEquipment' as type,risk_source_id,position3d
<!-- select id,name ,'impEquipment' as type,risk_source_id,position3d-->
from f_equipment e
<!-- from f_equipment e-->
UNION all
<!-- UNION all-->
select id,name,'monitorEquipment' as type,risk_source_id,position3d
<!-- select id,name,'monitorEquipment' as type,risk_source_id,position3d-->
from f_fire_equipment where equip_classify = 0
<!-- from f_fire_equipment where equip_classify = 0-->
UNION all
<!-- UNION all-->
select id,name,'video' as type,risk_source_id,position3d
<!-- select id,name,'video' as type,risk_source_id,position3d-->
from f_fire_equipment where equip_classify = 2
<!-- from f_fire_equipment where equip_classify = 2-->
UNION all
<!-- UNION all-->
select id,name ,'hydrant' as type,risk_source_id,position3d
<!-- select id,name ,'hydrant' as type,risk_source_id,position3d-->
from f_water_resource where type = 1
<!-- from f_water_resource where type = 1-->
UNION all
<!-- UNION all-->
select id,name,'pool' as type,risk_source_id,position3d
<!-- select id,name,'pool' as type,risk_source_id,position3d-->
from f_water_resource where type = 2
<!-- from f_water_resource where type = 2-->
UNION all
<!-- UNION all-->
select id,name,'fireCar' as type,risk_source_id,position3d
<!-- select id,name,'fireCar' as type,risk_source_id,position3d-->
from f_fire_car
<!-- from f_fire_car-->
UNION all
<!-- UNION all-->
select id,name,'fireEquipment' as type,risk_source_id,position3d
<!-- select id,name,'fireEquipment' as type,risk_source_id,position3d-->
from f_fire_equipment where equip_classify = 3
<!-- from f_fire_equipment where equip_classify = 3-->
UNION all
<!-- UNION all-->
select id,name,'fireChamber' as type,risk_source_id,position3d
<!-- select id,name,'fireChamber' as type,risk_source_id,position3d-->
from f_fire_station where type = 2
<!-- from f_fire_station where type = 2-->
UNION all
<!-- UNION all-->
select id,name,'fireFoamRoom' as type,risk_source_id,position3d
<!-- select id,name,'fireFoamRoom' as type,risk_source_id,position3d-->
from f_fire_station where type = 1
<!-- from f_fire_station where type = 1-->
) as sp
<!-- ) as sp-->
where
<!-- where-->
position3d
<![CDATA[<>]]>
'' and
<!-- position3d <![CDATA[<>]]> '' and-->
risk_source_id in
<!-- risk_source_id in-->
<foreach
collection=
"ids"
open=
"("
separator=
","
close=
")"
item=
"id"
>
<!-- <foreach collection="ids" open="(" separator="," close=")" item="id">--
>
#{id}
<!-- #{id}-->
</foreach
>
<!-- </foreach>--
>
order by regionId
<!-- order by regionId-->
</select
>
<!-- </select>--
>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_waterResource.xml
View file @
61767d5d
...
@@ -4,188 +4,188 @@
...
@@ -4,188 +4,188 @@
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.WaterResourceMapper"
>
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.WaterResourceMapper"
>
<select
id=
"queryOne"
resultType=
"java.util.Map"
>
<!-- <select id="queryOne" resultType="java.util.Map">--
>
select
<!-- select -->
fs.id,
<!-- fs.id,-->
fs.name,
<!-- fs.name,-->
fs.code,
<!-- fs.code,-->
fs.type,
<!-- fs.type,-->
fs.production_area AS productionArea,
<!-- fs.production_area AS productionArea,-->
fs.floor3d,
<!-- fs.floor3d,-->
fs.room,
<!-- fs.room,-->
fs.address,
<!-- fs.address,-->
fs.position3d,
<!-- fs.position3d,-->
fs.area,
<!-- fs.area,-->
fs.max_level maxLevel,
<!-- fs.max_level maxLevel,-->
fs.alarm_level alarmLevel,
<!-- fs.alarm_level alarmLevel,-->
fs.is_indoor as isIndoor,
<!-- fs.is_indoor as isIndoor,-->
fs.org_code AS orgCode,
<!-- fs.org_code AS orgCode,-->
fs.risk_source_id as riskSourceId
<!-- fs.risk_source_id as riskSourceId-->
from f_water_resource fs where fs.id = ${id}
<!-- from f_water_resource fs where fs.id = ${id}-->
</select
>
<!-- </select>--
>
<select
id=
"queryCountForPage"
resultType=
"long"
>
<!-- <select id="queryCountForPage" resultType="long">--
>
SELECT
<!-- SELECT-->
COUNT(1)
<!-- COUNT(1)-->
FROM
<!-- FROM-->
f_water_resource fs
<!-- f_water_resource fs-->
WHERE
<!-- WHERE-->
fs.org_code = #{orgCode}
<!-- fs.org_code = #{orgCode}-->
<if
test=
"name!=null"
>
<!-- <if test="name!=null">--
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
<!-- AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')-->
</if
>
<!-- </if>--
>
<if
test=
"code!=null"
>
<!-- <if test="code!=null">--
>
AND fs.`code` LIKE '%${code}%'
<!-- AND fs.`code` LIKE '%${code}%'-->
</if
>
<!-- </if>--
>
<if
test=
"type!=null"
>
<!-- <if test="type!=null">--
>
AND fs.`type` LIKE '%${type}%'
<!-- AND fs.`type` LIKE '%${type}%'-->
</if
>
<!-- </if>--
>
</select
>
<!-- </select>--
>
<select
id=
"queryForPage"
resultType=
"java.util.Map"
>
<!-- <select id="queryForPage" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
fs.id,
<!-- fs.id,-->
fs.name,
<!-- fs.name,-->
fs.code,
<!-- fs.code,-->
fs.type,
<!-- fs.type,-->
fs.production_area AS productionArea,
<!-- fs.production_area AS productionArea,-->
fs.floor3d,
<!-- fs.floor3d,-->
fs.room,
<!-- fs.room,-->
fs.address,
<!-- fs.address,-->
fs.position3d,
<!-- fs.position3d,-->
fs.area,
<!-- fs.area,-->
fs.max_level maxLevel,
<!-- fs.max_level maxLevel,-->
fs.alarm_level alarmLevel,
<!-- fs.alarm_level alarmLevel,-->
fs.is_indoor as isIndoor,
<!-- fs.is_indoor as isIndoor,-->
frs.name riskSourceName
<!-- frs.name riskSourceName-->
FROM
<!-- FROM-->
f_water_resource fs
<!-- f_water_resource fs-->
left join f_risk_source frs on frs.id = fs.risk_source_id
<!-- left join f_risk_source frs on frs.id = fs.risk_source_id-->
WHERE
<!-- WHERE-->
fs.org_code = #{orgCode}
<!-- fs.org_code = #{orgCode}-->
<if
test=
"name!=null"
>
<!-- <if test="name!=null">--
>
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
<!-- AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')-->
</if
>
<!-- </if>--
>
<if
test=
"code!=null"
>
<!-- <if test="code!=null">--
>
AND fs.`code` LIKE '%${code}%'
<!-- AND fs.`code` LIKE '%${code}%'-->
</if
>
<!-- </if>--
>
<if
test=
"type!=null"
>
<!-- <if test="type!=null">--
>
AND fs.`type` LIKE '%${type}%'
<!-- AND fs.`type` LIKE '%${type}%'-->
</if
>
<!-- </if>--
>
LIMIT ${start},${length} ;
<!-- LIMIT ${start},${length} ;-->
</select
>
<!-- </select>--
>
<select
id=
"queryCountForBindFireEqumntPage"
resultType=
"long"
>
<!-- <select id="queryCountForBindFireEqumntPage" resultType="long">--
>
SELECT
<!-- SELECT-->
count(1)
<!-- count(1)-->
FROM
<!-- FROM-->
f_water_resource_equipment fs
<!-- f_water_resource_equipment fs-->
JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id
<!-- JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id-->
WHERE
<!-- WHERE-->
fs.water_resource_id = ${waterResourceId}
<!-- fs.water_resource_id = ${waterResourceId}-->
</select
>
<!-- </select>--
>
<select
id=
"queryForBindFireEqumntPage"
resultType=
"java.util.Map"
>
<!-- <select id="queryForBindFireEqumntPage" resultType="java.util.Map">--
>
SELECT
<!-- SELECT-->
fs.water_resource_id,
<!-- fs.water_resource_id,-->
fs.number numberInStation,
<!-- fs.number numberInStation,-->
fs.unit unitInStation,
<!-- fs.unit unitInStation,-->
f.*,
<!-- f.*,-->
frs.name riskSourceName
<!-- frs.name riskSourceName-->
FROM
<!-- FROM-->
f_water_resource_equipment fs
<!-- f_water_resource_equipment fs-->
left join f_fire_equipment f on fs.fire_equipment_id = f.id
<!-- left join f_fire_equipment f on fs.fire_equipment_id = f.id-->
left join f_risk_source frs on frs.id = f.risk_source_id
<!-- left join f_risk_source frs on frs.id = f.risk_source_id-->
WHERE
<!-- WHERE-->
fs.water_resource_id = ${waterResourceId}
<!-- fs.water_resource_id = ${waterResourceId}-->
and f.id is not null
<!-- and f.id is not null-->
LIMIT ${start}, ${length};
<!-- LIMIT ${start}, ${length};-->
</select
>
<!-- </select>--
>
<select
id=
"listByCodes"
resultType=
"com.yeejoin.amos.fas.dao.entity.WaterResource"
>
<!-- <select id="listByCodes" resultType="com.yeejoin.amos.fas.dao.entity.WaterResource">--
>
select
<!-- select-->
id,
<!-- id,-->
code,
<!-- code,-->
name
<!-- name-->
from
<!-- from-->
f_water_resource
<!-- f_water_resource-->
where
<!-- where-->
code in
<!-- code in-->
<foreach
collection=
"codes"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
<!-- <foreach collection="codes" item="item" index="index" open="(" separator="," close=")">--
>
#{item}
<!-- #{item}-->
</foreach
>
<!-- </foreach>--
>
</select
>
<!-- </select>--
>
<insert
id=
"saveBatch"
keyColumn=
"id"
keyProperty=
"id"
<!-- <insert id="saveBatch" keyColumn="id" keyProperty="id"-->
parameterType=
"com.yeejoin.amos.fas.business.param.WaterResourceParam"
<!-- parameterType="com.yeejoin.amos.fas.business.param.WaterResourceParam"-->
useGeneratedKeys=
"true"
>
<!-- useGeneratedKeys="true">--
>
insert into f_water_resource
<!-- insert into f_water_resource-->
(
<!-- (-->
`name`,
<!-- `name`,-->
`code`,
<!-- `code`,-->
`type`,
<!-- `type`,-->
`floor3d`,
<!-- `floor3d`,-->
`room`,
<!-- `room`,-->
`address`,
<!-- `address`,-->
`position3d`,
<!-- `position3d`,-->
`org_code`,
<!-- `org_code`,-->
`is_indoor`,
<!-- `is_indoor`,-->
`risk_source_id`
<!-- `risk_source_id`-->
)
<!-- )-->
values
<!-- values-->
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
<!-- <foreach collection="list" item="item" index="index" separator=",">--
>
(
<!-- (-->
#{item.name},
<!-- #{item.name},-->
#{item.code},
<!-- #{item.code},-->
#{item.type},
<!-- #{item.type},-->
#{item.floor3d},
<!-- #{item.floor3d},-->
#{item.room},
<!-- #{item.room},-->
#{item.address},
<!-- #{item.address},-->
#{item.position3d},
<!-- #{item.position3d},-->
#{item.orgCode},
<!-- #{item.orgCode},-->
#{item.isIndoor},
<!-- #{item.isIndoor},-->
#{item.riskSourceId}
<!-- #{item.riskSourceId}-->
)
<!-- )-->
</foreach
>
<!-- </foreach>--
>
</insert
>
<!-- </insert>--
>
<update
id=
"updateBatch"
>
<!-- <update id="updateBatch">--
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
";"
>
<!-- <foreach collection="list" item="item" index="index" separator=";">--
>
update f_water_resource
<!-- update f_water_resource-->
<set
>
<!-- <set>--
>
<if
test=
"item.orgCode != null"
>
<!-- <if test="item.orgCode != null">--
>
org_code = #{item.orgCode},
<!-- org_code = #{item.orgCode},-->
</if
>
<!-- </if>--
>
<if
test=
"item.code != null"
>
<!-- <if test="item.code != null">--
>
code = #{item.code},
<!-- code = #{item.code},-->
</if
>
<!-- </if>--
>
<if
test=
"item.type != null"
>
<!-- <if test="item.type != null">--
>
type = #{item.type},
<!-- type = #{item.type},-->
</if
>
<!-- </if>--
>
<if
test=
"item.position3d != null"
>
<!-- <if test="item.position3d != null">--
>
position3d = #{item.position3d},
<!-- position3d = #{item.position3d},-->
</if
>
<!-- </if>--
>
<if
test=
"item.floor3d != null"
>
<!-- <if test="item.floor3d != null">--
>
floor3d = #{item.floor3d},
<!-- floor3d = #{item.floor3d},-->
</if
>
<!-- </if>--
>
<if
test=
"item.isIndoor != null"
>
<!-- <if test="item.isIndoor != null">--
>
is_indoor = #{item.isIndoor},
<!-- is_indoor = #{item.isIndoor},-->
</if
>
<!-- </if>--
>
<if
test=
"item.name != null"
>
<!-- <if test="item.name != null">--
>
name = #{item.name},
<!-- name = #{item.name},-->
</if
>
<!-- </if>--
>
<if
test=
"item.room != null"
>
<!-- <if test="item.room != null">--
>
room = #{item.room},
<!-- room = #{item.room},-->
</if
>
<!-- </if>--
>
<if
test=
"item.address != null"
>
<!-- <if test="item.address != null">--
>
address = #{item.address},
<!-- address = #{item.address},-->
</if
>
<!-- </if>--
>
<if
test=
"item.riskSourceId != null"
>
<!-- <if test="item.riskSourceId != null">--
>
risk_source_id = #{item.riskSourceId},
<!-- risk_source_id = #{item.riskSourceId},-->
</if
>
<!-- </if>--
>
</set
>
<!-- </set>--
>
where id = #{item.id}
<!-- where id = #{item.id}-->
</foreach
>
<!-- </foreach>--
>
</update
>
<!-- </update>--
>
</mapper>
</mapper>
\ No newline at end of file
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