package net.yyc.common.taxhelper.entity.model;

import net.yyc.common.taxhelper.config.TaxHelperConfig;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * {@code TaxHelperSettlementModel} 结算model
 *
 * @author Hengchen.Sun
 * @version 1.0.0
 * @date 2021-02-22
 * @since ver.1.0.0
 */
@Data
public class TaxHelperSettlementModel extends TaxHelperModel {
	private static final long serialVersionUID = 3367994202968726174L;

	// 企业信用代码
	private String enterpriseCode;

	// 扩展字段名称，用于对应业务摘要中扩展字段名称
	private List<String> extendFieldNames;

	// 结算清单列表
	private List<DetailedArr> detailedArr;

	// 业务摘要列表
	private List<AbstractArr> abstractArr;

	// 结算人员数
	private Integer count;

	// 回调接口
	private String notifyUrl;

	public TaxHelperSettlementModel(TaxHelperConfig taxHelperConfig) {
		this.appId = taxHelperConfig.getAppId();
		this.appSecrete = taxHelperConfig.getAppSecrete();
		this.queryUrl = taxHelperConfig.getQueryUrl();
	}

	// 结算清单
	@Data
	public static class DetailedArr implements Serializable {

		private static final long serialVersionUID = -1682151136227573346L;

		// 身份证号
		private String idCard;

		// 人员类别与发表对应.xlsx
		private String categoryName;

		// 结算金额
		private Double inputAmount;


	}

	// 业务摘要
	@Data
	public static class AbstractArr implements Serializable{
		private static final long serialVersionUID = 1750808233582651712L;

		//身份证号
		private String idCard;

		// 货物单价
		private Double price;

		// 货物数量
		private Integer number;

		// 合计
		private Double amount;

		// 扩展字段（10）
		private String extendField1;
		private String extendField2;
		private String extendField3;
		private String extendField4;
		private String extendField5;
		private String extendField6;
		private String extendField7;
		private String extendField8;
		private String extendField9;
		private String extendField10;

	}
}
