Commit 4589984b authored by tianbo's avatar tianbo

去掉vo

parent e0ed948c
package com.yeejoin.amos.boot.module.tzs.api.vo;
package com.yeejoin.amos.boot.module.tzs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -14,8 +14,8 @@ import java.util.Map;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "AlarmStatisticsVo", description = "AlarmStatisticsVo")
public class AlarmStatisticsVo {
@ApiModel(value = "AlarmStatisticsDto", description = "AlarmStatisticsDto")
public class AlarmStatisticsDto {
@ApiModelProperty(value = "我的待办数量")
private Integer todoNum;
......
......@@ -127,14 +127,15 @@ public class AlertCalledDto extends BaseDto {
@ApiModelProperty(value = "警情地址")
private String alertAddress;
/**
* 工单编号
*/
@ApiModelProperty(value = "响应级别")
private String responseLevel;
@ApiModelProperty("工单编号")
private String workOrderNumber;
@ApiModelProperty(value = "接警时间str")
private String callTimeStr;
@ApiModelProperty(value = "接警人")
protected String recUserName;
// @ApiModelProperty(value = "接警人")
// protected String recUserName;
}
package com.yeejoin.amos.boot.module.tzs.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.tzs.api.vo.AlertCalledVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -21,14 +20,14 @@ public class AlertCalledFormDto extends BaseDto{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "警情基本信息")
private AlertCalledVo alertCalledVo;
private AlertCalledDto alertCalledDto;
@ApiModelProperty(value = "动态表单值")
private List<FormValue> dynamicFormAlert;
public AlertCalledFormDto(AlertCalledVo alertCalledVo, List<FormValue> formValue) {
this.alertCalledVo = alertCalledVo;
public AlertCalledFormDto(AlertCalledDto alertCalledDto, List<FormValue> formValue) {
this.alertCalledDto = alertCalledDto;
this.dynamicFormAlert = formValue;
}
}
......@@ -206,9 +206,6 @@ public class ElevatorDto extends BaseDto {
@ApiModelProperty(value = "功率")
private String power;
@ApiModelProperty(value = "设备图片")
private String photos;
@ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId;
......
package com.yeejoin.amos.boot.module.tzs.api.vo;
package com.yeejoin.amos.boot.module.tzs.api.dto;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
......@@ -16,10 +16,8 @@ import lombok.experimental.Accessors;
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_maintenance_unit")
@ApiModel(value = "MaintenanceUnitNameVo", description = "MaintenanceUnitNameVo")
public class MaintenanceUnitNameVo extends BaseEntity {
@ApiModel(value = "MaintenanceUnitNameDto", description = "MaintenanceUnitNameDto")
public class MaintenanceUnitNameDto extends BaseEntity {
private static final long serialVersionUID = 1L;
......
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
//import java.util.Date;
//import java.util.List;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("tcb_elevator")
//@ApiModel(value = "ElevatorDto", description = "ElevatorDto")
//public class ElevatorDto extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "电梯应急救援识别码")
// private Integer rescueCode;
//
// @ApiModelProperty(value = "设备注册代码")
// private String registerCode;
//
// @ApiModelProperty(value = "所属省")
// private String province;
//
// @ApiModelProperty(value = "所属地市")
// private String city;
//
// @ApiModelProperty(value = "所属区县")
// private String district;
//
// @ApiModelProperty(value = "所属区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "安装地址")
// private String address;
//
// @ApiModelProperty(value = "内部编号")
// private String innerNum;
//
// @ApiModelProperty(value = "电梯品牌")
// private String brand;
//
// @ApiModelProperty(value = "出厂编号")
// private String factoryNum;
//
// @ApiModelProperty(value = "电梯安装单位")
// private String installationUnit;
//
// @ApiModelProperty(value = "制造日期(出厂时间)")
// private Date factoryDate;
//
// @ApiModelProperty(value = "电梯大修/改造日期")
// private Date overhaulDate;
//
// @ApiModelProperty(value = "开始使用日期")
// private Date startUseDate;
//
// @ApiModelProperty(value = "设备类别")
// private String category;
//
// @ApiModelProperty(value = "使用场所分类")
// private String useSiteCategory;
//
// @ApiModelProperty(value = "电梯型号")
// private String model;
//
// @ApiModelProperty(value = "电梯层数")
// private Integer floors;
//
// @ApiModelProperty(value = "电梯站数")
// private Integer stations;
//
// @ApiModelProperty(value = "电梯门数")
// private Integer doors;
//
// @ApiModelProperty(value = "电梯额定速度(单位:m/s)")
// private Float ratedSpeed;
//
// @ApiModelProperty(value = "电梯额定载重量(单位:kg)")
// private Float ratedLoad;
//
// @ApiModelProperty(value = "最大荷载人数")
// private Integer maxPersonLoad;
//
// @ApiModelProperty(value = "提升高度")
// private Float raiseHeight;
//
// @ApiModelProperty(value = "拖动方式")
// private String dragMode;
//
// @ApiModelProperty(value = "电梯使用状态")
// private Integer useStatus;
//
// @ApiModelProperty(value = "使用单位")
// private String useUnit;
//
// @ApiModelProperty(value = "使用单位id")
// private Long useUnitId;
//
// @ApiModelProperty(value = "制造单位名称")
// private String manufacturerName;
//
// @ApiModelProperty(value = "制造许可编号")
// private String manufacturingLicense;
//
// @ApiModelProperty(value = "维保类型")
// private String maintainType;
//
// @ApiModelProperty(value = "维护周期")
// private String maintainPeriod;
//
// @ApiModelProperty(value = "维保单位")
// private String maintainUnit;
//
// @ApiModelProperty(value = "维保单位id")
// private Long maintainUnitId;
//
// @ApiModelProperty(value = "维保负责人")
// private String maintainLeader;
//
// @ApiModelProperty(value = "维保负责人id")
// private Long maintainLeaderId;
//
// @ApiModelProperty(value = "维保负责人手机")
// private String maintainLeaderPhone;
//
// @ApiModelProperty(value = "主机模式")
// private String hostModel;
//
// @ApiModelProperty(value = "主机编号")
// private String hostNum;
//
// @ApiModelProperty(value = "动力类型")
// private String engineType;
//
// @ApiModelProperty(value = "动力编号")
// private String engineNum;
//
// @ApiModelProperty(value = "面板模型")
// private String panelModel;
//
// @ApiModelProperty(value = "面板编号")
// private String panelNum;
//
// @ApiModelProperty(value = "级联模型")
// private String cascadeModel;
//
// @ApiModelProperty(value = "级联线路模型")
// private String cascadeLineModel;
//
// @ApiModelProperty(value = "扶手带类型")
// private String handrailType;
//
// @ApiModelProperty(value = "扶手面板模型")
// private String handrailPanelModel;
//
// @ApiModelProperty(value = "扶手面板品牌")
// private String handrailPanelBrand;
//
// @ApiModelProperty(value = "滚转机模式")
// private String rollerMode;
//
// @ApiModelProperty(value = "倾斜的角度")
// private String tiltAngle;
//
// @ApiModelProperty(value = "横向跨度")
// private String horizontalSpan;
//
// @ApiModelProperty(value = "运行噪音")
// private String runningNoise;
//
// @ApiModelProperty(value = "运行方式")
// private String runningMode;
//
// @ApiModelProperty(value = "运行振动")
// private String runningVibration;
//
// @ApiModelProperty(value = "功率")
// private String power;
//
// @ApiModelProperty(value = "设备图片")
// private String photos;
//
// @ApiModelProperty(value = "设备图片")
// private List<Img> img;
//
// @ApiModelProperty(value = "原始表id(来自历史数据库)")
// private String originalId;
//
// @Data
// @EqualsAndHashCode()
// @Accessors(chain = true)
// @ApiModel(value = "Img", description = "Img")
// public static class Img {
// private String url;
//
// public Img(String url) {
// this.url = url;
// }
// }
//
//}
package com.yeejoin.amos.boot.module.tzs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
/**
* @author tb
* @date 2021-06-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tcb_elevator")
@ApiModel(value = "ElevatorVo", description = "ElevatorVo")
public class ElevatorVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "电梯应急救援识别码")
private Integer rescueCode;
@ApiModelProperty(value = "设备注册代码")
private String registerCode;
@ApiModelProperty(value = "所属省")
private String province;
@ApiModelProperty(value = "所属地市")
private String city;
@ApiModelProperty(value = "所属区县")
private String district;
@ApiModelProperty(value = "所属区域代码")
private String regionCode;
@ApiModelProperty(value = "安装地址")
private String address;
@ApiModelProperty(value = "内部编号")
private String innerNum;
@ApiModelProperty(value = "电梯品牌")
private String brand;
@ApiModelProperty(value = "出厂编号")
private String factoryNum;
@ApiModelProperty(value = "电梯安装单位")
private String installationUnit;
@ApiModelProperty(value = "制造日期(出厂时间)")
private Date factoryDate;
@ApiModelProperty(value = "电梯大修/改造日期")
private Date overhaulDate;
@ApiModelProperty(value = "开始使用日期")
private Date startUseDate;
@ApiModelProperty(value = "设备类别")
private String category;
@ApiModelProperty(value = "使用场所分类")
private String useSiteCategory;
@ApiModelProperty(value = "电梯型号")
private String model;
@ApiModelProperty(value = "电梯层数")
private Integer floors;
@ApiModelProperty(value = "电梯站数")
private Integer stations;
@ApiModelProperty(value = "电梯门数")
private Integer doors;
@ApiModelProperty(value = "电梯额定速度(单位:m/s)")
private Float ratedSpeed;
@ApiModelProperty(value = "电梯额定载重量(单位:kg)")
private Float ratedLoad;
@ApiModelProperty(value = "最大荷载人数")
private Integer maxPersonLoad;
@ApiModelProperty(value = "提升高度")
private Float raiseHeight;
@ApiModelProperty(value = "拖动方式")
private String dragMode;
@ApiModelProperty(value = "电梯使用状态")
private Integer useStatus;
@ApiModelProperty(value = "使用单位")
private String useUnit;
@ApiModelProperty(value = "使用单位id")
private Long useUnitId;
@ApiModelProperty(value = "制造单位名称")
private String manufacturerName;
@ApiModelProperty(value = "制造许可编号")
private String manufacturingLicense;
@ApiModelProperty(value = "维保类型")
private String maintainType;
@ApiModelProperty(value = "维护周期")
private String maintainPeriod;
@ApiModelProperty(value = "维保单位")
private String maintainUnit;
@ApiModelProperty(value = "维保单位id")
private Long maintainUnitId;
@ApiModelProperty(value = "维保负责人")
private String maintainLeader;
@ApiModelProperty(value = "维保负责人id")
private Long maintainLeaderId;
@ApiModelProperty(value = "维保负责人手机")
private String maintainLeaderPhone;
@ApiModelProperty(value = "主机模式")
private String hostModel;
@ApiModelProperty(value = "主机编号")
private String hostNum;
@ApiModelProperty(value = "动力类型")
private String engineType;
@ApiModelProperty(value = "动力编号")
private String engineNum;
@ApiModelProperty(value = "面板模型")
private String panelModel;
@ApiModelProperty(value = "面板编号")
private String panelNum;
@ApiModelProperty(value = "级联模型")
private String cascadeModel;
@ApiModelProperty(value = "级联线路模型")
private String cascadeLineModel;
@ApiModelProperty(value = "扶手带类型")
private String handrailType;
@ApiModelProperty(value = "扶手面板模型")
private String handrailPanelModel;
@ApiModelProperty(value = "扶手面板品牌")
private String handrailPanelBrand;
@ApiModelProperty(value = "滚转机模式")
private String rollerMode;
@ApiModelProperty(value = "倾斜的角度")
private String tiltAngle;
@ApiModelProperty(value = "横向跨度")
private String horizontalSpan;
@ApiModelProperty(value = "运行噪音")
private String runningNoise;
@ApiModelProperty(value = "运行方式")
private String runningMode;
@ApiModelProperty(value = "运行振动")
private String runningVibration;
@ApiModelProperty(value = "功率")
private String power;
@ApiModelProperty(value = "设备图片")
private String photos;
@ApiModelProperty(value = "设备图片")
private List<Img> img;
@ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId;
@Data
@EqualsAndHashCode()
@Accessors(chain = true)
@ApiModel(value = "Img", description = "Img")
public static class Img {
private String url;
public Img(String url) {
this.url = url;
}
}
}
package com.yeejoin.amos.boot.module.tzs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @author tb
* @date 2021-06-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_maintenance_unit")
@ApiModel(value = "MaintenanceUnitVo", description = "MaintenanceUnitVo")
public class MaintenanceUnitVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "统一社会信用代码")
private String socialCreditCode;
@ApiModelProperty(value = "维护保养单位名称")
private String unitName;
@ApiModelProperty(value = "省份")
private String province;
@ApiModelProperty(value = "地市")
private String city;
@ApiModelProperty(value = "区县")
private String district;
@ApiModelProperty(value = "区域代码")
private String regionCode;
@ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)")
private String address;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "法人id")
private Long legalPersonId;
@ApiModelProperty(value = "法人")
private String legalPerson;
@ApiModelProperty(value = "法人电话/注册电话")
private String legalPersonPhone;
@ApiModelProperty(value = "企业资质等级")
private String qualificationLevel;
@ApiModelProperty(value = "信用级别")
private Integer creditLevel;
@ApiModelProperty(value = "许可证编号")
private String licenseNum;
@ApiModelProperty(value = "值班电话")
private String dutyPhone;
@ApiModelProperty(value = "紧急电话号码")
private String emergencyPhone;
@ApiModelProperty(value = "主要负责人1")
private String principalFirst;
@ApiModelProperty(value = "主要负责人1手机号码")
private String principalFirstPhone;
@ApiModelProperty(value = "主要负责人1id")
private Long principalFirstId;
@ApiModelProperty(value = "主要负责人2")
private String principalSecond;
@ApiModelProperty(value = "主要负责人2手机号码")
private String principalSecondPhone;
@ApiModelProperty(value = "主要负责人2id")
private Long principalSecondId;
@ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId;
}
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("cb_maintenance_unit")
//@ApiModel(value = "MaintenanceUnitVo", description = "MaintenanceUnitVo")
//public class MaintenanceUnitVo extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "统一社会信用代码")
// private String socialCreditCode;
//
// @ApiModelProperty(value = "维护保养单位名称")
// private String unitName;
//
// @ApiModelProperty(value = "省份")
// private String province;
//
// @ApiModelProperty(value = "地市")
// private String city;
//
// @ApiModelProperty(value = "区县")
// private String district;
//
// @ApiModelProperty(value = "区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)")
// private String address;
//
// @ApiModelProperty(value = "经度")
// private String longitude;
//
// @ApiModelProperty(value = "纬度")
// private String latitude;
//
// @ApiModelProperty(value = "法人id")
// private Long legalPersonId;
//
// @ApiModelProperty(value = "法人")
// private String legalPerson;
//
// @ApiModelProperty(value = "法人电话/注册电话")
// private String legalPersonPhone;
//
// @ApiModelProperty(value = "企业资质等级")
// private String qualificationLevel;
//
// @ApiModelProperty(value = "信用级别")
// private Integer creditLevel;
//
// @ApiModelProperty(value = "许可证编号")
// private String licenseNum;
//
// @ApiModelProperty(value = "值班电话")
// private String dutyPhone;
//
// @ApiModelProperty(value = "紧急电话号码")
// private String emergencyPhone;
//
// @ApiModelProperty(value = "主要负责人1")
// private String principalFirst;
//
// @ApiModelProperty(value = "主要负责人1手机号码")
// private String principalFirstPhone;
//
// @ApiModelProperty(value = "主要负责人1id")
// private Long principalFirstId;
//
// @ApiModelProperty(value = "主要负责人2")
// private String principalSecond;
//
// @ApiModelProperty(value = "主要负责人2手机号码")
// private String principalSecondPhone;
//
// @ApiModelProperty(value = "主要负责人2id")
// private Long principalSecondId;
//
// @ApiModelProperty(value = "原始表id(来自历史数据库)")
// private String originalId;
//
//}
package com.yeejoin.amos.boot.module.tzs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @author tb
* @date 2021-06-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tcb_rescue_station")
@ApiModel(value = "RescueStationVo", description = "RescueStationVo")
public class RescueStationVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "应急救援机构名称")
private String name;
@ApiModelProperty(value = "省份")
private String province;
@ApiModelProperty(value = "地市")
private String city;
@ApiModelProperty(value = "区县")
private String district;
@ApiModelProperty(value = "区域代码")
private String regionCode;
@ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)")
private String address;
@ApiModelProperty(value = "责任人id")
private Long principalId;
@ApiModelProperty(value = "主要负责人")
private String principal;
@ApiModelProperty(value = "负责人电话")
private String principalPhone;
@ApiModelProperty(value = "应急救援负责人")
private String rescueLeader;
@ApiModelProperty(value = "应急救援负责人手机号")
private String rescueLeaderPhone;
@ApiModelProperty(value = "应急救援负责人id")
private Long rescueLeaderId;
@ApiModelProperty(value = "所属单位(维保单位)")
private String affiliatedUnit;
@ApiModelProperty(value = "所属单位id")
private Long affiliatedUnitId;
@ApiModelProperty(value = "经纬度")
private String longitudeLatitude;
}
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("tcb_rescue_station")
//@ApiModel(value = "RescueStationVo", description = "RescueStationVo")
//public class RescueStationVo extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "应急救援机构名称")
// private String name;
//
// @ApiModelProperty(value = "省份")
// private String province;
//
// @ApiModelProperty(value = "地市")
// private String city;
//
// @ApiModelProperty(value = "区县")
// private String district;
//
// @ApiModelProperty(value = "区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "地址(详细地址,包括道路、门牌号码)")
// private String address;
//
// @ApiModelProperty(value = "责任人id")
// private Long principalId;
//
// @ApiModelProperty(value = "主要负责人")
// private String principal;
//
// @ApiModelProperty(value = "负责人电话")
// private String principalPhone;
//
// @ApiModelProperty(value = "应急救援负责人")
// private String rescueLeader;
//
// @ApiModelProperty(value = "应急救援负责人手机号")
// private String rescueLeaderPhone;
//
// @ApiModelProperty(value = "应急救援负责人id")
// private Long rescueLeaderId;
//
// @ApiModelProperty(value = "所属单位(维保单位)")
// private String affiliatedUnit;
//
// @ApiModelProperty(value = "所属单位id")
// private Long affiliatedUnitId;
//
// @ApiModelProperty(value = "经纬度")
// private String longitudeLatitude;
//
//}
package com.yeejoin.amos.boot.module.tzs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @author tb
* @date 2021-06-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tcb_use_unit")
@ApiModel(value = "UseUnitVo", description = "UseUnitVo")
public class UseUnitVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "统一社会信用代码")
private String socialCreditCode;
@ApiModelProperty(value = "使用单位(小区)名称")
private String useUnitName;
@ApiModelProperty(value = "小区所属地产品牌")
private String realEstateBrand;
@ApiModelProperty(value = "物业公司所属品牌")
private String propertyCompanyBrand;
@ApiModelProperty(value = "省份")
private String province;
@ApiModelProperty(value = "地市")
private String city;
@ApiModelProperty(value = "区县")
private String district;
@ApiModelProperty(value = "区域代码")
private String regionCode;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "责任人id")
private Long principalId;
@ApiModelProperty(value = "主要负责人")
private String principal;
@ApiModelProperty(value = "负责人电话")
private String principalPhone;
@ApiModelProperty(value = "管理部门")
private String management;
@ApiModelProperty(value = "管理员id")
private Long managerId;
@ApiModelProperty(value = "电梯安全管理员")
private String manager;
@ApiModelProperty(value = "电梯管理员手机")
private String managerPhone;
@ApiModelProperty(value = "原始表id(来自历史数据库)")
private String originalId;
}
//package com.yeejoin.amos.boot.module.tzs.api.vo;
//
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.experimental.Accessors;
//
///**
// * @author tb
// * @date 2021-06-01
// */
//@Data
//@EqualsAndHashCode(callSuper = true)
//@Accessors(chain = true)
//@TableName("tcb_use_unit")
//@ApiModel(value = "UseUnitVo", description = "UseUnitVo")
//public class UseUnitVo extends BaseEntity {
//
// private static final long serialVersionUID = 1L;
//
//
// @ApiModelProperty(value = "统一社会信用代码")
// private String socialCreditCode;
//
// @ApiModelProperty(value = "使用单位(小区)名称")
// private String useUnitName;
//
// @ApiModelProperty(value = "小区所属地产品牌")
// private String realEstateBrand;
//
// @ApiModelProperty(value = "物业公司所属品牌")
// private String propertyCompanyBrand;
//
// @ApiModelProperty(value = "省份")
// private String province;
//
// @ApiModelProperty(value = "地市")
// private String city;
//
// @ApiModelProperty(value = "区县")
// private String district;
//
// @ApiModelProperty(value = "区域代码")
// private String regionCode;
//
// @ApiModelProperty(value = "地址")
// private String address;
//
// @ApiModelProperty(value = "责任人id")
// private Long principalId;
//
// @ApiModelProperty(value = "主要负责人")
// private String principal;
//
// @ApiModelProperty(value = "负责人电话")
// private String principalPhone;
//
// @ApiModelProperty(value = "管理部门")
// private String management;
//
// @ApiModelProperty(value = "管理员id")
// private Long managerId;
//
// @ApiModelProperty(value = "电梯安全管理员")
// private String manager;
//
// @ApiModelProperty(value = "电梯管理员手机")
// private String managerPhone;
//
// @ApiModelProperty(value = "原始表id(来自历史数据库)")
// private String originalId;
//
//}
......@@ -19,8 +19,7 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.ESAlertCalledRequestDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.tzs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.tzs.api.entity.DispatchPaper;
import com.yeejoin.amos.boot.module.tzs.api.vo.AlarmStatisticsVo;
import com.yeejoin.amos.boot.module.tzs.api.vo.AlertCalledVo;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlarmStatisticsDto;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.DispatchPaperServiceImpl;
......@@ -195,7 +194,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/alertStatistics")
@ApiOperation(httpMethod = "GET",value = "警情统计", notes = "警情统计")
public ResponseModel<AlarmStatisticsVo> alertStatistics() throws ParseException {
public ResponseModel<AlarmStatisticsDto> alertStatistics() throws ParseException {
ReginParams reginParams =
JSONObject.parseObject(null != redisUtils.get(buildKey(getToken())) ?
redisUtils.get(buildKey(getToken())).toString() : null, ReginParams.class);
......@@ -204,7 +203,7 @@ public class AlertCalledController extends BaseController {
//全部待办数量
QueryWrapper<AlertCalled> allNumQueryWrapper = new QueryWrapper<>();
AlarmStatisticsVo alarmStatisticsVo = new AlarmStatisticsVo();
AlarmStatisticsDto alarmStatisticsDto = new AlarmStatisticsDto();
todoNumQueryWrapper.eq("alert_status",false);
allNumQueryWrapper.eq("alert_status",false);
if(null != reginParams) {
......@@ -212,22 +211,22 @@ public class AlertCalledController extends BaseController {
todoNumQueryWrapper.or(true);
todoNumQueryWrapper.eq("org_code",reginParams.getCompany().getOrgCode());
alarmStatisticsVo.setTodoNum(iAlertCalledService.list(todoNumQueryWrapper).size());
alarmStatisticsVo.setAllNum(iAlertCalledService.list(allNumQueryWrapper).size());
alarmStatisticsDto.setTodoNum(iAlertCalledService.list(todoNumQueryWrapper).size());
alarmStatisticsDto.setAllNum(iAlertCalledService.list(allNumQueryWrapper).size());
Map<String, Object> map = iAlertCalledService.getAlertInfoList(DateUtils.dateFormat(new Date(),"")+" 00:00:00",
DateUtils.dateFormat(new Date(),"")+" 23:59:59",reginParams.getCompany().getOrgCode(),
reginParams.getUserModel().getUserId());
// 当天接警
alarmStatisticsVo.setTodayAlarmNum(map.get("calledCount") == null ? 0 : Integer.valueOf(map.get("calledCount").toString())) ;
alarmStatisticsDto.setTodayAlarmNum(map.get("calledCount") == null ? 0 : Integer.valueOf(map.get("calledCount").toString())) ;
//当天提交
alarmStatisticsVo.setTodayAlarmNum(map.get("majorAlertCount") == null ? 0 : Integer.valueOf(map.get("majorAlertCount").toString())) ;
alarmStatisticsDto.setTodayAlarmNum(map.get("majorAlertCount") == null ? 0 : Integer.valueOf(map.get("majorAlertCount").toString())) ;
//投诉咨询数量
alarmStatisticsVo.setSuggestions(map.get("suggestionsCount") == null ? 0 : Integer.valueOf(map.get("suggestionsCount").toString())) ;
alarmStatisticsDto.setSuggestions(map.get("suggestionsCount") == null ? 0 : Integer.valueOf(map.get("suggestionsCount").toString())) ;
//故障维修数量
alarmStatisticsVo.setSuggestions(map.get("faultRescueCount") == null ? 0 : Integer.valueOf(map.get("faultRescueCount").toString())) ;
alarmStatisticsDto.setSuggestions(map.get("faultRescueCount") == null ? 0 : Integer.valueOf(map.get("faultRescueCount").toString())) ;
//困人救援数量
alarmStatisticsVo.setSuggestions(map.get("sleepyIncidentCount") == null ? 0 : Integer.valueOf(map.get("sleepyIncidentCount").toString())) ;
alarmStatisticsDto.setSuggestions(map.get("sleepyIncidentCount") == null ? 0 : Integer.valueOf(map.get("sleepyIncidentCount").toString())) ;
Map<String,Integer> recordMap = Maps.newHashMap();
// 近七天办理数量
......@@ -238,9 +237,9 @@ public class AlertCalledController extends BaseController {
reginParams.getUserModel().getUserId());
recordMap.put(DateUtils.dateFormat(DateUtils.dateAddDays(new Date(), -i),""),nearlySevenDaysMap.get("calledCount") == null ? 0 : Integer.valueOf(nearlySevenDaysMap.get("calledCount").toString()));
}
alarmStatisticsVo.setNearlySevenDaysNum(recordMap);
alarmStatisticsDto.setNearlySevenDaysNum(recordMap);
}
return ResponseHelper.buildResponse(alarmStatisticsVo);
return ResponseHelper.buildResponse(alarmStatisticsDto);
}
/**
......@@ -253,7 +252,7 @@ public class AlertCalledController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/list")
@ApiOperation(httpMethod = "GET",value = "警情接警填报记录分页查询", notes = "警情接警填报记录分页查询")
public ResponseModel<IPage<AlertCalledVo>> queryForPage(String pageNum, String pageSize,String sort, AlertCalledDto alertCalledDto) {
public ResponseModel<IPage<AlertCalledDto>> queryForPage(String pageNum, String pageSize,String sort, AlertCalledDto alertCalledDto) {
AlertCalled alertCalled = BeanDtoVoUtils.convert(alertCalledDto,AlertCalled.class);
Page<AlertCalled> pageBean;
IPage<AlertCalled> page;
......@@ -267,10 +266,10 @@ public class AlertCalledController extends BaseController {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = iAlertCalledService.page(pageBean, alertCalledQueryWrapper);
IPage<AlertCalledVo> calledVoIPage = AlertBeanDtoVoUtils.alertCalledIPageVo(page);
IPage<AlertCalledDto> calledVoIPage = AlertBeanDtoVoUtils.alertCalledIPageDto(page);
calledVoIPage.getRecords().stream().forEach(e->e.setAlertAddress(e.getCity()+e.getDistrict()));
calledVoIPage.getRecords().stream().forEach(e->{
getResponseLevel(alertCalled.getSequenceNbr(),e,null);
getResponseLevel(alertCalled.getSequenceNbr(), e,null);
});
return ResponseHelper.buildResponse(calledVoIPage);
}
......@@ -330,7 +329,7 @@ public class AlertCalledController extends BaseController {
return queryWrapper;
}
void getResponseLevel(Long alertId,AlertCalledVo alertCalledVo,ESAlertCalledDto esAlertCalledDto) {
void getResponseLevel(Long alertId, AlertCalledDto alertCalledDto, ESAlertCalledDto esAlertCalledDto) {
QueryWrapper<DispatchPaper> dispatchPaperQueryWrapper = new QueryWrapper<>();
dispatchPaperQueryWrapper.eq("alert_id",alertId);
DispatchPaper dispatchPaper = dispatchPaperServiceImpl.getOne(dispatchPaperQueryWrapper);
......@@ -345,8 +344,8 @@ public class AlertCalledController extends BaseController {
dynamicParms.put("field_code","field_value");
});
String responseLevel = dynamicParms.get("response_level");
if(null != alertCalledVo) {
alertCalledVo.setResponseLevel(responseLevel);
if(null != alertCalledDto) {
alertCalledDto.setResponseLevel(responseLevel);
} else {
esAlertCalledDto.setResponseLevel(responseLevel);
}
......
......@@ -5,15 +5,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit;
import com.yeejoin.amos.boot.module.tzs.api.entity.UseUnit;
import com.yeejoin.amos.boot.module.tzs.api.service.IMaintenanceUnitService;
import com.yeejoin.amos.boot.module.tzs.api.vo.MaintenanceUnitNameVo;
import com.yeejoin.amos.boot.module.tzs.api.vo.MaintenanceUnitVo;
import com.yeejoin.amos.boot.module.tzs.api.vo.UseUnitVo;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl;
import com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitNameDto;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.ElevatorServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import io.swagger.annotations.Api;
......@@ -104,10 +100,10 @@ public class MaintenanceUnitController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<MaintenanceUnitVo> selectById(@PathVariable Long id) {
public ResponseModel<MaintenanceUnitDto> selectById(@PathVariable Long id) {
MaintenanceUnit maintenanceUnit = iMaintenanceUnitService.getById(id);
MaintenanceUnitVo maintenanceUnitVo = BeanDtoVoUtils.convertMaintenanceUnitToVo(maintenanceUnit, false);
return ResponseHelper.buildResponse(maintenanceUnitVo);
MaintenanceUnitDto maintenanceUnitDto = BeanDtoVoUtils.convertMaintenanceUnitToVo(maintenanceUnit, false);
return ResponseHelper.buildResponse(maintenanceUnitDto);
}
/**
......@@ -121,7 +117,7 @@ public class MaintenanceUnitController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<IPage<MaintenanceUnitVo>> listPage(String pageNum, String pageSize,
public ResponseModel<IPage<MaintenanceUnitDto>> listPage(String pageNum, String pageSize,
MaintenanceUnit maintenanceUnitDto) {
MaintenanceUnit maintenanceUnit = BeanDtoVoUtils.convert(maintenanceUnitDto, MaintenanceUnit.class);
Page<MaintenanceUnit> pageBean;
......@@ -159,8 +155,8 @@ public class MaintenanceUnitController extends BaseController {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = iMaintenanceUnitService.page(pageBean, maintenanceUnitQueryWrapper);
IPage<MaintenanceUnitVo> maintenanceUnitVoIPage = BeanDtoVoUtils.maintenanceUnitIPageVo(page);
return ResponseHelper.buildResponse(maintenanceUnitVoIPage);
IPage<MaintenanceUnitDto> maintenanceUnitDtoIPage = BeanDtoVoUtils.maintenanceUnitIPageDto(page);
return ResponseHelper.buildResponse(maintenanceUnitDtoIPage);
}
/**
......@@ -174,7 +170,7 @@ public class MaintenanceUnitController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/query_maintenance_unit_list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "分页查询维保单位信息", notes = "分页查询维保单位信息")
public ResponseModel<IPage<MaintenanceUnitVo>> queryMaintenanceUnitList(String pageNum, String pageSize,
public ResponseModel<IPage<MaintenanceUnitDto>> queryMaintenanceUnitList(String pageNum, String pageSize,
MaintenanceUnit maintenanceUnitDto) {
MaintenanceUnit maintenanceUnit = BeanDtoVoUtils.convert(maintenanceUnitDto, MaintenanceUnit.class);
Page<MaintenanceUnit> pageBean;
......@@ -208,8 +204,8 @@ public class MaintenanceUnitController extends BaseController {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = iMaintenanceUnitService.page(pageBean, maintenanceUnitQueryWrapper);
IPage<MaintenanceUnitVo> maintenanceUnitVoIPage = BeanDtoVoUtils.maintenanceUnitIPageVo(page);
return ResponseHelper.buildResponse(maintenanceUnitVoIPage);
IPage<MaintenanceUnitDto> maintenanceUnitDtoIPage = BeanDtoVoUtils.maintenanceUnitIPageDto(page);
return ResponseHelper.buildResponse(maintenanceUnitDtoIPage);
}
/**
......@@ -221,15 +217,15 @@ public class MaintenanceUnitController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/query_maintenance_unit_name_list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据名称查询维保单位列表", notes = "根据名称查询维保单位列表")
public ResponseModel<IPage<MaintenanceUnitNameVo>> queryMaintenanceUnitListWithName(@PathVariable(required =
public ResponseModel<IPage<MaintenanceUnitNameDto>> queryMaintenanceUnitListWithName(@PathVariable(required =
false) String unitName) {
QueryWrapper<MaintenanceUnit> maintenanceUnitQueryWrapper = new QueryWrapper<>();
maintenanceUnitQueryWrapper.select("distinct sequence_nbr,unit_name").like(StringUtils.isNotEmpty(unitName),
"unit_name", unitName);
Page<MaintenanceUnit> pageBean = new Page<>(0, Long.MAX_VALUE);
IPage<MaintenanceUnit> page = iMaintenanceUnitService.page(pageBean, maintenanceUnitQueryWrapper);
IPage<MaintenanceUnitNameVo> maintenanceUnitVoIPage = BeanDtoVoUtils.iPageVoStream(page,
MaintenanceUnitNameVo.class);
IPage<MaintenanceUnitNameDto> maintenanceUnitVoIPage = BeanDtoVoUtils.iPageVoStream(page,
MaintenanceUnitNameDto.class);
return ResponseHelper.buildResponse(maintenanceUnitVoIPage);
}
......@@ -241,17 +237,19 @@ public class MaintenanceUnitController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/alert/{alertId}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据警情id 查找设备维保单位信息", notes = "根据警情id 查找设备维保单位信息")
public ResponseModel<MaintenanceUnitVo> selectByAlertId(@PathVariable Long alertId) {
public ResponseModel<MaintenanceUnitDto> selectByAlertId(@PathVariable Long alertId) {
// 获取根据警情获取电梯信息
Elevator elevator = elevatorServiceImpl.selectByAlertId(alertId);
if (ValidationUtil.isEmpty(elevator))
if (ValidationUtil.isEmpty(elevator)) {
throw new BadRequest("设备未找到");
}
// 根据设备使用单位id 获取使用单位信息
MaintenanceUnit maintenanceUnit = iMaintenanceUnitService.getById(elevator.getMaintainUnitId());
if (ValidationUtil.isEmpty(maintenanceUnit))
if (ValidationUtil.isEmpty(maintenanceUnit)) {
throw new BadRequest("维保单位未找到");
MaintenanceUnitVo maintenanceUnitVo = BeanDtoVoUtils.convert(maintenanceUnit, MaintenanceUnitVo.class);
return ResponseHelper.buildResponse(maintenanceUnitVo);
}
MaintenanceUnitDto maintenanceUnitDto = BeanDtoVoUtils.convert(maintenanceUnit, MaintenanceUnitDto.class);
return ResponseHelper.buildResponse(maintenanceUnitDto);
}
}
......
......@@ -9,7 +9,6 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.RescueStationDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.entity.RescueStation;
import com.yeejoin.amos.boot.module.tzs.api.service.IRescueStationService;
import com.yeejoin.amos.boot.module.tzs.api.vo.RescueStationVo;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.ElevatorServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import io.swagger.annotations.Api;
......@@ -18,7 +17,11 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
......@@ -110,10 +113,10 @@ public class RescueStationController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<RescueStationVo> selectById(@PathVariable Long id) {
public ResponseModel<RescueStationDto> selectById(@PathVariable Long id) {
RescueStation rescueStation = iRescueStationService.getById(id);
RescueStationVo rescueStationVo = BeanDtoVoUtils.convert(rescueStation, RescueStationVo.class);
return ResponseHelper.buildResponse(rescueStationVo);
RescueStationDto rescueStationDto = BeanDtoVoUtils.convert(rescueStation, RescueStationDto.class);
return ResponseHelper.buildResponse(rescueStationDto);
}
/**
......@@ -127,8 +130,8 @@ public class RescueStationController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<IPage<RescueStationVo>> listPage(String pageNum, String pageSize,
RescueStationDto rescueStationDto) {
public ResponseModel<IPage<RescueStationDto>> listPage(String pageNum, String pageSize,
RescueStationDto rescueStationDto) {
RescueStation rescueStation = BeanDtoVoUtils.convert(rescueStationDto, RescueStation.class);
Page<RescueStation> pageBean;
QueryWrapper<RescueStation> rescueStationQueryWrapper = new QueryWrapper<>();
......@@ -165,8 +168,8 @@ public class RescueStationController extends BaseController {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = iRescueStationService.page(pageBean, rescueStationQueryWrapper);
IPage<RescueStationVo> rescueStationVoIPage = BeanDtoVoUtils.iPageVoStream(page, RescueStationVo.class);
return ResponseHelper.buildResponse(rescueStationVoIPage);
IPage<RescueStationDto> rescueStationDtoIPage = BeanDtoVoUtils.iPageVoStream(page, RescueStationDto.class);
return ResponseHelper.buildResponse(rescueStationDtoIPage);
}
/**
......@@ -180,7 +183,7 @@ public class RescueStationController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/query_rescue_station_list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "分页查询救援站信息", notes = "分页查询救援站信息")
public ResponseModel<IPage<RescueStationVo>> queryRescueStationList(String pageNum, String pageSize,
public ResponseModel<IPage<RescueStationDto>> queryRescueStationList(String pageNum, String pageSize,
RescueStationDto rescueStationDto) {
RescueStation rescueStation = BeanDtoVoUtils.convert(rescueStationDto, RescueStation.class);
Page<RescueStation> pageBean;
......@@ -215,8 +218,8 @@ public class RescueStationController extends BaseController {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
page = iRescueStationService.page(pageBean, rescueStationQueryWrapper);
IPage<RescueStationVo> rescueStationVoIPage = BeanDtoVoUtils.iPageVoStream(page, RescueStationVo.class);
return ResponseHelper.buildResponse(rescueStationVoIPage);
IPage<RescueStationDto> rescueStationDtoIPage = BeanDtoVoUtils.iPageVoStream(page, RescueStationDto.class);
return ResponseHelper.buildResponse(rescueStationDtoIPage);
}
......
......@@ -7,10 +7,10 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.feign.AmosFeignService;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.tzs.api.dto.UseUnitDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.entity.UseUnit;
import com.yeejoin.amos.boot.module.tzs.api.service.IUseUnitService;
import com.yeejoin.amos.boot.module.tzs.api.vo.UseUnitVo;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.ElevatorServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import io.swagger.annotations.Api;
......@@ -123,10 +123,10 @@ public class UseUnitController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<UseUnitVo> selectById(@PathVariable Long id) {
public ResponseModel<UseUnitDto> selectById(@PathVariable Long id) {
UseUnit useUnit = iUseUnitService.getById(id);
UseUnitVo useUnitVo = BeanDtoVoUtils.convert(useUnit, UseUnitVo.class);
return ResponseHelper.buildResponse(useUnitVo);
UseUnitDto useUnitDto = BeanDtoVoUtils.convert(useUnit, UseUnitDto.class);
return ResponseHelper.buildResponse(useUnitDto);
}
/**
......@@ -207,15 +207,16 @@ public class UseUnitController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/alert/{alertId}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据警情id 查找设备使用单位信息", notes = "根据警情id 查找设备使用单位信息")
public ResponseModel<UseUnitVo> selectByAlertId(@PathVariable Long alertId) {
public ResponseModel<UseUnitDto> selectByAlertId(@PathVariable Long alertId) {
// 获取根据警情获取电梯信息
Elevator elevator = elevatorServiceImpl.selectByAlertId(alertId);
// 根据设备使用单位id 获取使用单位信息
UseUnit useUnit = iUseUnitService.getById(elevator.getUseUnitId());
if (ValidationUtil.isEmpty(useUnit))
if (ValidationUtil.isEmpty(useUnit)) {
throw new BadRequest("使用单位未找到");
UseUnitVo useUnitVo = BeanDtoVoUtils.convert(useUnit, UseUnitVo.class);
return ResponseHelper.buildResponse(useUnitVo);
}
UseUnitDto useUnitDto = BeanDtoVoUtils.convert(useUnit, UseUnitDto.class);
return ResponseHelper.buildResponse(useUnitDto);
}
}
......@@ -18,8 +18,6 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.Template;
import com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums;
import com.yeejoin.amos.boot.module.tzs.api.mapper.AlertCalledMapper;
import com.yeejoin.amos.boot.module.tzs.api.service.IAlertCalledService;
import com.yeejoin.amos.boot.module.tzs.api.vo.AlertCalledVo;
import com.yeejoin.amos.boot.module.tzs.biz.utils.AlertBeanDtoVoUtils;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -94,22 +92,21 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
}
AlertCalledDto alertCalledDto = BeanDtoVoUtils.convert(alertCalled,AlertCalledDto.class);
AlertCalledVo alertCalledVo = AlertBeanDtoVoUtils.convertAlertCalledDtoToVo(alertCalledDto);
QueryWrapper<Elevator> elevatorQueryWrapper = new QueryWrapper<>();
elevatorQueryWrapper.eq("rescue_code", alertCalled.getDeviceId());
elevatorQueryWrapper.eq("register_code", alertCalled.getRegistrationCode());
Elevator elevator = iElevatorService.getOne(elevatorQueryWrapper);
if(null != elevator) {
alertCalledVo.setAddress(elevator.getAddress());
alertCalledVo.setProvince(elevator.getProvince());
alertCalledVo.setCity(elevator.getCity());
alertCalledVo.setDistrict(elevator.getDistrict());
alertCalledVo.setUseStatus(elevator.getUseStatus());
alertCalledVo.setUseSiteCategory(elevator.getUseSiteCategory());
alertCalledVo.setUseUnit(elevator.getUseUnit());
alertCalledVo.setRegionCode(elevator.getRegionCode());
alertCalledDto.setAddress(elevator.getAddress());
alertCalledDto.setProvince(elevator.getProvince());
alertCalledDto.setCity(elevator.getCity());
alertCalledDto.setDistrict(elevator.getDistrict());
alertCalledDto.setUseStatus(elevator.getUseStatus());
alertCalledDto.setUseSiteCategory(elevator.getUseSiteCategory());
alertCalledDto.setUseUnit(elevator.getUseUnit());
alertCalledDto.setRegionCode(elevator.getRegionCode());
}
AlertCalledFormDto alertCalledFormVo = new AlertCalledFormDto(alertCalledVo, formValue);
AlertCalledFormDto alertCalledFormVo = new AlertCalledFormDto(alertCalledDto, formValue);
redisUtils.set(RedisKey.TZS_ALERTCALLED_ID+id, JSON.toJSON(alertCalledFormVo),time);
return alertCalledFormVo;
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertFormInitDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.DispatchConsultFeedbackDto;
......@@ -21,7 +22,6 @@ import com.yeejoin.amos.boot.module.tzs.api.enums.DispatchPaperEnums;
import com.yeejoin.amos.boot.module.tzs.api.mapper.DispatchPaperMapper;
import com.yeejoin.amos.boot.module.tzs.api.service.IDispatchPaperService;
import com.yeejoin.amos.boot.module.tzs.api.service.IMaintenanceUnitService;
import com.yeejoin.amos.boot.module.tzs.api.vo.AlertCalledVo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -206,9 +206,9 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
dispatchSaveFeedbackDto.setAlertId(alertId);
AlertCalledFormDto alertCalledFormVo = (AlertCalledFormDto) alertCalledServiceImpl.selectAlertCalledById(alertId);
// 警情信息
AlertCalledVo alertCalledVo = alertCalledFormVo.getAlertCalledVo();
dispatchSaveFeedbackDto.setEmergency(alertCalledVo.getEmergencyPerson());
dispatchSaveFeedbackDto.setEmergencyCall(alertCalledVo.getEmergencyCall());
AlertCalledDto alertCalledDto = alertCalledFormVo.getAlertCalledDto();
dispatchSaveFeedbackDto.setEmergency(alertCalledDto.getEmergencyPerson());
dispatchSaveFeedbackDto.setEmergencyCall(alertCalledDto.getEmergencyCall());
// 派遣单信息
DispatchPaperFormDto dispatchPaperFormDto = this.selectDispatchPaperDtoByAlertId(alertId);
if(dispatchPaperFormDto == null || dispatchPaperFormDto.getDispatchPaper() == null) {
......@@ -365,9 +365,9 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
dispatchRepairFeedbackDto.setAlertId(alertId);
AlertCalledFormDto alertCalledFormVo = (AlertCalledFormDto) alertCalledServiceImpl.selectAlertCalledById(alertId);
// 警情信息
AlertCalledVo alertCalledVo = alertCalledFormVo.getAlertCalledVo();
dispatchRepairFeedbackDto.setEmergency(alertCalledVo.getEmergencyPerson());
dispatchRepairFeedbackDto.setEmergencyCall(alertCalledVo.getEmergencyCall());
AlertCalledDto alertCalledDto = alertCalledFormVo.getAlertCalledDto();
dispatchRepairFeedbackDto.setEmergency(alertCalledDto.getEmergencyPerson());
dispatchRepairFeedbackDto.setEmergencyCall(alertCalledDto.getEmergencyCall());
// 派遣单信息
DispatchPaperFormDto dispatchPaperFormDto = this.selectDispatchPaperDtoByAlertId(alertId);
......@@ -555,9 +555,9 @@ public class DispatchPaperServiceImpl extends BaseService<DispatchPaperDto,Dispa
dispatchConsultFeedbackDto.setAlertId(alertId);
AlertCalledFormDto alertCalledFormVo = (AlertCalledFormDto) alertCalledServiceImpl.selectAlertCalledById(alertId);
// 警情信息
AlertCalledVo alertCalledVo = alertCalledFormVo.getAlertCalledVo();
dispatchConsultFeedbackDto.setEmergency(alertCalledVo.getEmergencyPerson());
dispatchConsultFeedbackDto.setEmergencyCall(alertCalledVo.getEmergencyCall());
AlertCalledDto alertCalledDto = alertCalledFormVo.getAlertCalledDto();
dispatchConsultFeedbackDto.setEmergency(alertCalledDto.getEmergencyPerson());
dispatchConsultFeedbackDto.setEmergencyCall(alertCalledDto.getEmergencyCall());
// 派遣单信息
DispatchPaperFormDto dispatchPaperFormDto = this.selectDispatchPaperDtoByAlertId(alertId);
......
package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
......@@ -13,6 +16,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.List;
/**
* 服务实现类
*
......@@ -37,12 +42,29 @@ public class ElevatorServiceImpl extends BaseService<ElevatorDto, Elevator, Elev
public ElevatorDto saveElevator(ElevatorDto elevatorDto) {
elevatorDto = createWithModel(elevatorDto);
// TODO 保存附件
// sourceFileService.saveAttachments(elevatorDto.getSequenceNbr(), elevatorDto.getAttachments());
// 保存附件
sourceFileService.saveAttachments(elevatorDto.getSequenceNbr(), elevatorDto.getAttachments());
return elevatorDto;
}
/**
* 批量删除电梯信息
*
* @param seqStr 电梯主键(逗号分割)
* @return
*/
public boolean deleteBatchBySeq(String seqStr) {
if (!ValidationUtil.isEmpty(seqStr)) {
List<String> seqList = Lists.newArrayList(seqStr.split(","));
LambdaUpdateWrapper<Elevator> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
lambdaUpdateWrapper.in(Elevator::getSequenceNbr, seqList).set(Elevator::getIsDelete, true);
this.update(lambdaUpdateWrapper);
return true;
}
return false;
}
/**
* 更新电梯信息
*
* @param elevatorDto
......@@ -51,11 +73,24 @@ public class ElevatorServiceImpl extends BaseService<ElevatorDto, Elevator, Elev
public ElevatorDto updateElevator(ElevatorDto elevatorDto) {
elevatorDto = updateWithModel(elevatorDto);
// TODO 保存附件
// sourceFileService.saveAttachments(elevatorDto.getSequenceNbr(), elevatorDto.getAttachments());
// 保存附件
sourceFileService.saveAttachments(elevatorDto.getSequenceNbr(), elevatorDto.getAttachments());
return elevatorDto;
}
/**
* 根据id查询电梯信息
*
* @param sequenceNbr
* @return
*/
public ElevatorDto selectBySeq(Long sequenceNbr) {
ElevatorDto elevatorDto = this.queryBySeq(sequenceNbr);
// 获取附件
elevatorDto.setAttachments(sourceFileService.getAttachments(sequenceNbr));
return elevatorDto;
}
@Override
public Elevator selectByAlertId(Long alertId) {
......
......@@ -3,7 +3,6 @@ package com.yeejoin.amos.boot.module.tzs.biz.utils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.tzs.api.vo.AlertCalledVo;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
......@@ -21,38 +20,14 @@ public class AlertBeanDtoVoUtils {
* @param source 实体类
* @return Vo类
*/
public static AlertCalledVo convertAlertCalledDtoToVo( AlertCalledDto source) {
public static AlertCalledDto convertAlertCalledToDto(AlertCalled source) {
// 判断source是否为空
if (source == null) {
return null;
}
try {
// 创建新的对象实例
AlertCalledVo target = new AlertCalledVo();
// 把原对象数据拷贝到新对象
BeanUtils.copyProperties(source, target);
// 返回新对象
return target;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* 将警情记录实体类转换为Vo
*
* @param source 实体类
* @return Vo类
*/
public static AlertCalledVo convertAlertCalledToVo( AlertCalled source) {
// 判断source是否为空
if (source == null) {
return null;
}
try {
// 创建新的对象实例
AlertCalledVo target = new AlertCalledVo();
AlertCalledDto target = new AlertCalledDto();
// 把原对象数据拷贝到新对象
BeanUtils.copyProperties(source, target);
// 返回新对象
......@@ -71,10 +46,10 @@ public class AlertBeanDtoVoUtils {
* @param page 原分页对象
* @return 转换后的Vo
*/
public static IPage<AlertCalledVo> alertCalledIPageVo(IPage<AlertCalled> page) {
public static IPage<AlertCalledDto> alertCalledIPageDto(IPage<AlertCalled> page) {
return page.convert(item -> {
try {
return convertAlertCalledToVo(item);
return convertAlertCalledToDto(item);
} catch (Exception e) {
return null;
}
......
......@@ -2,17 +2,16 @@ package com.yeejoin.amos.boot.module.tzs.biz.utils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.feign.AmosFeignService;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit;
import com.yeejoin.amos.boot.module.tzs.api.vo.ElevatorVo;
import com.yeejoin.amos.boot.module.tzs.api.vo.MaintenanceUnitVo;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
......@@ -118,28 +117,22 @@ public class BeanDtoVoUtils {
}
/**
* 将电梯实体类转换为Vo
* 将电梯实体类转换为Dto
*
* @param source 实体类
* @param isBatch 是否批量
* @return Vo类
*/
public static ElevatorVo convertElevatorToVo(Elevator source, boolean isBatch) {
public static ElevatorDto convertElevatorToDto(Elevator source, boolean isBatch) {
// 判断source是否为空
if (source == null) {
return null;
}
try {
// 创建新的对象实例
ElevatorVo target = new ElevatorVo();
ElevatorDto target = new ElevatorDto();
// 把原对象数据拷贝到新对象
BeanUtils.copyProperties(source, target);
// 将设备图片转换为集合
String photos = source.getPhotos();
if (photos != null) {
String[] photoList = photos.split(",");
target.setImg(Arrays.stream(photoList).map(ElevatorVo.Img::new).collect(Collectors.toList()));
}
if (!isBatch) {
getElevatorDictionaryByDictCode();
}
......@@ -169,12 +162,12 @@ public class BeanDtoVoUtils {
}
/**
* 将Elevator转换为IPage<ElevatorVo>
* 将Elevator转换为IPage<ElevatorDto>
*
* @param page 原分页对象
* @return 转换后的Vo
*/
public static IPage<ElevatorVo> elevatorIPageVo(IPage<Elevator> page) {
public static IPage<ElevatorDto> elevatorIPageDto(IPage<Elevator> page) {
try {
getElevatorDictionaryByDictCode();
} catch (Exception e) {
......@@ -182,7 +175,7 @@ public class BeanDtoVoUtils {
}
return page.convert(item -> {
try {
return convertElevatorToVo(item, true);
return convertElevatorToDto(item, true);
} catch (Exception e) {
return null;
}
......@@ -198,14 +191,14 @@ public class BeanDtoVoUtils {
* @param isBatch 是否批量
* @return 转换后的Vo
*/
public static MaintenanceUnitVo convertMaintenanceUnitToVo(MaintenanceUnit source, boolean isBatch) {
public static MaintenanceUnitDto convertMaintenanceUnitToVo(MaintenanceUnit source, boolean isBatch) {
// 判断source是否为空
if (source == null) {
return null;
}
try {
// 创建新的对象实例
MaintenanceUnitVo target = new MaintenanceUnitVo();
MaintenanceUnitDto target = new MaintenanceUnitDto();
// 把原对象数据拷贝到新对象
BeanUtils.copyProperties(source, target);
// 返回新对象
......@@ -229,7 +222,7 @@ public class BeanDtoVoUtils {
* @param page 原分页对象
* @return 转换后的分页对象
*/
public static IPage<MaintenanceUnitVo> maintenanceUnitIPageVo(IPage<MaintenanceUnit> page) {
public static IPage<MaintenanceUnitDto> maintenanceUnitIPageDto(IPage<MaintenanceUnit> page) {
try {
getMaintenanceUnitDictionaryByDictCode();
} catch (Exception e) {
......
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