Newer
Older
newfiber-data-adapter / src / main / java / org / springnewfiber / dataadapter / xf / entity / SurgeTankDataDto.java
package org.springnewfiber.dataadapter.xf.entity;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springnewfiber.dataadapter.xf.enums.TxcFStatusValueEnum;

/**
 * @program: newfiber-data-adapter
 * @description: 调蓄池
 * @author: djt
 * @create: 2022-08-11 10:36
 **/
@Data
public class SurgeTankDataDto extends BaseXfInterfaceEntity {
    @ApiModelProperty(value = "调蓄池液位m")
    @JsonProperty(value = "z")
    private String txcyw;
    @ApiModelProperty(value = "泵坑液位m")
    @JsonProperty(value = "z")
    private String bkyw;
    @ApiModelProperty(value = "进水廊道液位m")
    @JsonProperty(value = "z")
    private String jsldyw;
    @ApiModelProperty(value = "水泵1状态")
    @JsonProperty(value = "sbzt")
    private String sbzt1;
    @ApiModelProperty(value = "水泵2状态")
    @JsonProperty(value = "sbzt")
    private String sbzt2;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器1角度,度")
    private String psqjd1;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器2角度,度")
    private String psqjd2;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器3角度,度")
    private String psqjd3;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器4角度,度")
    private String psqjd4;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器5角度,度")
    private String psqjd5;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器6角度,度")
    private String psqjd6;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器7角度,度")
    private String psqjd7;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器8角度,度")
    private String psqjd8;
    @JsonProperty(value = "psqjd")
    @ApiModelProperty(value = "喷射器9角度,度")
    private String psqjd9;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "1#喷射器水泵状态")
    private String psqsbzt1;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "2#喷射器水泵状态")
    private String psqsbzt2;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "3#喷射器水泵状态")
    private String psqsbzt3;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "4#喷射器水泵状态")
    private String psqsbzt4;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "5#喷射器水泵状态")
    private String psqsbzt5;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "6#喷射器水泵状态")
    private String psqsbzt6;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "7#喷射器水泵状态")
    private String psqsbzt7;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "8#喷射器水泵状态")
    private String psqsbzt8;
    @JsonProperty(value = "psqsbzt")
    @ApiModelProperty(value = "9#喷射器水泵状态")
    private String psqsbzt9;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率1,HZ")
    private String psqsbpl1;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率2,HZ")
    private String psqsbpl2;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率3,HZ")
    private String psqsbpl3;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率4,HZ")
    private String psqsbpl4;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率5,HZ")
    private String psqsbpl5;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率6,HZ")
    private String psqsbpl6;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率7,HZ")
    private String psqsbpl7;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率8,HZ")
    private String psqsbpl8;
    @JsonProperty(value = "psqsbpl")
    @ApiModelProperty(value = "喷射器水泵频率9,HZ")
    private String psqsbpl9;
    @JsonProperty(value = "zmzt")
    @ApiModelProperty(value = "闸门1状态")
    private String zmzt1;
    @JsonProperty(value = "zmzt")
    @ApiModelProperty(value = "闸门2状态")
    private String zmzt2;
    @JsonProperty(value = "zmzt")
    @ApiModelProperty(value = "闸门3状态")
    private String zmzt3;
    @JsonProperty(value = "zmzt")
    @ApiModelProperty(value = "闸门4状态")
    private String zmzt4;
    @JsonProperty(value = "zmzt")
    @ApiModelProperty(value = "闸门5状态")
    private String zmzt5;
    @JsonProperty(value = "zmzt")
    @ApiModelProperty(value = "闸门6状态")
    private String zmzt6;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机1状态")
    private String fjzt1;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机2状态")
    private String fjzt2;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机3状态")
    private String fjzt3;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机4状态")
    private String fjzt4;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机5状态")
    private String fjzt5;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机6状态")
    private String fjzt6;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机7状态")
    private String fjzt7;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机8状态")
    private String fjzt8;
    @JsonProperty(value = "fjzt")
    @ApiModelProperty(value = "风机9状态")
    private String fjzt9;
    @JsonProperty(value = "fsglzt")
    @ApiModelProperty(value = "粉碎格栅1状态")
    private String fsglzt1;
    @JsonProperty(value = "fsglzt")
    @ApiModelProperty(value = "粉碎格栅2状态")
    private String fsglzt2;
    @ApiModelProperty(value = "综合故障")
    @JsonProperty(value = "zhgz")
    private String zhgz;
    @ApiModelProperty(value = "格栅状态")
    @JsonProperty(value = "gszt")
    private String gszt;
    @ApiModelProperty(value = "运行状态")
    @JsonProperty(value = "yxzt")
    private String yxzt;
    @ApiModelProperty(value = "供电状态")
    @JsonProperty(value = "gdzt")
    private String gdzt;

    public static SurgeTankDataDto dataToDto(SurgeTankData data) {
        SurgeTankDataDto dto = new SurgeTankDataDto();
        BeanUtil.copyProperties(data, dto);
//        dto.setTm(DateUtil.parse(data.getTm(), "yyyy/MM/dd HH:mm:ss"));
        dto.setStnm(data.getLknm());
        dto.setStcd(data.getStrgid());
        return dto;
    }

    public static void main(String[] args) {
        String tm = "2022/8/2 14:30:00";
        DateTime dateTime = DateUtil.parse(tm, "yyyy/MM/dd HH:mm:ss");
        System.out.println(DateUtil.format(dateTime, DatePattern.NORM_DATETIME_PATTERN));
    }

    public String getPsqsbzt1() {
        return TxcFStatusValueEnum.match(psqsbzt1).getStatusValue();
    }

    private String getStatusIntger(String mark) {
        return TxcFStatusValueEnum.match(mark).getStatusValue();
    }

    public String getPsqsbzt2() {
        return TxcFStatusValueEnum.match(psqsbzt2).getStatusValue();
    }

    public String getPsqsbzt3() {
        return TxcFStatusValueEnum.match(psqsbzt3).getStatusValue();
    }

    public String getPsqsbzt4() {
        return TxcFStatusValueEnum.match(psqsbzt4).getStatusValue();
    }

    public String getPsqsbzt5() {
        return TxcFStatusValueEnum.match(psqsbzt5).getStatusValue();
    }

    public String getPsqsbzt6() {
        return TxcFStatusValueEnum.match(psqsbzt6).getStatusValue();
    }

    public String getPsqsbzt7() {
        return TxcFStatusValueEnum.match(psqsbzt7).getStatusValue();
    }

    public String getPsqsbzt8() {
        return TxcFStatusValueEnum.match(psqsbzt8).getStatusValue();
    }

    public String getPsqsbzt9() {
        return TxcFStatusValueEnum.match(psqsbzt9).getStatusValue();
    }

    public String getZmzt1() {
        return TxcFStatusValueEnum.match(zmzt1).getStatusValue();
    }

    public String getZmzt2() {
        return TxcFStatusValueEnum.match(zmzt2).getStatusValue();
    }

    public String getZmzt3() {
        return TxcFStatusValueEnum.match(zmzt3).getStatusValue();
    }

    public String getZmzt4() {
        return TxcFStatusValueEnum.match(zmzt4).getStatusValue();
    }

    public String getZmzt5() {
        return TxcFStatusValueEnum.match(zmzt5).getStatusValue();
    }

    public String getZmzt6() {
        return TxcFStatusValueEnum.match(zmzt6).getStatusValue();
    }

    public String getFjzt1() {
        return TxcFStatusValueEnum.match(fjzt1).getStatusValue();
    }

    public String getFjzt2() {
        return TxcFStatusValueEnum.match(fjzt2).getStatusValue();
    }

    public String getFjzt3() {
        return TxcFStatusValueEnum.match(fjzt3).getStatusValue();
    }

    public String getFjzt4() {
        return TxcFStatusValueEnum.match(fjzt4).getStatusValue();
    }

    public String getFjzt5() {
        return TxcFStatusValueEnum.match(fjzt5).getStatusValue();
    }

    public String getFjzt6() {
        return TxcFStatusValueEnum.match(fjzt6).getStatusValue();
    }

    public String getFjzt7() {
        return TxcFStatusValueEnum.match(fjzt7).getStatusValue();
    }

    public String getFjzt8() {
        return TxcFStatusValueEnum.match(fjzt8).getStatusValue();
    }

    public String getFjzt9() {
        return TxcFStatusValueEnum.match(fjzt9).getStatusValue();
    }

    public String getFsglzt1() {
        return TxcFStatusValueEnum.match(fsglzt1).getStatusValue();
    }

    public String getFsglzt2() {
        return TxcFStatusValueEnum.match(fsglzt2).getStatusValue();
    }

    public String getZhgz() {
        return TxcFStatusValueEnum.match(zhgz).getStatusValue();
    }

    public String getGszt() {
        return TxcFStatusValueEnum.match(gszt).getStatusValue();
    }

    public String getYxzt() {
        return TxcFStatusValueEnum.match(yxzt).getStatusValue();
    }

    public String getGdzt() {
        return TxcFStatusValueEnum.match(gdzt).getStatusValue();
    }
}