package com.steerinfo.ems.trmworkprocmaterialvalue.mapper;

import com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue;
import com.steerinfo.framework.mapper.IBaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
public interface TRmWorkprocMaterialValueMapper extends IBaseMapper<TRmWorkprocMaterialValue, HashMap<String, Object>> {
    /**
     * 获得工序与原材料数据维护数据（能源平衡管理-工序与原材料数据维护页面，查询数据）
     *
     * @return
     */
    List<Map<String, Object>> getWorkprocMaterialDetail(Map<String, Object> parameters);

    /**
     * 根据联合主键查询对象
     *
     * @param
     */
    TRmWorkprocMaterialValue selectByUPrimaryKey(TRmWorkprocMaterialValue tRmWorkprocMaterialValue);

    TRmWorkprocMaterialValue selectByPrimaryKey(HashMap<String, Object> m);

    int updateValue(HashMap<String, Object> m);

    int insertValue(HashMap<String, Object> m);

    int deleteByPrimaryKey(HashMap<String, Object> m);

    /**
     * 获取累计值
     *
     * @param params
     * @return
     */
    Double getSumvalue(HashMap<String, Object> params);

    /**
     * 获取月实绩产量和累计产量
     *
     * @param params
     * @return
     */
    Map<String, Object> getMonthOutPut(HashMap<String, Object> params);

    /**
     * 获取项目值与数据来源FID（从IF_MES_EMS_SWAPFILE表，status=1的已处理数据）
     *
     * @param params
     * @return
     */
    Map<String, Object> getItemval(HashMap<String, Object> params);

    /**
     * 获取项目值与数据来源FID（从IF_MES_EMS_SWAPFILE表，所有数据）
     *
     * @param params
     * @return
     */
    Map<String, Object> getAllItemval(HashMap<String, Object> params);

    /**
     * 从报表视图(V_INPUTOUTPUT)获取数据
     *
     * @param params
     * @return
     */
    List<TRmWorkprocMaterialValue> getReportValue(HashMap<String, Object> params);
}