package com.ag.account.detail.impl;

import com.ag.account.detail.AccountDetail;
import com.ag.entity.fee.ContractItem;
import com.ag.entity.fee.face.ICondition;
import com.ag.util.StrUtil;
import com.alibaba.fastjson.JSONObject;

/**
 * 箱（拼箱数量=0.1）
 */
public class CntrShipDetail extends AccountDetail {

    @Override
    protected Double getQuantity(JSONObject property, ContractItem contractItem){
        double quantity = 1d;
        if (!StrUtil.isEmpty(property.getString(ICondition.QUANTITY))){
            quantity = Double.valueOf(property.getString(ICondition.QUANTITY));
        }
        if (quantity <= 0){
            quantity = 1d;
        }
        return quantity;
    }

}
