药品添加导出报表字段修改,修改报表,修改药盒核对页面
This commit is contained in:
parent
9712c1e30c
commit
da8593cae4
|
|
@ -35,6 +35,6 @@ namespace MasaBlazorApp3.DataAccess.Dao
|
|||
/// 获取指定药盒号
|
||||
public Task<List<BoxModel>> GetDrawerNumByOperationNum(string machineId, List<int> operationNum);
|
||||
//核对处方
|
||||
public Task<bool> CheckOrderInfo(IList<OrderInfo> selectedOrderInfos, int DrawerNo);
|
||||
public Task<bool> CheckOrderInfo(IList<OrderInfo> selectedOrderInfos, BoxModel boxModel);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
.Where(di => di.DrugId == drugInfo.DrugId)
|
||||
.Set(di => di.DrugName, drugInfo.DrugName)
|
||||
.Set(di => di.DrugSpec, drugInfo.DrugSpec)
|
||||
.Set(di=>di.PackH,drugInfo.PackH)
|
||||
.Set(di => di.Manufactory, drugInfo.Manufactory);
|
||||
return statement.Update() > 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -784,13 +784,15 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
public async Task<List<BoxModel>> GetDrawerNumByOperationNum(string machineId,List<int> operationNum)
|
||||
{
|
||||
List<BoxModel> boxModelList = new List<BoxModel>();
|
||||
var query = _connection.ChannelStock
|
||||
.Where(cs => cs.MachineId == machineId && operationNum.Contains(cs.DrawerNo)&&cs.Quantity>0);
|
||||
boxModelList =await _connection.ChannelStock
|
||||
.Where(cs => cs.MachineId == machineId&& operationNum.Contains(cs.DrawerNo))
|
||||
.Select(cs => new BoxModel { BoxName = cs.DrawerNo.ToString(), BoxNo = Convert.ToInt32(cs.ColNo) }).ToListAsync();
|
||||
.Select(cs => new BoxModel { BoxName = cs.DrawerNo.ToString(), BoxNo = Convert.ToInt32(cs.ColNo) }).Distinct().ToListAsync();
|
||||
return boxModelList;
|
||||
}
|
||||
//核对处方
|
||||
public async Task<bool> CheckOrderInfo(IList<OrderInfo> selectedOrderInfos, BoxModel DrawerNo)
|
||||
public async Task<bool> CheckOrderInfo(IList<OrderInfo> selectedOrderInfos, BoxModel boxModel)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -806,7 +808,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
OrderInfo oi = selectedOrderInfos[i];
|
||||
|
||||
|
||||
int drawerNo = DrawerNo.BoxNo;
|
||||
int drawerNo =Convert.ToInt32(boxModel.BoxName);
|
||||
if (oi.DetailInfo != null && oi.DetailInfo.Id > 0)
|
||||
{
|
||||
//ChannelStock? cs = _connection.ChannelStock.AsQueryable()
|
||||
|
|
@ -821,7 +823,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&&cs.ColNo==DrawerNo.BoxNo).OrderBy(cs => cs.EffDate).ToList();
|
||||
&& cs.DrawerNo == drawerNo&&cs.ColNo== boxModel.BoxNo).OrderBy(cs => cs.EffDate).ToList();
|
||||
if (cs.Count <= 0)
|
||||
{
|
||||
logger.Info($"处方{oi.OrderNo}中药品{oi.DetailInfo.DrugId}在{drawerNo}号药盒无库存");
|
||||
|
|
@ -839,6 +841,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
if (oi.Status == 0)
|
||||
{
|
||||
int iUpdate = _connection.OrderInfo.Where(o => o.OrderNo == oi.OrderNo).Set(o => o.Status, 2).Update();
|
||||
int odUpdate = _connection.OrderDetail.Where(od => od.OrderNo == oi.OrderNo).Set(od => od.SetManuNo, oi.DetailInfo.drugManuNo.ManuNo).Update();
|
||||
_connection.Insert(new OrderFinish()
|
||||
{
|
||||
OrderNo = oi.OrderNo,
|
||||
|
|
@ -1008,6 +1011,8 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
_message.Notify(
|
||||
new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"有未核对处方:{empChannelStock}", Duration = 4000 }
|
||||
);
|
||||
_connection.RollbackTransaction();
|
||||
return false;
|
||||
}
|
||||
if (bFlag)
|
||||
{
|
||||
|
|
@ -1029,9 +1034,5 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
}
|
||||
}
|
||||
|
||||
public Task<bool> CheckOrderInfo(IList<OrderInfo> selectedOrderInfos, int DrawerNo)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,10 +109,10 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
|||
List<ReportUsageDateInfo> accountList = new List<ReportUsageDateInfo>();
|
||||
int pagedData = 0;
|
||||
|
||||
string SQL = $@"SELECT oi.Order_date as portdate, od.drug_id as DrugId,1 as ShouShuJian,'' as ZhuMa,'' as FuMa,oi.patient_id as IDNumber,oi.p_name as PName,oi.disease as Diagnose,
|
||||
string SQL = $@"SELECT oi.charge_Date as portdate, od.drug_id as DrugId,1 as ShouShuJian,'' as ZhuMa,'' as FuMa,oi.patient_id as IDNumber,oi.p_name as PName,oi.disease as Diagnose,
|
||||
CONCAT(di.drug_name,' ',di.drug_spec) as DrugName,od.set_manu_No as ManuNo,od.use_dosage as UsageDosage,'' as CanYeLiang,'' as CanYeChuZhi,'' as UseUserName,'' as CheckUserName
|
||||
from order_info oi inner join order_detail od on oi.order_no=od.order_no inner join drug_info di on od.drug_id=di.drug_id
|
||||
WHERE DATE_FORMAT(oi.Order_date,'%Y-%m-%d')='{searchDate?.ToString("yyyy-MM-dd")}' and oi.dm_status=2 and oi.cancel_flag=0 and oi.his_disp_flag=0 and di.pack_h=1";
|
||||
WHERE DATE_FORMAT(oi.charge_Date,'%Y-%m-%d')='{searchDate?.ToString("yyyy-MM-dd")}' and oi.dm_status=2 and oi.cancel_flag=0 and oi.his_disp_flag=0 and di.pack_h=1";
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -279,21 +279,21 @@
|
|||
);
|
||||
return;
|
||||
}
|
||||
// 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 }
|
||||
// );
|
||||
// }
|
||||
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()
|
||||
|
|
@ -345,7 +345,7 @@
|
|||
//查找该麻醉师对应的手术室
|
||||
//List<string> roomNameList = orderInfos.Select(it => it.RoomName).Distinct().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();
|
||||
BoxList = await orderInfoDao.GetDrawerNumByOperationNum(setting.Value.boxMachineId, roomNameList); //roomNameList.Select(it => new BoxModel { BoxName = it, BoxNo = Convert.ToInt32(it.Substring(it.Length - 2, 2)) }).ToList();
|
||||
|
||||
BoxNum = BoxList.FirstOrDefault();
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
</RadzenFieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-6 mb-4">
|
||||
<div class="col-6 mb-4" style="height:55vh;overflow:auto;">
|
||||
<RadzenDataGrid @ref="grid"
|
||||
LoadData="@LoadData"
|
||||
@bind-Value="@SelectedDrugs"
|
||||
|
|
@ -50,9 +50,9 @@
|
|||
Data="@_forecasts"
|
||||
AllowColumnResize="true" AllowAlternatingRows="false"
|
||||
SelectionMode="DataGridSelectionMode.Single" RowUpdate="@((DrugInfo di)=>{OnDrugUpdateRow(di);})" RowCreate="@((DrugInfo di)=>{OnDrugCreateRow(di);})"
|
||||
AllowPaging="true" PageSize="10" PagerHorizontalAlign="HorizontalAlign.Left" ColumnWidth="100px" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
||||
AllowPaging="true" PageSize="5" PagerHorizontalAlign="HorizontalAlign.Left" ColumnWidth="100px" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
||||
<Columns>
|
||||
<RadzenDataGridColumn Frozen="true" Title="编码" Property="DrugId">
|
||||
<RadzenDataGridColumn Title="编码" Property="DrugId">
|
||||
<EditTemplate Context="drugInfo">
|
||||
<RadzenTextBox Name="DrugId" @bind-Value="drugInfo.DrugId" Style="width:100%; display: block;" />
|
||||
<RadzenRequiredValidator Text="헝輕畇긍쯤" Component="DrugId" Popup="true" />
|
||||
|
|
@ -70,12 +70,17 @@
|
|||
<RadzenRequiredValidator Text="헝輕畇방목" Component="DrugSpec" Popup="true"/>
|
||||
</EditTemplate>
|
||||
</RadzenDataGridColumn>
|
||||
<RadzenDataGridColumn Width="200px" Title="厂家" Property="Manufactory">
|
||||
<RadzenDataGridColumn Width="150px" Title="厂家" Property="Manufactory">
|
||||
<EditTemplate Context="drugInfo">
|
||||
<RadzenTextBox Name="Manufactory" @bind-Value="drugInfo.Manufactory" Style="width:100%;display:block;" />
|
||||
<RadzenRequiredValidator Text="헝輕畇낍소" Component="Manufactory" Popup="true"/>
|
||||
</EditTemplate>
|
||||
</RadzenDataGridColumn>
|
||||
<RadzenDataGridColumn Title="导出使用报表" Property="PackH">
|
||||
<EditTemplate Context="drugInfo">
|
||||
<RadzenTextBox Name="PackH" @bind-Value="drugInfo.PackH" Style="width:100%;display:block;" />
|
||||
</EditTemplate>
|
||||
</RadzenDataGridColumn>
|
||||
|
||||
<RadzenDataGridColumn Context="drugInfo" Title="꾸鱗" Filterable="false" Sortable="false" TextAlign="TextAlign.Left" Frozen="true" FrozenPosition="FrozenColumnPosition.Right">
|
||||
<Template Context="drugInfo">
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ namespace MasaBlazorApp3.Pojo
|
|||
public string PackUnit { get; set; }
|
||||
[Column("py_code")]
|
||||
public string PyCode { get; set; }
|
||||
[Column("pack_h")]
|
||||
public string PackH { get; set; }
|
||||
//用于标识“手术室患者麻醉药品使用登记本”报表中是否导出该药品 1导出0不导
|
||||
//[Column("pack_h")]
|
||||
//public int ReportType { get; set; }
|
||||
|
|
|
|||
|
|
@ -304,7 +304,8 @@
|
|||
"HCrossFields":"DrugId",
|
||||
"VCrossFields":"ID号",
|
||||
"ListCols":6,
|
||||
"TotalCols":3
|
||||
"TotalCols":3,
|
||||
"TotalExcludeColumns":"残液处置方式;使用人签名;复核人签名"
|
||||
}
|
||||
},
|
||||
"Parameter":[
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"connectionStrings": "server=127.0.0.1;port=3306;database=zbzq;userid=root;password=qq1223;Charset=utf8mb4;",
|
||||
"connectionStrings": "server=127.0.0.1;port=3306;database=zbzq;userid=root;password=root;Charset=utf8mb4;",
|
||||
"finger": {
|
||||
"ip": "192.168.50.59",
|
||||
"port": 4370,
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
"boxMachineId": "DM5"
|
||||
},
|
||||
"port": {
|
||||
"drawerPortPath": "COM2",
|
||||
"drawerPortPath": "COM10",
|
||||
"drawerProtocol": 485,
|
||||
"scanCodePortPath": "COM1",
|
||||
"canBusExsit": true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue