package com.qunzhixinxi.hnqz.admin.entity.input;

import com.qunzhixinxi.hnqz.admin.entity.WmScorePackageSettleNote;
import com.qunzhixinxi.hnqz.admin.enums.CategoryEnum;
import com.qunzhixinxi.hnqz.common.ding.enums.DingEnum;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 *
 */
@Data
public class WmScorePackageSettleInput {

	/**
	 * packageId
	 */
	private String id;

	private Integer invoiceCategory;

	private String categoryName;

	private String status;

	private String settleFlag;

	private String enableType;

	private String taskAddFlag;

	private String sendPackageDeptId;

	private String packageFinishStatus;

	private String packageEntName;

	private String packageType1;

	private String packageType2;

	private String typeid;

	private String scorePackageName;

	private LocalDateTime createTime;

	private String belongDate;

	private Integer score;
	private Integer ytj;
	private Integer ysh;
	private Integer dsh;

	private List<WmScorePackageSettleNote> notes;

	/**
	 * @Modify: start
	 * @Version: 2021.4.16
	 * @Author: ryz
	 * @Date: 2021/4/22
	 */
	private String realName;

	private String description;

	private String subType;

	/**
	 * @Modify: start
	 * @Version: 2021.4.16
	 * @Author: ryz
	 * @Date: 2021/4/22
	 */
	public String toCategoryName() {

		if (CategoryEnum.CATEGORY_1.getCode().equals(invoiceCategory)) {
			return CategoryEnum.CATEGORY_1.getDesc();
		} else if (CategoryEnum.CATEGORY_2.getCode().equals(invoiceCategory)) {
			return CategoryEnum.CATEGORY_2.getDesc();
		} else if (CategoryEnum.CATEGORY_3.getCode().equals(invoiceCategory)) {
			return CategoryEnum.CATEGORY_3.getDesc();
		} else if (CategoryEnum.CATEGORY_4.getCode().equals(invoiceCategory)) {
			return CategoryEnum.CATEGORY_4.getDesc();
		}

		return "";
	}
}
