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


import com.sw.mes.core.base.BaseServiceImpl;
import com.sw.mes.core.utils.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.sw.mes.yb.report.entity.BrokenBractBase;
import com.sw.mes.yb.report.dao.BrokenBractBaseDao;
import com.sw.mes.yb.report.service.BrokenBractBaseService;

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


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

    @Override
    public int updateRepeatedInfo(String deviceNo, Date dateTime, String repeatedInfo) {
       return dao.updateRepeatedInfo(deviceNo,DateUtil.formatDate(dateTime,"yyyy-MM-dd HH:mm:ss"),repeatedInfo);
    }

    @Override
    public List<BrokenBractBase> findByLineBreakType() {
        return dao.findByLineBreakType();
    }

    @Override
    public Integer findByLotNoAndAddTime(String lotNo, Integer addTime) {
        return dao.findByLotNoAndAddTime(lotNo, addTime);
    }
}
