38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
|
using HL_FristAidPlatform_Help;
|
|||
|
using HL_FristAidPlatform_IDataBase;
|
|||
|
using HL_FristAidPlatform_Models;
|
|||
|
using SqlSugar;
|
|||
|
using System.Collections.Generic;
|
|||
|
|
|||
|
namespace HL_FristAidPlatform_DataBase.Base
|
|||
|
{
|
|||
|
public class T_Base_DrugDB : BaseDB, IT_Base_Drug
|
|||
|
{
|
|||
|
public SqlSugarClient db = GetClient();
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 查询急救车药品
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
public TableModel<AmbulanceDrugModel> GetAmbulanceDrugList()
|
|||
|
{
|
|||
|
TableModel<AmbulanceDrugModel> t = new TableModel<AmbulanceDrugModel>();
|
|||
|
List<AmbulanceDrugModel> list = new List<AmbulanceDrugModel>();
|
|||
|
list =db.Queryable<T_Base_Drug>().Where(i => i.Type == 1 && i.DeleteFlag == 0)
|
|||
|
.Select(i=>new AmbulanceDrugModel
|
|||
|
{
|
|||
|
GUID=i.GUID,
|
|||
|
Name=i.Name
|
|||
|
}).ToList();
|
|||
|
t.Code = 0;
|
|||
|
t.PageCount = list.Count;
|
|||
|
t.TotalNumber = list.Count;
|
|||
|
t.Data = list;
|
|||
|
t.Msg = "成功";
|
|||
|
return t;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|