package com.kcim.dao.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

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

/**
 * 科室损益计算
 * 
 * @author KCYG
 * @email KCYG@xinxicom
 * @date 2021-08-24 16:24:08
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName("cost_department_profit")
public class CostDepartmentProfit implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId
	private Long id;
	/**
	 * 年份
	 */
	private Integer year;
	/**
	 * 月份
	 */
	private Integer month;
	/**
	 * 报表项目父层级Id
	 */
	private Long reportParentId;
	/**
	 * 报表Id
	 */
	private Long reportId;
	/**
	 * 报表项目编号
	 */
	private Integer reportNum;
	/**
	 * 报表项目名称
	 */
	private String reportName;
	/**
	 * 计算公式
	 */
	private String calcFormula;
	/**
	 * 计算方式
	 */
	private Integer calcType;
	/**
	 * 责任中心代码
	 */
	private String responsibilityCode;
	/**
	 * 责任中心名称
	 */
	private String responsibilityName;
	/**
	 * 父类责任中心名称
	 */
	@TableField(exist = false)
	private String parentResponsibilityCode;
	@TableField(exist = false)
	private String parentResponsibilityName;

	@TableField(exist = false)
	private Long responsibilityId;

	@TableField(exist = false)
	private Long parentResponsibilityId;
	/**
	 * 成本类型
	 */
	private Integer costType;
	/**
	 * 收入类型
	 */
	private Integer incomeType;
	/**
	 * 金额
	 */
	private BigDecimal amount;
	/**
	 * 医院id
	 */
	private Long hospId;
	/**
	 * 创建时间
	 */
	private Long createTime;
	/**
	 * 删除时间
	 */
	@TableLogic(value = "0",delval = "UNIX_TIMESTAMP(NOW()) * 1000")
	private Long deleteTime;

	private Integer shareType;

	private BigDecimal percent;

	/**
	 * 预算金额
	 */
	private BigDecimal budgetAmount;

	/**
	 * 上期金额
	 */
	private BigDecimal prevPeriodAmount;

	/**
	 * 同期金额
	 */
	private BigDecimal samePeriodAmount;

	/**
	 * 完成率
	 */
	private BigDecimal completionRate;

	/**
	 * 环比
	 */
	private BigDecimal momRate;

	/**
	 * 同比
	 */
	private BigDecimal yoyRate;

	/**
	 * 会计科目金额列表
	 */
	@TableField(exist = false)
	private List<CostDepartmentProfitAccount> costDepartmentProfitAccounts;


}
