package com.bonus.canteen.core.supply.purchase.domain.vo;

import cn.hutool.core.text.CharSequenceUtil;
import com.bonus.canteen.core.supply.purchase.domain.bo.DrpContractAttachmentDTO;
import com.bonus.canteen.core.utils.SysUtil;
import com.bonus.common.houqin.utils.JacksonUtil;
import io.swagger.annotations.ApiModelProperty;

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

public class DrpContractPageVO {
   @ApiModelProperty("提交状态 1待提交 2已提交")
   private Integer commitStatus;
   @ApiModelProperty("合同状态 待生效,2履行中，3已失效，4已终止")
   private Integer contractStatus;
   @ApiModelProperty("审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
   private Integer approveStatus;
   @ApiModelProperty("合同单号")
   private String contractId;
   @ApiModelProperty("合同标题")
   private String contractTitle;
   @ApiModelProperty("签订时间")
   private LocalDate contractSigningTime;
   @ApiModelProperty("负责人")
   private String contractPerson;
   @ApiModelProperty("审批流ID")
   private Long processInstanceId;
   @ApiModelProperty("合同总金额")
   private Long contractAmount;
   @ApiModelProperty("采购订单金额")
   private Long orderGoodsAmount;
   @ApiModelProperty("合同开始时间")
   private LocalDateTime contractStartTime;
   @ApiModelProperty("合同结束时间")
   private LocalDateTime contractEndTime;
   @ApiModelProperty("食堂ID")
   private Long canteenId;
   @ApiModelProperty("食堂名称")
   private String canteenName;
   @ApiModelProperty("供应商ID")
   private Long supplierId;
   @ApiModelProperty("供应商名称")
   private String supplierName;
   @ApiModelProperty("供应货品种类")
   private Integer categoryNum;
   @ApiModelProperty("备注")
   private String remark;
   @ApiModelProperty("创建人")
   private String createBy;
   @ApiModelProperty("创建时间")
   private LocalDateTime createTime;
   @ApiModelProperty("更新人")
   private String updateBy;
   @ApiModelProperty("更新时间")
   private LocalDateTime updateTime;
   @ApiModelProperty("审批人")
   private String approveBy;
   @ApiModelProperty("审批完成时间")
   private LocalDateTime approveTime;
   @ApiModelProperty("当前用户是否可以审批")
   private Boolean curUserApprove;
   @ApiModelProperty("货品数量")
   private Double totalNum;
   @ApiModelProperty("付款方式(1一次性付款,2分期付款)")
   private Integer payMoneyStyle;
   @ApiModelProperty("付款日期")
   private LocalDate payMoneyDate;
   @ApiModelProperty("收款银行")
   private String collectMoneyBank;
   @ApiModelProperty("收款账号")
   private String collectMoneyAccount;
   @ApiModelProperty("账户名称")
   private String collectMoneyAccountName;
   @ApiModelProperty("付款备注")
   private String payRemark;
   @ApiModelProperty("合同附件，多个则逗号分隔")
   private String contractAttachment;
   @ApiModelProperty("区域ID")
   private Long areaId;
   @ApiModelProperty("区域名称")
   private String areaName;
   @ApiModelProperty("合同详情")
   private List<DrpContractDetailVO> detailList;
   @ApiModelProperty("合同附件")
   private List<DrpContractAttachmentDTO> attachmentDTOList;

   public List<DrpContractAttachmentDTO> getAttachmentDTOList() {
      if (!CharSequenceUtil.isNotEmpty(this.contractAttachment)) {
         return this.attachmentDTOList;
      } else {
         List<DrpContractAttachmentDTO> drpContractAttachmentDTOS = JacksonUtil.readList(this.contractAttachment, DrpContractAttachmentDTO.class);
         Iterator var2 = drpContractAttachmentDTOS.iterator();

         while(var2.hasNext()) {
            DrpContractAttachmentDTO drpContractAttachmentDTO = (DrpContractAttachmentDTO)var2.next();
            drpContractAttachmentDTO.setUrl(SysUtil.getCutFileUrl(drpContractAttachmentDTO.getUrl()));
         }

         return drpContractAttachmentDTOS;
      }
   }

   public Integer getCommitStatus() {
      return this.commitStatus;
   }

   public Integer getContractStatus() {
      return this.contractStatus;
   }

   public Integer getApproveStatus() {
      return this.approveStatus;
   }

   public String getContractId() {
      return this.contractId;
   }

   public String getContractTitle() {
      return this.contractTitle;
   }

   public LocalDate getContractSigningTime() {
      return this.contractSigningTime;
   }

   public String getContractPerson() {
      return this.contractPerson;
   }

   public Long getProcessInstanceId() {
      return this.processInstanceId;
   }

   public Long getContractAmount() {
      return this.contractAmount;
   }

   public Long getOrderGoodsAmount() {
      return this.orderGoodsAmount;
   }

   public LocalDateTime getContractStartTime() {
      return this.contractStartTime;
   }

   public LocalDateTime getContractEndTime() {
      return this.contractEndTime;
   }

   public Long getCanteenId() {
      return this.canteenId;
   }

   public String getCanteenName() {
      return this.canteenName;
   }

   public Long getSupplierId() {
      return this.supplierId;
   }

   public String getSupplierName() {
      return this.supplierName;
   }

   public Integer getCategoryNum() {
      return this.categoryNum;
   }

   public String getRemark() {
      return this.remark;
   }

   public String getApproveBy() {
      return this.approveBy;
   }

   public LocalDateTime getApproveTime() {
      return this.approveTime;
   }

   public Boolean getCurUserApprove() {
      return this.curUserApprove;
   }

   public Double getTotalNum() {
      return this.totalNum;
   }

   public Integer getPayMoneyStyle() {
      return this.payMoneyStyle;
   }

   public LocalDate getPayMoneyDate() {
      return this.payMoneyDate;
   }

   public String getCollectMoneyBank() {
      return this.collectMoneyBank;
   }

   public String getCollectMoneyAccount() {
      return this.collectMoneyAccount;
   }

   public String getCollectMoneyAccountName() {
      return this.collectMoneyAccountName;
   }

   public String getPayRemark() {
      return this.payRemark;
   }

   public String getContractAttachment() {
      return this.contractAttachment;
   }

   public Long getAreaId() {
      return this.areaId;
   }

   public String getAreaName() {
      return this.areaName;
   }

   public List<DrpContractDetailVO> getDetailList() {
      return this.detailList;
   }

   public void setCommitStatus(final Integer commitStatus) {
      this.commitStatus = commitStatus;
   }

   public void setContractStatus(final Integer contractStatus) {
      this.contractStatus = contractStatus;
   }

   public void setApproveStatus(final Integer approveStatus) {
      this.approveStatus = approveStatus;
   }

   public void setContractId(final String contractId) {
      this.contractId = contractId;
   }

   public void setContractTitle(final String contractTitle) {
      this.contractTitle = contractTitle;
   }

   public void setContractSigningTime(final LocalDate contractSigningTime) {
      this.contractSigningTime = contractSigningTime;
   }

   public void setContractPerson(final String contractPerson) {
      this.contractPerson = contractPerson;
   }

   public void setProcessInstanceId(final Long processInstanceId) {
      this.processInstanceId = processInstanceId;
   }

   public void setContractAmount(final Long contractAmount) {
      this.contractAmount = contractAmount;
   }

   public void setOrderGoodsAmount(final Long orderGoodsAmount) {
      this.orderGoodsAmount = orderGoodsAmount;
   }

   public void setContractStartTime(final LocalDateTime contractStartTime) {
      this.contractStartTime = contractStartTime;
   }

   public void setContractEndTime(final LocalDateTime contractEndTime) {
      this.contractEndTime = contractEndTime;
   }

   public void setCanteenId(final Long canteenId) {
      this.canteenId = canteenId;
   }

   public void setCanteenName(final String canteenName) {
      this.canteenName = canteenName;
   }

   public void setSupplierId(final Long supplierId) {
      this.supplierId = supplierId;
   }

   public void setSupplierName(final String supplierName) {
      this.supplierName = supplierName;
   }

   public void setCategoryNum(final Integer categoryNum) {
      this.categoryNum = categoryNum;
   }

   public void setRemark(final String remark) {
      this.remark = remark;
   }

   public void setApproveBy(final String approveBy) {
      this.approveBy = approveBy;
   }

   public void setApproveTime(final LocalDateTime approveTime) {
      this.approveTime = approveTime;
   }

   public void setCurUserApprove(final Boolean curUserApprove) {
      this.curUserApprove = curUserApprove;
   }

   public void setTotalNum(final Double totalNum) {
      this.totalNum = totalNum;
   }

   public void setPayMoneyStyle(final Integer payMoneyStyle) {
      this.payMoneyStyle = payMoneyStyle;
   }

   public void setPayMoneyDate(final LocalDate payMoneyDate) {
      this.payMoneyDate = payMoneyDate;
   }

   public void setCollectMoneyBank(final String collectMoneyBank) {
      this.collectMoneyBank = collectMoneyBank;
   }

   public void setCollectMoneyAccount(final String collectMoneyAccount) {
      this.collectMoneyAccount = collectMoneyAccount;
   }

   public void setCollectMoneyAccountName(final String collectMoneyAccountName) {
      this.collectMoneyAccountName = collectMoneyAccountName;
   }

   public void setPayRemark(final String payRemark) {
      this.payRemark = payRemark;
   }

   public void setContractAttachment(final String contractAttachment) {
      this.contractAttachment = contractAttachment;
   }

   public void setAreaId(final Long areaId) {
      this.areaId = areaId;
   }

   public void setAreaName(final String areaName) {
      this.areaName = areaName;
   }

   public void setDetailList(final List<DrpContractDetailVO> detailList) {
      this.detailList = detailList;
   }

   public void setAttachmentDTOList(final List<DrpContractAttachmentDTO> attachmentDTOList) {
      this.attachmentDTOList = attachmentDTOList;
   }

   public String getCreateBy() {
      return createBy;
   }

   public void setCreateBy(String createBy) {
      this.createBy = createBy;
   }

   public LocalDateTime getCreateTime() {
      return createTime;
   }

   public void setCreateTime(LocalDateTime createTime) {
      this.createTime = createTime;
   }

   public String getUpdateBy() {
      return updateBy;
   }

   public void setUpdateBy(String updateBy) {
      this.updateBy = updateBy;
   }

   public LocalDateTime getUpdateTime() {
      return updateTime;
   }

   public void setUpdateTime(LocalDateTime updateTime) {
      this.updateTime = updateTime;
   }
}
