Commit aa89ba54 authored by zhengjiawei's avatar zhengjiawei

注 无用库相关代码

parent 2ad73325
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* The persistent class for the fire_equipment database table.
*
*/
@Entity
@Table(name="f_fire_equipment_data")
@NamedQuery(name="FireEquipmentData.findAll", query="SELECT f FROM FireEquipmentData f")
public class FireEquipmentData extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name="fire_equipment_id")
private Long fireEquipmentId;
@Column(name="fire_equipment_point_id")
private Long fireEquipmentPointId;
@Column(name="eq_point_name")
private String eqPointName;
@Column(name="eq_point_unit")
private String eqPointUnit;
@Column(name="eq_point_code")
private String eqPointCode;
private String type="alarm";
/**
* 信息地址
*/
@Column(name="information_address")
private String informationAddress;
/**
* 值
*/
@Column(name="e_value")
private String eValue;
private int soe;
@Column(name="is_invalid")
private int isInvalid; // 是否有效
/**
* 机构
*/
@Column(name="org_code")
private String orgCode;
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public FireEquipmentData() {
}
public Long getFireEquipmentId() {
return fireEquipmentId;
}
public void setFireEquipmentId(Long fireEquipmentId) {
this.fireEquipmentId = fireEquipmentId;
}
public Long getFireEquipmentPointId() {
return fireEquipmentPointId;
}
public void setFireEquipmentPointId(Long fireEquipmentPointId) {
this.fireEquipmentPointId = fireEquipmentPointId;
}
public String getEqPointName() {
return eqPointName;
}
public void setEqPointName(String eqPointName) {
this.eqPointName = eqPointName;
}
public String getEqPointUnit() {
return eqPointUnit;
}
public void setEqPointUnit(String eqPointUnit) {
this.eqPointUnit = eqPointUnit;
}
public String getEqPointCode() {
return eqPointCode;
}
public void setEqPointCode(String eqPointCode) {
this.eqPointCode = eqPointCode;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getInformationAddress() {
return informationAddress;
}
public void setInformationAddress(String informationAddress) {
this.informationAddress = informationAddress;
}
public String geteValue() {
return eValue;
}
public void seteValue(String eValue) {
this.eValue = eValue;
}
public int getSoe() {
return soe;
}
public void setSoe(int soe) {
this.soe = soe;
}
public int getIsInvalid() {
return isInvalid;
}
public void setIsInvalid(int isInvalid) {
this.isInvalid = isInvalid;
}
}
\ No newline at end of file
//package com.yeejoin.amos.fas.dao.entity;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.NamedQuery;
//import javax.persistence.Table;
//
//
///**
// * The persistent class for the fire_equipment database table.
// *
// */
//@Entity
//@Table(name="f_fire_equipment_data")
//@NamedQuery(name="FireEquipmentData.findAll", query="SELECT f FROM FireEquipmentData f")
//public class FireEquipmentData extends BasicEntity {
// private static final long serialVersionUID = 1L;
//
// @Column(name="fire_equipment_id")
// private Long fireEquipmentId;
//
// @Column(name="fire_equipment_point_id")
// private Long fireEquipmentPointId;
//
// @Column(name="eq_point_name")
// private String eqPointName;
//
// @Column(name="eq_point_unit")
// private String eqPointUnit;
//
// @Column(name="eq_point_code")
// private String eqPointCode;
//
// private String type="alarm";
//
// /**
// * 信息地址
// */
// @Column(name="information_address")
// private String informationAddress;
// /**
// * 值
// */
// @Column(name="e_value")
// private String eValue;
//
// private int soe;
//
// @Column(name="is_invalid")
// private int isInvalid; // 是否有效
//
// /**
// * 机构
// */
// @Column(name="org_code")
// private String orgCode;
//
// public String getOrgCode() {
// return orgCode;
// }
//
// public void setOrgCode(String orgCode) {
// this.orgCode = orgCode;
// }
//
// public FireEquipmentData() {
// }
//
// public Long getFireEquipmentId() {
// return fireEquipmentId;
// }
//
// public void setFireEquipmentId(Long fireEquipmentId) {
// this.fireEquipmentId = fireEquipmentId;
// }
//
// public Long getFireEquipmentPointId() {
// return fireEquipmentPointId;
// }
//
// public void setFireEquipmentPointId(Long fireEquipmentPointId) {
// this.fireEquipmentPointId = fireEquipmentPointId;
// }
//
// public String getEqPointName() {
// return eqPointName;
// }
//
// public void setEqPointName(String eqPointName) {
// this.eqPointName = eqPointName;
// }
//
// public String getEqPointUnit() {
// return eqPointUnit;
// }
//
// public void setEqPointUnit(String eqPointUnit) {
// this.eqPointUnit = eqPointUnit;
// }
//
// public String getEqPointCode() {
// return eqPointCode;
// }
//
// public void setEqPointCode(String eqPointCode) {
// this.eqPointCode = eqPointCode;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getInformationAddress() {
// return informationAddress;
// }
//
// public void setInformationAddress(String informationAddress) {
// this.informationAddress = informationAddress;
// }
//
// public String geteValue() {
// return eValue;
// }
//
// public void seteValue(String eValue) {
// this.eValue = eValue;
// }
//
// public int getSoe() {
// return soe;
// }
//
// public void setSoe(int soe) {
// this.soe = soe;
// }
//
// public int getIsInvalid() {
// return isInvalid;
// }
//
// public void setIsInvalid(int isInvalid) {
// this.isInvalid = isInvalid;
// }
//
//
//
//}
\ No newline at end of file
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import org.springframework.data.annotation.Transient;
/**
* The persistent class for the f_fire_equipment_point database table.
*
*/
@Entity
@Table(name="f_fire_equipment_point")
@NamedQuery(name="FireEquipmentPoint.findAll", query="SELECT f FROM FireEquipmentPoint f")
public class FireEquipmentPoint extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name="code")
private String code;
@Column(name="create_by")
private String createBy;
@Column(name="fire_equipment_id")
private Long fireEquipmentId;
@Column(name="name")
private String name;
@Column(name="remark")
private String remark;
@Column(name="type")
private String type;
@Column(name="value")
private String value;
private String unit;
@Column(name="alarm_type")
private Long alarmType;
@Column(name="org_code")
private String orgCode;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Long getFireEquipmentId() {
return fireEquipmentId;
}
public void setFireEquipmentId(Long fireEquipmentId) {
this.fireEquipmentId = fireEquipmentId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public Long getAlarmType() {
return alarmType;
}
public void setAlarmType(Long alarmType) {
this.alarmType = alarmType;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
}
\ No newline at end of file
//package com.yeejoin.amos.fas.dao.entity;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.NamedQuery;
//import javax.persistence.Table;
//
//import org.springframework.data.annotation.Transient;
//
//
///**
// * The persistent class for the f_fire_equipment_point database table.
// *
// */
//@Entity
//@Table(name="f_fire_equipment_point")
//@NamedQuery(name="FireEquipmentPoint.findAll", query="SELECT f FROM FireEquipmentPoint f")
//public class FireEquipmentPoint extends BasicEntity {
// private static final long serialVersionUID = 1L;
// @Column(name="code")
// private String code;
//
// @Column(name="create_by")
// private String createBy;
//
// @Column(name="fire_equipment_id")
// private Long fireEquipmentId;
//
// @Column(name="name")
// private String name;
//
// @Column(name="remark")
// private String remark;
//
// @Column(name="type")
// private String type;
//
// @Column(name="value")
// private String value;
//
// private String unit;
// @Column(name="alarm_type")
// private Long alarmType;
//
// @Column(name="org_code")
// private String orgCode;
// public String getCode() {
// return code;
// }
//
// public void setCode(String code) {
// this.code = code;
// }
//
// public String getCreateBy() {
// return createBy;
// }
//
// public void setCreateBy(String createBy) {
// this.createBy = createBy;
// }
//
// public Long getFireEquipmentId() {
// return fireEquipmentId;
// }
//
// public void setFireEquipmentId(Long fireEquipmentId) {
// this.fireEquipmentId = fireEquipmentId;
// }
//
// public String getName() {
// return name;
// }
//
// public void setName(String name) {
// this.name = name;
// }
//
// public String getRemark() {
// return remark;
// }
//
// public void setRemark(String remark) {
// this.remark = remark;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// public String getUnit() {
// return unit;
// }
//
// public void setUnit(String unit) {
// this.unit = unit;
// }
//
// public Long getAlarmType() {
// return alarmType;
// }
//
// public void setAlarmType(Long alarmType) {
// this.alarmType = alarmType;
// }
//
// public String getOrgCode() {
// return orgCode;
// }
//
// public void setOrgCode(String orgCode) {
// this.orgCode = orgCode;
// }
//}
\ No newline at end of file
package com.yeejoin.amos.fas.dao.entity;
import java.util.List;
import java.util.Map;
import javax.persistence.*;
/**
* 消防站点
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_station")
@NamedQuery(name="FireStation.findAll", query="SELECT f FROM FireStation f")
public class FireStation extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 名称
*/
private String name;
/**
* 编号
*/
private String code;
/**
* 类型 1:消防小室,2:消防泡沫间
*/
private String type;
/**
* 所属风险区域id
*/
@Column(name="risk_source_id")
private Long riskSourceId;
/**
* 位置
*/
private String address;
/**
* 3纬坐标
*/
private String position3d;
/**
* 3维楼层
*/
private String floor3d;
/**
* 是否室内
*/
@Column(name="is_indoor")
private Boolean isIndoor=true;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
@Column(name="picture")
private String picture;
private List<Map> fireEquipmentInfo;
/**
* ue4位置
*/
@Lob
private String ue4Location;
/**
* ue4旋转
*/
@Lob
private String ue4Rotation;
@Transient
public List<Map> getFireEquipmentInfo() {
return fireEquipmentInfo;
}
public void setFireEquipmentInfo(List<Map> fireEquipmentInfo) {
this.fireEquipmentInfo = fireEquipmentInfo;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
public String getFloor3d() {
return floor3d;
}
public void setFloor3d(String floor3d) {
this.floor3d = floor3d;
}
public Boolean getIsIndoor() {
return isIndoor;
}
public void setIsIndoor(Boolean isIndoor) {
this.isIndoor = isIndoor;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getPicture() {
return picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public Long getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(Long riskSourceId) {
this.riskSourceId = riskSourceId;
}
@Column(name = "ue4_location")
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
@Column(name = "ue4_rotation")
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
}
//package com.yeejoin.amos.fas.dao.entity;
//
//import java.util.List;
//import java.util.Map;
//
//import javax.persistence.*;
//
///**
// * 消防站点
// * @author Administrator
// *
// */
//@Entity
//@Table(name="f_fire_station")
//@NamedQuery(name="FireStation.findAll", query="SELECT f FROM FireStation f")
//public class FireStation extends BasicEntity{
//
// /**
// *
// */
// private static final long serialVersionUID = 1L;
//
// /**
// * 名称
// */
// private String name;
// /**
// * 编号
// */
// private String code;
//
// /**
// * 类型 1:消防小室,2:消防泡沫间
// */
// private String type;
//
// /**
// * 所属风险区域id
// */
// @Column(name="risk_source_id")
// private Long riskSourceId;
//
//
// /**
// * 位置
// */
// private String address;
//
// /**
// * 3纬坐标
// */
// private String position3d;
//
// /**
// * 3维楼层
// */
// private String floor3d;
//
// /**
// * 是否室内
// */
// @Column(name="is_indoor")
// private Boolean isIndoor=true;
//
// /**
// * 组织
// */
// @Column(name="org_code")
// private String orgCode;
//
// /**
// * 创建人
// */
// @Column(name="create_by")
// private String createBy;
//
//
// @Column(name="picture")
// private String picture;
//
// private List<Map> fireEquipmentInfo;
//
// /**
// * ue4位置
// */
// @Lob
// private String ue4Location;
//
// /**
// * ue4旋转
// */
// @Lob
// private String ue4Rotation;
//
// @Transient
// public List<Map> getFireEquipmentInfo() {
// return fireEquipmentInfo;
// }
//
// public void setFireEquipmentInfo(List<Map> fireEquipmentInfo) {
// this.fireEquipmentInfo = fireEquipmentInfo;
// }
//
// public String getName() {
// return name;
// }
//
// public void setName(String name) {
// this.name = name;
// }
//
// public String getCode() {
// return code;
// }
//
// public void setCode(String code) {
// this.code = code;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getAddress() {
// return address;
// }
//
// public void setAddress(String address) {
// this.address = address;
// }
//
// public String getPosition3d() {
// return position3d;
// }
//
// public void setPosition3d(String position3d) {
// this.position3d = position3d;
// }
//
// public String getFloor3d() {
// return floor3d;
// }
//
// public void setFloor3d(String floor3d) {
// this.floor3d = floor3d;
// }
//
// public Boolean getIsIndoor() {
// return isIndoor;
// }
//
// public void setIsIndoor(Boolean isIndoor) {
// this.isIndoor = isIndoor;
// }
//
// public String getOrgCode() {
// return orgCode;
// }
//
// public void setOrgCode(String orgCode) {
// this.orgCode = orgCode;
// }
//
// public String getCreateBy() {
// return createBy;
// }
//
// public void setCreateBy(String createBy) {
// this.createBy = createBy;
// }
//
// public String getPicture() {
// return picture;
// }
//
// public void setPicture(String picture) {
// this.picture = picture;
// }
//
// public Long getRiskSourceId() {
// return riskSourceId;
// }
//
// public void setRiskSourceId(Long riskSourceId) {
// this.riskSourceId = riskSourceId;
// }
//
// @Column(name = "ue4_location")
// public String getUe4Location() {
// return ue4Location;
// }
//
// public void setUe4Location(String ue4Location) {
// this.ue4Location = ue4Location;
// }
//
// @Column(name = "ue4_rotation")
// public String getUe4Rotation() {
// return ue4Rotation;
// }
//
// public void setUe4Rotation(String ue4Rotation) {
// this.ue4Rotation = ue4Rotation;
// }
//}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* 消防站关联物资
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_station_equipment")
@NamedQuery(name="FireStationFireEquipment.findAll", query="SELECT f FROM FireStationFireEquipment f")
public class FireStationFireEquipment extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 消防站id
*/
@Column(name="fire_station_id")
private Long fireStationId;
/**
* 消防资源
*/
@Column(name="fire_equipment_id")
private Long fireEquipmentId;
/**
* 个数
*/
private Double number;
/**
* 单位
*/
private String unit;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
public Long getFireStationId() {
return fireStationId;
}
public void setFireStationId(Long fireStationId) {
this.fireStationId = fireStationId;
}
public Long getFireEquipmentId() {
return fireEquipmentId;
}
public void setFireEquipmentId(Long fireEquipmentId) {
this.fireEquipmentId = fireEquipmentId;
}
public Double getNumber() {
return number;
}
public void setNumber(Double number) {
this.number = number;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
}
//package com.yeejoin.amos.fas.dao.entity;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.NamedQuery;
//import javax.persistence.Table;
///**
// * 消防站关联物资
// * @author Administrator
// *
// */
//@Entity
//@Table(name="f_fire_station_equipment")
//@NamedQuery(name="FireStationFireEquipment.findAll", query="SELECT f FROM FireStationFireEquipment f")
//public class FireStationFireEquipment extends BasicEntity{
//
// /**
// *
// */
// private static final long serialVersionUID = 1L;
//
// /**
// * 消防站id
// */
// @Column(name="fire_station_id")
// private Long fireStationId;
//
// /**
// * 消防资源
// */
// @Column(name="fire_equipment_id")
// private Long fireEquipmentId;
//
// /**
// * 个数
// */
// private Double number;
//
// /**
// * 单位
// */
// private String unit;
//
// /**
// * 创建人
// */
// @Column(name="create_by")
// private String createBy;
//
// public Long getFireStationId() {
// return fireStationId;
// }
//
// public void setFireStationId(Long fireStationId) {
// this.fireStationId = fireStationId;
// }
//
// public Long getFireEquipmentId() {
// return fireEquipmentId;
// }
//
// public void setFireEquipmentId(Long fireEquipmentId) {
// this.fireEquipmentId = fireEquipmentId;
// }
//
// public Double getNumber() {
// return number;
// }
//
// public void setNumber(Double number) {
// this.number = number;
// }
//
// public String getUnit() {
// return unit;
// }
//
// public void setUnit(String unit) {
// this.unit = unit;
// }
//
// public String getCreateBy() {
// return createBy;
// }
//
// public void setCreateBy(String createBy) {
// this.createBy = createBy;
// }
//
//}
package com.yeejoin.amos.fas.dao.entity;
import java.sql.Time;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* 消防力量
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_strength")
@NamedQuery(name="FireStrength.findAll", query="SELECT f FROM FireStrength f")
public class FireStrength extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private String code;
/**
* 姓名
*/
private String username;
/**
* 职位
*/
private String position;
/**
* 固话
*/
private String tel;
/**
* 开始时间
*/
@Column(name="day_begin")
private Time dayBegin;
/**
* 结束时间
*/
@Column(name="day_end")
private Time dayEnd;
/**
* 手机
*/
@Column(name="phone_num")
private String phoneNum;
/**
* 工作描述
*/
@Column(name="job_des")
private String jobDes;
/**
* 备注
*/
private String remark;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public String getPhoneNum() {
return phoneNum;
}
public void setPhoneNum(String phoneNum) {
this.phoneNum = phoneNum;
}
public String getJobDes() {
return jobDes;
}
public void setJobDes(String jobDes) {
this.jobDes = jobDes;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Time getDayBegin() {
return dayBegin;
}
public void setDayBegin(Time dayBegin) {
this.dayBegin = dayBegin;
}
public Time getDayEnd() {
return dayEnd;
}
public void setDayEnd(Time dayEnd) {
this.dayEnd = dayEnd;
}
}
//package com.yeejoin.amos.fas.dao.entity;
//
//import java.sql.Time;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.NamedQuery;
//import javax.persistence.Table;
///**
// * 消防力量
// * @author Administrator
// *
// */
//@Entity
//@Table(name="f_fire_strength")
//@NamedQuery(name="FireStrength.findAll", query="SELECT f FROM FireStrength f")
//public class FireStrength extends BasicEntity{
//
// /**
// *
// */
// private static final long serialVersionUID = 1L;
//
// /**
// * 编号
// */
// private String code;
//
// /**
// * 姓名
// */
// private String username;
//
// /**
// * 职位
// */
// private String position;
//
// /**
// * 固话
// */
// private String tel;
//
// /**
// * 开始时间
// */
// @Column(name="day_begin")
// private Time dayBegin;
// /**
// * 结束时间
// */
// @Column(name="day_end")
// private Time dayEnd;
// /**
// * 手机
// */
// @Column(name="phone_num")
// private String phoneNum;
//
// /**
// * 工作描述
// */
// @Column(name="job_des")
// private String jobDes;
//
// /**
// * 备注
// */
// private String remark;
//
// /**
// * 组织
// */
// @Column(name="org_code")
// private String orgCode;
//
// /**
// * 创建人
// */
// @Column(name="create_by")
// private String createBy;
//
// public String getCode() {
// return code;
// }
//
// public void setCode(String code) {
// this.code = code;
// }
//
// public String getUsername() {
// return username;
// }
//
// public void setUsername(String username) {
// this.username = username;
// }
//
// public String getPosition() {
// return position;
// }
//
// public void setPosition(String position) {
// this.position = position;
// }
//
// public String getTel() {
// return tel;
// }
//
// public void setTel(String tel) {
// this.tel = tel;
// }
//
// public String getPhoneNum() {
// return phoneNum;
// }
//
// public void setPhoneNum(String phoneNum) {
// this.phoneNum = phoneNum;
// }
//
// public String getJobDes() {
// return jobDes;
// }
//
// public void setJobDes(String jobDes) {
// this.jobDes = jobDes;
// }
//
// public String getRemark() {
// return remark;
// }
//
// public void setRemark(String remark) {
// this.remark = remark;
// }
//
// public String getOrgCode() {
// return orgCode;
// }
//
// public void setOrgCode(String orgCode) {
// this.orgCode = orgCode;
// }
//
// public String getCreateBy() {
// return createBy;
// }
//
// public void setCreateBy(String createBy) {
// this.createBy = createBy;
// }
//
// public Time getDayBegin() {
// return dayBegin;
// }
//
// public void setDayBegin(Time dayBegin) {
// this.dayBegin = dayBegin;
// }
//
// public Time getDayEnd() {
// return dayEnd;
// }
//
// public void setDayEnd(Time dayEnd) {
// this.dayEnd = dayEnd;
// }
//
//}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.*;
/**
* 水资源
* @author
*
*/
@Entity
@Table(name="f_water_resource")
@NamedQuery(name="WaterResource.findAll", query="SELECT f FROM WaterResource f")
public class WaterResource extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 名称
*/
private String name;
/**
* 编号
*/
private String code;
/**
* 类型 1:消火栓,2:消防水池,3:喷淋
*/
private String type;
/**
* 区域
*/
@Column(name="production_area")
private String productionArea;
/**
* 3纬坐标
*/
private String position3d;
/**
* 3维楼层
*/
private String floor3d;
/**
* 是否室内
*/
@Column(name="is_indoor")
private Boolean isIndoor=true;
/**
* 所属风险区域id
*/
@Column(name="risk_source_id")
private Long riskSourceId;
/**
* 房间
*/
private String room;
/**
* 位置
*/
private String address;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
@Column(name="area")
private String area;
@Column(name="max_level")
private String maxLevel;
@Column(name="alarm_level")
private String alarmLevel;
/**
* ue4位置
*/
@Lob
private String ue4Location;
/**
* ue4旋转
*/
@Lob
private String ue4Rotation;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getProductionArea() {
return productionArea;
}
public void setProductionArea(String productionArea) {
this.productionArea = productionArea;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
public String getFloor3d() {
return floor3d;
}
public void setFloor3d(String floor3d) {
this.floor3d = floor3d;
}
public Boolean getIsIndoor() {
return isIndoor;
}
public void setIsIndoor(Boolean isIndoor) {
this.isIndoor = isIndoor;
}
public String getRoom() {
return room;
}
public void setRoom(String room) {
this.room = room;
}
public Long getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(Long riskSourceId) {
this.riskSourceId = riskSourceId;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
@Column(name = "ue4_location")
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
@Column(name = "ue4_rotation")
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getMaxLevel() {
return maxLevel;
}
public void setMaxLevel(String maxLevel) {
this.maxLevel = maxLevel;
}
public String getAlarmLevel() {
return alarmLevel;
}
public void setAlarmLevel(String alarmLevel) {
this.alarmLevel = alarmLevel;
}
}
//package com.yeejoin.amos.fas.dao.entity;
//
//import javax.persistence.*;
//
///**
// * 水资源
// * @author
// *
// */
//@Entity
//@Table(name="f_water_resource")
//@NamedQuery(name="WaterResource.findAll", query="SELECT f FROM WaterResource f")
//public class WaterResource extends BasicEntity{
//
// /**
// *
// */
// private static final long serialVersionUID = 1L;
//
// /**
// * 名称
// */
// private String name;
// /**
// * 编号
// */
// private String code;
//
// /**
// * 类型 1:消火栓,2:消防水池,3:喷淋
// */
// private String type;
//
//
// /**
// * 区域
// */
// @Column(name="production_area")
// private String productionArea;
//
//
// /**
// * 3纬坐标
// */
// private String position3d;
//
// /**
// * 3维楼层
// */
// private String floor3d;
//
// /**
// * 是否室内
// */
// @Column(name="is_indoor")
// private Boolean isIndoor=true;
// /**
// * 所属风险区域id
// */
// @Column(name="risk_source_id")
// private Long riskSourceId;
//
// /**
// * 房间
// */
// private String room;
//
// /**
// * 位置
// */
// private String address;
//
//
// /**
// * 组织
// */
// @Column(name="org_code")
// private String orgCode;
//
// /**
// * 创建人
// */
// @Column(name="create_by")
// private String createBy;
//
// @Column(name="area")
// private String area;
//
// @Column(name="max_level")
// private String maxLevel;
//
// @Column(name="alarm_level")
// private String alarmLevel;
//
// /**
// * ue4位置
// */
// @Lob
// private String ue4Location;
//
// /**
// * ue4旋转
// */
// @Lob
// private String ue4Rotation;
//
// public String getName() {
// return name;
// }
//
// public void setName(String name) {
// this.name = name;
// }
//
// public String getCode() {
// return code;
// }
//
// public void setCode(String code) {
// this.code = code;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getProductionArea() {
// return productionArea;
// }
//
// public void setProductionArea(String productionArea) {
// this.productionArea = productionArea;
// }
//
// public String getPosition3d() {
// return position3d;
// }
//
// public void setPosition3d(String position3d) {
// this.position3d = position3d;
// }
//
// public String getFloor3d() {
// return floor3d;
// }
//
// public void setFloor3d(String floor3d) {
// this.floor3d = floor3d;
// }
//
// public Boolean getIsIndoor() {
// return isIndoor;
// }
//
// public void setIsIndoor(Boolean isIndoor) {
// this.isIndoor = isIndoor;
// }
//
//
// public String getRoom() {
// return room;
// }
//
// public void setRoom(String room) {
// this.room = room;
// }
//
// public Long getRiskSourceId() {
// return riskSourceId;
// }
//
// public void setRiskSourceId(Long riskSourceId) {
// this.riskSourceId = riskSourceId;
// }
//
// public String getAddress() {
// return address;
// }
//
// public void setAddress(String address) {
// this.address = address;
// }
//
// public String getOrgCode() {
// return orgCode;
// }
//
// public void setOrgCode(String orgCode) {
// this.orgCode = orgCode;
// }
//
// public String getCreateBy() {
// return createBy;
// }
//
// public void setCreateBy(String createBy) {
// this.createBy = createBy;
// }
//
// @Column(name = "ue4_location")
// public String getUe4Location() {
// return ue4Location;
// }
//
// public void setUe4Location(String ue4Location) {
// this.ue4Location = ue4Location;
// }
//
// @Column(name = "ue4_rotation")
// public String getUe4Rotation() {
// return ue4Rotation;
// }
//
// public void setUe4Rotation(String ue4Rotation) {
// this.ue4Rotation = ue4Rotation;
// }
//
// public String getArea() {
// return area;
// }
//
// public void setArea(String area) {
// this.area = area;
// }
//
// public String getMaxLevel() {
// return maxLevel;
// }
//
// public void setMaxLevel(String maxLevel) {
// this.maxLevel = maxLevel;
// }
//
// public String getAlarmLevel() {
// return alarmLevel;
// }
//
// public void setAlarmLevel(String alarmLevel) {
// this.alarmLevel = alarmLevel;
// }
//}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* 水资源设备表
* @author
*
*/
@Entity
@Table(name="f_water_resource_equipment")
@NamedQuery(name="WaterResourceEquipment.findAll", query="SELECT f FROM WaterResourceEquipment f")
public class WaterResourceEquipment extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 水源id
*/
@Column(name="waterResourceId")
private Long waterResourceId;
/**
* 关联设备id
*/
@Column(name="fireEquipmentId")
private Long fireEquipmentId;
/**
* 个数
*/
private Double number=1d;
/**
* 单位
*/
private String unit;
public Long getWaterResourceId() {
return waterResourceId;
}
public void setWaterResourceId(Long waterResourceId) {
this.waterResourceId = waterResourceId;
}
public Long getFireEquipmentId() {
return fireEquipmentId;
}
public void setFireEquipmentId(Long fireEquipmentId) {
this.fireEquipmentId = fireEquipmentId;
}
public Double getNumber() {
return number;
}
public void setNumber(Double number) {
this.number = number;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
}
//package com.yeejoin.amos.fas.dao.entity;
//
//import javax.persistence.Column;
//import javax.persistence.Entity;
//import javax.persistence.NamedQuery;
//import javax.persistence.Table;
///**
// * 水资源设备表
// * @author
// *
// */
//@Entity
//@Table(name="f_water_resource_equipment")
//@NamedQuery(name="WaterResourceEquipment.findAll", query="SELECT f FROM WaterResourceEquipment f")
//public class WaterResourceEquipment extends BasicEntity{
//
// /**
// *
// */
// private static final long serialVersionUID = 1L;
//
// /**
// * 水源id
// */
// @Column(name="waterResourceId")
// private Long waterResourceId;
// /**
// * 关联设备id
// */
// @Column(name="fireEquipmentId")
// private Long fireEquipmentId;
// /**
// * 个数
// */
// private Double number=1d;
//
// /**
// * 单位
// */
// private String unit;
//
//
// public Long getWaterResourceId() {
// return waterResourceId;
// }
// public void setWaterResourceId(Long waterResourceId) {
// this.waterResourceId = waterResourceId;
// }
// public Long getFireEquipmentId() {
// return fireEquipmentId;
// }
// public void setFireEquipmentId(Long fireEquipmentId) {
// this.fireEquipmentId = fireEquipmentId;
// }
// public Double getNumber() {
// return number;
// }
// public void setNumber(Double number) {
// this.number = number;
// }
// public String getUnit() {
// return unit;
// }
// public void setUnit(String unit) {
// this.unit = unit;
// }
//
//}
......@@ -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.RemoteSecurityService;
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.IRiskSourceService;
import com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus;
......@@ -81,8 +81,8 @@ public class ContingencyAction implements CustomerAction {
@Autowired
private IContingencyInstance iContingencyInstance;
@Autowired
private FireStengthService fireStrengthService;
// @Autowired
// private FireStengthService fireStrengthService;
@Autowired
private ContingencyLogPublisher contingencyLogPublisher;
......
......@@ -121,10 +121,11 @@ public class ExcelController extends BaseController {
if ("fireResource".equals(type)) {//导入消防装备
List<FireEquipmentParam> list = FileHelper.importExcel(file, 1, 1, FireEquipmentParam.class);
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();
} catch (YeeException e) {
logger.info("导入数据异常", e);
......
......@@ -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.IFireCarService;
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.vo.ReginParams;
import com.yeejoin.amos.fas.config.Permission;
......@@ -37,8 +37,8 @@ public class FireSourceController extends BaseController {
private IFireCarService fireCarService;
@Autowired
private IFireEquipService iFireEquipService;
@Autowired
private IWaterResourceService iWaterResourceService;
// @Autowired
//// private IWaterResourceService iWaterResourceService;
@Autowired
private IEquipmentService iEquipService;
private final Logger log = LoggerFactory.getLogger(FireSourceController.class);
......@@ -87,12 +87,12 @@ public class FireSourceController extends BaseController {
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse delete(@PathVariable String ids) throws Exception {
String[] idArray = ids.split(",");
if (iWaterResourceService.countAssociatedEquipWaterByIds(idArray) > 0) {
return CommonResponseUtil.failure("该设备已被灭火栓或消防水池绑定,请先删除绑定关系");
}
if (iFireEquipService.countAssociatedEquipStationByIds(idArray) > 0) {
return CommonResponseUtil.failure("该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系");
}
// if (iWaterResourceService.countAssociatedEquipWaterByIds(idArray) > 0) {
// return CommonResponseUtil.failure("该设备已被灭火栓或消防水池绑定,请先删除绑定关系");
// }
// if (iFireEquipService.countAssociatedEquipStationByIds(idArray) > 0) {
// return CommonResponseUtil.failure("该设备已被消防泡沫间或消防小室绑定,请先删除绑定关系");
// }
if (iEquipService.countImpEquipByIds(idArray) > 0) {
return CommonResponseUtil.failure("该设备已被重点设备绑定,请先删除绑定关系");
}
......
package com.yeejoin.amos.fas.business.controller;
import java.util.Date;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.FireStrength;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@RestController
@RequestMapping(value = "/api/firestrength")
@Api(tags="消防专职人API")
public class FireStrengthController extends BaseController{
@Autowired
FireStengthService fireStengthService;
//@Authorization(ingore = true)
@Permission
@ApiOperation(httpMethod = "POST",value = "添加专职人员", notes = "添加专职人员")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse createPoint(@RequestBody FireStrength fireStrength) throws Exception{
if(fireStrength == null
|| StringUtils.isEmpty(fireStrength.getUsername())
|| StringUtils.isEmpty(fireStrength.getPhoneNum())
|| StringUtils.isEmpty(fireStrength.getPosition())
|| StringUtils.isEmpty(fireStrength.getCode() ))
throw new Exception("数据校验失败.");
fireStrength.setCreateBy("0");
fireStrength.setCreateDate(new Date());
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
@Permission
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT",value = "编辑专职人员", notes = "编辑专职人员")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse udpatePoint(@PathVariable Long id, @RequestBody FireStrength fireStrength) {
fireStrength.setId(id);
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "查询单个专职人员", notes = "查询单个专职人员")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryPoint(@PathVariable Long id) {
return CommonResponseUtil.success(fireStengthService.queryOne(id));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "DELETE",value = "删除专职人员", notes = "查询单个专职人员")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse deletePoint(@PathVariable String ids) throws Exception {
String [] idArray = ids.split(",");
return CommonResponseUtil.success(fireStengthService.deletePoint(idArray));
}
@Permission
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "分页查询专职人员", notes = "分页查询专职人员")
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse pointList(
@ApiParam(value = "名称模糊查询", required = false) @RequestParam(required = false)String name,
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false)String code,
@RequestParam int pageNumber,
@RequestParam int pageSize
) {
CommonPageable commonPageable = new CommonPageable(pageNumber,pageSize);
return CommonResponseUtil.success(fireStengthService.queryByFireEquimt(StringUtils.trimToNull(name),StringUtils.trimToNull(code),commonPageable));
}
}
//package com.yeejoin.amos.fas.business.controller;
//
//
//import java.util.Date;
//
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
//import com.yeejoin.amos.fas.config.Permission;
//import com.yeejoin.amos.fas.core.common.request.CommonPageable;
//import com.yeejoin.amos.fas.core.util.CommonResponse;
//import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
////import com.yeejoin.amos.fas.dao.entity.FireStrength;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//
//@RestController
//@RequestMapping(value = "/api/firestrength")
//@Api(tags="消防专职人API")
//public class FireStrengthController extends BaseController{
//
//
// @Autowired
// FireStengthService fireStengthService;
// //@Authorization(ingore = true)
//// @Permission
//// @ApiOperation(httpMethod = "POST",value = "添加专职人员", notes = "添加专职人员")
//// @RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
//// public CommonResponse createPoint(@RequestBody FireStrength fireStrength) throws Exception{
////
//// if(fireStrength == null
//// || StringUtils.isEmpty(fireStrength.getUsername())
//// || StringUtils.isEmpty(fireStrength.getPhoneNum())
//// || StringUtils.isEmpty(fireStrength.getPosition())
//// || StringUtils.isEmpty(fireStrength.getCode() ))
//// throw new Exception("数据校验失败.");
////
//// fireStrength.setCreateBy("0");
//// fireStrength.setCreateDate(new Date());
//// return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
//// }
//
//// @Permission
//// // @Authorization(ingore = true)
//// @ApiOperation(httpMethod = "PUT",value = "编辑专职人员", notes = "编辑专职人员")
//// @RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
//// public CommonResponse udpatePoint(@PathVariable Long id, @RequestBody FireStrength fireStrength) {
//// fireStrength.setId(id);
//// return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
//// }
//
// @Permission
// //@Authorization(ingore = true)
// @ApiOperation(httpMethod = "GET",value = "查询单个专职人员", notes = "查询单个专职人员")
// @RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
// public CommonResponse queryPoint(@PathVariable Long id) {
//
// return CommonResponseUtil.success(fireStengthService.queryOne(id));
// }
//
// @Permission
// //@Authorization(ingore = true)
// @ApiOperation(httpMethod = "DELETE",value = "删除专职人员", notes = "查询单个专职人员")
// @RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
// public CommonResponse deletePoint(@PathVariable String ids) throws Exception {
// String [] idArray = ids.split(",");
// return CommonResponseUtil.success(fireStengthService.deletePoint(idArray));
// }
//
// @Permission
// //@Authorization(ingore = true)
// @ApiOperation(httpMethod = "GET",value = "分页查询专职人员", notes = "分页查询专职人员")
// @RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
// public CommonResponse pointList(
// @ApiParam(value = "名称模糊查询", required = false) @RequestParam(required = false)String name,
// @ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false)String code,
// @RequestParam int pageNumber,
// @RequestParam int pageSize
// ) {
// CommonPageable commonPageable = new CommonPageable(pageNumber,pageSize);
//
// return CommonResponseUtil.success(fireStengthService.queryByFireEquimt(StringUtils.trimToNull(name),StringUtils.trimToNull(code),commonPageable));
// }
//
//}
......@@ -618,12 +618,12 @@ public class RiskSourceController extends BaseController {
return CommonResponseUtil.success();
}
@ApiOperation(httpMethod = "POST", value = "上传消防设备数据", notes = "上传消防设备数据")
@RequestMapping(value = "/data/fireqeuiment/all", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse postFireEqumentData(@RequestBody List<AlarmParam> deviceDatas) throws Exception {
riskSourceService.saveData(deviceDatas, "all");
return CommonResponseUtil.success();
}
// @ApiOperation(httpMethod = "POST", value = "上传消防设备数据", notes = "上传消防设备数据")
// @RequestMapping(value = "/data/fireqeuiment/all", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
// public CommonResponse postFireEqumentData(@RequestBody List<AlarmParam> deviceDatas) throws Exception {
// riskSourceService.saveData(deviceDatas, "all");
// return CommonResponseUtil.success();
// }
// @Permission
// @Authorization(ingore = true)
......
......@@ -6,7 +6,7 @@ import com.yeejoin.amos.fas.business.param.FireEquipmentParam;
import com.yeejoin.amos.fas.business.vo.EquipCommunicationData;
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;
......@@ -90,5 +90,5 @@ public interface FireEquipMapper extends BaseMapper {
FireEquipment findVideoById (@Param("id") Long id);
FireStation findFireStationById(@Param("id") Long id);
// FireStation findFireStationById(@Param("id") Long id);
}
......@@ -9,12 +9,12 @@ public interface FireStationMapper extends BaseMapper {
Map queryOne(@Param("id") Long id);
List<Map> queryForFireEqumntPage(
@Param("fireStationId") Long fireStationId,
@Param("start") long start,
@Param("length") Integer length);
Long queryCountForFireEqumntPage(
@Param("fireStationId") Long fireStationId);
// List<Map> queryForFireEqumntPage(
// @Param("fireStationId") Long fireStationId,
// @Param("start") long start,
// @Param("length") Integer length);
// Long queryCountForFireEqumntPage(
// @Param("fireStationId") Long fireStationId);
List<Map> queryForPage(@Param("name") String name,
......@@ -31,5 +31,5 @@ public interface FireStationMapper extends BaseMapper {
@Param("code") String code,
@Param("type")String type);
List<Map> queryEquipCountById(@Param("id") Long id);
// List<Map> queryEquipCountById(@Param("id") Long id);
}
package com.yeejoin.amos.fas.business.dao.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.fas.dao.entity.FireStrength;
public interface FireStrengthMapper extends BaseMapper {
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);
Long queryCountForPage(@Param("username") String username, @Param("code") String code);
List<FireStrength> queryForStrengthList(@Param("time")String time);
}
//package com.yeejoin.amos.fas.business.dao.mapper;
//
//import java.util.List;
//import java.util.Map;
//
//import org.apache.ibatis.annotations.Param;
//
////import com.yeejoin.amos.fas.dao.entity.FireStrength;
//
//public interface FireStrengthMapper extends BaseMapper {
//
// 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);
//
// Long queryCountForPage(@Param("username") String username, @Param("code") String code);
//
//// List<FireStrength> queryForStrengthList(@Param("time")String time);
//}
package com.yeejoin.amos.fas.business.dao.mapper;
import com.yeejoin.amos.fas.business.param.WaterResourceParam;
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.Set;
public interface WaterResourceMapper extends BaseMapper {
Map queryOne(@Param("id") Long id);
List<Map> queryForPage(
@Param("orgCode") String compCode,
@Param("name") String name,
@Param("code") String code,
@Param("type") String type,
@Param("start") long start,
@Param("length") Integer length);
Long queryCountForPage(
@Param("orgCode") String compCode,
@Param("name") String name,
@Param("code") String code,
@Param("type")String type);
List<Map> queryForBindFireEqumntPage(
@Param("waterResourceId") Long waterResourceId,
@Param("start") long start,
@Param("length") Integer length);
Long queryCountForBindFireEqumntPage(
@Param("waterResourceId") Long waterResourceId);
List<WaterResource> listByCodes(@Param("codes") Set<String> codes);
void saveBatch(List<WaterResourceParam> list);
void updateBatch(List<WaterResourceParam> list);
}
//package com.yeejoin.amos.fas.business.dao.mapper;
//
//import com.yeejoin.amos.fas.business.param.WaterResourceParam;
//import com.yeejoin.amos.fas.dao.entity.WaterResource;
//import org.apache.ibatis.annotations.Param;
//
//import java.util.List;
//import java.util.Map;
//import java.util.Set;
//
//public interface WaterResourceMapper extends BaseMapper {
//
// Map queryOne(@Param("id") Long id);
//
//
// List<Map> queryForPage(
// @Param("orgCode") String compCode,
// @Param("name") String name,
// @Param("code") String code,
// @Param("type") String type,
// @Param("start") long start,
// @Param("length") Integer length);
// Long queryCountForPage(
// @Param("orgCode") String compCode,
// @Param("name") String name,
// @Param("code") String code,
// @Param("type")String type);
//
// List<Map> queryForBindFireEqumntPage(
// @Param("waterResourceId") Long waterResourceId,
// @Param("start") long start,
// @Param("length") Integer length);
//
// Long queryCountForBindFireEqumntPage(
// @Param("waterResourceId") Long waterResourceId);
//
// List<WaterResource> listByCodes(@Param("codes") Set<String> codes);
//
// void saveBatch(List<WaterResourceParam> list);
//
// void updateBatch(List<WaterResourceParam> list);
//}
package com.yeejoin.amos.fas.business.dao.repository;
import com.yeejoin.amos.fas.dao.entity.FireStrength;
import java.util.Optional;
import org.springframework.stereotype.Repository;
@Repository("fireStrengthPointDao")
public interface FireStrengthPointDao extends BaseDao<FireStrength, Long> {
Optional<FireStrength> findById(Long id);
}
//package com.yeejoin.amos.fas.business.dao.repository;
//
//import com.yeejoin.amos.fas.dao.entity.FireStrength;
//
//import java.util.Optional;
//
//import org.springframework.stereotype.Repository;
//
//@Repository("fireStrengthPointDao")
//public interface FireStrengthPointDao extends BaseDao<FireStrength, Long> {
//
// Optional<FireStrength> findById(Long id);
//
//}
package com.yeejoin.amos.fas.business.dao.repository;
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.Query;
import org.springframework.stereotype.Repository;
......
......@@ -16,8 +16,8 @@ public interface IFireEquipmentDao extends BaseDao<FireEquipment, Long> {
Optional<FireEquipment> findById(Long id);
@Query(value = "SELECT count(1) FROM `f_fire_station_equipment` WHERE fire_equipment_id in ?1", nativeQuery = true)
int countAssociatedEquipStationByIds(String[] ids);
// @Query(value = "SELECT count(1) FROM `f_fire_station_equipment` WHERE fire_equipment_id in ?1", nativeQuery = true)
// int countAssociatedEquipStationByIds(String[] ids);
Optional<FireEquipment> findByCode(String code);
}
package com.yeejoin.amos.fas.business.dao.repository;
import java.util.Optional;
import org.springframework.stereotype.Repository;
import com.yeejoin.amos.fas.dao.entity.FireEquipmentData;
@Repository("iFireEquipmentDataDao")
public interface IFireEquipmentDataDao extends BaseDao<FireEquipmentData, Long> {
Optional<FireEquipmentData> findById(Long id);
}
//package com.yeejoin.amos.fas.business.dao.repository;
//
//import java.util.Optional;
//
//import org.springframework.stereotype.Repository;
//
//import com.yeejoin.amos.fas.dao.entity.FireEquipmentData;
//
//@Repository("iFireEquipmentDataDao")
//public interface IFireEquipmentDataDao extends BaseDao<FireEquipmentData, Long> {
//
// Optional<FireEquipmentData> findById(Long id);
//
//
//
//}
package com.yeejoin.amos.fas.business.dao.repository;
import java.util.Optional;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint;
@Repository("iFireEquipmentPointDao")
public interface IFireEquipmentPointDao extends BaseDao<FireEquipmentPoint, Long> {
Optional<FireEquipmentPoint> findById(Long id);
FireEquipmentPoint findOneByCode(String pointCode);
int countByCode(String code);
@Query(value = "SELECT count(1) FROM `f_fmea_equipment_point` WHERE equipment_point_id in ?1", nativeQuery = true)
int countImpEquipment(String[] idArray);
@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_risk_source r on r.id = f.risk_source_id " +
" WHERE ep.equipment_point_id in ?1 ", nativeQuery = true)
String findBindRiskSourceStrByPointIds(String[] idArray);
}
//package com.yeejoin.amos.fas.business.dao.repository;
//
//import java.util.Optional;
//
//import org.springframework.data.jpa.repository.Query;
//import org.springframework.stereotype.Repository;
//
//import com.yeejoin.amos.fas.dao.entity.FireEquipmentPoint;
//
//@Repository("iFireEquipmentPointDao")
//public interface IFireEquipmentPointDao extends BaseDao<FireEquipmentPoint, Long> {
//
// Optional<FireEquipmentPoint> findById(Long id);
//
// FireEquipmentPoint findOneByCode(String pointCode);
//
// int countByCode(String code);
//
// @Query(value = "SELECT count(1) FROM `f_fmea_equipment_point` WHERE equipment_point_id in ?1", nativeQuery = true)
// int countImpEquipment(String[] idArray);
//
// @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_risk_source r on r.id = f.risk_source_id " +
// " WHERE ep.equipment_point_id in ?1 ", nativeQuery = true)
// String findBindRiskSourceStrByPointIds(String[] idArray);
//
//}
package com.yeejoin.amos.fas.business.dao.repository;
import java.util.Optional;
import org.springframework.stereotype.Repository;
import com.yeejoin.amos.fas.dao.entity.FireStation;
@Repository("iFireStationDao")
public interface IFireStationDao extends BaseDao<FireStation, Long> {
Optional<FireStation> findById(Long id);
Optional<FireStation> findByCode(String code);
}
//package com.yeejoin.amos.fas.business.dao.repository;
//
//import java.util.Optional;
//
//import org.springframework.stereotype.Repository;
//
//import com.yeejoin.amos.fas.dao.entity.FireStation;
//
//@Repository("iFireStationDao")
//public interface IFireStationDao extends BaseDao<FireStation, Long> {
//
// Optional<FireStation> findById(Long id);
//
// Optional<FireStation> findByCode(String code);
//}
package com.yeejoin.amos.fas.business.dao.repository;
import com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
@Repository("iFireStationEquipmentDao")
public interface IFireStationEquipmentDao extends BaseDao<FireStationFireEquipment, Long> {
@Transactional
@Modifying
@Query(value = "delete FROM `f_fire_station_equipment` WHERE fire_station_id = ?1", nativeQuery = true)
void deleteByStationId(Long id);
}
//package com.yeejoin.amos.fas.business.dao.repository;
//
//import com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment;
//
//import org.springframework.data.jpa.repository.Modifying;
//import org.springframework.data.jpa.repository.Query;
//import org.springframework.stereotype.Repository;
//import org.springframework.transaction.annotation.Transactional;
//
//@Repository("iFireStationEquipmentDao")
//public interface IFireStationEquipmentDao extends BaseDao<FireStationFireEquipment, Long> {
//
// @Transactional
// @Modifying
// @Query(value = "delete FROM `f_fire_station_equipment` WHERE fire_station_id = ?1", nativeQuery = true)
// void deleteByStationId(Long id);
//
//
//}
package com.yeejoin.amos.fas.business.dao.repository;
import java.util.List;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint;
@Repository("iFmeaEquipmentPointDao")
public interface IFmeaEquipmentPointDao extends BaseDao<FmeaEquipmentPoint, Long>{
@Modifying
@Query(value="DELETE fmep FROM `f_fmea_equipment_point` fmep"+
"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)
void removeByFireEquipIdAndEquipId(Long fire_equipment_id,Long importantEquipmentId);
}
//package com.yeejoin.amos.fas.business.dao.repository;
//
//import java.util.List;
//
//import org.springframework.data.jpa.repository.Modifying;
//import org.springframework.data.jpa.repository.Query;
//import org.springframework.stereotype.Repository;
//
//import com.yeejoin.amos.fas.dao.entity.FmeaEquipmentPoint;
//
//
//@Repository("iFmeaEquipmentPointDao")
//public interface IFmeaEquipmentPointDao extends BaseDao<FmeaEquipmentPoint, Long>{
//
// @Modifying
// @Query(value="DELETE fmep FROM `f_fmea_equipment_point` fmep"+
// "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)
// void removeByFireEquipIdAndEquipId(Long fire_equipment_id,Long importantEquipmentId);
//}
package com.yeejoin.amos.fas.business.dao.repository;
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import java.util.Optional;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
@Repository("iWaterResourceDao")
public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
Optional<WaterResource> findById(Long id);
@Query(value = "SELECT count(1) FROM `f_water_resource_equipment` WHERE fire_equipment_id in ?1", nativeQuery = true)
int countAssociatedEquipWaterByIds(String[] ids);
}
//package com.yeejoin.amos.fas.business.dao.repository;
//
//import com.yeejoin.amos.fas.dao.entity.WaterResource;
//
//import java.util.Optional;
//
//import org.springframework.data.jpa.repository.Query;
//import org.springframework.stereotype.Repository;
//
//@Repository("iWaterResourceDao")
//public interface IWaterResourceDao extends BaseDao<WaterResource, Long> {
//
// Optional<WaterResource> findById(Long id);
//
// @Query(value = "SELECT count(1) FROM `f_water_resource_equipment` WHERE fire_equipment_id in ?1", nativeQuery = true)
// int countAssociatedEquipWaterByIds(String[] ids);
//}
package com.yeejoin.amos.fas.business.dao.repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
@Repository("iWaterResourceEquipmentDao")
public interface IWaterResourceEquipmentDao extends BaseDao<WaterResourceEquipment, Long> {
Optional<WaterResourceEquipment> findById(Long id);
WaterResourceEquipment findByWaterResourceIdAndFireEquipmentId(Long waterResourceId,Long fireEquipmentId);
int countByWaterResourceIdAndFireEquipmentId(Long waterResourceId,Long fireEquipmentId);
@Transactional
@Modifying
@Query(value = "delete FROM `f_water_resource_equipment` WHERE water_resource_id = ?1", nativeQuery = true)
void deleteByWaterSourceId(Long id);
}
//package com.yeejoin.amos.fas.business.dao.repository;
//
//import java.util.List;
//import java.util.Optional;
//
//import org.springframework.data.jpa.repository.Modifying;
//import org.springframework.data.jpa.repository.Query;
//import org.springframework.stereotype.Repository;
//import org.springframework.transaction.annotation.Transactional;
//
//import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
//
//@Repository("iWaterResourceEquipmentDao")
//public interface IWaterResourceEquipmentDao extends BaseDao<WaterResourceEquipment, Long> {
//
// Optional<WaterResourceEquipment> findById(Long id);
//
// WaterResourceEquipment findByWaterResourceIdAndFireEquipmentId(Long waterResourceId,Long fireEquipmentId);
//
// int countByWaterResourceIdAndFireEquipmentId(Long waterResourceId,Long fireEquipmentId);
//
// @Transactional
// @Modifying
// @Query(value = "delete FROM `f_water_resource_equipment` WHERE water_resource_id = ?1", nativeQuery = true)
// void deleteByWaterSourceId(Long id);
//
//}
......@@ -41,7 +41,7 @@ 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.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.feign.RemoteSecurityService;
import com.yeejoin.amos.fas.business.param.ImgParam;
......@@ -94,8 +94,8 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private IFmeaEquipmentPointDao iFmeaEquipmentPointDao;
// @Autowired
// private IFmeaEquipmentPointDao iFmeaEquipmentPointDao;
// @Autowired
// private MongoTemplate mongoTemplate;
......
......@@ -5,7 +5,7 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
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.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.entity.mybatis.FireEquipmentEntity;
import com.yeejoin.amos.fas.business.entity.mybatis.FireEquipmentPointEntity;
......@@ -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.core.util.CommonResponse;
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 org.springframework.beans.BeanUtils;
......@@ -45,8 +45,8 @@ public class ExcelServiceImpl implements IExcelService {
@Autowired
private IFireEquipPontService fireEquipPointService;
@Autowired
private WaterResourceMapper waterResourceMapper;
// @Autowired
// private WaterResourceMapper waterResourceMapper;
@Autowired
private IRiskSourceDao riskSourceDao;
......@@ -151,40 +151,40 @@ public class ExcelServiceImpl implements IExcelService {
return pointExcelList;
}
@Override
public void importWaterResource(List<WaterResourceParam> list) {
List<String> codeList = Lists.transform(list, WaterResourceParam::getCode);
Set<String> codeSet = Sets.newHashSet(codeList);
List<WaterResource> waterResources = waterResourceMapper.listByCodes(codeSet);
Map<String, WaterResource> waterResourceMap = Maps.uniqueIndex(waterResources, WaterResource::getCode);
List<WaterResourceParam> saveList = Lists.newArrayList();
List<WaterResourceParam> updateList = Lists.newArrayList();
list.forEach(warerRes -> {
if(!StringUtil.isNotEmpty(warerRes.getName())
|| !StringUtil.isNotEmpty(warerRes.getCode())) {
throw new YeeException("请检查必填项是否为空!");
}
String riskSourceCode = warerRes.getRiskSourceCode();
Optional<RiskSource> riskSourceOptional = riskSourceDao.findByCode(riskSourceCode);
if(riskSourceOptional.isPresent()) {
warerRes.setRiskSourceId(riskSourceOptional.get().getId());
}else {
throw new YeeException("编号: [" + riskSourceCode + "] 风险区域不存在!");
}
String code = warerRes.getCode();
WaterResource waterResource = waterResourceMap.get(code);
if (waterResource == null) {
saveList.add(warerRes);
} else {
warerRes.setId(waterResource.getId());
updateList.add(warerRes);
}
});
if (!CollectionUtils.isEmpty(saveList)) {
waterResourceMapper.saveBatch(saveList);
}
if (!CollectionUtils.isEmpty(updateList)) {
waterResourceMapper.updateBatch(updateList);
}
}
// @Override
// public void importWaterResource(List<WaterResourceParam> list) {
// List<String> codeList = Lists.transform(list, WaterResourceParam::getCode);
// Set<String> codeSet = Sets.newHashSet(codeList);
// List<WaterResource> waterResources = waterResourceMapper.listByCodes(codeSet);
// Map<String, WaterResource> waterResourceMap = Maps.uniqueIndex(waterResources, WaterResource::getCode);
// List<WaterResourceParam> saveList = Lists.newArrayList();
// List<WaterResourceParam> updateList = Lists.newArrayList();
// list.forEach(warerRes -> {
// if(!StringUtil.isNotEmpty(warerRes.getName())
// || !StringUtil.isNotEmpty(warerRes.getCode())) {
// throw new YeeException("请检查必填项是否为空!");
// }
// String riskSourceCode = warerRes.getRiskSourceCode();
// Optional<RiskSource> riskSourceOptional = riskSourceDao.findByCode(riskSourceCode);
// if(riskSourceOptional.isPresent()) {
// warerRes.setRiskSourceId(riskSourceOptional.get().getId());
// }else {
// throw new YeeException("编号: [" + riskSourceCode + "] 风险区域不存在!");
// }
// String code = warerRes.getCode();
// WaterResource waterResource = waterResourceMap.get(code);
// if (waterResource == null) {
// saveList.add(warerRes);
// } else {
// warerRes.setId(waterResource.getId());
// updateList.add(warerRes);
// }
// });
// if (!CollectionUtils.isEmpty(saveList)) {
// waterResourceMapper.saveBatch(saveList);
// }
// if (!CollectionUtils.isEmpty(updateList)) {
// waterResourceMapper.updateBatch(updateList);
// }
// }
}
......@@ -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.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.FireEquipmentPointEntity;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentService;
......@@ -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.CommonResponseUtil;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
......@@ -26,8 +26,8 @@ import java.util.Optional;
@Service("fireEquipPoint")
public class FireEquipPointServiceImpl implements IFireEquipPontService {
@Autowired
private IFireEquipmentPointDao fireEquipmentPointDao;
// @Autowired
// private IFireEquipmentPointDao fireEquipmentPointDao;
@Autowired
private FireEquipPointMapper fireEquipPointMapper;
......@@ -38,40 +38,40 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
@Autowired
private FireEquipMapper fireEquipMapper;
public FireEquipmentPoint savePoint(FireEquipmentPoint fireEquipmentPoint) {
return fireEquipmentPointDao.save(fireEquipmentPoint);
}
public FireEquipmentPoint queryOne(Long id) {
Optional<FireEquipmentPoint> fireCar1= fireEquipmentPointDao.findById(id);
FireEquipmentPoint fireCar=null;
if(fireCar1.isPresent()){
fireCar=fireCar1.get();
}
return fireCar;
}
@Override
public String[] deletePoint(String[] idArray) throws Exception {
for (String id : idArray) {
Optional<FireEquipmentPoint> fireEquipmentPoint1 = fireEquipmentPointDao.findById(Long.parseLong(id));
FireEquipmentPoint fireEquipmentPoint=null;
if(fireEquipmentPoint1.isPresent()){
fireEquipmentPoint=fireEquipmentPoint1.get();
}
if (fireEquipmentPoint != null) {
this.fireEquipmentPointDao.deleteById(Long.parseLong(id));
} else {
throw new Exception("找不到指定的监测点:" + id);
}
}
return idArray;
}
//
// public FireEquipmentPoint savePoint(FireEquipmentPoint fireEquipmentPoint) {
// return fireEquipmentPointDao.save(fireEquipmentPoint);
// }
// public FireEquipmentPoint queryOne(Long id) {
// Optional<FireEquipmentPoint> fireCar1= fireEquipmentPointDao.findById(id);
// FireEquipmentPoint fireCar=null;
// if(fireCar1.isPresent()){
// fireCar=fireCar1.get();
// }
// return fireCar;
// }
// @Override
// public String[] deletePoint(String[] idArray) throws Exception {
// for (String id : idArray) {
// Optional<FireEquipmentPoint> fireEquipmentPoint1 = fireEquipmentPointDao.findById(Long.parseLong(id));
// FireEquipmentPoint fireEquipmentPoint=null;
//
// if(fireEquipmentPoint1.isPresent()){
// fireEquipmentPoint=fireEquipmentPoint1.get();
// }
//
// if (fireEquipmentPoint != null) {
// this.fireEquipmentPointDao.deleteById(Long.parseLong(id));
// } else {
// throw new Exception("找不到指定的监测点:" + id);
// }
// }
//
// return idArray;
// }
public Page queryByFireEquimt(Long fireEqumntId, String name, CommonPageable pageable) {
......@@ -116,15 +116,15 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
return CommonResponseUtil.success();
}
@Override
public CommonResponse save(FireEquipmentPointEntity fireEquipmentPointEntity) {
FireEquipmentPointEntity pointEntity = fireEquipPointMapper.getByCode(fireEquipmentPointEntity.getCode());
if (pointEntity != null) {
return CommonResponseUtil.failure("监测点编号已经存在");
}
fireEquipPointMapper.save(fireEquipmentPointEntity);
return CommonResponseUtil.success();
}
// @Override
// public CommonResponse save(FireEquipmentPointEntity fireEquipmentPointEntity) {
// FireEquipmentPointEntity pointEntity = fireEquipPointMapper.getByCode(fireEquipmentPointEntity.getCode());
// if (pointEntity != null) {
// return CommonResponseUtil.failure("监测点编号已经存在");
// }
// fireEquipPointMapper.save(fireEquipmentPointEntity);
// return CommonResponseUtil.success();
// }
@Override
public CommonResponse update(FireEquipmentPointEntity fireEquipmentPointEntity) {
......@@ -156,14 +156,14 @@ public class FireEquipPointServiceImpl implements IFireEquipPontService {
}
@Override
public int countImpEquipment(String[] idArray) {
return fireEquipmentPointDao.countImpEquipment(idArray);
}
// @Override
// public int countImpEquipment(String[] idArray) {
// return fireEquipmentPointDao.countImpEquipment(idArray);
// }
@Override
public String findBindRiskSourceStrByPointIds(String[] idArray) {
return fireEquipmentPointDao.findBindRiskSourceStrByPointIds(idArray);
}
// @Override
// public String findBindRiskSourceStrByPointIds(String[] idArray) {
// return fireEquipmentPointDao.findBindRiskSourceStrByPointIds(idArray);
// }
}
......@@ -3,8 +3,8 @@ 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.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.IWaterResourceDao;
//import com.yeejoin.amos.fas.business.dao.repository.IFireStationDao;
//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.service.intfc.IFireEquipService;
......@@ -13,8 +13,8 @@ import com.yeejoin.amos.fas.common.enums.EquipClassifyEnum;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
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.WaterResource;
//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;
......@@ -38,11 +38,11 @@ public class FireEquipServiceImpl implements IFireEquipService {
@Autowired
ImpEquipMapper impEquipMapper;
@Autowired
IWaterResourceDao iWaterResourceDao;
// @Autowired
// IWaterResourceDao iWaterResourceDao;
@Autowired
IFireStationDao iFireStationDao;
// @Autowired
// IFireStationDao iFireStationDao;
public FireEquipment save(FireEquipment fireEquipment) {
Long id = fireEquipment.getId();
......@@ -146,24 +146,24 @@ public class FireEquipServiceImpl implements IFireEquipService {
switch (fireEquipmentType)
{
case pool:
FireStation fireStation = fireEquipMapper.findFireStationById(id);
fireStation.setType("2");
fireStation.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity = fireStation;
break;
case fireFoamRoom:
FireStation fireStation1 = fireEquipMapper.findFireStationById(id);
fireStation1.setType("2");
fireStation1.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity = fireStation1;
break;
case fireChamber:
FireStation fireStation11 = fireEquipMapper.findFireStationById(id);
fireStation11.setType("1");
fireStation11.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity = fireStation11;
break;
// case pool:
// FireStation fireStation = fireEquipMapper.findFireStationById(id);
// fireStation.setType("2");
// fireStation.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
// returnEntity = fireStation;
// break;
// case fireFoamRoom:
// FireStation fireStation1 = fireEquipMapper.findFireStationById(id);
// fireStation1.setType("2");
// fireStation1.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
// returnEntity = fireStation1;
// break;
// case fireChamber:
// FireStation fireStation11 = fireEquipMapper.findFireStationById(id);
// fireStation11.setType("1");
// fireStation11.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
// returnEntity = fireStation11;
// break;
case extinguisher:
case hydrant:
case monitorEquipment:
......@@ -193,10 +193,10 @@ public class FireEquipServiceImpl implements IFireEquipService {
return returnEntity;
}
@Override
public int countAssociatedEquipStationByIds(String[] ids) {
return iFireEquipmentDao.countAssociatedEquipStationByIds(ids);
}
// @Override
// public int countAssociatedEquipStationByIds(String[] ids) {
// return iFireEquipmentDao.countAssociatedEquipStationByIds(ids);
// }
@Override
......
package com.yeejoin.amos.fas.business.service.impl;
import com.yeejoin.amos.fas.business.dao.mapper.FireStrengthMapper;
import com.yeejoin.amos.fas.business.dao.repository.FireStrengthPointDao;
import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.dao.entity.FireStrength;
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.List;
import java.util.Map;
import java.util.Optional;
@Service("fireStengthService")
public class FireStrengthServiceImpl implements FireStengthService {
@Autowired
private FireStrengthPointDao fireStrengthPointDao;
@Autowired
private FireStrengthMapper fireStrengthMapper;
public FireStrength savePoint(FireStrength fireEquipmentPoint) {
return fireStrengthPointDao.save(fireEquipmentPoint);
}
public Map queryOne(Long id) {
return fireStrengthMapper.queryOne(id);
}
public String[] deletePoint(String[] idArray) throws Exception {
for (String id : idArray) {
Optional<FireStrength> fireEquipmentPoint1 = fireStrengthPointDao.findById(Long.parseLong(id));
FireStrength fireEquipmentPoint = null;
if (fireEquipmentPoint1.isPresent()) {
fireEquipmentPoint = fireEquipmentPoint1.get();
}
if (fireEquipmentPoint != null) {
this.fireStrengthPointDao.deleteById(Long.parseLong(id));
} else {
throw new Exception("找不到指定的监测点:" + id);
}
}
return idArray;
}
public Page queryByFireEquimt(String username, String code, CommonPageable pageable) {
Long total = fireStrengthMapper.queryCountForPage(username, code);
List<Map> content = fireStrengthMapper.queryForPage(username, code, pageable.getOffset(),
pageable.getPageSize());
Page result = new PageImpl(content, pageable, total);
return result;
}
public List<FireStrength> queryForStrengthList(String time) {
return fireStrengthMapper.queryForStrengthList(time);
}
}
//package com.yeejoin.amos.fas.business.service.impl;
//
//import com.yeejoin.amos.fas.business.dao.mapper.FireStrengthMapper;
//import com.yeejoin.amos.fas.business.dao.repository.FireStrengthPointDao;
//import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
//import com.yeejoin.amos.fas.core.common.request.CommonPageable;
//import com.yeejoin.amos.fas.dao.entity.FireStrength;
//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.List;
//import java.util.Map;
//import java.util.Optional;
//
//@Service("fireStengthService")
//public class FireStrengthServiceImpl implements FireStengthService {
//
// @Autowired
// private FireStrengthPointDao fireStrengthPointDao;
// @Autowired
// private FireStrengthMapper fireStrengthMapper;
//
// public FireStrength savePoint(FireStrength fireEquipmentPoint) {
// return fireStrengthPointDao.save(fireEquipmentPoint);
// }
//
// public Map queryOne(Long id) {
// return fireStrengthMapper.queryOne(id);
// }
//
// public String[] deletePoint(String[] idArray) throws Exception {
// for (String id : idArray) {
// Optional<FireStrength> fireEquipmentPoint1 = fireStrengthPointDao.findById(Long.parseLong(id));
// FireStrength fireEquipmentPoint = null;
// if (fireEquipmentPoint1.isPresent()) {
// fireEquipmentPoint = fireEquipmentPoint1.get();
// }
// if (fireEquipmentPoint != null) {
// this.fireStrengthPointDao.deleteById(Long.parseLong(id));
// } else {
// throw new Exception("找不到指定的监测点:" + id);
// }
// }
//
// return idArray;
// }
//
// public Page queryByFireEquimt(String username, String code, CommonPageable pageable) {
// Long total = fireStrengthMapper.queryCountForPage(username, code);
// List<Map> content = fireStrengthMapper.queryForPage(username, code, pageable.getOffset(),
// pageable.getPageSize());
// Page result = new PageImpl(content, pageable, total);
// return result;
// }
//
// public List<FireStrength> queryForStrengthList(String time) {
// return fireStrengthMapper.queryForStrengthList(time);
// }
//
//}
......@@ -47,11 +47,11 @@ 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.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.IRiskSourceDao;
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.RemoteSecurityService;
import com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService;
......@@ -81,11 +81,11 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.core.util.StringUtil;
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.RiskSource;
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 io.swagger.annotations.ApiOperation;
......@@ -104,12 +104,12 @@ public class View3dServiceImpl implements IView3dService {
private IRiskSourceDao iRiskSourceDao;
@Autowired
private IFireEquipmentDao iFireEquipmentDao;
@Autowired
private IFireStationDao iFireStationDao;
// @Autowired
// private IFireStationDao iFireStationDao;
@Autowired
private IEquipmentDao iEquipmentDao;
@Autowired
private IWaterResourceDao iWaterResourceDao;
// @Autowired
// private IWaterResourceDao iWaterResourceDao;
@Autowired
private PatrolMapper patrolMapper;
@Autowired
......@@ -162,11 +162,11 @@ public class View3dServiceImpl implements IView3dService {
this.updateFireCarPosition(pointBo);
case "fireChamber":
case "fireFoamRoom":
this.updateFireStationPosition(pointBo);
break;
// this.updateFireStationPosition(pointBo);
// break;
case "hydrant":
case "pool":
this.updateWaterSourcePosition(pointBo);
// case "pool":
// this.updateWaterSourcePosition(pointBo);
break;
default:
log.error("不支持的类型-->" + pointType);
......@@ -188,33 +188,33 @@ public class View3dServiceImpl implements IView3dService {
// }
}
public void updateWaterSourcePosition(BindPointBo pointBo) {
Optional<WaterResource> data = iWaterResourceDao.findById(pointBo.getPointId());
if(data.isPresent()){
WaterResource waterResource = data.get();
String ue4Location = pointBo.getUe4Location();
String ue4Rotation = pointBo.getUe4Rotation();
String position3d = pointBo.getPosition3d();
if(ue4Location != null) waterResource.setUe4Location(ue4Location);
if(ue4Rotation != null) waterResource.setUe4Rotation(ue4Rotation);
if(position3d != null) waterResource.setPosition3d(position3d);
iWaterResourceDao.save(waterResource);
}
}
// public void updateWaterSourcePosition(BindPointBo pointBo) {
// Optional<WaterResource> data = iWaterResourceDao.findById(pointBo.getPointId());
// if(data.isPresent()){
// WaterResource waterResource = data.get();
// String ue4Location = pointBo.getUe4Location();
// String ue4Rotation = pointBo.getUe4Rotation();
// String position3d = pointBo.getPosition3d();
// if(ue4Location != null) waterResource.setUe4Location(ue4Location);
// if(ue4Rotation != null) waterResource.setUe4Rotation(ue4Rotation);
// if(position3d != null) waterResource.setPosition3d(position3d);
// iWaterResourceDao.save(waterResource);
// }
// }
public void updateFireStationPosition(BindPointBo pointBo) {
Optional<FireStation> data = iFireStationDao.findById(pointBo.getPointId());
if(data.isPresent()){
FireStation fireStation = data.get();
String ue4Location = pointBo.getUe4Location();
String ue4Rotation = pointBo.getUe4Rotation();
String position3d = pointBo.getPosition3d();
if(ue4Location != null) fireStation.setUe4Location(ue4Location);
if(ue4Rotation != null) fireStation.setUe4Rotation(ue4Rotation);
if(position3d != null) fireStation.setPosition3d(position3d);
iFireStationDao.save(fireStation);
}
}
// public void updateFireStationPosition(BindPointBo pointBo) {
// Optional<FireStation> data = iFireStationDao.findById(pointBo.getPointId());
// if(data.isPresent()){
// FireStation fireStation = data.get();
// String ue4Location = pointBo.getUe4Location();
// String ue4Rotation = pointBo.getUe4Rotation();
// String position3d = pointBo.getPosition3d();
// if(ue4Location != null) fireStation.setUe4Location(ue4Location);
// if(ue4Rotation != null) fireStation.setUe4Rotation(ue4Rotation);
// if(position3d != null) fireStation.setPosition3d(position3d);
// iFireStationDao.save(fireStation);
// }
// }
public void updateFireEquipmentPosition(BindPointBo pointBo) {
Optional<FireEquipment> data = iFireEquipmentDao.findById(pointBo.getPointId());
......
package com.yeejoin.amos.fas.business.service.impl;
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.IWaterResourceEquipmentDao;
import com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.StringUtil;
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
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 org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@Service("waterResourceService")
public class WaterResourceServiceImpl implements IWaterResourceService {
@Autowired
IWaterResourceDao iWaterResourceDao;
@Autowired
WaterResourceMapper waterResourceMapper;
@Autowired
IWaterResourceEquipmentDao iWaterResourceEquipmentDao;
@Override
public WaterResource save(WaterResource waterResource)
{
Long id = waterResource.getId();
waterResource = iWaterResourceDao.saveAndFlush(waterResource);
return waterResource;
}
public Map queryOne(Long id)
{
return waterResourceMapper.queryOne(id);
}
@Transactional
public String [] delete(String []idArray) throws Exception
{
for(String id:idArray)
{
Optional<WaterResource> waterResource1 = iWaterResourceDao.findById(Long.parseLong(id));
WaterResource waterResource = null;
if(waterResource1.isPresent()){
waterResource=waterResource1.get();
}
iWaterResourceEquipmentDao.deleteByWaterSourceId(Long.valueOf(id));
if(waterResource != null)
{
this.iWaterResourceDao.deleteById(Long.parseLong(id));
}else
{
throw new Exception("找不到指定的监测点:"+id);
}
}
return idArray;
}
public Page queryForPage(String compCode, String username,String code,String type, CommonPageable pageable)
{
Long total = waterResourceMapper.queryCountForPage(compCode,username,code,type);
List<Map> content = waterResourceMapper.queryForPage(compCode,username,code,type,pageable.getOffset(),pageable.getPageSize());
Page result = new PageImpl(content,pageable,total);
return result;
}
@Override
public void saveBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments) {
// TODO Auto-generated method stub
List<WaterResourceEquipment> saveList = new ArrayList<WaterResourceEquipment>();
for(WaterResourceEquipment waterResourceEquipment:waterResourceEquipments){
int count = iWaterResourceEquipmentDao.countByWaterResourceIdAndFireEquipmentId(waterResourceEquipment.getWaterResourceId(),waterResourceEquipment.getFireEquipmentId());
if(count==0){
saveList.add(waterResourceEquipment);
}
}
iWaterResourceEquipmentDao.saveAll(saveList);
}
@Override
public void deleteBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments) {
// TODO Auto-generated method stub
List<WaterResourceEquipment> deleteList = new ArrayList<WaterResourceEquipment>();
for(WaterResourceEquipment waterResourceEquipment:waterResourceEquipments){
WaterResourceEquipment saveWaterResourceEquipment = iWaterResourceEquipmentDao.findByWaterResourceIdAndFireEquipmentId(waterResourceEquipment.getWaterResourceId(),waterResourceEquipment.getFireEquipmentId());
if(StringUtil.isNotEmpty(saveWaterResourceEquipment)){
deleteList.add(saveWaterResourceEquipment);
}
}
iWaterResourceEquipmentDao.deleteAll(deleteList);
}
@Override
public Page queryBindFireEquemtPage(Long waterResourceId, CommonPageable pageable) {
Long total = waterResourceMapper.queryCountForBindFireEqumntPage(waterResourceId);
List<Map> content = waterResourceMapper.queryForBindFireEqumntPage(waterResourceId, pageable.getOffset(),
pageable.getPageSize());
return new PageImpl(content, pageable, total);
}
@Override
public Object queryForList() {
return iWaterResourceDao.findAll();
}
@Override
public int countAssociatedEquipWaterByIds(String[] ids) {
return iWaterResourceDao.countAssociatedEquipWaterByIds(ids);
}
}
//package com.yeejoin.amos.fas.business.service.impl;
//
//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.IWaterResourceEquipmentDao;
//import com.yeejoin.amos.fas.business.service.intfc.IWaterResourceService;
//import com.yeejoin.amos.fas.core.common.request.CommonPageable;
//import com.yeejoin.amos.fas.core.util.StringUtil;
//import com.yeejoin.amos.fas.dao.entity.WaterResource;
//import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
//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 org.springframework.transaction.annotation.Transactional;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Map;
//import java.util.Optional;
//
//@Service("waterResourceService")
//public class WaterResourceServiceImpl implements IWaterResourceService {
//
//
//
// @Autowired
// IWaterResourceDao iWaterResourceDao;
//
// @Autowired
// WaterResourceMapper waterResourceMapper;
//
// @Autowired
// IWaterResourceEquipmentDao iWaterResourceEquipmentDao;
//
// @Override
// public WaterResource save(WaterResource waterResource)
// {
// Long id = waterResource.getId();
// waterResource = iWaterResourceDao.saveAndFlush(waterResource);
// return waterResource;
// }
//
//
// public Map queryOne(Long id)
// {
// return waterResourceMapper.queryOne(id);
// }
//
// @Transactional
// public String [] delete(String []idArray) throws Exception
// {
// for(String id:idArray)
// {
// Optional<WaterResource> waterResource1 = iWaterResourceDao.findById(Long.parseLong(id));
// WaterResource waterResource = null;
// if(waterResource1.isPresent()){
// waterResource=waterResource1.get();
// }
// iWaterResourceEquipmentDao.deleteByWaterSourceId(Long.valueOf(id));
// if(waterResource != null)
// {
// this.iWaterResourceDao.deleteById(Long.parseLong(id));
// }else
// {
// throw new Exception("找不到指定的监测点:"+id);
// }
// }
//
// return idArray;
// }
//
//
// public Page queryForPage(String compCode, String username,String code,String type, CommonPageable pageable)
// {
// Long total = waterResourceMapper.queryCountForPage(compCode,username,code,type);
// List<Map> content = waterResourceMapper.queryForPage(compCode,username,code,type,pageable.getOffset(),pageable.getPageSize());
// Page result = new PageImpl(content,pageable,total);
// return result;
// }
//
//
// @Override
// public void saveBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments) {
// // TODO Auto-generated method stub
// List<WaterResourceEquipment> saveList = new ArrayList<WaterResourceEquipment>();
// for(WaterResourceEquipment waterResourceEquipment:waterResourceEquipments){
// int count = iWaterResourceEquipmentDao.countByWaterResourceIdAndFireEquipmentId(waterResourceEquipment.getWaterResourceId(),waterResourceEquipment.getFireEquipmentId());
// if(count==0){
// saveList.add(waterResourceEquipment);
// }
// }
// iWaterResourceEquipmentDao.saveAll(saveList);
// }
//
//
// @Override
// public void deleteBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments) {
// // TODO Auto-generated method stub
// List<WaterResourceEquipment> deleteList = new ArrayList<WaterResourceEquipment>();
// for(WaterResourceEquipment waterResourceEquipment:waterResourceEquipments){
// WaterResourceEquipment saveWaterResourceEquipment = iWaterResourceEquipmentDao.findByWaterResourceIdAndFireEquipmentId(waterResourceEquipment.getWaterResourceId(),waterResourceEquipment.getFireEquipmentId());
// if(StringUtil.isNotEmpty(saveWaterResourceEquipment)){
// deleteList.add(saveWaterResourceEquipment);
// }
// }
// iWaterResourceEquipmentDao.deleteAll(deleteList);
// }
//
//
// @Override
// public Page queryBindFireEquemtPage(Long waterResourceId, CommonPageable pageable) {
// Long total = waterResourceMapper.queryCountForBindFireEqumntPage(waterResourceId);
// List<Map> content = waterResourceMapper.queryForBindFireEqumntPage(waterResourceId, pageable.getOffset(),
// pageable.getPageSize());
// return new PageImpl(content, pageable, total);
// }
//
//
// @Override
// public Object queryForList() {
// return iWaterResourceDao.findAll();
// }
//
//
// @Override
// public int countAssociatedEquipWaterByIds(String[] ids) {
// return iWaterResourceDao.countAssociatedEquipWaterByIds(ids);
// }
//}
package com.yeejoin.amos.fas.business.service.intfc;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Page;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.dao.entity.FireStrength;
public interface FireStengthService {
/**
* 保存或者更新风险点
* @param fireEquipmentPoint
* @return
*/
FireStrength savePoint(FireStrength fireEquipmentPoint);
/**
* 查询单个风险点
* @param id
* @return
*/
Map queryOne(Long id);
/**
* 删除单个风险点
* @return
* @throws Exception
*/
String [] deletePoint(String[] idArray) throws Exception;
/**
* 查询指定设备的风险点列表
* @param fireEqumntId
* @return
*/
Page queryByFireEquimt(String username,String code, CommonPageable pageable);
List<FireStrength> queryForStrengthList(String time);
}
//package com.yeejoin.amos.fas.business.service.intfc;
//
//import java.util.List;
//import java.util.Map;
//
//import org.springframework.data.domain.Page;
//
//import com.yeejoin.amos.fas.core.common.request.CommonPageable;
////import com.yeejoin.amos.fas.dao.entity.FireStrength;
//
//public interface FireStengthService {
//
// /**
// * 保存或者更新风险点
// * @param fireEquipmentPoint
// * @return
// */
// FireStrength savePoint(FireStrength fireEquipmentPoint);
//
//
// /**
// * 查询单个风险点
// * @param id
// * @return
// */
// Map queryOne(Long id);
//
//
// /**
// * 删除单个风险点
// * @return
// * @throws Exception
// */
// String [] deletePoint(String[] idArray) throws Exception;
//
//
// /**
// * 查询指定设备的风险点列表
// * @param fireEqumntId
// * @return
// */
// Page queryByFireEquimt(String username,String code, CommonPageable pageable);
//
//
// List<FireStrength> queryForStrengthList(String time);
//}
package com.yeejoin.amos.fas.business.service.intfc;
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 java.util.Map;
......
......@@ -15,5 +15,5 @@ public interface IExcelService {
List<?> exportPointData(Map<String, Object> paramsMap);
void importWaterResource(List<WaterResourceParam> list);
// void importWaterResource(List<WaterResourceParam> list);
}
......@@ -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.core.common.request.CommonPageable;
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 java.util.List;
......@@ -17,7 +17,7 @@ public interface IFireEquipPontService {
* @param fireEquipmentPoint
* @return
*/
FireEquipmentPoint savePoint(FireEquipmentPoint fireEquipmentPoint);
// FireEquipmentPoint savePoint(FireEquipmentPoint fireEquipmentPoint);
/**
......@@ -26,7 +26,7 @@ public interface IFireEquipPontService {
* @param id
* @return
*/
FireEquipmentPoint queryOne(Long id);
// FireEquipmentPoint queryOne(Long id);
/**
......@@ -35,7 +35,7 @@ public interface IFireEquipPontService {
* @return
* @throws Exception
*/
String[] deletePoint(String[] idArray) throws Exception;
// String[] deletePoint(String[] idArray) throws Exception;
/**
......@@ -52,7 +52,7 @@ public interface IFireEquipPontService {
CommonResponse batchUnbindToEquipment(List<Long> pointIds);
CommonResponse save(FireEquipmentPointEntity fireEquipmentPointEntity);
// CommonResponse save(FireEquipmentPointEntity fireEquipmentPointEntity);
CommonResponse update(FireEquipmentPointEntity fireEquipmentPointEntity);
......@@ -61,8 +61,8 @@ public interface IFireEquipPontService {
CommonResponse listByType(Integer type);
int countImpEquipment(String[] idArray);
// int countImpEquipment(String[] idArray);
String findBindRiskSourceStrByPointIds(String[] idArray);
// String findBindRiskSourceStrByPointIds(String[] idArray);
}
......@@ -45,7 +45,7 @@ public interface IFireEquipService {
* @param ids
* @return
*/
int countAssociatedEquipStationByIds(String[] ids);
// int countAssociatedEquipStationByIds(String[] ids);
Boolean isExistByCode(String code);
}
package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.dao.entity.FireStation;
import com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
public interface IFireStationService {
/**
* 保存或者更新风险点
* @param fireStation
* @return
*/
FireStation save(FireStation fireStation);
/**
* 保存或者更新消防小室
* @param fireStation
* @return
*/
FireStation saveAndUpd(FireStation fireStation,MultipartFile[] file);
/**
* 关联消防设备
* @param fireStationFireEquipments
* @return
*/
List<FireStationFireEquipment> saveStationFireEquipment(List<FireStationFireEquipment> fireStationFireEquipments) throws Exception;
/**
* 查询单个风险点
* @param id
* @return
*/
Map queryOne(Long id);
/**
* 查询已经绑定的消防设备列表
* @param fireStationId
* @return
*/
Page queryForFireEquemtPage(Long fireStationId,CommonPageable pageable);
void deleteStationFireEquipment(List<FireStationFireEquipment> fireStationFireEquipments) throws Exception;
/**
* 删除单个风险点
* @return
* @throws Exception
*/
String [] delete(String[] idArray) throws Exception;
/**
* 查询指定设备的风险点列表
* @return
*/
Page queryForPage(String username, String code,String type, CommonPageable pageable);
List<Map> queryForList(String username, String code,String type);
/**
* 获取消防小室配置装备数据
* @param id
* @return
*/
Map queryForEuqimentListById(Long id);
Boolean isExistByCode(String code);
}
//package com.yeejoin.amos.fas.business.service.intfc;
//
//import com.yeejoin.amos.fas.core.common.request.CommonPageable;
//import com.yeejoin.amos.fas.dao.entity.FireStation;
//import com.yeejoin.amos.fas.dao.entity.FireStationFireEquipment;
//import org.springframework.data.domain.Page;
//import org.springframework.web.multipart.MultipartFile;
//
//import java.util.List;
//import java.util.Map;
//
//public interface IFireStationService {
//
// /**
// * 保存或者更新风险点
// * @param fireStation
// * @return
// */
// FireStation save(FireStation fireStation);
//
// /**
// * 保存或者更新消防小室
// * @param fireStation
// * @return
// */
// FireStation saveAndUpd(FireStation fireStation,MultipartFile[] file);
//
// /**
// * 关联消防设备
// * @param fireStationFireEquipments
// * @return
// */
// List<FireStationFireEquipment> saveStationFireEquipment(List<FireStationFireEquipment> fireStationFireEquipments) throws Exception;
//
//
// /**
// * 查询单个风险点
// * @param id
// * @return
// */
// Map queryOne(Long id);
//
// /**
// * 查询已经绑定的消防设备列表
// * @param fireStationId
// * @return
// */
// Page queryForFireEquemtPage(Long fireStationId,CommonPageable pageable);
// void deleteStationFireEquipment(List<FireStationFireEquipment> fireStationFireEquipments) throws Exception;
//
// /**
// * 删除单个风险点
// * @return
// * @throws Exception
// */
// String [] delete(String[] idArray) throws Exception;
//
//
// /**
// * 查询指定设备的风险点列表
// * @return
// */
// Page queryForPage(String username, String code,String type, CommonPageable pageable);
//
//
// List<Map> queryForList(String username, String code,String type);
//
// /**
// * 获取消防小室配置装备数据
// * @param id
// * @return
// */
// Map queryForEuqimentListById(Long id);
//
// Boolean isExistByCode(String code);
//
//}
......@@ -136,7 +136,7 @@ public interface IRiskSourceService {
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);
......
package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.dao.entity.WaterResource;
import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
import org.springframework.data.domain.Page;
import java.util.List;
import java.util.Map;
public interface IWaterResourceService {
/**
* 保存或者更新风险点
* @param waterResource
* @return
*/
WaterResource save(WaterResource waterResource);
/**
* 查询单个风险点
* @param id
* @return
*/
Map queryOne(Long id);
/**
* 删除单个风险点
* @return
* @throws Exception
*/
String [] delete(String[] idArray) throws Exception;
/**
* 查询指定设备的风险点列表
* @return
*/
Page queryForPage(String compCode,String username, String code, String type,CommonPageable pageable);
void saveBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments);
void deleteBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments);
/**
* 查询已经绑定的消防设备列表
* @param waterResourceId
* @return
*/
Page queryBindFireEquemtPage(Long waterResourceId,CommonPageable pageable);
Object queryForList();
int countAssociatedEquipWaterByIds(String[] ids);
}
//package com.yeejoin.amos.fas.business.service.intfc;
//
//import com.yeejoin.amos.fas.core.common.request.CommonPageable;
//import com.yeejoin.amos.fas.dao.entity.WaterResource;
//import com.yeejoin.amos.fas.dao.entity.WaterResourceEquipment;
//
//import org.springframework.data.domain.Page;
//
//import java.util.List;
//import java.util.Map;
//
//public interface IWaterResourceService {
//
// /**
// * 保存或者更新风险点
// * @param waterResource
// * @return
// */
// WaterResource save(WaterResource waterResource);
//
//
// /**
// * 查询单个风险点
// * @param id
// * @return
// */
// Map queryOne(Long id);
//
//
// /**
// * 删除单个风险点
// * @return
// * @throws Exception
// */
// String [] delete(String[] idArray) throws Exception;
//
//
// /**
// * 查询指定设备的风险点列表
// * @return
// */
// Page queryForPage(String compCode,String username, String code, String type,CommonPageable pageable);
//
// void saveBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments);
//
// void deleteBindFireEquipment(List<WaterResourceEquipment> waterResourceEquipments);
//
// /**
// * 查询已经绑定的消防设备列表
// * @param waterResourceId
// * @return
// */
// Page queryBindFireEquemtPage(Long waterResourceId,CommonPageable pageable);
//
//
// Object queryForList();
//
// int countAssociatedEquipWaterByIds(String[] ids);
//}
......@@ -3,91 +3,91 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper">
<!--查询 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
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 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>
<!-- <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>
\ No newline at end of file
......@@ -4,98 +4,98 @@
<mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.FireStationMapper">
<select id="queryOne" resultType="java.util.Map">
SELECT
fs.id,
fs.name,
fs.code,
fs.type,
fs.address,
fs.floor3d,
fs.position3d,
fs.is_indoor AS isIndoor,
fs.picture,
fs.risk_source_id as riskSourceId
FROM
f_fire_station fs
WHERE
fs.id = ${id}
</select>
<select id="queryCountForFireEqumntPage" resultType="long">
SELECT
count(1)
FROM
f_fire_station_equipment fs
JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id
WHERE
fs.fire_station_id = ${fireStationId}
</select>
<select id="queryForFireEqumntPage" resultType="java.util.Map">
SELECT
fs.fire_station_id,
fs.number numberInStation,
fs.unit unitInStation,
f.*,
frs.name riskSourceName
FROM
f_fire_station_equipment fs
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
WHERE
fs.fire_station_id = ${fireStationId}
and f.id is not null
LIMIT ${start}, ${length};
</select>
<select id="queryCountForPage" resultType="long">
SELECT
COUNT(1)
FROM
f_fire_station fs
WHERE
1=1
<if test="name!=null">
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
<if test="code!=null">
AND fs.`code` LIKE '%${code}%'
</if>
<if test="type!=null">
AND fs.`type` LIKE '%${type}%';
</if>
</select>
<select id="queryForPage" resultType="java.util.Map">
SELECT
fs.id,
fs.name,
fs.code,
fs.type,
fs.address,
fs.floor3d,
fs.position3d,
fs.is_indoor as isIndoor,
frs.name riskSourceName
FROM
f_fire_station fs
left join f_risk_source frs on frs.id = fs.risk_source_id
WHERE
1=1
<if test="name!=null">
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
<if test="code!=null">
AND fs.`code` LIKE '%${code}%'
</if>
<if test="type!=null">
AND fs.`type` LIKE '%${type}%'
</if>
LIMIT ${start},${length} ;
</select>
<!-- <select id="queryOne" resultType="java.util.Map">-->
<!-- SELECT-->
<!-- fs.id,-->
<!-- fs.name,-->
<!-- fs.code,-->
<!-- fs.type,-->
<!-- fs.address,-->
<!-- fs.floor3d,-->
<!-- fs.position3d,-->
<!-- fs.is_indoor AS isIndoor,-->
<!-- fs.picture,-->
<!-- fs.risk_source_id as riskSourceId-->
<!-- FROM-->
<!-- f_fire_station fs-->
<!-- WHERE-->
<!-- fs.id = ${id}-->
<!-- </select>-->
<!-- <select id="queryCountForFireEqumntPage" resultType="long">-->
<!-- SELECT-->
<!-- count(1)-->
<!-- FROM-->
<!-- f_fire_station_equipment fs-->
<!-- JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id-->
<!-- WHERE-->
<!-- fs.fire_station_id = ${fireStationId}-->
<!-- </select>-->
<!-- <select id="queryForFireEqumntPage" resultType="java.util.Map">-->
<!-- SELECT-->
<!-- fs.fire_station_id,-->
<!-- fs.number numberInStation,-->
<!-- fs.unit unitInStation,-->
<!-- f.*,-->
<!-- frs.name riskSourceName-->
<!-- FROM-->
<!-- f_fire_station_equipment fs-->
<!-- 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-->
<!-- WHERE-->
<!-- fs.fire_station_id = ${fireStationId}-->
<!-- and f.id is not null-->
<!-- LIMIT ${start}, ${length};-->
<!-- </select>-->
<!-- <select id="queryCountForPage" resultType="long">-->
<!-- SELECT-->
<!-- COUNT(1)-->
<!-- FROM-->
<!-- f_fire_station fs-->
<!-- WHERE-->
<!-- 1=1-->
<!-- <if test="name!=null">-->
<!-- AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')-->
<!-- </if>-->
<!-- <if test="code!=null">-->
<!-- AND fs.`code` LIKE '%${code}%'-->
<!-- </if>-->
<!-- <if test="type!=null">-->
<!-- AND fs.`type` LIKE '%${type}%';-->
<!-- </if>-->
<!-- </select>-->
<!-- <select id="queryForPage" resultType="java.util.Map">-->
<!-- SELECT-->
<!-- fs.id,-->
<!-- fs.name,-->
<!-- fs.code,-->
<!-- fs.type,-->
<!-- fs.address,-->
<!-- fs.floor3d,-->
<!-- fs.position3d,-->
<!-- fs.is_indoor as isIndoor,-->
<!-- frs.name riskSourceName-->
<!-- FROM-->
<!-- f_fire_station fs-->
<!-- left join f_risk_source frs on frs.id = fs.risk_source_id-->
<!-- WHERE-->
<!-- 1=1-->
<!-- <if test="name!=null">-->
<!-- AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')-->
<!-- </if>-->
<!-- <if test="code!=null">-->
<!-- AND fs.`code` LIKE '%${code}%'-->
<!-- </if>-->
<!-- <if test="type!=null">-->
<!-- AND fs.`type` LIKE '%${type}%'-->
<!-- </if>-->
<!-- LIMIT ${start},${length} ;-->
<!-- </select>-->
<select id="queryForList" resultType="java.util.Map">
......@@ -139,19 +139,19 @@
</select>
<select id="queryEquipCountById" resultType="java.util.Map">
SELECT
fe.`name`,
SUM(fse.number) count,
fe.unit
FROM
`f_fire_station_equipment` fse
LEFT JOIN f_fire_equipment fe ON fe.id = fse.fire_equipment_id
WHERE
fire_station_id = #{id}
GROUP BY
fe.`name`,fe.unit
</select>
<!-- <select id="queryEquipCountById" resultType="java.util.Map">-->
<!-- SELECT-->
<!-- fe.`name`,-->
<!-- SUM(fse.number) count,-->
<!-- fe.unit-->
<!-- FROM-->
<!-- `f_fire_station_equipment` fse-->
<!-- LEFT JOIN f_fire_equipment fe ON fe.id = fse.fire_equipment_id-->
<!-- WHERE-->
<!-- fire_station_id = #{id}-->
<!-- GROUP BY-->
<!-- fe.`name`,fe.unit-->
<!-- </select>-->
</mapper>
\ No newline at end of file
......@@ -4,19 +4,19 @@
<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
*
FROM
f_fire_station_equipment se
WHERE
se.fire_equipment_id = ${fireEquipmentId}
AND se.fire_station_id = ${fireStationId};
</select>
<update id="updateNumberById">
update f_fire_station_equipment set number = #{diff}
where id = #{stationEquiId}
</update>
<!-- SELECT-->
<!-- *-->
<!-- FROM-->
<!-- f_fire_station_equipment se-->
<!-- WHERE-->
<!-- se.fire_equipment_id = ${fireEquipmentId}-->
<!-- AND se.fire_station_id = ${fireStationId};-->
<!-- </select>-->
<!-- -->
<!-- <update id="updateNumberById">-->
<!-- update f_fire_station_equipment set number = #{diff}-->
<!-- where id = #{stationEquiId}-->
<!-- </update>-->
</mapper>
\ No newline at end of file
......@@ -4,90 +4,90 @@
<mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.FireStrengthMapper">
<select id="queryOne" resultType="java.util.Map">
SELECT
id,
username,
`code`,
position,
tel,
phone_num,
job_des,
remark,
org_code,
create_by,
create_date,
day_end dayEnd,
day_begin dayBegin
FROM
f_fire_strength
WHERE
id = #{id}
</select>
<!-- <select id="queryOne" resultType="java.util.Map">-->
<!-- SELECT-->
<!-- id,-->
<!-- username,-->
<!-- `code`,-->
<!-- position,-->
<!-- tel,-->
<!-- phone_num,-->
<!-- job_des,-->
<!-- remark,-->
<!-- org_code,-->
<!-- create_by,-->
<!-- create_date,-->
<!-- day_end dayEnd,-->
<!-- day_begin dayBegin-->
<!-- FROM-->
<!-- f_fire_strength-->
<!-- WHERE-->
<!-- id = #{id}-->
<!-- </select>-->
<select id="queryCountForPage" resultType="long">
<!-- <select id="queryCountForPage" resultType="long">-->
SELECT
COUNT(1)
FROM
f_fire_strength fs
WHERE
1=1
<if test="username!=null">
AND (fs.username LIKE '%${username}%' or fs.`code` LIKE '%${username}%')
</if>
<if test="code!=null">
AND fs.`code` LIKE '%${code}%';
</if>
</select>
<select id="queryForPage" resultType="java.util.Map">
<!-- SELECT-->
<!-- COUNT(1)-->
<!-- FROM-->
<!-- f_fire_strength fs-->
<!-- WHERE-->
<!-- 1=1-->
<!-- <if test="username!=null">-->
<!-- AND (fs.username LIKE '%${username}%' or fs.`code` LIKE '%${username}%')-->
<!-- </if>-->
<!-- <if test="code!=null">-->
<!-- AND fs.`code` LIKE '%${code}%';-->
<!-- </if>-->
<!-- </select>-->
<!-- <select id="queryForPage" resultType="java.util.Map">-->
SELECT
*
FROM
f_fire_strength fs
WHERE
1=1
<!-- SELECT-->
<!-- *-->
<!-- FROM-->
<!-- f_fire_strength fs-->
<!-- WHERE-->
<!-- 1=1-->
<if test="username!=null">
AND (fs.username LIKE '%${username}%' or fs.`code` LIKE '%${username}%')
</if>
<if test="code!=null">
AND fs.`code` LIKE '%${code}%';
</if>
LIMIT ${start},${length} ;
<!-- <if test="username!=null">-->
<!-- AND (fs.username LIKE '%${username}%' or fs.`code` LIKE '%${username}%')-->
<!-- </if>-->
<!-- <if test="code!=null">-->
<!-- AND fs.`code` LIKE '%${code}%';-->
<!-- </if>-->
<!-- LIMIT ${start},${length} ;-->
</select>
<!-- </select>-->
<select id="queryForStrengthList" resultType="com.yeejoin.amos.fas.dao.entity.FireStrength">
SELECT
*
FROM
f_fire_strength t
WHERE
TIME_TO_SEC(#{time}) &gt;= TIME_TO_SEC( t.day_begin )
AND TIME_TO_SEC(#{time}) &lt;= TIME_TO_SEC(
t.day_end)
</select>
<!-- <select id="queryForStrengthList" resultType="com.yeejoin.amos.fas.dao.entity.FireStrength">-->
<!-- SELECT-->
<!-- * -->
<!-- FROM-->
<!-- f_fire_strength t -->
<!-- WHERE-->
<!-- TIME_TO_SEC(#{time}) &gt;= TIME_TO_SEC( t.day_begin ) -->
<!-- AND TIME_TO_SEC(#{time}) &lt;= TIME_TO_SEC(-->
<!-- t.day_end)-->
<!-- </select>-->
<insert id="save" parameterType="com.yeejoin.amos.fas.dao.entity.FireStrength">
INSERT INTO f_fire_strength
username,
`code`,
position,
tel,
phone_num,
job_des,
remark,
org_code,
create_by,
create_date,
day_end ,
day_begin
VALUES(#{username},#{code},#{position},#{tel},#{phoneNum},#{jobDes},#{remark},#{orgCode},#{createBy},NOW(),#{dayEnd},#{dayBegin})
</insert>
<!-- <insert id="save" parameterType="com.yeejoin.amos.fas.dao.entity.FireStrength">-->
<!-- INSERT INTO f_fire_strength-->
<!-- username,-->
<!-- `code`,-->
<!-- position,-->
<!-- tel,-->
<!-- phone_num,-->
<!-- job_des,-->
<!-- remark,-->
<!-- org_code,-->
<!-- create_by,-->
<!-- create_date,-->
<!-- day_end ,-->
<!-- day_begin -->
<!-- VALUES(#{username},#{code},#{position},#{tel},#{phoneNum},#{jobDes},#{remark},#{orgCode},#{createBy},NOW(),#{dayEnd},#{dayBegin})-->
<!-- </insert>-->
</mapper>
\ No newline at end of file
......@@ -4,188 +4,188 @@
<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
fs.id,
fs.name,
fs.code,
fs.type,
fs.production_area AS productionArea,
fs.floor3d,
fs.room,
fs.address,
fs.position3d,
fs.area,
fs.max_level maxLevel,
fs.alarm_level alarmLevel,
fs.is_indoor as isIndoor,
fs.org_code AS orgCode,
fs.risk_source_id as riskSourceId
from f_water_resource fs where fs.id = ${id}
</select>
<!-- select -->
<!-- fs.id,-->
<!-- fs.name,-->
<!-- fs.code,-->
<!-- fs.type,-->
<!-- fs.production_area AS productionArea,-->
<!-- fs.floor3d,-->
<!-- fs.room,-->
<!-- fs.address,-->
<!-- fs.position3d,-->
<!-- fs.area,-->
<!-- fs.max_level maxLevel,-->
<!-- fs.alarm_level alarmLevel,-->
<!-- fs.is_indoor as isIndoor,-->
<!-- fs.org_code AS orgCode,-->
<!-- fs.risk_source_id as riskSourceId-->
<!-- from f_water_resource fs where fs.id = ${id}-->
<!-- </select>-->
<select id="queryCountForPage" resultType="long">
<!-- <select id="queryCountForPage" resultType="long">-->
SELECT
COUNT(1)
FROM
f_water_resource fs
WHERE
fs.org_code = #{orgCode}
<if test="name!=null">
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
<if test="code!=null">
AND fs.`code` LIKE '%${code}%'
</if>
<if test="type!=null">
AND fs.`type` LIKE '%${type}%'
</if>
</select>
<select id="queryForPage" resultType="java.util.Map">
SELECT
fs.id,
fs.name,
fs.code,
fs.type,
fs.production_area AS productionArea,
fs.floor3d,
fs.room,
fs.address,
fs.position3d,
fs.area,
fs.max_level maxLevel,
fs.alarm_level alarmLevel,
fs.is_indoor as isIndoor,
frs.name riskSourceName
FROM
f_water_resource fs
left join f_risk_source frs on frs.id = fs.risk_source_id
WHERE
fs.org_code = #{orgCode}
<if test="name!=null">
AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')
</if>
<if test="code!=null">
AND fs.`code` LIKE '%${code}%'
</if>
<if test="type!=null">
AND fs.`type` LIKE '%${type}%'
</if>
LIMIT ${start},${length} ;
<!-- SELECT-->
<!-- COUNT(1)-->
<!-- FROM-->
<!-- f_water_resource fs-->
<!-- WHERE-->
<!-- fs.org_code = #{orgCode}-->
<!-- <if test="name!=null">-->
<!-- AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')-->
<!-- </if>-->
<!-- <if test="code!=null">-->
<!-- AND fs.`code` LIKE '%${code}%'-->
<!-- </if>-->
<!-- <if test="type!=null">-->
<!-- AND fs.`type` LIKE '%${type}%'-->
<!-- </if>-->
<!-- </select>-->
<!-- <select id="queryForPage" resultType="java.util.Map">-->
<!-- SELECT-->
<!-- fs.id,-->
<!-- fs.name,-->
<!-- fs.code,-->
<!-- fs.type,-->
<!-- fs.production_area AS productionArea,-->
<!-- fs.floor3d,-->
<!-- fs.room,-->
<!-- fs.address,-->
<!-- fs.position3d,-->
<!-- fs.area,-->
<!-- fs.max_level maxLevel,-->
<!-- fs.alarm_level alarmLevel,-->
<!-- fs.is_indoor as isIndoor,-->
<!-- frs.name riskSourceName-->
<!-- FROM-->
<!-- f_water_resource fs-->
<!-- left join f_risk_source frs on frs.id = fs.risk_source_id-->
<!-- WHERE-->
<!-- fs.org_code = #{orgCode}-->
<!-- <if test="name!=null">-->
<!-- AND (fs.name LIKE '%${name}%' or fs.`code` LIKE '%${name}%')-->
<!-- </if>-->
<!-- <if test="code!=null">-->
<!-- AND fs.`code` LIKE '%${code}%'-->
<!-- </if>-->
<!-- <if test="type!=null">-->
<!-- AND fs.`type` LIKE '%${type}%'-->
<!-- </if>-->
<!-- LIMIT ${start},${length} ;-->
</select>
<!-- </select>-->
<select id="queryCountForBindFireEqumntPage" resultType="long">
SELECT
count(1)
FROM
f_water_resource_equipment fs
JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id
WHERE
fs.water_resource_id = ${waterResourceId}
</select>
<select id="queryForBindFireEqumntPage" resultType="java.util.Map">
SELECT
fs.water_resource_id,
fs.number numberInStation,
fs.unit unitInStation,
f.*,
frs.name riskSourceName
FROM
f_water_resource_equipment fs
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
WHERE
fs.water_resource_id = ${waterResourceId}
and f.id is not null
LIMIT ${start}, ${length};
</select>
<!-- <select id="queryCountForBindFireEqumntPage" resultType="long">-->
<!-- SELECT-->
<!-- count(1)-->
<!-- FROM-->
<!-- f_water_resource_equipment fs-->
<!-- JOIN f_fire_equipment f ON fs.fire_equipment_id = f.id-->
<!-- WHERE-->
<!-- fs.water_resource_id = ${waterResourceId}-->
<!-- </select>-->
<!-- <select id="queryForBindFireEqumntPage" resultType="java.util.Map">-->
<!-- SELECT-->
<!-- fs.water_resource_id,-->
<!-- fs.number numberInStation,-->
<!-- fs.unit unitInStation,-->
<!-- f.*,-->
<!-- frs.name riskSourceName-->
<!-- FROM-->
<!-- f_water_resource_equipment fs-->
<!-- 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-->
<!-- WHERE-->
<!-- fs.water_resource_id = ${waterResourceId}-->
<!-- and f.id is not null-->
<!-- LIMIT ${start}, ${length};-->
<!-- </select>-->
<select id="listByCodes" resultType="com.yeejoin.amos.fas.dao.entity.WaterResource">
select
id,
code,
name
from
f_water_resource
where
code in
<foreach collection="codes" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!-- <select id="listByCodes" resultType="com.yeejoin.amos.fas.dao.entity.WaterResource">-->
<!-- select-->
<!-- id,-->
<!-- code,-->
<!-- name-->
<!-- from-->
<!-- f_water_resource-->
<!-- where-->
<!-- code in-->
<!-- <foreach collection="codes" item="item" index="index" open="(" separator="," close=")">-->
<!-- #{item}-->
<!-- </foreach>-->
<!-- </select>-->
<insert id="saveBatch" keyColumn="id" keyProperty="id"
parameterType="com.yeejoin.amos.fas.business.param.WaterResourceParam"
useGeneratedKeys="true">
insert into f_water_resource
(
`name`,
`code`,
`type`,
`floor3d`,
`room`,
`address`,
`position3d`,
`org_code`,
`is_indoor`,
`risk_source_id`
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.name},
#{item.code},
#{item.type},
#{item.floor3d},
#{item.room},
#{item.address},
#{item.position3d},
#{item.orgCode},
#{item.isIndoor},
#{item.riskSourceId}
)
</foreach>
</insert>
<!-- <insert id="saveBatch" keyColumn="id" keyProperty="id"-->
<!-- parameterType="com.yeejoin.amos.fas.business.param.WaterResourceParam"-->
<!-- useGeneratedKeys="true">-->
<!-- insert into f_water_resource-->
<!-- (-->
<!-- `name`,-->
<!-- `code`,-->
<!-- `type`,-->
<!-- `floor3d`,-->
<!-- `room`,-->
<!-- `address`,-->
<!-- `position3d`,-->
<!-- `org_code`,-->
<!-- `is_indoor`,-->
<!-- `risk_source_id`-->
<!-- )-->
<!-- values-->
<!-- <foreach collection="list" item="item" index="index" separator=",">-->
<!-- (-->
<!-- #{item.name},-->
<!-- #{item.code},-->
<!-- #{item.type},-->
<!-- #{item.floor3d},-->
<!-- #{item.room},-->
<!-- #{item.address},-->
<!-- #{item.position3d},-->
<!-- #{item.orgCode},-->
<!-- #{item.isIndoor},-->
<!-- #{item.riskSourceId}-->
<!-- )-->
<!-- </foreach>-->
<!-- </insert>-->
<update id="updateBatch">
<foreach collection="list" item="item" index="index" separator=";">
update f_water_resource
<set>
<if test="item.orgCode != null">
org_code = #{item.orgCode},
</if>
<if test="item.code != null">
code = #{item.code},
</if>
<if test="item.type != null">
type = #{item.type},
</if>
<if test="item.position3d != null">
position3d = #{item.position3d},
</if>
<if test="item.floor3d != null">
floor3d = #{item.floor3d},
</if>
<if test="item.isIndoor != null">
is_indoor = #{item.isIndoor},
</if>
<if test="item.name != null">
name = #{item.name},
</if>
<if test="item.room != null">
room = #{item.room},
</if>
<if test="item.address != null">
address = #{item.address},
</if>
<if test="item.riskSourceId != null">
risk_source_id = #{item.riskSourceId},
</if>
</set>
where id = #{item.id}
</foreach>
</update>
<!-- <update id="updateBatch">-->
<!-- <foreach collection="list" item="item" index="index" separator=";">-->
<!-- update f_water_resource-->
<!-- <set>-->
<!-- <if test="item.orgCode != null">-->
<!-- org_code = #{item.orgCode},-->
<!-- </if>-->
<!-- <if test="item.code != null">-->
<!-- code = #{item.code},-->
<!-- </if>-->
<!-- <if test="item.type != null">-->
<!-- type = #{item.type},-->
<!-- </if>-->
<!-- <if test="item.position3d != null">-->
<!-- position3d = #{item.position3d},-->
<!-- </if>-->
<!-- <if test="item.floor3d != null">-->
<!-- floor3d = #{item.floor3d},-->
<!-- </if>-->
<!-- <if test="item.isIndoor != null">-->
<!-- is_indoor = #{item.isIndoor},-->
<!-- </if>-->
<!-- <if test="item.name != null">-->
<!-- name = #{item.name},-->
<!-- </if>-->
<!-- <if test="item.room != null">-->
<!-- room = #{item.room},-->
<!-- </if>-->
<!-- <if test="item.address != null">-->
<!-- address = #{item.address},-->
<!-- </if>-->
<!-- <if test="item.riskSourceId != null">-->
<!-- risk_source_id = #{item.riskSourceId},-->
<!-- </if>-->
<!-- </set>-->
<!-- where id = #{item.id}-->
<!-- </foreach>-->
<!-- </update>-->
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment