package com.tofly.feesapi.yhgl.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tofly.feesapi.common.constant.YhztEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;


/**
 * 用户档案
 */
@Data
@ApiModel("用户档案添加DTO")
public class YhKhjbxxInsert {

    @ApiModelProperty(value = "用户编号", required = true, position = 1, example = "61006501")
    private String yhbh;

//    @ApiModelProperty("原用户号")
//    private String ykhbh;

    @ApiModelProperty(value = "所属公司编码", required = true, position = 2, example = "1")
    private String ssgs;

    @ApiModelProperty(value = "所属抄表片区编码", position = 3, example = "1")
    private String sscbpq;

    @ApiModelProperty(value = "所属抄表本编码", required = true, position = 4, example = "1")
    private String sscbb;

    @ApiModelProperty(value = "申请日期(yyyy-MM-dd)", position = 5, example = "2024-02-02")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate sqrq;

    @ApiModelProperty(value = "建档日期(yyyy-MM-dd)", position = 5, example = "2024-02-02")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate jdrq;




    @ApiModelProperty(value = "用户姓名", required = true, position = 6, example = "张三")
    private String yhxm;

    @ApiModelProperty(value = "用户地址", required = true, position = 7, example = "xx小区x栋")
    private String yhdz;

    @ApiModelProperty(value = "联系电话", position = 8, example = "13925426572")
    private String lxdh;

    @ApiModelProperty(value = "性别编码", position = 9, example = "1")
    private String xb;

    @ApiModelProperty(value = "证件类别编码", position = 10, example = "1")
    private String zjlb;

    @ApiModelProperty(value = "证件号码", position = 11, example = "520606201405082758")
    private String zjhm;

    @ApiModelProperty(value = "用户状态", position = 12, example = "申请用户")
    private YhztEnum yhzt = YhztEnum.正式用户;

    @ApiModelProperty(value = "是否特困户（1是，0否）", position = 13, example = "1")
    private String tkhbz="0";

    @ApiModelProperty(value = "发票类型 0普票1专票", position = 14, example = "0")
    private String fplx="0";

    @ApiModelProperty(value = "是否取整（1是，0否）", position = 15, example = "0")
    private String sfqz="0";

    @ApiModelProperty(value = "发票开具纳税人识别号", position = 16, example = "25452557558")
    private String fpNsrsbh;

    @ApiModelProperty(value = "发票开具地址", position = 17, example = "xx市xx区xxx街道xx号")
    private String fpDz;
    @ApiModelProperty(value = "通水（1是，0否）", position = 18, example = "1")
    private String tsbz="0";

    @ApiModelProperty(value = "通水日期(yyyy-MM-dd)", position = 19, example = "2024-02-02")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate tsrq;


    @ApiModelProperty(value = "水表信息", position = 20)
    private YhCbkxxInsert yhCbkxx = new YhCbkxxInsert();

    @ApiModelProperty(value = "备注", position = 30, example = "备注")
    private String bz;

    @ApiModelProperty(value = "操作人员编码", position = 31, example = "223")
    private String czrybm;

    @ApiModelProperty(value = "操作人员姓名", position = 31, example = "李四")
    private String czryxm;

    @ApiModelProperty(value = "操作时间(yyyy-MM-dd HH:mm:ss)", position = 32, example = "2024-02-06 13:37:13")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date czsj;

    @Data
    @ApiModel("水表档案添加DTO")
    public static class YhCbkxxInsert {

        @ApiModelProperty(value = "水表编号", position = 1, example = "0006")
        private String sbbh;

        @ApiModelProperty(value = "水表类别编码", position = 2, example = "1")
        private String sblb;

        @ApiModelProperty(value = "水表生产厂家编码", position = 3, example = "1")
        private String sbsccj;

        @ApiModelProperty(value = "水表型号编码", position = 4, example = "1")
        private String sbxh;

        @ApiModelProperty(value = "水表口径编码", position = 5, example = "20")
        private String sbkj;

        @ApiModelProperty(value = "水表量程编码", position = 6, example = "4")
        private String sblc;

        // ------------------------水价---------------------
        @ApiModelProperty(value = "水价编码", position = 10, example = "8")
        private String sjbm;

        @ApiModelProperty(value = "水量比例", position = 11, example = "0")
        private BigDecimal slbl;

        @ApiModelProperty(value = "水价编码1", position = 12, example = "7")
        private String sjbm1;

        @ApiModelProperty(value = "水量比例1", position = 13, example = "0.4")
        private BigDecimal slbl1;

        @ApiModelProperty(value = "水价编码2", position = 14, example = "8")
        private String sjbm2;

        @ApiModelProperty(value = "水量比例2", position = 15, example = "0.4")
        private BigDecimal slbl2;

        @ApiModelProperty(value = "水价编码3", position = 16, example = "9")
        private String sjbm3;

        @ApiModelProperty(value = "水量比例3", position = 17, example = "0.3")
        private BigDecimal slbl3;

        @ApiModelProperty(value = "垃圾费标志（1是，0否）", position = 20, example = "1")
        private String ljfbz;

        @ApiModelProperty(value = "污水费标志（1是，0否）", position = 21, example = "1")
        private String wsfbz;

        @ApiModelProperty(value = "一表多价标志（1是，0否）", position = 22, example = "1")
        private String ybdjbz;


        @ApiModelProperty(value = "水表起数", position = 22, example = "1")
        private String sbqs;

        @ApiModelProperty(value = "计费状态（1正常，2停用）", position = 23, example = "1")
        private String jfzt;
        @ApiModelProperty(value = "抄表频率", position = 24, example = "1")
        private String cbpl;
        @ApiModelProperty(value = "表具位置", position = 25, example = "表具位置")
        private String bjwz;

        @ApiModelProperty(value = "垃圾费方式（1是，0否）", position = 26, example = "1")
        private String ljffs;

        @ApiModelProperty(value = "垃圾费金额", position = 27, example = "垃圾费金额")
        private String ljfje;

    }

}
