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
fe42f92b
Commit
fe42f92b
authored
Jan 11, 2021
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释FireEquipment相关代码
parent
2ad73325
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
705 additions
and
630 deletions
+705
-630
FireEquipment.java
...n/java/com/yeejoin/amos/fas/dao/entity/FireEquipment.java
+381
-381
FireEquipmentBo.java
...ava/com/yeejoin/amos/fas/business/bo/FireEquipmentBo.java
+125
-0
FireSourceController.java
...in/amos/fas/business/controller/FireSourceController.java
+38
-39
FireEquipMapper.java
...yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
+3
-3
ImpAndFireEquipMapper.java
...n/amos/fas/business/dao/mapper/ImpAndFireEquipMapper.java
+3
-4
IFireEquipmentDao.java
...n/amos/fas/business/dao/repository/IFireEquipmentDao.java
+23
-23
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+14
-19
FireEquipServiceImpl.java
.../amos/fas/business/service/impl/FireEquipServiceImpl.java
+51
-59
FireStationServiceImpl.java
...mos/fas/business/service/impl/FireStationServiceImpl.java
+46
-50
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+1
-3
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+11
-16
IFireEquipService.java
...in/amos/fas/business/service/intfc/IFireEquipService.java
+3
-6
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+1
-22
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+2
-2
dbTemplate_impAndfire_equip.xml
.../main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
+3
-3
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/FireEquipment.java
View file @
fe42f92b
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
//package com.yeejoin.amos.fas.dao.entity;
//
import
com.fasterxml.jackson.annotation.JsonFormat
;
//import com.fasterxml.jackson.annotation.JsonFormat;
import
org.springframework.format.annotation.DateTimeFormat
;
//import org.springframework.format.annotation.DateTimeFormat;
//
import
java.math.BigDecimal
;
//import java.math.BigDecimal;
import
java.util.Date
;
//import java.util.Date;
//
import
javax.persistence.*
;
//import javax.persistence.*;
//
//
/**
///**
* 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"
)
//@Table(name="f_fire_equipment")
@NamedQuery
(
name
=
"FireEquipment.findAll"
,
query
=
"SELECT f FROM FireEquipment f"
)
//@NamedQuery(name="FireEquipment.findAll", query="SELECT f FROM FireEquipment f")
public
class
FireEquipment
extends
BasicEntity
{
//public class FireEquipment extends BasicEntity {
private
static
final
long
serialVersionUID
=
1L
;
// private static final long serialVersionUID = 1L;
//
private
String
brand
;
// private String brand;
//
private
String
code
;
// private String code;
//
/**
// /**
* 3维坐标
// * 3维坐标
*/
// */
private
String
position3d
;
// private String position3d;
//
/**
// /**
* 3维楼层
// * 3维楼层
*/
// */
private
String
floor3d
;
// private String floor3d;
//
/**
// /**
* 是否室内 0-否 1-是
// * 是否室内 0-否 1-是
*/
// */
@Column
(
name
=
"is_indoor"
)
// @Column(name="is_indoor")
private
Boolean
isIndoor
;
// private Boolean isIndoor;
//
@Column
(
name
=
"create_by"
)
// @Column(name="create_by")
private
String
createBy
;
// private String createBy;
//
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
// @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
// @JsonFormat(pattern = "yyyy-MM-dd")
@Column
(
name
=
"effective_date"
)
// @Column(name="effective_date")
private
Date
effectiveDate
;
// private Date effectiveDate;
//
@Column
(
name
=
"maintenance_cycle"
)
// @Column(name="maintenance_cycle")
private
int
maintenanceCycle
;
// private int maintenanceCycle;
//
/**
// /**
* 装备分类:0-设备类;1-耗材类
// * 装备分类:0-设备类;1-耗材类
*/
// */
@Column
(
name
=
"equip_classify"
)
// @Column(name="equip_classify")
private
int
equipClassify
;
// private int equipClassify;
//
private
String
manufacturer
;
// private String manufacturer;
//
private
String
model
;
// private String model;
//
private
String
name
;
// private String name;
//
private
int
number
;
// private int number;
//
@Column
(
name
=
"org_code"
)
// @Column(name="org_code")
private
String
orgCode
;
// private String orgCode;
//
@Column
(
name
=
"production_area"
)
// @Column(name="production_area")
private
String
productionArea
;
// private String productionArea;
//
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
// @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
// @JsonFormat(pattern = "yyyy-MM-dd")
@Column
(
name
=
"production_date"
)
// @Column(name="production_date")
private
Date
productionDate
;
// private Date productionDate;
//
private
String
remark
;
// private String remark;
//
private
String
room
;
// private String room;
//
/**
// /**
* 装备编码
// * 装备编码
*/
// */
@Column
(
name
=
"equip_code"
)
// @Column(name="equip_code")
private
String
equipCode
;
// private String equipCode;
//
/**
// /**
* 装备类型
// * 装备类型
*/
// */
@Column
(
name
=
"equip_type"
)
// @Column(name="equip_type")
private
String
equipType
;
// private String equipType;
//
/**
// /**
* 监测设备状态
// * 监测设备状态
*/
// */
@Column
(
name
=
"equip_status"
)
// @Column(name="equip_status")
private
Integer
equipStatus
;
// private Integer equipStatus;
//
//
private
String
unit
;
// private String unit;
//
//
private
String
protectObjNames
;
// private String protectObjNames;
//
/**
// /**
* 重量
// * 重量
*/
// */
private
BigDecimal
weight
;
// private BigDecimal weight;
//
/**
// /**
* 动作状态
// * 动作状态
*/
// */
@Column
(
name
=
"action_state"
)
// @Column(name="action_state")
private
String
actionState
;
// private String actionState;
//
/**
// /**
* 喷发状态
// * 喷发状态
*/
// */
@Column
(
name
=
"eruption_state"
)
// @Column(name="eruption_state")
private
String
eruptionState
;
// private String eruptionState;
//
/**
// /**
* 所属风险区域id
// * 所属风险区域id
*/
// */
@Column
(
name
=
"risk_source_id"
)
// @Column(name="risk_source_id")
private
Long
riskSourceId
;
// private Long riskSourceId;
//
/**
// /**
* ue4位置
// * ue4位置
*/
// */
@Lob
// @Lob
private
String
ue4Location
;
// private String ue4Location;
//
/**
// /**
* ue4旋转
// * ue4旋转
*/
// */
@Lob
// @Lob
private
String
ue4Rotation
;
// private String ue4Rotation;
//
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
getActionState
()
{
// public String getActionState() {
return
actionState
;
// return actionState;
}
// }
//
public
void
setActionState
(
String
actionState
)
{
// public void setActionState(String actionState) {
this
.
actionState
=
actionState
;
// this.actionState = actionState;
}
// }
//
public
String
getEruptionState
()
{
// public String getEruptionState() {
return
eruptionState
;
// return eruptionState;
}
// }
//
public
void
setEruptionState
(
String
eruptionState
)
{
// public void setEruptionState(String eruptionState) {
this
.
eruptionState
=
eruptionState
;
// this.eruptionState = eruptionState;
}
// }
//
@Transient
// @Transient
public
String
getProtectObjNames
()
{
// public String getProtectObjNames() {
return
protectObjNames
;
// return protectObjNames;
}
// }
//
public
void
setProtectObjNames
(
String
protectObjNames
)
{
// public void setProtectObjNames(String protectObjNames) {
this
.
protectObjNames
=
protectObjNames
;
// this.protectObjNames = protectObjNames;
}
// }
//
public
Integer
getEquipStatus
()
{
// public Integer getEquipStatus() {
return
equipStatus
;
// return equipStatus;
}
// }
//
public
void
setEquipStatus
(
Integer
equipStatus
)
{
// public void setEquipStatus(Integer equipStatus) {
this
.
equipStatus
=
equipStatus
;
// this.equipStatus = equipStatus;
}
// }
//
public
FireEquipment
()
{
// public FireEquipment() {
}
// }
//
public
String
getBrand
()
{
// public String getBrand() {
return
this
.
brand
;
// return this.brand;
}
// }
//
public
void
setBrand
(
String
brand
)
{
// public void setBrand(String brand) {
this
.
brand
=
brand
;
// this.brand = brand;
}
// }
//
public
String
getCode
()
{
// public String getCode() {
return
this
.
code
;
// return this.code;
}
// }
//
public
void
setCode
(
String
code
)
{
// public void setCode(String code) {
this
.
code
=
code
;
// this.code = code;
}
// }
//
public
String
getCreateBy
()
{
// public String getCreateBy() {
return
this
.
createBy
;
// return this.createBy;
}
// }
//
public
void
setCreateBy
(
String
createBy
)
{
// public void setCreateBy(String createBy) {
this
.
createBy
=
createBy
;
// this.createBy = createBy;
}
// }
//
public
Date
getEffectiveDate
()
{
// public Date getEffectiveDate() {
return
this
.
effectiveDate
;
// return this.effectiveDate;
}
// }
//
public
void
setEffectiveDate
(
Date
effectiveDate
)
{
// public void setEffectiveDate(Date effectiveDate) {
this
.
effectiveDate
=
effectiveDate
;
// this.effectiveDate = effectiveDate;
}
// }
//
//
public
int
getMaintenanceCycle
()
{
// public int getMaintenanceCycle() {
return
this
.
maintenanceCycle
;
// return this.maintenanceCycle;
}
// }
//
public
void
setMaintenanceCycle
(
int
maintenanceCycle
)
{
// public void setMaintenanceCycle(int maintenanceCycle) {
this
.
maintenanceCycle
=
maintenanceCycle
;
// this.maintenanceCycle = maintenanceCycle;
}
// }
//
public
String
getManufacturer
()
{
// public String getManufacturer() {
return
this
.
manufacturer
;
// return this.manufacturer;
}
// }
//
public
void
setManufacturer
(
String
manufacturer
)
{
// public void setManufacturer(String manufacturer) {
this
.
manufacturer
=
manufacturer
;
// this.manufacturer = manufacturer;
}
// }
//
public
String
getModel
()
{
// public String getModel() {
return
this
.
model
;
// return this.model;
}
// }
//
public
void
setModel
(
String
model
)
{
// public void setModel(String model) {
this
.
model
=
model
;
// this.model = model;
}
// }
//
public
String
getName
()
{
// public String getName() {
return
this
.
name
;
// return this.name;
}
// }
//
public
void
setName
(
String
name
)
{
// public void setName(String name) {
this
.
name
=
name
;
// this.name = name;
}
// }
//
public
int
getNumber
()
{
// public int getNumber() {
return
this
.
number
;
// return this.number;
}
// }
//
public
void
setNumber
(
int
number
)
{
// public void setNumber(int number) {
this
.
number
=
number
;
// this.number = number;
}
// }
//
public
String
getOrgCode
()
{
// public String getOrgCode() {
return
this
.
orgCode
;
// return this.orgCode;
}
// }
//
public
void
setOrgCode
(
String
orgCode
)
{
// public void setOrgCode(String orgCode) {
this
.
orgCode
=
orgCode
;
// this.orgCode = orgCode;
}
// }
//
public
String
getProductionArea
()
{
// public String getProductionArea() {
return
this
.
productionArea
;
// return this.productionArea;
}
// }
//
public
void
setProductionArea
(
String
productionArea
)
{
// public void setProductionArea(String productionArea) {
this
.
productionArea
=
productionArea
;
// this.productionArea = productionArea;
}
// }
//
public
Date
getProductionDate
()
{
// public Date getProductionDate() {
return
this
.
productionDate
;
// return this.productionDate;
}
// }
//
public
void
setProductionDate
(
Date
productionDate
)
{
// public void setProductionDate(Date productionDate) {
this
.
productionDate
=
productionDate
;
// this.productionDate = productionDate;
}
// }
//
public
String
getRemark
()
{
// public String getRemark() {
return
this
.
remark
;
// return this.remark;
}
// }
//
public
void
setRemark
(
String
remark
)
{
// public void setRemark(String remark) {
this
.
remark
=
remark
;
// this.remark = remark;
}
// }
//
public
String
getRoom
()
{
// public String getRoom() {
return
this
.
room
;
// return this.room;
}
// }
//
public
void
setRoom
(
String
room
)
{
// public void setRoom(String room) {
this
.
room
=
room
;
// this.room = room;
}
// }
//
//
public
String
getUnit
()
{
// public String getUnit() {
return
this
.
unit
;
// return this.unit;
}
// }
//
public
void
setUnit
(
String
unit
)
{
// public void setUnit(String unit) {
this
.
unit
=
unit
;
// this.unit = unit;
}
// }
//
public
String
getEquipCode
()
{
// public String getEquipCode() {
return
equipCode
;
// return equipCode;
}
// }
//
public
void
setEquipCode
(
String
equipCode
)
{
// public void setEquipCode(String equipCode) {
this
.
equipCode
=
equipCode
;
// this.equipCode = equipCode;
}
// }
//
public
String
getEquipType
()
{
// public String getEquipType() {
return
equipType
;
// return equipType;
}
// }
//
public
void
setEquipType
(
String
equipType
)
{
// public void setEquipType(String equipType) {
this
.
equipType
=
equipType
;
// this.equipType = equipType;
}
// }
//
public
int
getEquipClassify
()
{
// public int getEquipClassify() {
return
equipClassify
;
// return equipClassify;
}
// }
//
public
void
setEquipClassify
(
int
equipClassify
)
{
// public void setEquipClassify(int equipClassify) {
this
.
equipClassify
=
equipClassify
;
// this.equipClassify = equipClassify;
}
// }
//
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
BigDecimal
getWeight
()
{
// public BigDecimal getWeight() {
return
weight
;
// return weight;
}
// }
//
public
void
setWeight
(
BigDecimal
weight
)
{
// public void setWeight(BigDecimal weight) {
this
.
weight
=
weight
;
// this.weight = weight;
}
// }
//
@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;
}
// }
}
//}
\ No newline at end of file
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/bo/FireEquipmentBo.java
0 → 100644
View file @
fe42f92b
package
com
.
yeejoin
.
amos
.
fas
.
business
.
bo
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
lombok.Data
;
/**
* The persistent class for the fire_equipment database table.
*
*/
@Data
public
class
FireEquipmentBo
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
private
long
id
;
private
Date
createDate
;
private
String
brand
;
private
String
code
;
/**
* 3维坐标
*/
private
String
position3d
;
/**
* 3维楼层
*/
private
String
floor3d
;
/**
* 是否室内 0-否 1-是
*/
private
Boolean
isIndoor
;
private
String
createBy
;
private
Date
effectiveDate
;
private
int
maintenanceCycle
;
/**
* 装备分类:0-设备类;1-耗材类
*/
private
int
equipClassify
;
private
String
manufacturer
;
private
String
model
;
private
String
name
;
private
int
number
;
private
String
orgCode
;
private
String
productionArea
;
private
Date
productionDate
;
private
String
remark
;
private
String
room
;
/**
* 装备编码
*/
private
String
equipCode
;
/**
* 装备类型
*/
private
String
equipType
;
/**
* 监测设备状态
*/
private
Integer
equipStatus
;
private
String
unit
;
private
String
protectObjNames
;
/**
* 重量
*/
private
BigDecimal
weight
;
/**
* 动作状态
*/
private
String
actionState
;
/**
* 喷发状态
*/
private
String
eruptionState
;
/**
* 所属风险区域id
*/
private
Long
riskSourceId
;
/**
* ue4位置
*/
private
String
ue4Location
;
/**
* ue4旋转
*/
private
String
ue4Rotation
;
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/FireSourceController.java
View file @
fe42f92b
...
@@ -12,7 +12,6 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
...
@@ -12,7 +12,6 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.core.common.request.CommonRequest
;
import
com.yeejoin.amos.fas.core.common.request.CommonRequest
;
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.FireEquipment
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -43,44 +42,44 @@ public class FireSourceController extends BaseController {
...
@@ -43,44 +42,44 @@ public class FireSourceController extends BaseController {
private
IEquipmentService
iEquipService
;
private
IEquipmentService
iEquipService
;
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
FireSourceController
.
class
);
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
FireSourceController
.
class
);
@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
FireEquipment
fireEquipment
)
throws
Exception
{
//
public CommonResponse create(@RequestBody FireEquipment fireEquipment) throws Exception {
//
if
(
fireEquipment
.
getId
()
==
0
l
)
{
//新增
//
if(fireEquipment.getId() == 0l) {//新增
Boolean
existByCode
=
iFireEquipService
.
isExistByCode
(
fireEquipment
.
getCode
());
//
Boolean existByCode = iFireEquipService.isExistByCode(fireEquipment.getCode());
if
(
existByCode
){
//
if(existByCode){
return
CommonResponseUtil
.
failure
(
"设备编号重复,请重试!"
);
//
return CommonResponseUtil.failure("设备编号重复,请重试!");
}
//
}
}
//
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
//
ReginParams reginParams = getSelectedOrgInfo();
String
compCode
=
getOrgCode
(
reginParams
);
//
String compCode = getOrgCode(reginParams);
fireEquipment
.
setCreateBy
(
getUserId
());
//
fireEquipment.setCreateBy(getUserId());
fireEquipment
.
setCreateDate
(
new
Date
());
//
fireEquipment.setCreateDate(new Date());
fireEquipment
.
setOrgCode
(
compCode
);
//
fireEquipment.setOrgCode(compCode);
//
//设备状态默认为正常
//
//设备状态默认为正常
fireEquipment
.
setEquipStatus
(
0
);
//
fireEquipment.setEquipStatus(0);
//
//
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
//
return CommonResponseUtil.success(iFireEquipService.save(fireEquipment));
}
//
}
@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
FireEquipment
fireEquipment
)
{
//
public CommonResponse udpate(@PathVariable Long id, @RequestBody FireEquipment fireEquipment) {
fireEquipment
.
setId
(
id
);
//
fireEquipment.setId(id);
return
CommonResponseUtil
.
success
(
iFireEquipService
.
save
(
fireEquipment
));
//
return CommonResponseUtil.success(iFireEquipService.save(fireEquipment));
}
//
}
@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
(
iFireEquipService
.
queryOne
(
id
));
//
return CommonResponseUtil.success(iFireEquipService.queryOne(id));
}
//
}
@Permission
@Permission
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除消防装备"
,
notes
=
"查询单个消防装备"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"删除消防装备"
,
notes
=
"查询单个消防装备"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/FireEquipMapper.java
View file @
fe42f92b
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.business.bo.FireEquipmentBo
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
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.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -86,9 +86,9 @@ public interface FireEquipMapper extends BaseMapper {
...
@@ -86,9 +86,9 @@ public interface FireEquipMapper extends BaseMapper {
Long
removeIfmeaPointByFireEquipIdAndEquipId
(
@Param
(
"fireEquipmentId"
)
Long
fireEquipmentId
,
@Param
(
"importantEquipmentId"
)
Long
importantEquipmentId
);
Long
removeIfmeaPointByFireEquipIdAndEquipId
(
@Param
(
"fireEquipmentId"
)
Long
fireEquipmentId
,
@Param
(
"importantEquipmentId"
)
Long
importantEquipmentId
);
FireEquipment
findFireEquipById
(
@Param
(
"id"
)
Long
id
);
FireEquipment
Bo
findFireEquipById
(
@Param
(
"id"
)
Long
id
);
FireEquipment
findVideoById
(
@Param
(
"id"
)
Long
id
);
FireEquipment
Bo
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/ImpAndFireEquipMapper.java
View file @
fe42f92b
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.fas.business.dao.mapper;
...
@@ -3,7 +3,6 @@ package com.yeejoin.amos.fas.business.dao.mapper;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
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.FireEquipment
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -26,9 +25,9 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
...
@@ -26,9 +25,9 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
* @param equipmentId
* @param equipmentId
* @return
* @return
*/
*/
List
<
FireEquipment
>
queryBindFirEqumtPage
(
@Param
(
"start"
)
long
start
,
@Param
(
"length"
)
int
length
,
@Param
(
"equipmentId"
)
String
equipmentId
);
//
List<FireEquipment> queryBindFirEqumtPage(@Param("start") long start,@Param("length")int length,@Param("equipmentId") String equipmentId);
//
Long
queryBindFirEqumtPageCount
(
@Param
(
"equipmentId"
)
String
equipmentId
);
//
Long queryBindFirEqumtPageCount(@Param("equipmentId") String equipmentId);
Map
queryForCamera
(
@Param
(
"equipmentId"
)
String
equipmentId
);
Map
queryForCamera
(
@Param
(
"equipmentId"
)
String
equipmentId
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IFireEquipmentDao.java
View file @
fe42f92b
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.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.FireEquipment
;
//
import com.yeejoin.amos.fas.dao.entity.FireEquipment;
//
@Repository
(
"iFireEquipmentDao"
)
//
@Repository("iFireEquipmentDao")
public
interface
IFireEquipmentDao
extends
BaseDao
<
FireEquipment
,
Long
>
{
//
public interface IFireEquipmentDao extends BaseDao<FireEquipment, Long> {
//
@Query
(
value
=
"select distinct production_area from f_fire_equipment "
,
nativeQuery
=
true
)
////
@Query(value = "select distinct production_area from f_fire_equipment ",nativeQuery = true)
List
<
String
>
findFireEquipArea
();
////
List<String> findFireEquipArea();
//
Optional
<
FireEquipment
>
findById
(
Long
id
);
////
Optional<FireEquipment> findById(Long id);
//
@Query
(
value
=
"SELECT count(1) FROM `f_fire_station_equipment` WHERE fire_equipment_id in ?1"
,
nativeQuery
=
true
)
////
@Query(value = "SELECT count(1) FROM `f_fire_station_equipment` WHERE fire_equipment_id in ?1", nativeQuery = true)
int
countAssociatedEquipStationByIds
(
String
[]
ids
);
////
int countAssociatedEquipStationByIds(String[] ids);
//
Optional
<
FireEquipment
>
findByCode
(
String
code
);
////
Optional<FireEquipment> findByCode(String code);
}
//
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
fe42f92b
...
@@ -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.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFmeaEquipmentPointDao
;
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
;
...
@@ -53,7 +52,6 @@ import com.yeejoin.amos.fas.core.util.DaoCriteria;
...
@@ -53,7 +52,6 @@ import com.yeejoin.amos.fas.core.util.DaoCriteria;
import
com.yeejoin.amos.fas.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.fas.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
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.FireEquipment
;
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.Privilege
;
...
@@ -83,9 +81,6 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -83,9 +81,6 @@ public class EquipmentServiceImpl implements IEquipmentService {
IEquipmentFireEquipmentDao
equipmentFireEquipmentDao
;
IEquipmentFireEquipmentDao
equipmentFireEquipmentDao
;
@Autowired
@Autowired
IFireEquipmentDao
iFireEquipmentDao
;
@Autowired
ImpAndFireEquipMapper
impAndFireEquipMapper
;
ImpAndFireEquipMapper
impAndFireEquipMapper
;
@Autowired
@Autowired
...
@@ -251,20 +246,20 @@ public class EquipmentServiceImpl implements IEquipmentService {
...
@@ -251,20 +246,20 @@ public class EquipmentServiceImpl implements IEquipmentService {
*/
*/
@Override
@Override
public
Page
queryBindFirEqumtList
(
CommonPageable
commonPageable
,
Long
equipmentId
)
{
public
Page
queryBindFirEqumtList
(
CommonPageable
commonPageable
,
Long
equipmentId
)
{
long
start
=
-
1
;
//
long start = -1;
int
length
=
-
1
;
//
int length = -1;
if
(
null
!=
commonPageable
)
{
//
if (null != commonPageable) {
start
=
commonPageable
.
getOffset
();
//
start = commonPageable.getOffset();
length
=
commonPageable
.
getPageSize
();
//
length = commonPageable.getPageSize();
}
//
}
long
total
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPageCount
(
String
.
valueOf
(
equipmentId
));
//
long total = this.impAndFireEquipMapper.queryBindFirEqumtPageCount(String.valueOf(equipmentId));
List
<
FireEquipment
>
list
=
this
.
impAndFireEquipMapper
.
queryBindFirEqumtPage
(
start
,
length
,
String
.
valueOf
(
equipmentId
));
//
List<FireEquipment> list = this.impAndFireEquipMapper.queryBindFirEqumtPage(start, length, String.valueOf(equipmentId));
if
(
commonPageable
==
null
)
//
if(commonPageable==null)
{
//
{
commonPageable
=
new
CommonPageable
();
//
commonPageable = new CommonPageable();
}
//
}
Page
result
=
new
PageImpl
(
list
,
commonPageable
,
total
);
//
Page result = new PageImpl(list, commonPageable, total);
return
result
;
return
null
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireEquipServiceImpl.java
View file @
fe42f92b
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
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.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IWaterResourceDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IWaterResourceDao
;
import
com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentEntity
;
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.FireEquipment
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
import
com.yeejoin.amos.fas.dao.entity.FireStation
;
import
com.yeejoin.amos.fas.dao.entity.WaterResource
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
@Service
(
"fireEquipService"
)
@Service
(
"fireEquipService"
)
public
class
FireEquipServiceImpl
implements
IFireEquipService
{
public
class
FireEquipServiceImpl
implements
IFireEquipService
{
...
@@ -33,9 +29,6 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -33,9 +29,6 @@ public class FireEquipServiceImpl implements IFireEquipService {
FireEquipMapper
fireEquipMapper
;
FireEquipMapper
fireEquipMapper
;
@Autowired
@Autowired
IFireEquipmentDao
iFireEquipmentDao
;
@Autowired
ImpEquipMapper
impEquipMapper
;
ImpEquipMapper
impEquipMapper
;
@Autowired
@Autowired
...
@@ -44,35 +37,35 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -44,35 +37,35 @@ public class FireEquipServiceImpl implements IFireEquipService {
@Autowired
@Autowired
IFireStationDao
iFireStationDao
;
IFireStationDao
iFireStationDao
;
public
FireEquipment
save
(
FireEquipment
fireEquipment
)
{
//
public FireEquipment save(FireEquipment fireEquipment) {
Long
id
=
fireEquipment
.
getId
();
//
Long id = fireEquipment.getId();
iFireEquipmentDao
.
save
(
fireEquipment
);
//
iFireEquipmentDao.save(fireEquipment);
return
fireEquipment
;
//
return fireEquipment;
}
//
}
//
//
public
FireEquipment
queryOne
(
Long
id
)
{
//
public FireEquipment queryOne(Long id) {
Optional
<
FireEquipment
>
fireEquipment1
=
iFireEquipmentDao
.
findById
(
id
);
//
Optional<FireEquipment> fireEquipment1=iFireEquipmentDao.findById(id);
if
(
fireEquipment1
.
isPresent
()){
//
if(fireEquipment1.isPresent()){
return
fireEquipment1
.
get
();
//
return fireEquipment1.get();
}
//
}
return
null
;
//
return null;
}
//
}
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
for
(
String
id
:
idArray
)
{
//
for (String id : idArray) {
Optional
<
FireEquipment
>
fireEquipment1
=
iFireEquipmentDao
.
findById
(
Long
.
parseLong
(
id
));
//
Optional<FireEquipment> fireEquipment1 = iFireEquipmentDao.findById(Long.parseLong(id));
FireEquipment
fireEquipment
=
null
;
//
FireEquipment fireEquipment=null;
if
(
fireEquipment1
.
isPresent
()){
//
if(fireEquipment1.isPresent()){
fireEquipment
=
fireEquipment1
.
get
();
//
fireEquipment= fireEquipment1.get();
}
//
}
//
if
(
fireEquipment
!=
null
)
{
//
if (fireEquipment != null) {
this
.
iFireEquipmentDao
.
deleteById
(
Long
.
parseLong
(
id
));
//
this.iFireEquipmentDao.deleteById(Long.parseLong(id));
}
else
{
//
} else {
throw
new
Exception
(
"找不到指定的对象:"
+
id
);
//
throw new Exception("找不到指定的对象:" + id);
}
//
}
}
//
}
return
idArray
;
return
idArray
;
}
}
...
@@ -96,7 +89,8 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -96,7 +89,8 @@ public class FireEquipServiceImpl implements IFireEquipService {
@Override
@Override
public
List
<
String
>
findFireEquipArea
()
{
public
List
<
String
>
findFireEquipArea
()
{
return
iFireEquipmentDao
.
findFireEquipArea
();
return
null
;
// return iFireEquipmentDao.findFireEquipArea();
}
}
...
@@ -167,23 +161,20 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -167,23 +161,20 @@ public class FireEquipServiceImpl implements IFireEquipService {
case
extinguisher:
case
extinguisher:
case
hydrant:
case
hydrant:
case
monitorEquipment:
case
monitorEquipment:
FireEquipment
fireEquipment
=
fireEquipMapper
.
findFireEquipById
(
id
);
FireEquipmentBo
fireEquipment
=
fireEquipMapper
.
findFireEquipById
(
id
);
fireEquipment
.
setEquipClassify
(
Integer
.
parseInt
(
EquipClassifyEnum
.
EQUIPMENT
.
getCode
()));
fireEquipment
.
setEquipClassify
(
Integer
.
parseInt
(
EquipClassifyEnum
.
EQUIPMENT
.
getCode
()));
returnEntity
=
fireEquipment
;
returnEntity
=
fireEquipment
;
break
;
break
;
case
video:
case
video:
FireEquipment
fireVideo
=
fireEquipMapper
.
findVideoById
(
id
);
FireEquipmentBo
fireVideo
=
fireEquipMapper
.
findVideoById
(
id
);
fireVideo
.
setEquipClassify
(
Integer
.
parseInt
(
EquipClassifyEnum
.
VIDEO
.
getCode
()));
fireVideo
.
setEquipClassify
(
Integer
.
parseInt
(
EquipClassifyEnum
.
VIDEO
.
getCode
()));
returnEntity
=
fireVideo
;
returnEntity
=
fireVideo
;
break
;
break
;
case
fireDetection:
case
fireDetection:
Optional
<
FireEquipment
>
fireDetection1
=
this
.
iFireEquipmentDao
.
findById
(
id
);
FireEquipmentBo
fireDetection
=
fireEquipMapper
.
findFireEquipById
(
id
);
FireEquipment
fireDetection
=
null
;
if
(
fireDetection1
.
isPresent
()){
fireDetection
.
setProtectObjNames
(
this
.
impEquipMapper
.
queryProtectObjNames
(
fireDetection
.
getId
()));
fireDetection
=
fireDetection1
.
get
();
}
fireDetection
.
setProtectObjNames
(
this
.
impEquipMapper
.
queryProtectObjNames
(
fireDetection
.
getId
()));
returnEntity
=
fireDetection
;
returnEntity
=
fireDetection
;
break
;
break
;
default
:
default
:
...
@@ -195,13 +186,14 @@ public class FireEquipServiceImpl implements IFireEquipService {
...
@@ -195,13 +186,14 @@ public class FireEquipServiceImpl implements IFireEquipService {
@Override
@Override
public
int
countAssociatedEquipStationByIds
(
String
[]
ids
)
{
public
int
countAssociatedEquipStationByIds
(
String
[]
ids
)
{
return
iFireEquipmentDao
.
countAssociatedEquipStationByIds
(
ids
);
// return iFireEquipmentDao.countAssociatedEquipStationByIds(ids);
return
0
;
}
}
@Override
//
@Override
public
Boolean
isExistByCode
(
String
code
)
{
//
public Boolean isExistByCode(String code) {
Optional
<
FireEquipment
>
optional
=
iFireEquipmentDao
.
findByCode
(
code
);
//
Optional<FireEquipment> optional = iFireEquipmentDao.findByCode(code);
return
optional
.
isPresent
();
//
return optional.isPresent();
}
//
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/FireStationServiceImpl.java
View file @
fe42f92b
...
@@ -4,12 +4,10 @@ import com.yeejoin.amos.fas.business.constants.FasConstant;
...
@@ -4,12 +4,10 @@ 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.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationEquipmentDao
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireStationService
;
import
com.yeejoin.amos.fas.business.service.intfc.IFireStationService
;
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.FireEquipment
;
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
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
...
@@ -43,8 +41,6 @@ public class FireStationServiceImpl implements IFireStationService {
...
@@ -43,8 +41,6 @@ public class FireStationServiceImpl implements IFireStationService {
@Autowired
@Autowired
IFireStationEquipmentDao
iFireStationEquipmentDao
;
IFireStationEquipmentDao
iFireStationEquipmentDao
;
@Autowired
IFireEquipmentDao
iFireEquipmentDao
;
@Value
(
"${windows.img.path}"
)
@Value
(
"${windows.img.path}"
)
private
String
winImgPath
;
private
String
winImgPath
;
...
@@ -61,52 +57,52 @@ public class FireStationServiceImpl implements IFireStationService {
...
@@ -61,52 +57,52 @@ public class FireStationServiceImpl implements IFireStationService {
public
List
<
FireStationFireEquipment
>
saveStationFireEquipment
(
public
List
<
FireStationFireEquipment
>
saveStationFireEquipment
(
List
<
FireStationFireEquipment
>
fireStationFireEquipments
)
throws
Exception
{
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());
FireStation
fireStation
=
null
;
//
FireStation fireStation=null;
FireEquipment
fireEquipment
=
null
;
//
FireEquipment fireEquipment=null;
if
(
fireStation1
.
isPresent
()){
//
if(fireStation1.isPresent()){
fireStation
=
fireStation1
.
get
();
//
fireStation=fireStation1.get();
}
//
}
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("绑定关系已经存在.");
//
Map
map
=
fireStationEquipmentMapper
.
queryRelation
(
fireStationFireEquipment
.
getFireStationId
(),
//
Map map = fireStationEquipmentMapper.queryRelation(fireStationFireEquipment.getFireStationId(),
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");//当前数量
Double
number2
=
fireStationFireEquipment
.
getNumber
();
//添加的数量
//
Double number2 = fireStationFireEquipment.getNumber();//添加的数量
Double
number3
=
(
double
)
fireEquipment
.
getNumber
();
//库存
//
Double number3 = (double)fireEquipment.getNumber();//库存
Double
diff
=
number3
-
number2
;
//
Double diff = number3 - number2;
if
(
diff
<
0
){
//
if(diff < 0){
throw
new
Exception
(
"添加数量超过现有数量!."
);
//
throw new Exception("添加数量超过现有数量!.");
}
else
{
//
}else {
Double
curNumber
=
number
+
number2
;
//
Double curNumber = number + number2;
fireStationEquipmentMapper
.
updateNumberById
(
stationEquiId
,
curNumber
);
//
fireStationEquipmentMapper.updateNumberById(stationEquiId,curNumber);
fireEquipment
.
setNumber
(
diff
.
intValue
());
//
fireEquipment.setNumber(diff.intValue());
iFireEquipmentDao
.
saveAndFlush
(
fireEquipment
);
//
iFireEquipmentDao.saveAndFlush(fireEquipment);
}
//
}
}
//
}
}
else
{
//
}else {
fireStationFireEquipment
=
iFireStationEquipmentDao
.
save
(
fireStationFireEquipment
);
//
fireStationFireEquipment = iFireStationEquipmentDao.save(fireStationFireEquipment);
}
//
}
//
//
//
}
//
}
return
fireStationFireEquipments
;
return
fireStationFireEquipments
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
fe42f92b
...
@@ -114,8 +114,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -114,8 +114,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
@Autowired
private
FireEquipMapper
fireEquipMapper
;
private
FireEquipMapper
fireEquipMapper
;
@Autowired
private
IFireEquipmentDao
iFireEquipmentDao
;
@Autowired
@Autowired
private
ImpAndFireEquipMapper
impAndFireEquipMapper
;
private
ImpAndFireEquipMapper
impAndFireEquipMapper
;
...
@@ -530,7 +528,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -530,7 +528,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
public
void
alermContingency
(
String
batchNo
,
FireEquipment
fireEquipment
,
Equipment
equipment
)
throws
Exception
{
public
void
alermContingency
(
String
batchNo
,
FireEquipment
Bo
fireEquipment
,
Equipment
equipment
)
throws
Exception
{
Object
oldContingencyRo
=
redisTemplate
.
opsForValue
().
get
(
"contingencyRo"
);
Object
oldContingencyRo
=
redisTemplate
.
opsForValue
().
get
(
"contingencyRo"
);
ContingencyRo
contingencyRo
=
new
ContingencyRo
();
ContingencyRo
contingencyRo
=
new
ContingencyRo
();
contingencyRo
.
setBatchNo
(
batchNo
);
contingencyRo
.
setBatchNo
(
batchNo
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
fe42f92b
...
@@ -46,7 +46,6 @@ import com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper;
...
@@ -46,7 +46,6 @@ 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.IFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IFireStationDao
;
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
;
...
@@ -80,7 +79,6 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
...
@@ -80,7 +79,6 @@ 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.FireEquipment
;
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
;
...
@@ -88,7 +86,6 @@ import com.yeejoin.amos.fas.dao.entity.SafetyIndexChangeLog;
...
@@ -88,7 +86,6 @@ 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
;
import
io.swagger.annotations.ApiOperation
;
/**
/**
* @author DELL
* @author DELL
...
@@ -103,8 +100,6 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -103,8 +100,6 @@ public class View3dServiceImpl implements IView3dService {
@Autowired
@Autowired
private
IRiskSourceDao
iRiskSourceDao
;
private
IRiskSourceDao
iRiskSourceDao
;
@Autowired
@Autowired
private
IFireEquipmentDao
iFireEquipmentDao
;
@Autowired
private
IFireStationDao
iFireStationDao
;
private
IFireStationDao
iFireStationDao
;
@Autowired
@Autowired
private
IEquipmentDao
iEquipmentDao
;
private
IEquipmentDao
iEquipmentDao
;
...
@@ -217,17 +212,17 @@ public class View3dServiceImpl implements IView3dService {
...
@@ -217,17 +212,17 @@ public class View3dServiceImpl implements IView3dService {
}
}
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
public
void
updateFireEquipmentPosition
(
BindPointBo
pointBo
)
{
Optional
<
FireEquipment
>
data
=
iFireEquipmentDao
.
findById
(
pointBo
.
getPointId
());
//
Optional<FireEquipment> data = iFireEquipmentDao.findById(pointBo.getPointId());
if
(
data
.
isPresent
()){
//
if(data.isPresent()){
FireEquipment
fireEquipment
=
data
.
get
();
//
FireEquipment fireEquipment = 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
)
fireEquipment
.
setUe4Location
(
ue4Location
);
//
if(ue4Location != null) fireEquipment.setUe4Location(ue4Location);
if
(
ue4Rotation
!=
null
)
fireEquipment
.
setUe4Rotation
(
ue4Rotation
);
//
if(ue4Rotation != null) fireEquipment.setUe4Rotation(ue4Rotation);
if
(
position3d
!=
null
)
fireEquipment
.
setPosition3d
(
position3d
);
//
if(position3d != null) fireEquipment.setPosition3d(position3d);
iFireEquipmentDao
.
save
(
fireEquipment
);
//
iFireEquipmentDao.save(fireEquipment);
}
//
}
}
}
public
void
updateEquipmentPosition
(
BindPointBo
pointBo
)
{
public
void
updateEquipmentPosition
(
BindPointBo
pointBo
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IFireEquipService.java
View file @
fe42f92b
...
@@ -2,13 +2,10 @@ package com.yeejoin.amos.fas.business.service.intfc;
...
@@ -2,13 +2,10 @@ package com.yeejoin.amos.fas.business.service.intfc;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
import
com.yeejoin.amos.fas.business.param.CommonPageInfoParam
;
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.BasicEntity
;
import
com.yeejoin.amos.fas.dao.entity.FireEquipment
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
public
interface
IFireEquipService
{
public
interface
IFireEquipService
{
...
@@ -18,9 +15,9 @@ public interface IFireEquipService {
...
@@ -18,9 +15,9 @@ public interface IFireEquipService {
List
<
String
>
findFireEquipArea
();
List
<
String
>
findFireEquipArea
();
FireEquipment
save
(
FireEquipment
fireEquipment
);
//
FireEquipment save(FireEquipment fireEquipment);
FireEquipment
queryOne
(
Long
id
);
//
FireEquipment queryOne(Long id);
/**
/**
* 删除单个风险点
* 删除单个风险点
...
@@ -47,5 +44,5 @@ public interface IFireEquipService {
...
@@ -47,5 +44,5 @@ public interface IFireEquipService {
*/
*/
int
countAssociatedEquipStationByIds
(
String
[]
ids
);
int
countAssociatedEquipStationByIds
(
String
[]
ids
);
Boolean
isExistByCode
(
String
code
);
//
Boolean isExistByCode(String code);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
fe42f92b
...
@@ -61,28 +61,7 @@
...
@@ -61,28 +61,7 @@
alter table `f_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
alter table `f_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350445716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_car"
columnName=
"ue4_location"
/>
</not>
</preConditions>
<comment>
f_fire_car add column ue4_location
</comment>
<sql>
alter table `f_fire_car` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350445716-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_car"
columnName=
"ue4_rotation"
/>
</not>
</preConditions>
<comment>
f_fire_car add column ue4_rotation
</comment>
<sql>
alter table `f_fire_car` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
fe42f92b
...
@@ -512,7 +512,7 @@
...
@@ -512,7 +512,7 @@
WHERE esi.equipment_specific_id = #{fireEquipmentId} AND fmep.important_equipment_id = #{importantEquipmentId}
WHERE esi.equipment_specific_id = #{fireEquipmentId} AND fmep.important_equipment_id = #{importantEquipmentId}
</select>
</select>
<select
id=
"findFireEquipById"
resultType=
"com.yeejoin.amos.fas.
dao.entity.FireEquipment
"
>
<select
id=
"findFireEquipById"
resultType=
"com.yeejoin.amos.fas.
business.bo.FireEquipmentBo
"
>
SELECT
SELECT
spec.id AS id,
spec.id AS id,
spec.org_code AS org_code,
spec.org_code AS org_code,
...
@@ -559,7 +559,7 @@
...
@@ -559,7 +559,7 @@
spec.id = #{id}
spec.id = #{id}
</if>
</if>
</select>
</select>
<select
id=
"findVideoById"
resultType=
"com.yeejoin.amos.fas.
dao.entity.FireEquipment
"
>
<select
id=
"findVideoById"
resultType=
"com.yeejoin.amos.fas.
business.bo.FireEquipmentBo
"
>
SELECT
SELECT
risk.*,
risk.*,
video.id AS id,
video.id AS id,
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impAndfire_equip.xml
View file @
fe42f92b
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<!--
<select id="queryBindFirEqumtPage" resultType="com.yeejoin.amos.fas.dao.entity.FireEquipment">
<select id="queryBindFirEqumtPage" resultType="com.yeejoin.amos.fas.dao.entity.FireEquipment">
SELECT
SELECT
rs.`name` production_area,
rs.`name` production_area,
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
<if test="start != -1 and length != -1">
<if test="start != -1 and length != -1">
LIMIT ${start},${length} ;
LIMIT ${start},${length} ;
</if>
</if>
</select>
</select>
<select id="queryBindFirEqumtPageCount" resultType="long">
<select id="queryBindFirEqumtPageCount" resultType="long">
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
efe.equipment_id = ${equipmentId}
efe.equipment_id = ${equipmentId}
AND efe.fire_equipment_id = fe.id
AND efe.fire_equipment_id = fe.id
)
)
</select>
</select>
-->
<select
id=
"queryForCamera"
resultType=
"map"
>
<select
id=
"queryForCamera"
resultType=
"map"
>
SELECT
SELECT
...
...
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