Commit fc083344 authored by suhuiguang's avatar suhuiguang

Merge branch 'dev_upgrade' of http://172.16.10.76/station/YeeAmosFireAutoSysRoot into dev_upgrade

parents 5d7fd60e 93a6cf15
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* The persistent class for the accident_type database table.
*
*/
@Entity
@Table(name="f_accident_type")
@NamedQuery(name="AccidentType.findAll", query="SELECT a FROM AccidentType a")
public class AccidentType extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name="create_by")
private Long createBy;
@Column(name="dept_id")
private Long deptId;
private String name;
@Column(name="evaluation_sid")
private String evaluationSid;
@Column(name="org_code")
private String orgCode;
private String remark;
private String severity;
private String influence;
public AccidentType() {
}
public Long getCreateBy() {
return this.createBy;
}
public void setCreateBy(Long createBy) {
this.createBy = createBy;
}
public Long getDeptId() {
return this.deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
@Transient
public String getInfluence() {
return this.influence;
}
public void setInfluence(String influence) {
this.influence = influence;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getEvaluationSid() {
return evaluationSid;
}
public void setEvaluationSid(String evaluationSid) {
this.evaluationSid = evaluationSid;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Transient
public String getSeverity() {
return this.severity;
}
public void setSeverity(String severity) {
this.severity = severity;
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* The persistent class for the accident_type database table.
*
*/
@Entity
@Table(name="f_accident_type")
@NamedQuery(name="AccidentType.findAll", query="SELECT a FROM AccidentType a")
public class AccidentType extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name="create_by")
private String createBy;
@Column(name="dept_id")
private String deptId;
private String name;
@Column(name="evaluation_sid")
private String evaluationSid;
@Column(name="org_code")
private String orgCode;
private String remark;
private String severity;
private String influence;
public AccidentType() {
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getDeptId() {
return deptId;
}
public void setDeptId(String deptId) {
this.deptId = deptId;
}
@Transient
public String getInfluence() {
return this.influence;
}
public void setInfluence(String influence) {
this.influence = influence;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getEvaluationSid() {
return evaluationSid;
}
public void setEvaluationSid(String evaluationSid) {
this.evaluationSid = evaluationSid;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Transient
public String getSeverity() {
return this.severity;
}
public void setSeverity(String severity) {
this.severity = severity;
}
}
\ No newline at end of file
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.*;
/**
* The persistent class for the equipment database table.
*
*/
@Entity
@Table(name="f_equipment")
@NamedQuery(name="Equipment.findAll", query="SELECT e FROM Equipment e")
public class Equipment extends BasicEntity {
private static final long serialVersionUID = 1L;
private String address;
private String building;
/**
* 所属风险区域id
*/
@Column(name="risk_source_id")
private Long riskSourceId;
/**
* 3维坐标
*/
private String position3d;
/**
* 3维楼层
*/
private String floor3d;
/**
* 预案配置
*/
@Column(name="reserve_plan")
private String reservePlan;
/**
* 是否室内 0-否 1-是
*/
@Column(name="is_indoor")
private Boolean isIndoor;
@Column(name="charge_dept_id")
private int chargeDeptId;
@Column(name="charge_user_id")
private int chargeUserId;
private String code;
@Column(name="fire_truck_route")
private String fireTruckRoute;
public String getFireTruckRoute() {
return fireTruckRoute;
}
public void setFireTruckRoute(String fireTruckRoute) {
this.fireTruckRoute = fireTruckRoute;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
public String getFloor3d() {
return floor3d;
}
public void setFloor3d(String floor3d) {
this.floor3d = floor3d;
}
public Boolean getIsIndoor() {
return isIndoor;
}
public void setIsIndoor(Boolean isIndoor) {
this.isIndoor = isIndoor;
}
private String room;
/**
* 关联消防小室id
*/
@Column(name="fire_station_id")
private Long fireStationId;
@Column(name="create_by")
private String createBy;
private String name;
@Column(name="org_code")
private String orgCode;
private String remark;
/**
* ue4位置
*/
@Lob
private String ue4Location;
/**
* ue4旋转
*/
@Lob
private String ue4Rotation;
public Equipment() {
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBuilding() {
return this.building;
}
public void setBuilding(String building) {
this.building = building;
}
public Long getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(Long riskSourceId) {
this.riskSourceId = riskSourceId;
}
public int getChargeDeptId() {
return this.chargeDeptId;
}
public void setChargeDeptId(int chargeDeptId) {
this.chargeDeptId = chargeDeptId;
}
public int getChargeUserId() {
return this.chargeUserId;
}
public void setChargeUserId(int chargeUserId) {
this.chargeUserId = chargeUserId;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getCreateBy() {
return this.createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public Long getFireStationId() {
return fireStationId;
}
public void setFireStationId(Long fireStationId) {
this.fireStationId = fireStationId;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getRoom() {
return room;
}
public void setRoom(String room) {
this.room = room;
}
public String getReservePlan() {
return reservePlan;
}
public void setReservePlan(String reservePlan) {
this.reservePlan = reservePlan;
}
@Column(name = "ue4_location")
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
@Column(name = "ue4_rotation")
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.*;
/**
* The persistent class for the equipment database table.
*
*/
@Entity
@Table(name="f_equipment")
@NamedQuery(name="Equipment.findAll", query="SELECT e FROM Equipment e")
public class Equipment extends BasicEntity {
private static final long serialVersionUID = 1L;
private String address;
private String building;
/**
* 所属风险区域id
*/
@Column(name="risk_source_id")
private Long riskSourceId;
/**
* 3维坐标
*/
private String position3d;
/**
* 3维楼层
*/
private String floor3d;
/**
* 预案配置
*/
@Column(name="reserve_plan")
private String reservePlan;
/**
* 是否室内 0-否 1-是
*/
@Column(name="is_indoor")
private Boolean isIndoor;
@Column(name="charge_dept_id")
private String chargeDeptId;
@Column(name="charge_user_id")
private String chargeUserId;
private String code;
@Column(name="fire_truck_route")
private String fireTruckRoute;
public String getFireTruckRoute() {
return fireTruckRoute;
}
public void setFireTruckRoute(String fireTruckRoute) {
this.fireTruckRoute = fireTruckRoute;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
public String getFloor3d() {
return floor3d;
}
public void setFloor3d(String floor3d) {
this.floor3d = floor3d;
}
public Boolean getIsIndoor() {
return isIndoor;
}
public void setIsIndoor(Boolean isIndoor) {
this.isIndoor = isIndoor;
}
private String room;
/**
* 关联消防小室id
*/
@Column(name="fire_station_id")
private Long fireStationId;
@Column(name="create_by")
private String createBy;
private String name;
@Column(name="org_code")
private String orgCode;
private String remark;
/**
* ue4位置
*/
@Lob
private String ue4Location;
/**
* ue4旋转
*/
@Lob
private String ue4Rotation;
public Equipment() {
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public String getBuilding() {
return this.building;
}
public void setBuilding(String building) {
this.building = building;
}
public Long getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(Long riskSourceId) {
this.riskSourceId = riskSourceId;
}
public String getChargeDeptId() {
return chargeDeptId;
}
public void setChargeDeptId(String chargeDeptId) {
this.chargeDeptId = chargeDeptId;
}
public String getChargeUserId() {
return chargeUserId;
}
public void setChargeUserId(String chargeUserId) {
this.chargeUserId = chargeUserId;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getCreateBy() {
return this.createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public Long getFireStationId() {
return fireStationId;
}
public void setFireStationId(Long fireStationId) {
this.fireStationId = fireStationId;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getRoom() {
return room;
}
public void setRoom(String room) {
this.room = room;
}
public String getReservePlan() {
return reservePlan;
}
public void setReservePlan(String reservePlan) {
this.reservePlan = reservePlan;
}
@Column(name = "ue4_location")
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
@Column(name = "ue4_rotation")
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
}
\ No newline at end of file
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* The persistent class for the evaluation_model database table.
*
*/
@Entity
@Table(name="f_evaluation_model")
@NamedQuery(name="EvaluationModel.findAll", query="SELECT e FROM EvaluationModel e")
public class EvaluationModel extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name="create_by")
private int createBy;
private String name;
/**
* 系数
*/
private String coefficient;
/**
* 影响
*/
private String influence;
/**
* 描述
*/
private String describe;
/**
* S,D,O
*/
private String type;
@Column(name="org_code")
private String orgCode;
private String remark;
@Lob
private String standard;
public EvaluationModel() {
}
public int getCreateBy() {
return this.createBy;
}
public void setCreateBy(int createBy) {
this.createBy = createBy;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getStandard() {
return this.standard;
}
public void setStandard(String standard) {
this.standard = standard;
}
public String getCoefficient() {
return coefficient;
}
public void setCoefficient(String coefficient) {
this.coefficient = coefficient;
}
public String getInfluence() {
return influence;
}
public void setInfluence(String influence) {
this.influence = influence;
}
public String getDescribe() {
return describe;
}
public void setDescribe(String describe) {
this.describe = describe;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* The persistent class for the evaluation_model database table.
*
*/
@Entity
@Table(name="f_evaluation_model")
@NamedQuery(name="EvaluationModel.findAll", query="SELECT e FROM EvaluationModel e")
public class EvaluationModel extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name="create_by")
private String createBy;
private String name;
/**
* 系数
*/
private String coefficient;
/**
* 影响
*/
private String influence;
/**
* 描述
*/
private String describe;
/**
* S,D,O
*/
private String type;
@Column(name="org_code")
private String orgCode;
private String remark;
@Lob
private String standard;
public EvaluationModel() {
}
public String getCreateBy() {
return this.createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getStandard() {
return this.standard;
}
public void setStandard(String standard) {
this.standard = standard;
}
public String getCoefficient() {
return coefficient;
}
public void setCoefficient(String coefficient) {
this.coefficient = coefficient;
}
public String getInfluence() {
return influence;
}
public void setInfluence(String influence) {
this.influence = influence;
}
public String getDescribe() {
return describe;
}
public void setDescribe(String describe) {
this.describe = describe;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
\ No newline at end of file
package com.yeejoin.amos.fas.dao.entity;
import java.util.List;
import java.util.Map;
import javax.persistence.*;
/**
* 消防站点
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_station")
@NamedQuery(name="FireStation.findAll", query="SELECT f FROM FireStation f")
public class FireStation extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 名称
*/
private String name;
/**
* 编号
*/
private String code;
/**
* 类型 1:消防小室,2:消防泡沫间
*/
private String type;
/**
* 所属风险区域id
*/
@Column(name="risk_source_id")
private Long riskSourceId;
/**
* 位置
*/
private String address;
/**
* 3纬坐标
*/
private String position3d;
/**
* 3维楼层
*/
private String floor3d;
/**
* 是否室内
*/
@Column(name="is_indoor")
private Boolean isIndoor=true;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private int createBy;
@Column(name="picture")
private String picture;
private List<Map> fireEquipmentInfo;
/**
* ue4位置
*/
@Lob
private String ue4Location;
/**
* ue4旋转
*/
@Lob
private String ue4Rotation;
@Transient
public List<Map> getFireEquipmentInfo() {
return fireEquipmentInfo;
}
public void setFireEquipmentInfo(List<Map> fireEquipmentInfo) {
this.fireEquipmentInfo = fireEquipmentInfo;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
public String getFloor3d() {
return floor3d;
}
public void setFloor3d(String floor3d) {
this.floor3d = floor3d;
}
public Boolean getIsIndoor() {
return isIndoor;
}
public void setIsIndoor(Boolean isIndoor) {
this.isIndoor = isIndoor;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public int getCreateBy() {
return createBy;
}
public void setCreateBy(int createBy) {
this.createBy = createBy;
}
public String getPicture() {
return picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public Long getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(Long riskSourceId) {
this.riskSourceId = riskSourceId;
}
@Column(name = "ue4_location")
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
@Column(name = "ue4_rotation")
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
}
package com.yeejoin.amos.fas.dao.entity;
import java.util.List;
import java.util.Map;
import javax.persistence.*;
/**
* 消防站点
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_station")
@NamedQuery(name="FireStation.findAll", query="SELECT f FROM FireStation f")
public class FireStation extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 名称
*/
private String name;
/**
* 编号
*/
private String code;
/**
* 类型 1:消防小室,2:消防泡沫间
*/
private String type;
/**
* 所属风险区域id
*/
@Column(name="risk_source_id")
private Long riskSourceId;
/**
* 位置
*/
private String address;
/**
* 3纬坐标
*/
private String position3d;
/**
* 3维楼层
*/
private String floor3d;
/**
* 是否室内
*/
@Column(name="is_indoor")
private Boolean isIndoor=true;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
@Column(name="picture")
private String picture;
private List<Map> fireEquipmentInfo;
/**
* ue4位置
*/
@Lob
private String ue4Location;
/**
* ue4旋转
*/
@Lob
private String ue4Rotation;
@Transient
public List<Map> getFireEquipmentInfo() {
return fireEquipmentInfo;
}
public void setFireEquipmentInfo(List<Map> fireEquipmentInfo) {
this.fireEquipmentInfo = fireEquipmentInfo;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
public String getFloor3d() {
return floor3d;
}
public void setFloor3d(String floor3d) {
this.floor3d = floor3d;
}
public Boolean getIsIndoor() {
return isIndoor;
}
public void setIsIndoor(Boolean isIndoor) {
this.isIndoor = isIndoor;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getPicture() {
return picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public Long getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(Long riskSourceId) {
this.riskSourceId = riskSourceId;
}
@Column(name = "ue4_location")
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
@Column(name = "ue4_rotation")
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* 消防站关联物资
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_station_equipment")
@NamedQuery(name="FireStationFireEquipment.findAll", query="SELECT f FROM FireStationFireEquipment f")
public class FireStationFireEquipment extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 消防站id
*/
@Column(name="fire_station_id")
private Long fireStationId;
/**
* 消防资源
*/
@Column(name="fire_equipment_id")
private Long fireEquipmentId;
/**
* 个数
*/
private Double number;
/**
* 单位
*/
private String unit;
/**
* 创建人
*/
@Column(name="create_by")
private int createBy;
public Long getFireStationId() {
return fireStationId;
}
public void setFireStationId(Long fireStationId) {
this.fireStationId = fireStationId;
}
public Long getFireEquipmentId() {
return fireEquipmentId;
}
public void setFireEquipmentId(Long fireEquipmentId) {
this.fireEquipmentId = fireEquipmentId;
}
public Double getNumber() {
return number;
}
public void setNumber(Double number) {
this.number = number;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public int getCreateBy() {
return createBy;
}
public void setCreateBy(int createBy) {
this.createBy = createBy;
}
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* 消防站关联物资
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_station_equipment")
@NamedQuery(name="FireStationFireEquipment.findAll", query="SELECT f FROM FireStationFireEquipment f")
public class FireStationFireEquipment extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 消防站id
*/
@Column(name="fire_station_id")
private Long fireStationId;
/**
* 消防资源
*/
@Column(name="fire_equipment_id")
private Long fireEquipmentId;
/**
* 个数
*/
private Double number;
/**
* 单位
*/
private String unit;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
public Long getFireStationId() {
return fireStationId;
}
public void setFireStationId(Long fireStationId) {
this.fireStationId = fireStationId;
}
public Long getFireEquipmentId() {
return fireEquipmentId;
}
public void setFireEquipmentId(Long fireEquipmentId) {
this.fireEquipmentId = fireEquipmentId;
}
public Double getNumber() {
return number;
}
public void setNumber(Double number) {
this.number = number;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
}
package com.yeejoin.amos.fas.dao.entity;
import java.sql.Time;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* 消防力量
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_strength")
@NamedQuery(name="FireStrength.findAll", query="SELECT f FROM FireStrength f")
public class FireStrength extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private String code;
/**
* 姓名
*/
private String username;
/**
* 职位
*/
private String position;
/**
* 固话
*/
private String tel;
/**
* 开始时间
*/
@Column(name="day_begin")
private Time dayBegin;
/**
* 结束时间
*/
@Column(name="day_end")
private Time dayEnd;
/**
* 手机
*/
@Column(name="phone_num")
private String phoneNum;
/**
* 工作描述
*/
@Column(name="job_des")
private String jobDes;
/**
* 备注
*/
private String remark;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private int createBy;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public String getPhoneNum() {
return phoneNum;
}
public void setPhoneNum(String phoneNum) {
this.phoneNum = phoneNum;
}
public String getJobDes() {
return jobDes;
}
public void setJobDes(String jobDes) {
this.jobDes = jobDes;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public int getCreateBy() {
return createBy;
}
public void setCreateBy(int createBy) {
this.createBy = createBy;
}
public Time getDayBegin() {
return dayBegin;
}
public void setDayBegin(Time dayBegin) {
this.dayBegin = dayBegin;
}
public Time getDayEnd() {
return dayEnd;
}
public void setDayEnd(Time dayEnd) {
this.dayEnd = dayEnd;
}
}
package com.yeejoin.amos.fas.dao.entity;
import java.sql.Time;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* 消防力量
* @author Administrator
*
*/
@Entity
@Table(name="f_fire_strength")
@NamedQuery(name="FireStrength.findAll", query="SELECT f FROM FireStrength f")
public class FireStrength extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private String code;
/**
* 姓名
*/
private String username;
/**
* 职位
*/
private String position;
/**
* 固话
*/
private String tel;
/**
* 开始时间
*/
@Column(name="day_begin")
private Time dayBegin;
/**
* 结束时间
*/
@Column(name="day_end")
private Time dayEnd;
/**
* 手机
*/
@Column(name="phone_num")
private String phoneNum;
/**
* 工作描述
*/
@Column(name="job_des")
private String jobDes;
/**
* 备注
*/
private String remark;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public String getPhoneNum() {
return phoneNum;
}
public void setPhoneNum(String phoneNum) {
this.phoneNum = phoneNum;
}
public String getJobDes() {
return jobDes;
}
public void setJobDes(String jobDes) {
this.jobDes = jobDes;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Time getDayBegin() {
return dayBegin;
}
public void setDayBegin(Time dayBegin) {
this.dayBegin = dayBegin;
}
public Time getDayEnd() {
return dayEnd;
}
public void setDayEnd(Time dayEnd) {
this.dayEnd = dayEnd;
}
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* The persistent class for the preplan_picture database table.
*/
@Entity
@Table(name = "f_preplan_picture")
@NamedQuery(name = "PreplanPicture.findAll", query = "SELECT p FROM PreplanPicture p")
public class PreplanPicture extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name = "create_by")
private int createBy;
@Column(name = "equipment_id")
private Long equipmentId;
private String name;
@Lob
private String picture;
private String remark;
private int type;
public PreplanPicture() {
}
public int getCreateBy() {
return this.createBy;
}
public void setCreateBy(int createBy) {
this.createBy = createBy;
}
public Long getEquipmentId() {
return this.equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getPicture() {
return this.picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public int getType() {
return this.type;
}
public void setType(int type) {
this.type = type;
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* The persistent class for the preplan_picture database table.
*/
@Entity
@Table(name = "f_preplan_picture")
@NamedQuery(name = "PreplanPicture.findAll", query = "SELECT p FROM PreplanPicture p")
public class PreplanPicture extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name = "create_by")
private String createBy;
@Column(name = "equipment_id")
private Long equipmentId;
private String name;
@Lob
private String picture;
private String remark;
private int type;
public PreplanPicture() {
}
public String getCreateBy() {
return this.createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Long getEquipmentId() {
return this.equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getPicture() {
return this.picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public int getType() {
return this.type;
}
public void setType(int type) {
this.type = type;
}
}
\ No newline at end of file
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* The persistent class for the risk_factors database table.
*
*/
@Entity
@Table(name="f_risk_factor")
@NamedQuery(name="RiskFactor.findAll", query="SELECT r FROM RiskFactor r")
public class RiskFactor extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name="accident_type_id")
private Long accidentTypeId;
@Column(name="create_by")
private int createBy;
@Column(name="dept_id")
private Long deptId;
private String name;
@Column(name="org_code")
private String orgCode;
private String remark;
private String type;
public RiskFactor() {
}
public Long getAccidentTypeId() {
return this.accidentTypeId;
}
public void setAccidentTypeId(Long accidentTypeId) {
this.accidentTypeId = accidentTypeId;
}
public int getCreateBy() {
return this.createBy;
}
public void setCreateBy(int createBy) {
this.createBy = createBy;
}
public Long getDeptId() {
return this.deptId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
/**
* The persistent class for the risk_factors database table.
*
*/
@Entity
@Table(name="f_risk_factor")
@NamedQuery(name="RiskFactor.findAll", query="SELECT r FROM RiskFactor r")
public class RiskFactor extends BasicEntity {
private static final long serialVersionUID = 1L;
@Column(name="accident_type_id")
private Long accidentTypeId;
@Column(name="create_by")
private String createBy;
@Column(name="dept_id")
private String deptId;
private String name;
@Column(name="org_code")
private String orgCode;
private String remark;
private String type;
public RiskFactor() {
}
public Long getAccidentTypeId() {
return this.accidentTypeId;
}
public void setAccidentTypeId(Long accidentTypeId) {
this.accidentTypeId = accidentTypeId;
}
public String getCreateBy() {
return this.createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getDeptId() {
return this.deptId;
}
public void setDeptId(String deptId) {
this.deptId = deptId;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
\ No newline at end of file
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
* The persistent class for the risk_level database table.
*/
@Entity
@Table(name = "f_risk_level")
@NamedQuery(name = "RiskLevel.findAll", query = "SELECT r FROM RiskLevel r")
public class RiskLevel extends BasicEntity {
private static final long serialVersionUID = 1L;
private String color;
@Column(name = "create_by")
private Long createBy;
@Column(name = "evaluation_model_id")
private Long evaluationModelId;
@Column(name = "name")
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "level")
private Integer level;
@Column(name = "org_code")
private String orgCode;
@Column(name = "top_limit")
private BigDecimal topLimit;
@Column(name = "down_limit")
private BigDecimal downLimit;
private Integer manageLevel;
private String remark;
private String severity;
public RiskLevel() {
}
public String getColor() {
return this.color;
}
public void setColor(String color) {
this.color = color;
}
public Long getCreateBy() {
return this.createBy;
}
public void setCreateBy(Long createBy) {
this.createBy = createBy;
}
public Integer getLevel() {
return this.level;
}
public void setLevel(Integer level) {
this.level = level;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getSeverity() {
return this.severity;
}
public void setSeverity(String severity) {
this.severity = severity;
}
public Long getEvaluationModelId() {
return evaluationModelId;
}
public void setEvaluationModelId(Long evaluationModelId) {
this.evaluationModelId = evaluationModelId;
}
public BigDecimal getTopLimit() {
return topLimit;
}
public void setTopLimit(BigDecimal topLimit) {
this.topLimit = topLimit;
}
public BigDecimal getDownLimit() {
return downLimit;
}
public void setDownLimit(BigDecimal downLimit) {
this.downLimit = downLimit;
}
public Integer getManageLevel() {
return manageLevel;
}
public void setManageLevel(Integer manageLevel) {
this.manageLevel = manageLevel;
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import java.math.BigDecimal;
/**
* The persistent class for the risk_level database table.
*/
@Entity
@Table(name = "f_risk_level")
@NamedQuery(name = "RiskLevel.findAll", query = "SELECT r FROM RiskLevel r")
public class RiskLevel extends BasicEntity {
private static final long serialVersionUID = 1L;
private String color;
@Column(name = "create_by")
private String createBy;
@Column(name = "evaluation_model_id")
private Long evaluationModelId;
@Column(name = "name")
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "level")
private Integer level;
@Column(name = "org_code")
private String orgCode;
@Column(name = "top_limit")
private BigDecimal topLimit;
@Column(name = "down_limit")
private BigDecimal downLimit;
private Integer manageLevel;
private String remark;
private String severity;
public RiskLevel() {
}
public String getColor() {
return this.color;
}
public void setColor(String color) {
this.color = color;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Integer getLevel() {
return this.level;
}
public void setLevel(Integer level) {
this.level = level;
}
public String getOrgCode() {
return this.orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getSeverity() {
return this.severity;
}
public void setSeverity(String severity) {
this.severity = severity;
}
public Long getEvaluationModelId() {
return evaluationModelId;
}
public void setEvaluationModelId(Long evaluationModelId) {
this.evaluationModelId = evaluationModelId;
}
public BigDecimal getTopLimit() {
return topLimit;
}
public void setTopLimit(BigDecimal topLimit) {
this.topLimit = topLimit;
}
public BigDecimal getDownLimit() {
return downLimit;
}
public void setDownLimit(BigDecimal downLimit) {
this.downLimit = downLimit;
}
public Integer getManageLevel() {
return manageLevel;
}
public void setManageLevel(Integer manageLevel) {
this.manageLevel = manageLevel;
}
}
\ No newline at end of file
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.*;
/**
* 水资源
* @author
*
*/
@Entity
@Table(name="f_water_resource")
@NamedQuery(name="WaterResource.findAll", query="SELECT f FROM WaterResource f")
public class WaterResource extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 名称
*/
private String name;
/**
* 编号
*/
private String code;
/**
* 类型 1:消火栓,2:消防水池,3:喷淋
*/
private String type;
/**
* 区域
*/
@Column(name="production_area")
private String productionArea;
/**
* 3纬坐标
*/
private String position3d;
/**
* 3维楼层
*/
private String floor3d;
/**
* 是否室内
*/
@Column(name="is_indoor")
private Boolean isIndoor=true;
/**
* 所属风险区域id
*/
@Column(name="risk_source_id")
private Long riskSourceId;
/**
* 房间
*/
private String room;
/**
* 位置
*/
private String address;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private int createBy;
/**
* ue4位置
*/
@Lob
private String ue4Location;
/**
* ue4旋转
*/
@Lob
private String ue4Rotation;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getProductionArea() {
return productionArea;
}
public void setProductionArea(String productionArea) {
this.productionArea = productionArea;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
public String getFloor3d() {
return floor3d;
}
public void setFloor3d(String floor3d) {
this.floor3d = floor3d;
}
public Boolean getIsIndoor() {
return isIndoor;
}
public void setIsIndoor(Boolean isIndoor) {
this.isIndoor = isIndoor;
}
public String getRoom() {
return room;
}
public void setRoom(String room) {
this.room = room;
}
public Long getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(Long riskSourceId) {
this.riskSourceId = riskSourceId;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public int getCreateBy() {
return createBy;
}
public void setCreateBy(int createBy) {
this.createBy = createBy;
}
@Column(name = "ue4_location")
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
@Column(name = "ue4_rotation")
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
}
package com.yeejoin.amos.fas.dao.entity;
import javax.persistence.*;
/**
* 水资源
* @author
*
*/
@Entity
@Table(name="f_water_resource")
@NamedQuery(name="WaterResource.findAll", query="SELECT f FROM WaterResource f")
public class WaterResource extends BasicEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 名称
*/
private String name;
/**
* 编号
*/
private String code;
/**
* 类型 1:消火栓,2:消防水池,3:喷淋
*/
private String type;
/**
* 区域
*/
@Column(name="production_area")
private String productionArea;
/**
* 3纬坐标
*/
private String position3d;
/**
* 3维楼层
*/
private String floor3d;
/**
* 是否室内
*/
@Column(name="is_indoor")
private Boolean isIndoor=true;
/**
* 所属风险区域id
*/
@Column(name="risk_source_id")
private Long riskSourceId;
/**
* 房间
*/
private String room;
/**
* 位置
*/
private String address;
/**
* 组织
*/
@Column(name="org_code")
private String orgCode;
/**
* 创建人
*/
@Column(name="create_by")
private String createBy;
/**
* ue4位置
*/
@Lob
private String ue4Location;
/**
* ue4旋转
*/
@Lob
private String ue4Rotation;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getProductionArea() {
return productionArea;
}
public void setProductionArea(String productionArea) {
this.productionArea = productionArea;
}
public String getPosition3d() {
return position3d;
}
public void setPosition3d(String position3d) {
this.position3d = position3d;
}
public String getFloor3d() {
return floor3d;
}
public void setFloor3d(String floor3d) {
this.floor3d = floor3d;
}
public Boolean getIsIndoor() {
return isIndoor;
}
public void setIsIndoor(Boolean isIndoor) {
this.isIndoor = isIndoor;
}
public String getRoom() {
return room;
}
public void setRoom(String room) {
this.room = room;
}
public Long getRiskSourceId() {
return riskSourceId;
}
public void setRiskSourceId(Long riskSourceId) {
this.riskSourceId = riskSourceId;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
@Column(name = "ue4_location")
public String getUe4Location() {
return ue4Location;
}
public void setUe4Location(String ue4Location) {
this.ue4Location = ue4Location;
}
@Column(name = "ue4_rotation")
public String getUe4Rotation() {
return ue4Rotation;
}
public void setUe4Rotation(String ue4Rotation) {
this.ue4Rotation = ue4Rotation;
}
}
package com.yeejoin.amos.fas.business.controller;
import java.util.Date;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.FireStrength;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@RestController
@RequestMapping(value = "/api/firestrength")
@Api(tags="消防专职人API")
public class FireStrengthController extends BaseController{
@Autowired
FireStengthService fireStengthService;
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "POST",value = "添加专职人员", notes = "添加专职人员")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse createPoint(@RequestBody FireStrength fireStrength) throws Exception{
if(fireStrength == null
|| StringUtils.isEmpty(fireStrength.getUsername())
|| StringUtils.isEmpty(fireStrength.getPhoneNum())
|| StringUtils.isEmpty(fireStrength.getPosition())
|| StringUtils.isEmpty(fireStrength.getCode() ))
throw new Exception("数据校验失败.");
fireStrength.setCreateBy(0);
fireStrength.setCreateDate(new Date());
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT",value = "编辑专职人员", notes = "编辑专职人员")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse udpatePoint(@PathVariable Long id, @RequestBody FireStrength fireStrength) {
fireStrength.setId(id);
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "查询单个专职人员", notes = "查询单个专职人员")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryPoint(@PathVariable Long id) {
return CommonResponseUtil.success(fireStengthService.queryOne(id));
}
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "DELETE",value = "删除专职人员", notes = "查询单个专职人员")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse deletePoint(@PathVariable String ids) throws Exception {
String [] idArray = ids.split(",");
return CommonResponseUtil.success(fireStengthService.deletePoint(idArray));
}
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "分页查询专职人员", notes = "分页查询专职人员")
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse pointList(
@ApiParam(value = "名称模糊查询", required = false) @RequestParam(required = false)String name,
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false)String code,
@RequestParam int pageNumber,
@RequestParam int pageSize
) {
CommonPageable commonPageable = new CommonPageable(pageNumber,pageSize);
return CommonResponseUtil.success(fireStengthService.queryByFireEquimt(StringUtils.trimToNull(name),StringUtils.trimToNull(code),commonPageable));
}
}
package com.yeejoin.amos.fas.business.controller;
import java.util.Date;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.FireStrength;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@RestController
@RequestMapping(value = "/api/firestrength")
@Api(tags="消防专职人API")
public class FireStrengthController extends BaseController{
@Autowired
FireStengthService fireStengthService;
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "POST",value = "添加专职人员", notes = "添加专职人员")
@RequestMapping(value = "", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse createPoint(@RequestBody FireStrength fireStrength) throws Exception{
if(fireStrength == null
|| StringUtils.isEmpty(fireStrength.getUsername())
|| StringUtils.isEmpty(fireStrength.getPhoneNum())
|| StringUtils.isEmpty(fireStrength.getPosition())
|| StringUtils.isEmpty(fireStrength.getCode() ))
throw new Exception("数据校验失败.");
fireStrength.setCreateBy("0");
fireStrength.setCreateDate(new Date());
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
// @Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT",value = "编辑专职人员", notes = "编辑专职人员")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
public CommonResponse udpatePoint(@PathVariable Long id, @RequestBody FireStrength fireStrength) {
fireStrength.setId(id);
return CommonResponseUtil.success(fireStengthService.savePoint(fireStrength));
}
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "查询单个专职人员", notes = "查询单个专职人员")
@RequestMapping(value = "/{id}", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryPoint(@PathVariable Long id) {
return CommonResponseUtil.success(fireStengthService.queryOne(id));
}
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "DELETE",value = "删除专职人员", notes = "查询单个专职人员")
@RequestMapping(value = "/{ids}", produces = "application/json;charset=UTF-8", method = RequestMethod.DELETE)
public CommonResponse deletePoint(@PathVariable String ids) throws Exception {
String [] idArray = ids.split(",");
return CommonResponseUtil.success(fireStengthService.deletePoint(idArray));
}
//@Authorization(ingore = true)
@ApiOperation(httpMethod = "GET",value = "分页查询专职人员", notes = "分页查询专职人员")
@RequestMapping(value = "/page", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse pointList(
@ApiParam(value = "名称模糊查询", required = false) @RequestParam(required = false)String name,
@ApiParam(value = "编号模糊查询", required = false) @RequestParam(required = false)String code,
@RequestParam int pageNumber,
@RequestParam int pageSize
) {
CommonPageable commonPageable = new CommonPageable(pageNumber,pageSize);
return CommonResponseUtil.success(fireStengthService.queryByFireEquimt(StringUtils.trimToNull(name),StringUtils.trimToNull(code),commonPageable));
}
}
package com.yeejoin.amos.fas.business.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service;
import com.google.common.base.Joiner;
import com.yeejoin.amos.fas.business.dao.mapper.AccidentTypeMapper;
import com.yeejoin.amos.fas.business.dao.repository.IAccidentTypeDao;
import com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao;
import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IAccidentTypeService;
import com.yeejoin.amos.fas.dao.entity.AccidentType;
import com.yeejoin.amos.fas.dao.entity.RiskFactor;
import com.yeejoin.amos.fas.exception.YeeException;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
@Service("accidentTypeService")
public class AccidentTypeServiceImpl implements IAccidentTypeService {
@Autowired
AccidentTypeMapper accidentTypeMapper;
@Autowired
IAccidentTypeDao iAccidentTypeDao;
@Autowired
IRiskFactorDao iRiskFactorDao;
@Autowired
private RemoteSecurityService remoteSecurityService;
@Override
public void detAccidentType(Long[] param) {
//1.校验
for(Long id : param){
checkBeforeDet(id);
}
//2.删除
iAccidentTypeDao.deleteAllByIds(param);
}
/**
* 关联数据校验
* @param id
*/
private void checkBeforeDet(Long id) {
List<RiskFactor> list = iRiskFactorDao.findByAccidentTypeId(id);
if(null != list && list.size()>0){
throw new YeeException("危险因素"+list.get(0).getName()+"在使用中,不能删除");
}
}
@Override
public void editAccidentType(HashMap<String, Object> map) {
AccidentType param = (AccidentType)map.get("param");
String orgCode = map.get("org_code") == null ? "":map.get("org_code").toString();
String userId = map.get("user_id")== null ? "0":map.get("user_id").toString();
String deptId = map.get("dept_id")== null ? "0":map.get("dept_id").toString();
param.setOrgCode(orgCode);
param.setDeptId(Long.parseLong(deptId));
param.setCreateBy(Long.parseLong(userId));
param.setCreateDate(new Date());
iAccidentTypeDao.save(param);
}
@Override
public List<HashMap<String,Object>> queryAccidentType(String orgCode) {
return accidentTypeMapper.findAccidentTypeListByOrgCode(orgCode);
}
@Override
public Page<HashMap<String, Object>> queryAccidentTypePage(String toke,String product,String appKey,CommonPageInfoParam param) {
long total = accidentTypeMapper.countPageData(param);
List<HashMap<String, Object>> content = accidentTypeMapper.findAccidentTypePage(param);
List<String> userIdList = new ArrayList<String>();
List<String> deptIdList = new ArrayList<String>();
for(HashMap<String, Object> map : content)
{
String userId = String.valueOf(map.get("createBy"));
String deptId = String.valueOf(map.get("deptId"));
if(userId!=null&&!userIdList.contains(userId))
{
userIdList.add(userId);
}
if(deptId!=null&&!deptIdList.contains(deptId))
{
deptIdList.add(deptId);
}
}
Map<String, String> userMap = new HashMap<String,String>();
Map<String, String> deptMap = new HashMap<String,String>();
if(userIdList.size()>0)
{
List<AgencyUserModel> users =remoteSecurityService.listUserByUserIds(toke, product, appKey, Joiner.on(",").join(userIdList));
for (int i = 0; i < users.size(); i++) {
userMap.put(users.get(i).getUserId(), users.get(i).getUserName());
}
}
if(deptIdList.size()>0)
{
List<LinkedHashMap> depts =remoteSecurityService.listDepartmentByDeptIds(toke, product, appKey, Joiner.on(",").join(deptIdList));
for (int i = 0; i < depts.size(); i++) {
deptMap.put(depts.get(i).get("sequenceNbr").toString(), depts.get(i).get("departmentName").toString());
}
}
content.forEach(e -> {
e.put("userName",userMap.get(String.valueOf(e.get("createBy"))));
e.put("deptName",deptMap.get(String.valueOf(e.get("deptId"))));
});
Page<HashMap<String, Object>> result = new PageImpl<>(content, param, total);
return result;
}
}
package com.yeejoin.amos.fas.business.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service;
import com.google.common.base.Joiner;
import com.yeejoin.amos.fas.business.dao.mapper.AccidentTypeMapper;
import com.yeejoin.amos.fas.business.dao.repository.IAccidentTypeDao;
import com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao;
import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IAccidentTypeService;
import com.yeejoin.amos.fas.dao.entity.AccidentType;
import com.yeejoin.amos.fas.dao.entity.RiskFactor;
import com.yeejoin.amos.fas.exception.YeeException;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
@Service("accidentTypeService")
public class AccidentTypeServiceImpl implements IAccidentTypeService {
@Autowired
AccidentTypeMapper accidentTypeMapper;
@Autowired
IAccidentTypeDao iAccidentTypeDao;
@Autowired
IRiskFactorDao iRiskFactorDao;
@Autowired
private RemoteSecurityService remoteSecurityService;
@Override
public void detAccidentType(Long[] param) {
//1.校验
for(Long id : param){
checkBeforeDet(id);
}
//2.删除
iAccidentTypeDao.deleteAllByIds(param);
}
/**
* 关联数据校验
* @param id
*/
private void checkBeforeDet(Long id) {
List<RiskFactor> list = iRiskFactorDao.findByAccidentTypeId(id);
if(null != list && list.size()>0){
throw new YeeException("危险因素"+list.get(0).getName()+"在使用中,不能删除");
}
}
@Override
public void editAccidentType(HashMap<String, Object> map) {
AccidentType param = (AccidentType)map.get("param");
String orgCode = map.get("org_code") == null ? "":map.get("org_code").toString();
String userId = map.get("user_id")== null ? "0":map.get("user_id").toString();
String deptId = map.get("dept_id")== null ? "0":map.get("dept_id").toString();
param.setOrgCode(orgCode);
param.setDeptId(deptId);
param.setCreateBy(userId);
param.setCreateDate(new Date());
iAccidentTypeDao.save(param);
}
@Override
public List<HashMap<String,Object>> queryAccidentType(String orgCode) {
return accidentTypeMapper.findAccidentTypeListByOrgCode(orgCode);
}
@Override
public Page<HashMap<String, Object>> queryAccidentTypePage(String toke,String product,String appKey,CommonPageInfoParam param) {
long total = accidentTypeMapper.countPageData(param);
List<HashMap<String, Object>> content = accidentTypeMapper.findAccidentTypePage(param);
List<String> userIdList = new ArrayList<String>();
List<String> deptIdList = new ArrayList<String>();
for(HashMap<String, Object> map : content)
{
String userId = String.valueOf(map.get("createBy"));
String deptId = String.valueOf(map.get("deptId"));
if(userId!=null&&!userIdList.contains(userId))
{
userIdList.add(userId);
}
if(deptId!=null&&!deptIdList.contains(deptId))
{
deptIdList.add(deptId);
}
}
List<AgencyUserModel> users =remoteSecurityService.listUserByUserIds(toke, product, appKey, Joiner.on(",").join(userIdList));
Map<String, String> userMap = new HashMap<String,String>();
for (int i = 0; i < users.size(); i++) {
userMap.put(users.get(i).getUserId(), users.get(i).getUserName());
}
List<LinkedHashMap> depts =remoteSecurityService.listDepartmentByDeptIds(toke, product, appKey, Joiner.on(",").join(deptIdList));
Map<String, String> deptMap = new HashMap<String,String>();
for (int i = 0; i < depts.size(); i++) {
deptMap.put(depts.get(i).get("sequenceNbr").toString(), depts.get(i).get("departmentName").toString());
}
content.forEach(e -> {
e.put("userName",userMap.get(e.get("createBy")));
e.put("deptName",deptMap.get(e.get("deptId")));
});
Page<HashMap<String, Object>> result = new PageImpl<>(content, param, total);
return result;
}
}
package com.yeejoin.amos.fas.business.service.impl;
import java.util.ArrayList;
......@@ -74,7 +75,7 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
String orgCode = map.get("org_code") == null ? "":map.get("org_code").toString();
String userId = map.get("user_id")== null ? "0":map.get("user_id").toString();
param.setOrgCode(orgCode);
param.setCreateBy(Long.parseLong(userId));
param.setCreateBy(userId);
param.setCreateDate(new Date());
iRiskLevelDao.save(param);
}
......@@ -119,3 +120,4 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
}
}
package com.yeejoin.amos.fas.business.service.impl;
import java.math.BigDecimal;
......@@ -229,7 +230,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
String orgCode = map.get("org_code") == null ? "" : map.get("org_code").toString();
String userId = map.get("user_id") == null ? "0" : map.get("user_id").toString();
riskSource.setOrgCode(orgCode);
riskSource.setCreateBy(Integer.parseInt(userId));
riskSource.setCreateBy(userId);
Optional<RiskSource> oldRiskSource1 = iRiskSourceDao.findById(id);
RiskSource oldRiskSource = null;
if (oldRiskSource1.isPresent()) {
......
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