package com.huatek.busi.dao;

import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;

import com.huatek.busi.entity.TransformerEpaDeviationStatistics;
import com.huatek.torch.sql.dao.impl.BaseDao;
import com.huatek.torch.util.uuid.Uuid;

/**
 * 变压器油色谱数据偏差率统计 Dao
 *
 * @author anker_cheng
 * @date Jul 15, 2019 11:48:53 AM
 */
@Repository
public class TransformerEpaDeviationStatisticsDao extends BaseDao<TransformerEpaDeviationStatistics, String> {

    public int saveOrUpdate(TransformerEpaDeviationStatistics entity) {
        if (StringUtils.isEmpty(entity.getId())) {
            entity.setId(Uuid.getUUID());
            return this.add(entity);
        }
        return this.updateLocal(entity);
    }
}
