/* (non-Javadoc)
  * @see com.cloud.erp.dao.SalesContractDao#getCount(java.util.Map, com.cloud.erp.utils.PageUtil)
  */
 @Override
 public long getCount(Map<String, Object> params, PageUtil pageUtil) {
   String dataRule = dataPermissionAssign.translate("SalesContract");
   String hql = "select count(*) from SalesContract t where t.status='A'" + dataRule;
   hql += Constants.getSearchConditionsHQL("t", params);
   hql += Constants.getGradeSearchConditionsHQL("t", pageUtil);
   return baseDao.count(hql, params);
 }
 /* (non-Javadoc)
  * @see com.cloud.erp.dao.SalesContractDao#findSalesContracts(java.util.Map, com.cloud.erp.utils.PageUtil)
  */
 @Override
 public List<SalesContract> findSalesContracts(Map<String, Object> params, PageUtil pageUtil) {
   String dataRule = dataPermissionAssign.translate("SalesContract");
   String hql = "from SalesContract t where t.status='A'" + dataRule;
   hql += Constants.getSearchConditionsHQL("t", params);
   hql += Constants.getGradeSearchConditionsHQL("t", pageUtil);
   return baseDao.find(hql, params, pageUtil.getPage(), pageUtil.getRows());
 }