package com.iamberry.app.face;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.iamberry.app.core.dto.RecordCountInfoDTO;
import com.iamberry.app.core.dto.RecordDTO;
import com.iamberry.app.core.entity.MilkDatetimeValue;
import com.iamberry.app.core.entity.MilkImages;
import com.iamberry.app.core.entity.MilkMakingRecord;
import com.iamberry.app.core.entity.MilkPowderInfo;

/**
 * MilkService
 *
 * @author Moon Cheng
 * @date 2016年3月23日 上午11:33:10
 */

public interface MilkService {

	/**
	 * setMilkMakingRecord
	 *
	 * @param makingRecord
	 * @param token
	 * @param recordId
	 * @return
	 */
	public MilkMakingRecord setMilkMakingRecord(MilkMakingRecord makingRecord, String token);

	/**
	 * searchUserRecordsBytime
	 *
	 * @author Moon Cheng
	 * @param userId
	 * @param startTime
	 * @param endTime
	 * @return Milk Making Record List
	 */
	public Map<String, List<RecordDTO>> searchUserRecordsByTime(Long userId, String dateStatus, String chosenDate,
			String machineMac) ;
	/**
	 * searchUserRecordById
	 *
	 * @author Moon Cheng
	 * @param recordId
	 * @return Milk Making Record Information
	 */
	public MilkMakingRecord searchUserRecordById(Long recordId);

	/**
	 * getTotalMilkVolumeMadeByUser
	 *
	 * @author Moon Cheng
	 * @param userId
	 * @return
	 */
	public RecordCountInfoDTO getTotalMilkVolumeMadeByUser(Long userId) ;

	/**
	 * setMilkPowderInfo
	 *
	 * @author Moon Cheng
	 * @param entity
	 * @param token
	 * @return Milk Powder Information
	 */
	public MilkPowderInfo setMilkPowderInfo(MilkPowderInfo entity, String token) ;
	/**
	 * searchMilkPowderInfoByBarCode
	 *
	 * @author Moon Cheng
	 * @param barcode
	 * @return Milk Powder Information
	 */
	public MilkPowderInfo searchMilkPowderInfoByBarCode(String barcode) ;
	/**
	 * searchMilkPowderInfosByBrand
	 *
	 * @author Moon Cheng, Yin
	 * @param brand
	 * @return Milk Powder List
	 */
	public Map<String, List<String>> searchMilkPowderInfosByBrand(String brand) ;

	/**
	 * searchMilkPowderBrand
	 *
	 * @return Brand List
	 */
	public List<String> searchMilkPowderBrand() ;

	/**
	 * searchMilkInfoByBrandSeriesLevel
	 *
	 * @param brand
	 * @param series
	 * @param level
	 * @return
	 */
	public MilkPowderInfo searchMilkInfoByBrandSeriesLevel(String brand, String series, String level);

	// =====================================TuyaHistoryData======================================
	/**
	 * getLastRecordDate
	 *
	 * @return
	 */
	public Date getLastRecordDate() ;
	/**
	 * addRecordData
	 *
	 * @param devId
	 * @param value
	 * @param time
	 */
	public void addRecordData(String devId, String value, Long time, Long userID) ;
	
	/**
	 * setMilkImages
	 * @author Moon Cheng
	 * @param entity
	 * @param token
	 * @return Milk Powder Information
	 */
	public void setMilkImages(MilkImages images) ;
	
	/**
	 * 获取冲奶记录，根据时间统计某一天
	 * @param mac
	 * @param date
	 * @return
	 * @author 献
	 * @Time   2016年12月12日
	 */
	//public List<MilkDatetimeValue> getMilkRecordByTime(String mac, String time);
	
	/**
	 * 获取冲奶记录，根据日期统计某个月
	 * @param mac
	 * @param date
	 * @return
	 * @author 献
	 * @Time   2016年12月12日
	 */
	//public List<MilkDatetimeValue> getMilkRecordByDate(String mac, String date);
	
	/**
	 * 通过barcode查询奶粉信息
	 *
	 * @author Moon Cheng
	 * @param barCode
	 * @return
	 */
	public MilkPowderInfo selectMilkPowderByBar(String barcode);
}
