package com.jisco.dynamicweight.dynamicworkupdata.mapper;

import com.jisco.dynamicweight.dynamicworkauditdata.model.DynamicWorkAuditdata;
import com.jisco.dynamicweight.dynamicworkupdata.model.DynamicWorkUpdata;
import com.jisco.dynamicweight.dynamicworkupdata.vo.AuditDataVO;
import com.jisco.dynamicweight.dynamicworkupdata.vo.DailyReportVO;
import com.steerinfo.framework.mapper.IBaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface DynamicWorkUpdataMapper extends IBaseMapper<DynamicWorkUpdata, String> {
    /**
     * 重新获取动态秤称重数据
     */
    void recalc();

    /**
     * 数据分批总重量
     *
     * @param stationCode
     * @param date1
     * @param date2
     * @return
     */
    BigDecimal inbatchsTotalWeight(String stationCode, Date date1, Date date2);

    /**
     * 返粉总重量
     *
     * @param map String meterialCode, Date date1, Date date2, BigDecimal weight
     * @return
     */
    void returnedDustWeight(Map<String, Object> map);

    /**
     * 动态秤日报表
     *
     * @return
     */
    List<DailyReportVO> dailyReport(LocalDateTime bl8start,
                                    LocalDateTime bl8end,
                                    LocalDateTime bl16start,
                                    LocalDateTime bl16end,
                                    LocalDateTime bl24start,
                                    LocalDateTime bl24end,
                                    LocalDateTime rzlstart,
                                    LocalDateTime rzlend,
                                    LocalDateTime yzlstart,
                                    LocalDateTime yzlend,
                                    LocalDateTime nzlstart,
                                    LocalDateTime nzlend);

    /**
     * 查询待审核数据
     * @param bl8start
     * @param bl8end
     * @param bl16start
     * @param bl16end
     * @param bl24start
     * @param bl24end
     * @return
     */
    List<AuditDataVO> getAuditData(LocalDateTime bl8start, LocalDateTime bl8end, LocalDateTime bl16start, LocalDateTime bl16end, LocalDateTime bl24start, LocalDateTime bl24end);

    void setUploaded(DynamicWorkAuditdata auditdata);
}