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;
    @ApiModelProperty(value = "调蓄池2号液位")
    @JsonProperty(value = "txc2yw")
    private String txc2yw;
    @ApiModelProperty(value = "闸门7状态")
    @JsonProperty(value = "zmzt7")
    private String zmzt7;
    @ApiModelProperty(value = "2号格栅状态")
    @JsonProperty(value = "gszt2")
    private String gszt2;
    @ApiModelProperty(value = "喷射器10角度")
    @JsonProperty(value = "psqjd10")
    private String psqjd10;
    @ApiModelProperty(value = "10#喷射器水泵状态")
    @JsonProperty(value = "psqsbzt10")
    private String psqsbzt10;
    @ApiModelProperty(value = "喷射器水泵频率10")
    @JsonProperty(value = "psqsbpl10")
    private String psqsbpl10;
    @ApiModelProperty(value = "闸门8状态")
    @JsonProperty(value = "zmzt8")
    private String zmzt8;
    @ApiModelProperty(value = "故障代码1")
    @JsonProperty(value = "gzdm1")
    private String gzdm1;
    @ApiModelProperty(value = "故障代码2")
    @JsonProperty(value = "gzdm2")
    private String gzdm2;


    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));
    }
}