AIMS/AIMSEntity/BLL/Extension/BFeesRecordReport.cs
2023-03-21 08:50:33 +08:00

50 lines
1.2 KiB
C#

using System;
using AIMSDAL;
using AIMSModel;
using AIMSObjectQuery;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using HelperDB;
namespace AIMSBLL
{
public partial class BFeesRecordReport
{
public static DataTable GetUpListByWhere2(string where)
{
string sql = string.Format(@"
SELECT
ROW_NUMBER() OVER (ORDER BY FeeCode ASC) AS noo,
FeeCode ,
ChargName ,
ChargSpec ,
sum(convert(float,FeeNum)) FeeNum,
UnitPrice
FROM [dbo].[FeesRecord]
where FeeIsDrug=1 and {0}
group by FeeCode , ChargName, ChargSpec ,UnitPrice
order by FeeCode ", where);
DataTable dt = DBHelper.GetDataTable(sql);
return dt;
}
public static DataTable GetUpListByWhere(string where)
{
string sql = string.Format(@"
SELECT *,
info.OperationRoom,
info.PatientName,
info.MdrecNo
FROM[dbo].[FeesRecord]
left join [dbo].[V_OperationRecordInfo] info on info.RecoredId=[FeesRecord].OperationRecordId
where FeeIsDrug=1 and {0}
order by FeeCode ", where);
DataTable dt = DBHelper.GetDataTable(sql);
return dt;
}
}
}