去掉用户实体中药箱号字段
This commit is contained in:
parent
acdecc8700
commit
52769b3030
|
|
@ -74,7 +74,7 @@ namespace DM_Weight.Models
|
||||||
return "userList = [UserName:" + Nickname + ", UserId:" + UserName + "]";
|
return "userList = [UserName:" + Nickname + ", UserId:" + UserName + "]";
|
||||||
}
|
}
|
||||||
//保存用户已取药箱的药箱号
|
//保存用户已取药箱的药箱号
|
||||||
[SugarColumn(ColumnName = "Box_Num")]
|
//[SugarColumn(ColumnName = "Box_Num")]
|
||||||
public string BoxNumber { get; set; }
|
//public string BoxNumber { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -524,23 +524,6 @@ namespace DM_Weight.ViewModels
|
||||||
.Where(it => it.DrawerType == 1)
|
.Where(it => it.DrawerType == 1)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
SqlSugarHelper.Db.Insertable(new MachineRecord()
|
|
||||||
{
|
|
||||||
MachineId = ConfigurationManager.AppSettings["dm_machineId"].ToString(),
|
|
||||||
DrawerNo = cs.DrawerNo,
|
|
||||||
ColNo = cs.ColNo,
|
|
||||||
DrugId = cs.DrugId,
|
|
||||||
ManuNo = cs.ManuNo,
|
|
||||||
EffDate = !String.IsNullOrEmpty(cs.EffDate) ? DateTime.ParseExact(cs.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
|
||||||
Operator = HomeWindowViewModel.Operator?.Id,
|
|
||||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
|
||||||
OperationTime = DateTime.Now,
|
|
||||||
Quantity = oi._OrderDetail.Quantity,
|
|
||||||
Type = 2,
|
|
||||||
InvoiceId = oi.OrderNo
|
|
||||||
//, StockQuantity = nowChannels.Sum(it => it.Quantity)
|
|
||||||
}).ExecuteCommand();
|
|
||||||
|
|
||||||
#region 记录 注射剂使用与交接记录报表
|
#region 记录 注射剂使用与交接记录报表
|
||||||
//查询发药时间
|
//查询发药时间
|
||||||
//MachineRecord SendMachineRecord = SqlSugarHelper.Db.Queryable<MachineRecord>().Where(mr => mr.DrawerNo == cs.DrawerNo && mr.Type == 2)
|
//MachineRecord SendMachineRecord = SqlSugarHelper.Db.Queryable<MachineRecord>().Where(mr => mr.DrawerNo == cs.DrawerNo && mr.Type == 2)
|
||||||
|
|
@ -594,10 +577,10 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - oi._OrderDetail.Quantity;
|
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - oi._OrderDetail.Quantity;
|
||||||
accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + oi._OrderDetail.Quantity;
|
accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + oi._OrderDetail.Quantity;
|
||||||
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
|
|
||||||
accountBookG2Day.UseDose = (Convert.ToInt32(accountBookG2Day.UseDose) + Convert.ToInt32(oi._OrderDetail.surgicalResidual.UseDose)).ToString();
|
accountBookG2Day.UseDose = (Convert.ToInt32(accountBookG2Day.UseDose) + Convert.ToInt32(oi._OrderDetail.surgicalResidual.UseDose)).ToString();
|
||||||
accountBookG2Day.ResidualDose = (Convert.ToInt32(accountBookG2Day.ResidualDose) + Convert.ToInt32(oi._OrderDetail.surgicalResidual.ResidualDose)).ToString();
|
accountBookG2Day.ResidualDose = (Convert.ToInt32(accountBookG2Day.ResidualDose) + Convert.ToInt32(oi._OrderDetail.surgicalResidual.ResidualDose)).ToString();
|
||||||
accountBookG2Day.TotalStock = (accountBookEmpty != null ? (accountBookEmpty.TotalStock > 0 ? accountBookEmpty.TotalStock : 0) : 0) + oi._OrderDetail.Quantity;
|
accountBookG2Day.TotalStock = (accountBookEmpty != null ? (accountBookEmpty.TotalStock > 0 ? accountBookEmpty.TotalStock : 0) : 0) + oi._OrderDetail.Quantity;
|
||||||
|
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
|
||||||
manuStock = accountBookG2Day.ManuStock;
|
manuStock = accountBookG2Day.ManuStock;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -610,7 +593,7 @@ namespace DM_Weight.ViewModels
|
||||||
ManuNo = cs.ManuNo,
|
ManuNo = cs.ManuNo,
|
||||||
EffDate = cs.EffDate,
|
EffDate = cs.EffDate,
|
||||||
YQuantity = 0,
|
YQuantity = 0,
|
||||||
ManuStock = nowChannels.Sum(it => it.Quantity), //oi._OrderDetail.Quantity,
|
ManuStock = manuStock > 0 ? manuStock :nowChannels.Sum(it => it.Quantity), //oi._OrderDetail.Quantity,
|
||||||
TotalStock = oi._OrderDetail.Quantity,
|
TotalStock = oi._OrderDetail.Quantity,
|
||||||
UserId1 = HomeWindowViewModel.Operator?.Id,
|
UserId1 = HomeWindowViewModel.Operator?.Id,
|
||||||
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
UserId2 = HomeWindowViewModel.Reviewer?.Id,
|
||||||
|
|
@ -686,6 +669,25 @@ namespace DM_Weight.ViewModels
|
||||||
logger.Info($"未写入总结存数据{oi._OrderDetail.DrugId}-{oi._OrderDetail.Quantity}");
|
logger.Info($"未写入总结存数据{oi._OrderDetail.DrugId}-{oi._OrderDetail.Quantity}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SqlSugarHelper.Db.Insertable(new MachineRecord()
|
||||||
|
{
|
||||||
|
MachineId = ConfigurationManager.AppSettings["dm_machineId"].ToString(),
|
||||||
|
DrawerNo = cs.DrawerNo,
|
||||||
|
ColNo = cs.ColNo,
|
||||||
|
DrugId = cs.DrugId,
|
||||||
|
ManuNo = cs.ManuNo,
|
||||||
|
EffDate = !String.IsNullOrEmpty(cs.EffDate) ? DateTime.ParseExact(cs.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||||
|
Operator = HomeWindowViewModel.Operator?.Id,
|
||||||
|
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||||
|
OperationTime = DateTime.Now,
|
||||||
|
Quantity = oi._OrderDetail.Quantity,
|
||||||
|
Type = 2,
|
||||||
|
InvoiceId = oi.OrderNo,
|
||||||
|
GetId= manuStock,
|
||||||
|
DepartmentId=$"当前库存:{nowChannels.Sum(it => it.Quantity)},空瓶数:{(accountBookEmpty != null ? (accountBookEmpty.TotalStock > 0 ? accountBookEmpty.TotalStock : 0) : 0) + oi._OrderDetail.Quantity}"
|
||||||
|
//, StockQuantity = nowChannels.Sum(it => it.Quantity)
|
||||||
|
}).ExecuteCommand();
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(empChannelStock))
|
if (!string.IsNullOrEmpty(empChannelStock))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue