package com.ltgk.boat.domain.dto;

import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.lang.reflect.Field;
import java.math.BigDecimal;

/**
 * @Author: wan kun
 * @Description: 新增修改捕捞证书
 * @Date: 2024/12/24 17:55
 * @Version: 1.0
 */
@Data
public class SaveBoatFishingReq {
    @ApiModelProperty(value = "渔船捕捞许可信息唯一标识")
    @JsonProperty("id")
    private String id;
    @NotBlank(message = "渔船信息唯一标识不能为空")
    @ApiModelProperty(value = "渔船信息唯一标识")
    @JsonProperty("boatId")
    private String boatId;
    @ApiModelProperty(value = "渔船所属地区代码")
    @JsonProperty("areaCode")
    private String areaCode;
    @ApiModelProperty(value = "渔船所属地区名称")
    @JsonProperty("areaName")
    private String areaName;
    @ApiModelProperty(value = "渔业捕捞许可证编号")
    @JsonProperty("fishingCode")
    private String fishingCode;
    @ApiModelProperty(value = "持证人")
    @JsonProperty("certificateHolderName")
    private String certificateHolderName;
    @ApiModelProperty(value = "身份证号或企业注册号")
    @JsonProperty("certificateHolderIdcard")
    private String certificateHolderIdcard;
    @ApiModelProperty(value = "持证人地址")
    @JsonProperty("certificateHolderAddr")
    private String certificateHolderAddr;
    @ApiModelProperty(value = "申请部门")
    @JsonProperty("applyDept")
    private String applyDept;
    @ApiModelProperty(value = "申请日期")
    @JsonProperty("applyDate")
    private String applyDate;
    @ApiModelProperty(value = "申请人邮政编码")
    @JsonProperty("applyZipCode")
    private String applyZipCode;
    @ApiModelProperty(value = "申请人电话")
    @JsonProperty("applyPhone")
    private String applyPhone;
    @ApiModelProperty(value = "申请许可证类型")
    @JsonProperty("certificateType")
    private String certificateType;
    @ApiModelProperty(value = "申请类型")
    @JsonProperty("applyType")
    private String applyType;
    @ApiModelProperty(value = "申请理由")
    @JsonProperty("applyReason")
    private String applyReason;
    @ApiModelProperty(value = "签发人")
    @JsonProperty("signName")
    private String signName;
    @ApiModelProperty(value = "签发部门")
    @JsonProperty("signDept")
    private String signDept;
    @ApiModelProperty(value = "签发时间")
    @JsonProperty("signDate")
    private String signDate;
    @ApiModelProperty(value = "船名")
    @JsonProperty("boatName")
    private String boatName;
    @ApiModelProperty(value = "检验证书编号")
    @JsonProperty("examineCode")
    private String examineCode;
    @ApiModelProperty(value = "国籍登记证书编号")
    @JsonProperty("nationalityCode")
    private String nationalityCode;
    @ApiModelProperty(value = "船籍港")
    @JsonProperty("homePort")
    private String homePort;
    @ApiModelProperty(value = "船舶呼号识别码")
    @JsonProperty("boatCallCode")
    private String boatCallCode;
    @ApiModelProperty(value = "原主机功率")
    @JsonProperty("oldMainPower")
    private String oldMainPower;
    @ApiModelProperty(value = "鱼舱数量")
    @JsonProperty("fishholdNum")
    private String fishholdNum;
    @ApiModelProperty(value = "鱼舱容积")
    @JsonProperty("fishholdVolume")
    private String fishholdVolume;
    @ApiModelProperty(value = "子船主机数量")
    @JsonProperty("sonMainNum")
    private String sonMainNum;
    @ApiModelProperty(value = "主作业类型")
    @JsonProperty("mainWorkType")
    private String mainWorkType;
    @ApiModelProperty(value = "主作业第一作业方式")
    @JsonProperty("mainWorkOneType")
    private String mainWorkOneType;
    @ApiModelProperty(value = "主作业第一作业方式作业场所")
    @JsonProperty("mainWorkOnePlace")
    private String mainWorkOnePlace;
    @ApiModelProperty(value = "主作业第一作业方式具体场所名称")
    @JsonProperty("mainWorkOnePlaceName")
    private String mainWorkOnePlaceName;
    @ApiModelProperty(value = "主作业第一作业方式作业开始时间")
    @JsonProperty("mainWorkOneStartTime")
    private String mainWorkOneStartTime;
    @ApiModelProperty(value = "主作业第一作业方式作业结束时间")
    @JsonProperty("mainWorkOneEndTime")
    private String mainWorkOneEndTime;
    @ApiModelProperty(value = "主作业第一作业方式作业时限描述")
    @JsonProperty("mainWorkOneTimeDesc")
    private String mainWorkOneTimeDesc;
    @ApiModelProperty(value = "主作业第一作业方式渔具名称")
    @JsonProperty("mainWorkOneFishingName")
    private String mainWorkOneFishingName;
    @ApiModelProperty(value = "主作业第一作业方式渔具规格")
    @JsonProperty("mainWorkOneFishingSpecs")
    private String mainWorkOneFishingSpecs;
    @ApiModelProperty(value = "主作业第一作业方式渔具数量")
    @JsonProperty("mainWorkOneFishingNum")
    private String mainWorkOneFishingNum;
    @ApiModelProperty(value = "主作业第一作业方式主要捕捞品种")
    @JsonProperty("mainWorkOneSpecies")
    private String mainWorkOneSpecies;
    @ApiModelProperty(value = "主作业第一作业方式捕捞限额")
    @JsonProperty("mainWorkOneQuota")
    private String mainWorkOneQuota;
    @ApiModelProperty(value = "主作业第一作业方式捕捞水产品数")
    @JsonProperty("mainWorkOneProductNum")
    private String mainWorkOneProductNum;
    @ApiModelProperty(value = "主作业第一作业方式最小网目或网")
    @JsonProperty("mainWorkOneMinNet")
    private BigDecimal mainWorkOneMinNet;
    @ApiModelProperty(value = "主作业第二作业方式")
    @JsonProperty("mainWorkTwoType")
    private String mainWorkTwoType;
    @ApiModelProperty(value = "主作业第二作业方式作业场所")
    @JsonProperty("mainWorkTwoPlace")
    private String mainWorkTwoPlace;
    @ApiModelProperty(value = "主作业第二作业方式具体场所名称")
    @JsonProperty("mainWorkTwoPlaceName")
    private String mainWorkTwoPlaceName;
    @ApiModelProperty(value = "主作业第二作业方式作业开始时间")
    @JsonProperty("mainWorkTwoStartTime")
    private String mainWorkTwoStartTime;
    @ApiModelProperty(value = "主作业第二作业方式作业结束时间")
    @JsonProperty("mainWorkTwoEndTime")
    private String mainWorkTwoEndTime;
    @ApiModelProperty(value = "主作业第二作业方式作业时限描述")
    @JsonProperty("mainWorkTwoTimeDesc")
    private String mainWorkTwoTimeDesc;
    @ApiModelProperty(value = "主作业第二作业方式渔具名称")
    @JsonProperty("mainWorkTwoFishingName")
    private String mainWorkTwoFishingName;
    @ApiModelProperty(value = "主作业第二作业方式渔具规格")
    @JsonProperty("mainWorkTwoFishingSpecs")
    private String mainWorkTwoFishingSpecs;
    @ApiModelProperty(value = "主作业第二作业方式渔具数量")
    @JsonProperty("mainWorkTwoFishingNum")
    private String mainWorkTwoFishingNum;
    @ApiModelProperty(value = "主作业第二作业方式主要捕捞品种")
    @JsonProperty("mainWorkTwoSpecies")
    private String mainWorkTwoSpecies;
    @ApiModelProperty(value = "主作业第二作业方式捕捞限额")
    @JsonProperty("mainWorkTwoQuota")
    private String mainWorkTwoQuota;
    @ApiModelProperty(value = "主作业第二作业方式捕捞水产品数")
    @JsonProperty("mainWorkTwoProductNum")
    private String mainWorkTwoProductNum;
    @ApiModelProperty(value = "主作业第二作业方式最小网目或网")
    @JsonProperty("mainWorkTwoMinNet")
    private BigDecimal mainWorkTwoMinNet;
    @ApiModelProperty(value = "兼作业类型")
    @JsonProperty("doubleWorkType")
    private String doubleWorkType;
    @ApiModelProperty(value = "兼作业第一作业方式")
    @JsonProperty("doubleWorkOneType")
    private String doubleWorkOneType;
    @ApiModelProperty(value = "兼作业第一作业方式作业场所")
    @JsonProperty("doubleWorkOnePlace")
    private String doubleWorkOnePlace;
    @ApiModelProperty(value = "兼作业第一作业方式具体场所名称")
    @JsonProperty("doubleWorkOnePlaceName")
    private String doubleWorkOnePlaceName;
    @ApiModelProperty(value = "兼作业第一作业方式作业开始时间")
    @JsonProperty("doubleWorkOneStartTime")
    private String doubleWorkOneStartTime;
    @ApiModelProperty(value = "兼作业第一作业方式作业结束时间")
    @JsonProperty("doubleWorkOneEndTime")
    private String doubleWorkOneEndTime;
    @ApiModelProperty(value = "兼作业第一作业方式作业时限描述")
    @JsonProperty("doubleWorkOneTimeDesc")
    private String doubleWorkOneTimeDesc;
    @ApiModelProperty(value = "兼作业第一作业方式渔具名称")
    @JsonProperty("doubleWorkOneFishingName")
    private String doubleWorkOneFishingName;
    @ApiModelProperty(value = "兼作业第一作业方式渔具规格")
    @JsonProperty("doubleWorkOneFishingSpecs")
    private String doubleWorkOneFishingSpecs;
    @ApiModelProperty(value = "兼作业第一作业方式渔具数量")
    @JsonProperty("doubleWorkOneFishingNum")
    private String doubleWorkOneFishingNum;
    @ApiModelProperty(value = "兼作业第一作业方式主要捕捞品种")
    @JsonProperty("doubleWorkOneFishingSpecies")
    private String doubleWorkOneFishingSpecies;
    @ApiModelProperty(value = "兼作业第一作业方式捕捞限额")
    @JsonProperty("doubleWorkOneFishingQuota")
    private String doubleWorkOneFishingQuota;
    @ApiModelProperty(value = "兼作业第一作业方式捕捞单位")
    @JsonProperty("doubleWorkOneFishingUnit")
    private String doubleWorkOneFishingUnit;
    @ApiModelProperty(value = "兼作业第二作业方式")
    @JsonProperty("doubleWorkTwoType")
    private String doubleWorkTwoType;
    @ApiModelProperty(value = "兼作业第二作业方式作业场所")
    @JsonProperty("doubleWorkTwoPlace")
    private String doubleWorkTwoPlace;
    @ApiModelProperty(value = "兼作业第二作业方式具体场所名称")
    @JsonProperty("doubleWorkTwoPlaceName")
    private String doubleWorkTwoPlaceName;
    @ApiModelProperty(value = "兼作业第二作业方式作业开始时间")
    @JsonProperty("doubleWorkTwoStartTime")
    private String doubleWorkTwoStartTime;
    @ApiModelProperty(value = "兼作业第二作业方式作业结束时间")
    @JsonProperty("doubleWorkTwoEndTime")
    private String doubleWorkTwoEndTime;
    @ApiModelProperty(value = "兼作业第二作业方式作业时限描述")
    @JsonProperty("doubleWorkTwoTimeDesc")
    private String doubleWorkTwoTimeDesc;
    @ApiModelProperty(value = "兼作业第二作业方式渔具名称")
    @JsonProperty("doubleWorkTwoFishingName")
    private String doubleWorkTwoFishingName;
    @ApiModelProperty(value = "兼作业第二作业方式渔具规格")
    @JsonProperty("doubleWorkTwoFishingSpecs")
    private String doubleWorkTwoFishingSpecs;
    @ApiModelProperty(value = "兼作业第二作业方式渔具数量")
    @JsonProperty("doubleWorkTwoFishingNum")
    private String doubleWorkTwoFishingNum;
    @ApiModelProperty(value = "兼作业第二作业方式主要捕捞品种")
    @JsonProperty("doubleWorkTwoFishingSpecies")
    private String doubleWorkTwoFishingSpecies;
    @ApiModelProperty(value = "兼作业第二作业方式捕捞限额")
    @JsonProperty("doubleWorkTwoFishingQuota")
    private String doubleWorkTwoFishingQuota;
    @ApiModelProperty(value = "兼作业第二作业方式捕捞单位")
    @JsonProperty("doubleWorkTwoFishingUnit")
    private String doubleWorkTwoFishingUnit;
    @ApiModelProperty(value = "兼作业第二作业方式最小网目或网")
    @JsonProperty("doubleWorkTwoMinNet")
    private String doubleWorkTwoMinNet;
    @ApiModelProperty(value = "辅助作业辅助方式")
    @JsonProperty("assistantWorkType")
    private String assistantWorkType;
    @ApiModelProperty(value = "辅助作业作业场所")
    @JsonProperty("assistantWorkPlace")
    private String assistantWorkPlace;
    @ApiModelProperty(value = "辅助作业具体作业场所")
    @JsonProperty("assistantWorkPlaceName")
    private String assistantWorkPlaceName;
    @ApiModelProperty(value = "辅助作业作业开始时间")
    @JsonProperty("assistantWorkStartTime")
    private String assistantWorkStartTime;
    @ApiModelProperty(value = "辅助作业作业结束时间")
    @JsonProperty("assistantWorkEndTime")
    private String assistantWorkEndTime;
    @ApiModelProperty(value = "辅助作业作业时限描述")
    @JsonProperty("assistantWorkTimeDesc")
    private String assistantWorkTimeDesc;
    @ApiModelProperty(value = "辅助作业其他限制条件")
    @JsonProperty("assistantWorkOtherCond")
    private String assistantWorkOtherCond;
    @ApiModelProperty(value = "操作说明")
    @JsonProperty("remark")
    private String remark;
    @ApiModelProperty(value = "主作业第一作业方式渔具所属标准")
    @JsonProperty("mainWorkOneFishingStandard")
    private String mainWorkOneFishingStandard;
    @ApiModelProperty(value = "主作业第二作业方式渔具所属标准")
    @JsonProperty("mainWorkTwoFishingStandard")
    private String mainWorkTwoFishingStandard;
    @ApiModelProperty(value = "兼作业第一作业方式渔具所属标准")
    @JsonProperty("doubleWorkOneFishingStandard")
    private String doubleWorkOneFishingStandard;
    @ApiModelProperty(value = "兼作业第二作业方式渔具所属标准")
    @JsonProperty("doubleWorkTwoFishingStandard")
    private String doubleWorkTwoFishingStandard;
    @ApiModelProperty(value = "申请书编号")
    @JsonProperty("applyNum")
    private String applyNum;
    @ApiModelProperty(value = "打印次数")
    @JsonProperty("printNum")
    private BigDecimal printNum;
    @ApiModelProperty("证书有效期")
    @JsonProperty(value = "certificate_validity")
    private String certificateValidity;

    public void checkoutData() throws IllegalAccessException {
        Field[] fields = SaveBoatFishingReq.class.getDeclaredFields();
        for (Field field : fields) {
            Object object = field.get(this);
            if (ObjectUtils.isEmpty(object)) {
                field.set(this, null);
            }
        }

    }
}
