/**
  * 根据名字查询分类是否重复
  *
  * @author 马浩然
  */
 protected int checkClaAdd(String clfName) {
   return jdbcTemplateDao
       .getJdbcTemplate()
       .queryForInt(
           "select count(*) from yq_classification where yq_classification.CLF_DELFLAG=0 and yq_classification.CLF_NAME=?",
           new Object[] {clfName});
 }
 /**
  * 根据名字和Id查询分类是否重复
  *
  * @author 马浩然
  */
 protected int checkClaUpdate(String clfName, String clfruleId) {
   int count = 0;
   String OpartName =
       entityDaoImpl.get(YqClassification.class, Integer.valueOf(clfruleId)).getClfName();
   if (!OpartName.equals(clfName)) {
     count =
         jdbcTemplateDao
             .getJdbcTemplate()
             .queryForInt(
                 "select count(*) from yq_classification where yq_classification.CLF_DELFLAG=0 and yq_classification.CLF_NAME=?",
                 new Object[] {clfName});
   }
   return count;
 }