grouopExceedViewService.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Models;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Data.SqlClient;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace DAL
  10. {
  11. public class grouopExceedViewService
  12. {
  13. /// <summary>
  14. /// 查询所有
  15. /// </summary>
  16. /// <param name="sql">sql语句</param>
  17. /// <param name="param">可变参数数组</param>
  18. /// <returns>返回集合</returns>
  19. List<grouopExceedView> excuteSql(string sql, params SqlParameter[] param)
  20. {
  21. return ServiceBase<grouopExceedView>.excuteSql(new grouopExceedView(), "grouopExceedView", sql, CommandType.Text, param);
  22. }
  23. /// <summary>
  24. /// 根据diid查询超支导出数据
  25. /// </summary>
  26. /// <param name="id">对象编号</param>
  27. /// <returns>返回空或者单个对象信息</returns>
  28. public List<grouopExceedView> GetGrouopExceedByDiId(int DiId)
  29. {
  30. //调用获取单个对象的方法
  31. return excuteSql("select d.TeamName,g.operatorsDate,g.PriceType,g.PriceName,g.Coefficient,g.Price,(select Name from SetData where g.currency=id) as Currency,c.DayRate,c.RMBPrice,g.remark from grouopExceed g left join CreditCardPayment c on g.id=c.CId and c.CTable=805 left join DelegationInfo d on g.DIID=d.Id where g.IsDel=0 and g.DIID=@DiId", new SqlParameter("@DiId", DiId));
  32. }
  33. }
  34. }