修改提交
This commit is contained in:
parent
0ccef22fbd
commit
9712c1e30c
|
|
@ -790,7 +790,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
return boxModelList;
|
||||
}
|
||||
//核对处方
|
||||
public async Task<bool> CheckOrderInfo(IList<OrderInfo> selectedOrderInfos, int DrawerNo)
|
||||
public async Task<bool> CheckOrderInfo(IList<OrderInfo> selectedOrderInfos, BoxModel DrawerNo)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -806,7 +806,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
OrderInfo oi = selectedOrderInfos[i];
|
||||
|
||||
|
||||
int drawerNo = DrawerNo;
|
||||
int drawerNo = DrawerNo.BoxNo;
|
||||
if (oi.DetailInfo != null && oi.DetailInfo.Id > 0)
|
||||
{
|
||||
//ChannelStock? cs = _connection.ChannelStock.AsQueryable()
|
||||
|
|
@ -821,7 +821,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
&& cs.ManuNo == oi.DetailInfo.drugManuNo.ManuNo
|
||||
&& cs.EffDate == ((DateTime)oi.DetailInfo.drugManuNo.EffDate).ToString("yyyy-MM-dd")
|
||||
&& cs.MachineId.Equals(_setting.boxMachineId)
|
||||
&& cs.DrawerNo == drawerNo).OrderBy(cs => cs.EffDate).ToList();
|
||||
&& cs.DrawerNo == drawerNo&&cs.ColNo==DrawerNo.BoxNo).OrderBy(cs => cs.EffDate).ToList();
|
||||
if (cs.Count <= 0)
|
||||
{
|
||||
logger.Info($"处方{oi.OrderNo}中药品{oi.DetailInfo.DrugId}在{drawerNo}号药盒无库存");
|
||||
|
|
@ -1029,5 +1029,9 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
}
|
||||
}
|
||||
|
||||
public Task<bool> CheckOrderInfo(IList<OrderInfo> selectedOrderInfos, int DrawerNo)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@
|
|||
<RadzenLabel Text="核对药箱" Component="BoxList" Style="margin:0.5rem" />
|
||||
<RadzenDropDownDataGrid AllowVirtualization="true" Name="BoxList" TValue="BoxModel" Data="@BoxList" @bind-Value="BoxNum"
|
||||
AllowFilteringByAllStringColumns="true" TextProperty="BoxName">
|
||||
|
||||
<Template>
|
||||
@((context as BoxModel).BoxName + "-" + (context as BoxModel).BoxNo)
|
||||
</Template>
|
||||
<Columns>
|
||||
<RadzenDropDownDataGridColumn Property="BoxName" Title="药箱号" Sortable="false" />
|
||||
</Columns>
|
||||
|
|
@ -256,6 +258,20 @@
|
|||
//确认
|
||||
async Task Confirm()
|
||||
{
|
||||
if (selectedOrderInfos==null)
|
||||
{
|
||||
_message.Notify(
|
||||
new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"请选择处方", Duration = 4000 }
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (BoxNum==null)
|
||||
{
|
||||
_message.Notify(
|
||||
new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"请选择药箱", Duration = 4000 }
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (selectedOrderInfos.Any(it => it.DetailInfo.drugManuNo == null))
|
||||
{
|
||||
_message.Notify(
|
||||
|
|
@ -263,21 +279,21 @@
|
|||
);
|
||||
return;
|
||||
}
|
||||
bool bResult = await orderInfoDao.CheckOrderInfo(selectedOrderInfos, BoxNum.BoxNo);
|
||||
if (bResult)
|
||||
{
|
||||
_message.Notify(
|
||||
new NotificationMessage { Severity = NotificationSeverity.Success, Summary = "提示", Detail = $"处方已核对完成", Duration = 4000 }
|
||||
);
|
||||
await GetInitialDate();
|
||||
await grid.Reload();
|
||||
}
|
||||
else
|
||||
{
|
||||
_message.Notify(
|
||||
new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"处方已核对失败", Duration = 4000 }
|
||||
);
|
||||
}
|
||||
// bool bResult = await orderInfoDao.CheckOrderInfo(selectedOrderInfos, BoxNum);
|
||||
// if (bResult)
|
||||
// {
|
||||
// _message.Notify(
|
||||
// new NotificationMessage { Severity = NotificationSeverity.Success, Summary = "提示", Detail = $"处方已核对完成", Duration = 4000 }
|
||||
// );
|
||||
// await GetInitialDate();
|
||||
// await grid.Reload();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// _message.Notify(
|
||||
// new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"处方已核对失败", Duration = 4000 }
|
||||
// );
|
||||
// }
|
||||
}
|
||||
PageData<OrderInfo> result;
|
||||
protected override async Task OnInitializedAsync()
|
||||
|
|
@ -328,7 +344,7 @@
|
|||
|
||||
//查找该麻醉师对应的手术室
|
||||
//List<string> roomNameList = orderInfos.Select(it => it.RoomName).Distinct().ToList();
|
||||
List<int> roomNameList = orderInfos.Select(it => Convert.ToInt32(it.RoomName.Substring(it.RoomName.Length - 2, 2))).ToList();
|
||||
List<int> roomNameList = orderInfos.Select(it => Convert.ToInt32(it.RoomName.Substring(6, it.RoomName.Length - 6))).Distinct().ToList();
|
||||
BoxList = await orderInfoDao.GetDrawerNumByOperationNum(setting.Value.machineId, roomNameList); //roomNameList.Select(it => new BoxModel { BoxName = it, BoxNo = Convert.ToInt32(it.Substring(it.Length - 2, 2)) }).ToList();
|
||||
|
||||
BoxNum = BoxList.FirstOrDefault();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ internal class Program
|
|||
// 数据库
|
||||
appBuilder.Services.AddLinqToDBContext<AppDataConnection>((provider, options) =>
|
||||
options.UseMySql(config.GetValue<String>("connectionStrings"))
|
||||
.UseDefaultLogging(provider), ServiceLifetime.Scoped);
|
||||
.UseDefaultLogging(provider), ServiceLifetime.Transient);
|
||||
// dao层数据库操作
|
||||
appBuilder.Services.AddScoped<IUserDao, UserDao>();
|
||||
appBuilder.Services.AddScoped<IRoleDao, RoleDao>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue