package com.ycl.platform.domain.vo;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.ycl.platform.base.AbsVo;
|
import com.ycl.platform.domain.entity.CalculateReport;
|
import enumeration.general.CalculateReportStatusEnum;
|
import lombok.Data;
|
import org.springframework.beans.BeanUtils;
|
import org.springframework.lang.NonNull;
|
|
import java.math.BigDecimal;
|
import java.time.LocalDateTime;
|
import java.util.Date;
|
import java.util.List;
|
|
/**
|
* 核算报告展示
|
*
|
* @author xp
|
* @since 2024-04-23
|
*/
|
@Data
|
public class CalculateReportDetailVO {
|
|
private Integer id;
|
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
private Date createTime;
|
|
/** 合同 */
|
private Integer contractId;
|
|
private Integer whichYear;
|
/** 运维单位 */
|
private String unitName;
|
|
/** 合同名称 */
|
private String contractName;
|
|
/** 核算日期 */
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
private LocalDateTime calculateTime;
|
|
/** 扣减总金额 */
|
private BigDecimal deductMoney;
|
|
/** 明细 */
|
private List<CalculateRecordVO> recordList;
|
|
/** 核算规则 */
|
private List<CalculateMoneyRuleVO> ruleList;
|
|
private CalculateReportStatusEnum status;
|
|
public static CalculateReportDetailVO getVoByEntity(@NonNull CalculateReport entity, CalculateReportDetailVO vo) {
|
if(vo == null) {
|
vo = new CalculateReportDetailVO();
|
}
|
BeanUtils.copyProperties(entity, vo);
|
return vo;
|
}
|
|
}
|