Commit aa89ba54 authored by zhengjiawei's avatar zhengjiawei

注 无用库相关代码

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