package com.prolog.cs.biz.inbound.dto.rcv;

import cn.hutool.core.date.DateUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * Copyright: Copyright (C) 2020 prolog-int, Inc. All rights reserved.
 * <p>
 * Company: 湖北普罗格科技股份有限公司
 *
 * @author 刘溢沅
 * @since 2022-08-22 16:29
 */
@NoArgsConstructor
@Data
public class RcvLineDetailsDTO {
    private Object itemVolume;
    private double pieceConversionRate;
    private double pieceQty;
    private Integer shelfStockCount;
    private Object itemZjm;
    private Integer isCaseOrPiece;
    private Object itemHealthListedLicensor;
    private String itemName;
    private String uom;
    private Object recordNbr;
    private Integer isBacteria;
    private String asnAutoBillNum;
    private String id;
    private String branchid;
    private double scanQty;
    private Object tempControlScope;
    private String rcvType;
    private Integer isInstrument;
    private double rejectQty;
    private String itemId;
    private double scanCaseQty;
    private Object itemIsBatch;
    private String warehouseId;
    private Integer shelfLifeDays;
    private String rcvTypeName;
    private String itemHealthStoreCategory;
    private Integer isDelegate;
    private Integer isSupervise;
    private Object registerNbr;
    private double caseConversionRate;
    private String asnHeaderId;
    private Object industry;
    private Object rcvRtReason;
    private Integer remainShelfStockCount;
    private String manufacturer;
    private String itemNum;
    private Object expiryDateTrackLevel;
    private Object managementExpiredDate;
    private Object itemWeight;
    private String countryOriginId;
    private String asnLineId;
    private String shelfLifeUnit;
    private String mtlOwnerId;
    private Object manufacturerId;
    private double oddPieceQty;
    private String categoryCode;
    private String itemAssistantCode;
    private Integer itemIsRecheck;
    private Object itemHealthStorenote;
    private Object commonName;
    private Object itemHealthProduceLicense;
    private String manufacturerName;
    private double preQty;
    private Object srcLineId;
    private String registerNbrEn;
    private String allowDecimal;
    private String itemHealthCategory;
    private String manufacturerLotNum;
    private Object manufactureCode;
    private Integer remainStackStockCount;
    private Integer itemIsUnpack;
    private Integer isRetrospect;
    private String itemBarcode;
    private double freeQty;
    private String mtlOwnerCode;
    private String productionPlace;
    private String poAuditOpinion;
    private double receivedQty;
    private Integer itemIsSpecial;
    private Integer stackStockCount;
    private Integer itemHealthIsBigDecimal;
    private Object typeName;
    private Object qcMode;
    private Object srcHeaderId;
    private String batchId;
    private String categoryName;
    private String warehouseCode;
    private Integer isLock;
    private String shippername;
    private double oddCaseQty;
    private Integer isHosted;
    private Integer itemIsImported;
    private String batchNum;
    private String specification;
    private Object itemHealthCommonName;
    private String approvalNumber;
    private double conversionRate;
    private Object asnLineRemark;
    private Integer piecePriceTi;
    private Object itemHealthTwovoteflag;
    private String storeTemperature;
    private Integer piecePriceTe;
    private Object itemHealthRegisterNbr;
    private String batchExpiredDate;
    private Integer shelfLifeNum;
    private Object inStoreDay;
    private String categoryId;
    private String batchProductionDate;

    @ApiModelProperty(value = "容器编码")
    private String containerCode;

    @ApiModelProperty(value = "显示生产日期", position = -4)
    private String showProductionDate;

    @ApiModelProperty(value = "显示有效期至", position = -4)
    private String showExpiredDate;

    @ApiModelProperty("待收数量")
    private double tobeQty;

    public String getShowProductionDate() {
        return DateUtil.format(DateUtil.parse(batchProductionDate), "yyyy-MM-dd");
    }

    public String getShowExpiredDate() {
        return DateUtil.format(DateUtil.parse(batchExpiredDate), "yyyy-MM-dd");
    }
}
