package com.jisco.dynamicweight.dynamicworkdata.mapper;

import com.steerinfo.framework.mapper.IBaseMapper;
import com.jisco.dynamicweight.dynamicworkdata.model.DynamicWorkData;
import org.apache.ibatis.annotations.Mapper;

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

@Mapper
public interface DynamicWorkDataMapper extends IBaseMapper<DynamicWorkData, String> {
    /**
     * 计算(M1M1B)去1#-4#焦炉总量
     *
     * @param receiver
     * @param startTime
     * @param endTime
     * @return
     */
    BigDecimal getTotalWeightOfM1AndM1BTo1_4(String receiver, Date startTime, Date endTime);

    /**
     * 计算3煤塔总量
     *
     * @param material
     * @param startTime
     * @param endTime
     * @return
     */
    BigDecimal getTotalWeightOf3MT(String material, Date startTime, Date endTime);

    /**
     * 查询(M1M1B)去1#-4#焦炉按物料分组后的重量
     *
     * @param memo
     * @param startTime
     * @param endTime
     * @return
     */
    List<DynamicWorkData> getTotalWeightOfM1AndM1BTo1_4GroupByMaterial(String memo, Date startTime, Date endTime);

    /**
     * 重新获取动态秤称重数据
     */
    void recalc();
}