package com.sw.mes.yb.accessory.service.impl;


import com.sw.mes.yb.accessory.dao.AccessoryOrderDao;
import com.sw.mes.yb.accessory.entity.AccessoryOrder;
import com.sw.mes.yb.accessory.service.AccessoryOrderService;
import com.sw.mes.core.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

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


/**
* @Author
* @Description：
* @Date: Create in
* @Modified By:
*/
@Service
@Transactional
public class AccessoryOrderServiceImpl extends BaseServiceImpl<AccessoryOrder> implements AccessoryOrderService {
    AccessoryOrderDao dao;
	@Autowired
    public void setDao(AccessoryOrderDao dao) {
        super.setBaseDao(dao);
        this.dao=dao;
    }

    //各热场件平均使用天数和定额天数对比（正常损耗）
    @Override
    public List<Map<String,Object>> accessoryLifeAvg(String accessoryTypeName, String startTime, String endTime){
	    return dao.accessoryLifeAvg(accessoryTypeName,startTime,endTime);
    }

    //同一热场件不同厂家寿命对比（正常损耗）
    @Override
    public List<Map<String,Object>> accessorySupplierLifeAvg(String accessoryTypeName,String startTime,String endTime){
        return dao.accessorySupplierLifeAvg(accessoryTypeName,startTime,endTime);
    }

    //质量问题损失占比
    @Override
    public List<Map<String,Object>> accessoryQuality(String accessoryTypeName,String startTime,String endTime){
        return dao.accessoryQuality(accessoryTypeName,startTime,endTime);
    }
}
