package jnpf.model.personnels.vo.goods;

import jnpf.model.personnels.po.FtbPersonnelsGoodsReceive;
import lombok.Data;

import java.util.Date;

@Data
public class FtbPersonnelsGoodsReceiveDetailsVO {

    /**
     * 物品领用id
     */
    private String id;

    /**
     * 员工姓名
     */
    private String userName;

    /**
     * 所属组织
     */
    private String orgName;

    /**
     * 物品名称
     */
    private String goodsName;

    /**
     * 领取日期
     */
    private Date receiptTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 物品领用数量
     */
    private Long quantityUse;

    /**
     * 剩余数量
     */
    private Long remainingQuantity;
    /**
     * 物品Id
     */
    private String goodsId;

    public static FtbPersonnelsGoodsReceiveDetailsVO convert(FtbPersonnelsGoodsReceive ftbPersonnelsGoodsReceive) {
        if (ftbPersonnelsGoodsReceive == null) {
            return null;
        }
        FtbPersonnelsGoodsReceiveDetailsVO ftbPersonnelsGoodsReceiveDetailsVO = new FtbPersonnelsGoodsReceiveDetailsVO();
        ftbPersonnelsGoodsReceiveDetailsVO.setUserName(ftbPersonnelsGoodsReceive.getUserName());
        ftbPersonnelsGoodsReceiveDetailsVO.setOrgName(ftbPersonnelsGoodsReceive.getOrgName());
        ftbPersonnelsGoodsReceiveDetailsVO.setReceiptTime(ftbPersonnelsGoodsReceive.getReceiptTime());
        ftbPersonnelsGoodsReceiveDetailsVO.setRemark(ftbPersonnelsGoodsReceive.getRemark());
        ftbPersonnelsGoodsReceiveDetailsVO.setGoodsId(ftbPersonnelsGoodsReceive.getGoodsId());
        ftbPersonnelsGoodsReceiveDetailsVO.setQuantityUse(ftbPersonnelsGoodsReceive.getQuantityUse());
        ftbPersonnelsGoodsReceiveDetailsVO.setId(ftbPersonnelsGoodsReceive.getId());
        return ftbPersonnelsGoodsReceiveDetailsVO;
    }

}
