package com.chenyang.nse.bussiness.dao.core;

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.vo.datascope.FieldReportFormDetailVO;
import com.chenyang.nse.bussiness.entity.vo.datascope.FieldReportFormTotalVO;
import com.chenyang.nse.bussiness.entity.vo.datascope.FieldReportFormVO;
import java.util.List;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

@Repository
public class FieldReportFormDao extends BaseDao<Object, String> {
   public List<FieldReportFormVO> getFieldReportFormSearch(String sql) {
      List<FieldReportFormVO> vo = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.aliasToBean(FieldReportFormVO.class)).getResultList();
      return vo;
   }

   public List<FieldReportFormTotalVO> getFieldReportFormTotalSearch(String sql) {
      List<FieldReportFormTotalVO> vo = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.aliasToBean(FieldReportFormTotalVO.class)).getResultList();
      return vo;
   }

   public List<FieldReportFormDetailVO> getFieldReportFormDetailSearch(String sql) {
      List<FieldReportFormDetailVO> vo = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.aliasToBean(FieldReportFormDetailVO.class)).getResultList();
      return vo;
   }
}
