添加药品明细账册、处方明细账册

This commit is contained in:
maqiao 2025-06-21 10:49:18 +08:00
parent 5269c94399
commit 95ba43ae7e
17 changed files with 1767 additions and 103 deletions

View File

@ -3,7 +3,7 @@
<connectionStrings> <connectionStrings>
<!-- 数据库连接字符串 --> <!-- 数据库连接字符串 -->
<!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />--> <!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />-->
<add name="database" connectionString="server=127.0.0.1;port=3306;database=xiangtan_xc;userid=root;password=root" /> <add name="database" connectionString="server=127.0.0.1;port=3306;database=xiangtan_mazuike_xx;userid=root;password=root" />
</connectionStrings> </connectionStrings>
<!--<runtime> <!--<runtime>
--> -->
@ -42,7 +42,7 @@
<!-- 无操作退出录像时间单位秒为0时不退出录像 --> <!-- 无操作退出录像时间单位秒为0时不退出录像 -->
<add key="stopRecord" value="180"/> <add key="stopRecord" value="180"/>
<add key="gridConnectionString" value="MYSQL; Database=xiangtan_mazuike; Password=root; Port=3306; Server=127.0.0.1; User=root;"/> <add key="gridConnectionString" value="MYSQL; Database=xiangtan_mazuike_xx; Password=root; Port=3306; Server=127.0.0.1; User=root;"/>
<!-- 查询处方是orderNo还是orderGroupNo --> <!-- 查询处方是orderNo还是orderGroupNo -->
<add key="OrderNoName" value="orderNo" /> <add key="OrderNoName" value="orderNo" />
<!-- 后门耗材板地址 没有则填写0--> <!-- 后门耗材板地址 没有则填写0-->
@ -54,7 +54,7 @@
<!-- 抽屉串口使用的协议232或者485 --> <!-- 抽屉串口使用的协议232或者485 -->
<add key="DrawerProtocol" value="485" /> <add key="DrawerProtocol" value="485" />
<!-- 抽屉串口的串口号 --> <!-- 抽屉串口的串口号 -->
<add key="DrawerPortPath" value="COM3" /> <add key="DrawerPortPath" value="COM1" />
<!-- can总线串口的串口号 --> <!-- can总线串口的串口号 -->
<add key="CanBusPortPath" value="COM11" /> <add key="CanBusPortPath" value="COM11" />
<!-- 条码枪串口的串口号 --> <!-- 条码枪串口的串口号 -->

View File

@ -98,6 +98,12 @@
<None Update="ReportTemp\account_book_temp.grf"> <None Update="ReportTemp\account_book_temp.grf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="ReportTemp\account_book_temp1.grf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ReportTemp\account_book_temp_new.grf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="ReportTemp\changeShifts_temp.grf"> <None Update="ReportTemp\changeShifts_temp.grf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>

View File

@ -365,5 +365,119 @@ namespace DM_Weight.Report
Report.PrintPreview(true); Report.PrintPreview(true);
} }
/// <summary>
/// 药品专用账册
/// </summary>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
/// <param name="type"></param>
/// <param name="drug_id"></param>
public static void PrintReportAccountBookForDrug(DateTime? startDate, DateTime? endDate, string drug_id)
{
// 定义Grid++Report报表主对象
GridppReport Report = new GridppReport();
// 加载模板文件
Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "account_book_temp1.grf");
Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
string SQL = $@" SELECT ac.create_time as operationTime, IF(ac.INVOICE_NO='日结','',ac.INVOICE_NO) invoiceNo,
ac.manu_no as manuNo,ac.eff_date as effDate,ac.add_quantity inQuantity,ac.manu_stock as manuQuantity,ac.department as dept,ac.out_quantity as outQuantity,ac.total_stock as totalQuantity,IF(ac.INVOICE_NO='',ac.INVOICE_NO,'') as rj,
di.drug_id as drugId,di.drug_name as drugName,di.drug_spec as drugSpec,di.manufactory as manufactory,di.big_unit as bigUnit,u1.user_name as operatorName,u2.user_name as reviewerName,db.baseQuantity
FROM account_book_g2 ac left join drug_info di on ac.drug_id=di.drug_id left join user_list u1 on ac.user_id1=u1.id left join user_list u2 on ac.user_id2=u2.id LEFT JOIN DRUG_BASE db on di.drug_id=db.drugid and db.machine_id='{p_machine_id}'
WHERE ac.machine_id='{p_machine_id}' and create_time>'{p_startDate}' AND create_time<'{p_endDate}' AND TYPE IN(1,2,3) ";
if (!string.IsNullOrEmpty(drug_id))
{
SQL += " AND ac.drug_id='" + drug_id + "' ";
}
//if (type > 0)
//{
// if (type == 1)
// {
// SQL += " WHERE AddQuantity>0 ";
// }
// if (type == 2)
// {
// SQL += " WHERE OutQuantity>0 ";
// }
// if (type == 3)
// {
// SQL += " WHERE type=3 ";
// }
// if (type == 4)
// {
// SQL += " WHERE type=4 ";
// }
//}
SQL += " ORDER BY di.drug_id,ac.create_time";
Report.DetailGrid.Recordset.QuerySQL = SQL;
Report.PrintPreview(true);
//string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "account_book_temp.pdf";
//if (File.Exists(filePath))
//{
// try
// {
// File.Delete(filePath);
// }
// catch (Exception ex)
// {
// FindAndKillProcess();
// }
//}
//Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
}
/// <summary>
/// 处方专用账册
/// </summary>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
/// <param name="type"></param>
/// <param name="drug_id"></param>
public static void PrintReportAccountBookForOrder(DateTime? startDate, DateTime? endDate, string drug_id)
{
// 定义Grid++Report报表主对象
GridppReport Report = new GridppReport();
// 加载模板文件
Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "account_book_temp_new.grf");
Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
string SQL = $@" SELECT ac.create_time as operationTime, ac.manu_no as manuNo,
ac.eff_date as effDate,ac.department as dept,oi.p_name as pName,oi.sex as sex,oi.age as age,oi.id_number as idNumber,
oi.patient_no as zyh,'' mkh,oi.disease as disease,ac.out_quantity as outQuantity,'' ftph,oi.doctor_name as doctorName,oi.order_no as orderNo,'' kptjr,
di.drug_id as drugId,di.drug_name as drugName,di.drug_spec as drugSpec,di.big_unit AS bigUnit,u1.user_name as operatorName,u2.user_name as reviewerName,db.baseQuantity
FROM account_book_g2 ac inner join order_info oi on ac.invoice_no=oi.order_no left join drug_info di on ac.drug_id=di.drug_id left join drug_base db on di.drug_id=db.DrugId and db.machine_id='DM1'
left join user_list u1 on ac.user_id1=u1.id left join user_list u2 on ac.user_id2=u2.id
WHERE ac.machine_id='{p_machine_id}' and create_time>'{p_startDate}' AND create_time<'{p_endDate}' ";
if (!string.IsNullOrEmpty(drug_id))
{
SQL += " AND ac.drug_id='" + drug_id + "' ";
}
SQL += " ORDER BY di.drug_id,ac.create_time desc";
Report.DetailGrid.Recordset.QuerySQL = SQL;
Report.PrintPreview(true);
//string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "account_book_temp.pdf";
//if (File.Exists(filePath))
//{
// try
// {
// File.Delete(filePath);
// }
// catch (Exception ex)
// {
// FindAndKillProcess();
// }
//}
//Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
}
} }
} }

View File

@ -0,0 +1,647 @@
{
"Version":"6.8.1.1",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Oriention":"Landscape",
"LeftMargin":1,
"TopMargin":1.42875,
"RightMargin":1,
"BottomMargin":1.8
},
"DetailGrid":{
"CenterView":true,
"AppendBlankRow":true,
"Recordset":{
"Field":[
{
"Name":"日期",
"Type":"DateTime",
"Format":"yy/MM/dd HH:mm:ss",
"DBFieldName":"operationTime"
},
{
"Name":"凭证号",
"DBFieldName":"invoiceNo"
},
{
"Name":"批号",
"DBFieldName":"manuNo"
},
{
"Name":"有效期",
"Type":"DateTime",
"Format":"yy/M/d",
"DBFieldName":"effDate"
},
{
"Name":"厂家",
"DBFieldName":"manufactory"
},
{
"Name":"日结",
"DBFieldName":"rj"
},
{
"Name":"领入",
"Type":"Integer",
"DBFieldName":"inQuantity"
},
{
"Name":"科室",
"DBFieldName":"dept"
},
{
"Name":"发出",
"Type":"Integer",
"DBFieldName":"outQuantity"
},
{
"Name":"批号结存",
"Type":"Integer",
"DBFieldName":"manuQuantity"
},
{
"Name":"总结存",
"Type":"Integer",
"DBFieldName":"totalQuantity"
},
{
"Name":"发药人",
"DBFieldName":"operatorName"
},
{
"Name":"复核人",
"DBFieldName":"reviewerName"
},
{
"Name":"药品名称",
"DBFieldName":"drugName"
},
{
"Name":"规格",
"DBFieldName":"drugSpec"
},
{
"Name":"单位",
"DBFieldName":"bigUnit"
},
{
"Name":"基数",
"DBFieldName":"baseQuantity"
},
{
"Name":"drugId"
}
]
},
"Column":[
{
"Name":"日期",
"Width":1.77271
},
{
"Name":"凭证号",
"Width":2.80458
},
{
"Name":"批号",
"Width":3.99521
},
{
"Name":"有效期",
"Width":2.43417
},
{
"Name":"生产厂家"
},
{
"Name":"日结",
"Width":0.978958
},
{
"Name":"领入",
"Width":0.79375
},
{
"Name":"科室"
},
{
"Name":"发出",
"Width":0.820208
},
{
"Name":"批号结存",
"Width":1.19063
},
{
"Name":"总结存",
"Width":1.00542
},
{
"Name":"发药人",
"Width":1.40229
},
{
"Name":"复核人",
"Width":1.40229
}
],
"ColumnContent":{
"Height":0.85,
"ColumnContentCell":[
{
"Column":"日期",
"WordWrap":true,
"TextAlign":"MiddleCenter",
"ShrinkFontToFit":true,
"DataField":"日期"
},
{
"Column":"凭证号",
"TextAlign":"MiddleCenter",
"DataField":"凭证号"
},
{
"Column":"批号",
"TextAlign":"MiddleCenter",
"DataField":"批号"
},
{
"Column":"有效期",
"TextAlign":"MiddleCenter",
"DataField":"有效期"
},
{
"Column":"生产厂家",
"TextAlign":"MiddleCenter",
"DataField":"厂家"
},
{
"Column":"日结",
"TextAlign":"MiddleCenter",
"DataField":"日结"
},
{
"Column":"领入",
"TextAlign":"MiddleCenter",
"DataField":"领入"
},
{
"Column":"科室",
"TextAlign":"MiddleCenter",
"DataField":"科室"
},
{
"Column":"发出",
"TextAlign":"MiddleCenter",
"DataField":"发出"
},
{
"Column":"批号结存",
"TextAlign":"MiddleCenter",
"DataField":"批号结存"
},
{
"Column":"总结存",
"TextAlign":"MiddleCenter",
"DataField":"总结存"
},
{
"Column":"发药人",
"FreeCell":true,
"Control":[
{
"Type":"FieldBox",
"Name":"FieldBox12",
"Dock":"Fill",
"TextAlign":"MiddleCenter",
"DataField":"发药人"
}
]
},
{
"Column":"复核人",
"FreeCell":true,
"Control":[
{
"Type":"FieldBox",
"Name":"FieldBox13",
"Dock":"Fill",
"TextAlign":"MiddleCenter",
"DataField":"复核人"
}
]
}
]
},
"ColumnTitle":{
"Height":1.19063,
"RepeatStyle":"OnGroupHeaderPage",
"ColumnTitleCell":[
{
"GroupTitle":false,
"Column":"日期",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"日期"
},
{
"GroupTitle":false,
"Column":"凭证号",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"凭证号"
},
{
"GroupTitle":false,
"Column":"批号",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"批号"
},
{
"GroupTitle":false,
"Column":"有效期",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"有效期"
},
{
"GroupTitle":false,
"Column":"生产厂家",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"生产厂家"
},
{
"GroupTitle":false,
"Column":"日结",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"日结"
},
{
"GroupTitle":false,
"Column":"领入",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"领入"
},
{
"GroupTitle":false,
"Column":"科室",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"科室"
},
{
"GroupTitle":false,
"Column":"发出",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"发出"
},
{
"GroupTitle":false,
"Column":"批号结存",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"批号结\r\n存"
},
{
"GroupTitle":false,
"Column":"总结存",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"总结\r\n存"
},
{
"GroupTitle":false,
"Column":"发药人",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"FreeCell":true,
"Control":[
{
"Type":"StaticBox",
"Name":"日结人",
"Top":0.61,
"Width":1.40229,
"Height":0.5,
"TextAlign":"MiddleCenter",
"Text":"日结人"
},
{
"Type":"StaticBox",
"Name":"发药人",
"Width":1.40229,
"Height":0.582083,
"Border":{
"Styles":"[DrawBottom]"
},
"TextAlign":"MiddleCenter",
"Text":"发药人"
}
]
},
{
"GroupTitle":false,
"Column":"复核人",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"FreeCell":true,
"Control":[
{
"Type":"StaticBox",
"Name":"复核人",
"Width":1.40229,
"Height":0.58,
"Border":{
"Styles":"[DrawBottom]"
},
"TextAlign":"MiddleCenter",
"Text":"复核人"
},
{
"Type":"StaticBox",
"Name":"交接人",
"Top":0.608542,
"Width":1.5875,
"Height":0.5,
"TextAlign":"MiddleCenter",
"Text":"交接人"
}
]
}
]
},
"Group":[
{
"Name":"Group1",
"ByFields":"drugId",
"GroupHeader":{
"NewPage":"Before",
"PrintGridBorder":false,
"RepeatOnPage":true,
"Control":[
{
"Type":"StaticBox",
"Name":"StaticBox16",
"Top":0.0529167,
"Width":2.19604,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"药品名称:"
},
{
"Type":"FieldBox",
"Name":"FieldBox7",
"Left":2.40771,
"Width":5.63563,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"药品名称"
},
{
"Type":"StaticBox",
"Name":"StaticBox17",
"Left":8.91646,
"Top":0.079375,
"Width":1.11125,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"规格:"
},
{
"Type":"FieldBox",
"Name":"FieldBox8",
"Left":10.0013,
"Top":0.079375,
"Width":1.79917,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"规格"
},
{
"Type":"StaticBox",
"Name":"StaticBox18",
"Left":12.6471,
"Top":0.079375,
"Width":1.21708,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"单位:"
},
{
"Type":"FieldBox",
"Name":"FieldBox9",
"Left":13.8377,
"Top":0.079375,
"Width":1.87854,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"单位"
},
{
"Type":"StaticBox",
"Name":"StaticBox20",
"Left":16.3513,
"Top":0.079375,
"Width":2.01083,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"基数:"
},
{
"Type":"FieldBox",
"Name":"FieldBox11",
"Left":18.3356,
"Width":1.905,
"Height":1.00542,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"基数"
},
{
"Type":"StaticBox",
"Name":"药品ID",
"Left":20.7698,
"Top":0.238125,
"Width":1.79917,
"Height":0.608542,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"药品ID"
},
{
"Type":"FieldBox",
"Name":"FieldBox14",
"Left":22.569,
"Top":0.238125,
"Width":1.79917,
"Height":0.608542,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"drugId"
}
],
"NewPageColumn":"Before"
},
"GroupFooter":{
"Visible":false
}
}
]
},
"Parameter":[
{
"Name":"machine_id"
},
{
"Name":"startDate",
"DataType":"DateTime"
},
{
"Name":"endDate",
"DataType":"DateTime"
}
],
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":1.79917,
"Control":[
{
"Type":"MemoBox",
"Name":"MemoBox1",
"Dock":"Fill",
"Center":"Both",
"Font":{
"Name":"宋体",
"Size":262500,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"湘谭县人民医院麻醉药品、精神药品专用账本(急诊药房)"
}
],
"RepeatOnPage":true
}
]
}

View File

@ -0,0 +1,751 @@
{
"Version":"6.8.1.1",
"Font":{
"Name":"宋体",
"Size":105000,
"Weight":400,
"Charset":134
},
"Printer":{
"Oriention":"Landscape",
"LeftMargin":1,
"TopMargin":1.4287,
"RightMargin":1,
"BottomMargin":1.8
},
"DetailGrid":{
"CenterView":true,
"AppendBlankRow":true,
"Recordset":{
"Field":[
{
"Name":"日期",
"Type":"DateTime",
"Format":"yyyy/MM/dd HH:mm:ss",
"DBFieldName":"operationTime"
},
{
"Name":"药品名称",
"DBFieldName":"drugName"
},
{
"Name":"规格",
"DBFieldName":"drugSpec"
},
{
"Name":"单位",
"DBFieldName":"bigUnit"
},
{
"Name":"基数",
"DBFieldName":"baseQuantity"
},
{
"Name":"批号",
"DBFieldName":"manuNo"
},
{
"Name":"有效期",
"Type":"DateTime",
"Format":"yy/M/d",
"DBFieldName":"effDate"
},
{
"Name":"科室",
"DBFieldName":"dept"
},
{
"Name":"患者姓名",
"DBFieldName":"pName"
},
{
"Name":"性别",
"DBFieldName":"sex"
},
{
"Name":"年龄",
"DBFieldName":"age"
},
{
"Name":"身份证号",
"DBFieldName":"idNumber"
},
{
"Name":"住院号",
"DBFieldName":"zyh"
},
{
"Name":"麻卡号",
"DBFieldName":"mkh"
},
{
"Name":"疾病名称",
"DBFieldName":"disease"
},
{
"Name":"数量",
"DBFieldName":"outQuantity"
},
{
"Name":"废贴批号",
"DBFieldName":"ftph"
},
{
"Name":"医师",
"DBFieldName":"doctorName"
},
{
"Name":"处方编号",
"DBFieldName":"orderNo"
},
{
"Name":"空瓶提交人",
"DBFieldName":"kptjr"
},
{
"Name":"空瓶回收人",
"DBFieldName":"operatorName"
},
{
"Name":"空瓶毁形人",
"DBFieldName":"reviewerName"
},
{
"Name":"药品ID",
"DBFieldName":"drugId"
}
]
},
"Column":[
{
"Name":"日期",
"Width":1.77271
},
{
"Name":"批号",
"Width":2.01083
},
{
"Name":"效期",
"Width":1.61396
},
{
"Name":"科室"
},
{
"Name":"患者姓名",
"Width":1.5875
},
{
"Name":"性别",
"Width":1.40229
},
{
"Name":"年龄",
"Width":1.40229
},
{
"Name":"身份证号"
},
{
"Name":"门诊/住院号"
},
{
"Name":"专用病历号(麻卡号)"
},
{
"Name":"疾病名称"
},
{
"Name":"数量",
"Width":1.05833
},
{
"Name":"回收空瓶废贴批号"
},
{
"Name":"医师",
"Width":1.79917
},
{
"Name":"处方编号"
},
{
"Name":"空瓶提交人",
"Width":1.82563
},
{
"Name":"空瓶回收人",
"Width":1.37583
},
{
"Name":"空瓶毁形人",
"Width":1.79917
}
],
"ColumnContent":{
"Height":0.85,
"ColumnContentCell":[
{
"Column":"日期",
"WordWrap":true,
"TextAlign":"MiddleCenter",
"ShrinkFontToFit":true,
"DataField":"日期"
},
{
"Column":"批号",
"TextAlign":"MiddleCenter",
"DataField":"批号"
},
{
"Column":"效期",
"TextAlign":"MiddleCenter",
"DataField":"有效期"
},
{
"Column":"科室",
"TextAlign":"MiddleCenter",
"DataField":"科室"
},
{
"Column":"患者姓名",
"TextAlign":"MiddleCenter",
"DataField":"患者姓名"
},
{
"Column":"性别",
"TextAlign":"MiddleCenter",
"DataField":"性别"
},
{
"Column":"年龄",
"TextAlign":"MiddleCenter",
"DataField":"年龄"
},
{
"Column":"身份证号",
"TextAlign":"MiddleCenter",
"DataField":"身份证号"
},
{
"Column":"门诊/住院号",
"TextAlign":"MiddleCenter",
"DataField":"住院号"
},
{
"Column":"专用病历号(麻卡号)",
"TextAlign":"MiddleCenter",
"DataField":"麻卡号"
},
{
"Column":"疾病名称",
"TextAlign":"MiddleCenter",
"DataField":"疾病名称"
},
{
"Column":"数量",
"TextAlign":"MiddleCenter",
"DataField":"数量"
},
{
"Column":"回收空瓶废贴批号",
"TextAlign":"MiddleCenter",
"DataField":"废贴批号"
},
{
"Column":"医师",
"TextAlign":"MiddleCenter",
"DataField":"医师"
},
{
"Column":"处方编号",
"TextAlign":"MiddleCenter",
"DataField":"处方编号"
},
{
"Column":"空瓶提交人",
"TextAlign":"MiddleCenter",
"DataField":"空瓶提交人"
},
{
"Column":"空瓶回收人",
"TextAlign":"MiddleCenter",
"DataField":"空瓶回收人"
},
{
"Column":"空瓶毁形人",
"TextAlign":"MiddleCenter",
"DataField":"空瓶毁形人"
}
]
},
"ColumnTitle":{
"Height":1.19063,
"RepeatStyle":"OnGroupHeaderPage",
"ColumnTitleCell":[
{
"GroupTitle":false,
"Column":"日期",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"日期"
},
{
"GroupTitle":false,
"Column":"批号",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"批号"
},
{
"GroupTitle":false,
"Column":"效期",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"效期"
},
{
"GroupTitle":false,
"Column":"科室",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"科室"
},
{
"GroupTitle":false,
"Column":"患者姓名",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"患者姓\r\n名"
},
{
"GroupTitle":false,
"Column":"性别",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"性别"
},
{
"GroupTitle":false,
"Column":"年龄",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"年龄"
},
{
"GroupTitle":false,
"Column":"身份证号",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"身份证号"
},
{
"GroupTitle":false,
"Column":"门诊/住院号",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"门诊/住院\r\n号"
},
{
"GroupTitle":false,
"Column":"专用病历号(麻卡号)",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"专用病历\r\n号麻卡\r\n号"
},
{
"GroupTitle":false,
"Column":"疾病名称",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"疾病名称"
},
{
"GroupTitle":false,
"Column":"数量",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"数量"
},
{
"GroupTitle":false,
"Column":"回收空瓶废贴批号",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"回收空\r\n瓶废贴\r\n批号"
},
{
"GroupTitle":false,
"Column":"医师",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"医师"
},
{
"GroupTitle":false,
"Column":"处方编号",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"处方编号"
},
{
"GroupTitle":false,
"Column":"空瓶提交人",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"空瓶提\r\n交人"
},
{
"GroupTitle":false,
"Column":"空瓶回收人",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"FreeCell":true,
"Control":[
{
"Type":"StaticBox",
"Name":"发药人",
"Width":1.5,
"Height":0.5,
"Border":{
"Styles":"[DrawBottom]"
},
"TextAlign":"MiddleCenter",
"Text":"发药人"
},
{
"Type":"StaticBox",
"Name":"StaticBox21",
"Top":0.5,
"Width":1.5875,
"Height":0.582083,
"TextAlign":"MiddleCenter",
"Text":"空瓶回\r\n收人"
}
]
},
{
"GroupTitle":false,
"Column":"空瓶毁形人",
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"FreeCell":true,
"Control":[
{
"Type":"StaticBox",
"Name":"复核人",
"Width":1.5,
"Height":0.5,
"Border":{
"Styles":"[DrawBottom]"
},
"TextAlign":"MiddleCenter",
"Text":"复核人"
},
{
"Type":"StaticBox",
"Name":"StaticBox22",
"Top":0.5,
"Width":1.5875,
"Height":0.687917,
"TextAlign":"MiddleCenter",
"Text":"空瓶毁\r\n形人"
}
]
}
]
},
"Group":[
{
"Name":"Group1",
"ByFields":"药品ID",
"GroupHeader":{
"NewPage":"Before",
"PrintGridBorder":false,
"RepeatOnPage":true,
"Control":[
{
"Type":"StaticBox",
"Name":"StaticBox16",
"Left":1.08479,
"Top":0.079375,
"Width":2.19604,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"药品名称:"
},
{
"Type":"FieldBox",
"Name":"FieldBox7",
"Left":3.4925,
"Top":0.079375,
"Width":4.78896,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"药品名称"
},
{
"Type":"StaticBox",
"Name":"StaticBox17",
"Left":10.2658,
"Top":0.0794,
"Width":1.11125,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"规格:"
},
{
"Type":"FieldBox",
"Name":"FieldBox8",
"Left":11.3506,
"Top":0.0794,
"Width":3.175,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"规格"
},
{
"Type":"StaticBox",
"Name":"StaticBox18",
"Left":14.7902,
"Top":0.0794,
"Width":1.21708,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"单位:"
},
{
"Type":"FieldBox",
"Name":"FieldBox9",
"Left":15.9808,
"Top":0.0794,
"Width":1.87854,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"单位"
},
{
"Type":"StaticBox",
"Name":"StaticBox19",
"Left":19.1558,
"Top":0.0794,
"Width":1.16417,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"基数:"
},
{
"Type":"FieldBox",
"Name":"FieldBox10",
"Left":20.2935,
"Top":0.0794,
"Width":1.74625,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"基数"
},
{
"Type":"StaticBox",
"Name":"StaticBox20",
"Left":22.4102,
"Top":0.0794,
"Width":2.01083,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"Text":"药品ID"
},
{
"Type":"FieldBox",
"Name":"FieldBox11",
"Left":24.3946,
"Top":0.0794,
"Width":3.01625,
"Height":0.978958,
"Font":{
"Name":"宋体",
"Size":105000,
"Bold":true,
"Charset":134
},
"DataField":"药品ID"
}
],
"NewPageColumn":"Before"
},
"GroupFooter":{
"Visible":false
}
}
]
},
"Parameter":[
{
"Name":"machine_id"
},
{
"Name":"startDate",
"DataType":"DateTime"
},
{
"Name":"endDate",
"DataType":"DateTime"
}
],
"ReportHeader":[
{
"Name":"ReportHeader1",
"Height":1.79917,
"Control":[
{
"Type":"MemoBox",
"Name":"MemoBox1",
"Dock":"Fill",
"Center":"Both",
"Font":{
"Name":"宋体",
"Size":262500,
"Bold":true,
"Charset":134
},
"TextAlign":"MiddleCenter",
"Text":"湘潭县人民医院麻醉药品、精神药品处方专册登记(急诊药房)"
}
],
"RepeatOnPage":true
}
]
}

View File

@ -347,5 +347,28 @@ namespace DM_Weight.ViewModels
return accountList; return accountList;
} }
/// <summary>
/// 导出药品专用账册
/// </summary>
public DelegateCommand DownloadAccountBookForDrug
{
get => new DelegateCommand(() =>
{
GridReportUtil.PrintReportAccountBookForDrug(StartDate, EndDate, DrugInfo == null ? "" : DrugInfo.DrugId.ToString() ?? "");
});
}
/// <summary>
/// 导出处方专用账册
/// </summary>
public DelegateCommand DownloadAccountBookForOrder
{
get => new DelegateCommand(() =>
{
GridReportUtil.PrintReportAccountBookForOrder(StartDate, EndDate, DrugInfo == null ? "" : DrugInfo.DrugId.ToString() ?? "");
});
}
} }
} }

View File

@ -623,6 +623,7 @@ namespace DM_Weight.ViewModels
.Where(cs => cs.DrawerType == 1) .Where(cs => cs.DrawerType == 1)
.ToList(); .ToList();
// 保存数据 出/入库记录 // 保存数据 出/入库记录
SqlSugarHelper.Db.Insertable(new MachineRecord() SqlSugarHelper.Db.Insertable(new MachineRecord()
{ {
@ -663,7 +664,9 @@ namespace DM_Weight.ViewModels
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now, CreateTime = DateTime.Now,
InvoiceNo = SelectDrugPleaseClaim.PleaseNo InvoiceNo = SelectDrugPleaseClaim.PleaseNo,
TotalStock = nowChannels.Sum(itx => itx.Quantity),
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存与总结存数据 //修改凌晨生成的日结存与总结存数据
@ -675,7 +678,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.AddQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.AddQuantity;
accountBookG2Day.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock=nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -688,13 +693,15 @@ namespace DM_Weight.ViewModels
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.AddQuantity,
TotalStock = it.AddQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
TotalStock = nowChannels.Sum(itx => itx.Quantity),
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
AddQuantity = it.AddQuantity,
Department= dept
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -709,7 +716,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock + it.AddQuantity; accountBookG2Total.AddQuantity = accountBookG2Total.AddQuantity + it.AddQuantity;
accountBookG2Total.TotalStock = nowChannels.Sum(itx => itx.Quantity);
accountBookG2Total.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -720,13 +729,15 @@ namespace DM_Weight.ViewModels
DrugId = it.DrugId, DrugId = it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.AddQuantity,
TotalStock = it.AddQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department= dept,
AddQuantity = it.AddQuantity,
ManuStock=nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx => itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -232,7 +232,7 @@ namespace DM_Weight.ViewModels
OperationTime = DateTime.Now, OperationTime = DateTime.Now,
Quantity = it.AddQuantity, Quantity = it.AddQuantity,
Type = 1, Type = 1,
InvoiceId = InvoiceId InvoiceId = InvoiceId,
//,StockQuantity = nowChannels.Sum(it => it.Quantity) //,StockQuantity = nowChannels.Sum(it => it.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
@ -251,8 +251,9 @@ namespace DM_Weight.ViewModels
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now CreateTime = DateTime.Now,
TotalStock = nowChannels.Sum(itx => itx.Quantity),
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存数据 //修改凌晨生成的日结存数据
AccountBookG2 accountBookG2Day = SqlSugarHelper.Db.Queryable<AccountBookG2>() AccountBookG2 accountBookG2Day = SqlSugarHelper.Db.Queryable<AccountBookG2>()
@ -263,7 +264,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.AddQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.AddQuantity;
accountBookG2Day.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock = nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
@ -277,13 +280,15 @@ namespace DM_Weight.ViewModels
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.AddQuantity, AddQuantity = it.AddQuantity,
TotalStock = it.AddQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
ManuStock= nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -298,7 +303,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock + it.AddQuantity; accountBookG2Total.AddQuantity = accountBookG2Total.AddQuantity + it.AddQuantity;
accountBookG2Total.ManuStock =nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.TotalStock = nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -309,13 +316,15 @@ namespace DM_Weight.ViewModels
DrugId = it.DrugId, DrugId = it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.AddQuantity, AddQuantity = it.AddQuantity,
TotalStock = it.AddQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -250,7 +250,9 @@ namespace DM_Weight.ViewModels
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now CreateTime = DateTime.Now,
TotalStock = nowChannels.Sum(itx => itx.Quantity),
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存数据 //修改凌晨生成的日结存数据
@ -262,7 +264,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - it.TakeQuantity; accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + it.TakeQuantity;
accountBookG2Day.ManuStock =nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock = nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -272,16 +276,18 @@ namespace DM_Weight.ViewModels
{ {
DrugId =it.DrugId, DrugId =it.DrugId,
Type = 3, Type = 3,
Department = ConfigurationManager.AppSettings["department"].ToString(),
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.TakeQuantity,
TotalStock = it.TakeQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
OutQuantity=it.TakeQuantity,
TotalStock = nowChannels.Sum(itx => itx.Quantity),
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -296,7 +302,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock - it.TakeQuantity; accountBookG2Total.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.OutQuantity = accountBookG2Total.OutQuantity + it.TakeQuantity;
accountBookG2Total.TotalStock = nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -307,13 +315,15 @@ namespace DM_Weight.ViewModels
DrugId =it.DrugId, DrugId =it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.TakeQuantity, OutQuantity=it.TakeQuantity,
TotalStock = it.TakeQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department= ConfigurationManager.AppSettings["department"].ToString(),
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -294,8 +294,9 @@ namespace DM_Weight.ViewModels
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now CreateTime = DateTime.Now,
ManuStock=nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock=nowChannels.Sum(itx=>itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存数据 //修改凌晨生成的日结存数据
AccountBookG2 accountBookG2Day = SqlSugarHelper.Db.Queryable<AccountBookG2>() AccountBookG2 accountBookG2Day = SqlSugarHelper.Db.Queryable<AccountBookG2>()
@ -306,7 +307,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.AddQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.AddQuantity;
accountBookG2Day.ManuStock =nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock = nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -319,13 +322,16 @@ namespace DM_Weight.ViewModels
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.AddQuantity, AddQuantity = it.AddQuantity,
TotalStock = it.AddQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
ManuStock =nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -340,7 +346,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock + it.AddQuantity; accountBookG2Total.AddQuantity = accountBookG2Total.AddQuantity + it.AddQuantity;
accountBookG2Total.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.TotalStock =nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -351,13 +359,16 @@ namespace DM_Weight.ViewModels
DrugId = it.DrugId, DrugId = it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.AddQuantity,
TotalStock = it.AddQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
AddQuantity=it.AddQuantity,
ManuStock =nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -357,7 +357,9 @@ namespace DM_Weight.ViewModels
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now CreateTime = DateTime.Now,
ManuStock=nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock=nowChannels.Sum(itx=>itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存数据 //修改凌晨生成的日结存数据
@ -369,7 +371,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - it.TakeQuantity; accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + it.TakeQuantity;
accountBookG2Day.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock = nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -382,13 +386,16 @@ namespace DM_Weight.ViewModels
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.TakeQuantity,
TotalStock = it.TakeQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
OutQuantity = it.TakeQuantity,
ManuStock =nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -403,7 +410,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock - it.TakeQuantity; accountBookG2Total.OutQuantity = accountBookG2Total.OutQuantity + it.TakeQuantity;
accountBookG2Total.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.TotalStock = nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -414,13 +423,15 @@ namespace DM_Weight.ViewModels
DrugId = it.DrugId, DrugId = it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.TakeQuantity,
TotalStock = it.TakeQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
OutQuantity = it.TakeQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock =nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -352,7 +352,9 @@ namespace DM_Weight.ViewModels
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now CreateTime = DateTime.Now,
ManuStock=nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock=nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存数据 //修改凌晨生成的日结存数据
@ -364,7 +366,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.ReturnQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.ReturnQuantity;
accountBookG2Day.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock = nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -377,13 +381,15 @@ namespace DM_Weight.ViewModels
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.ReturnQuantity,
TotalStock = it.ReturnQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
AddQuantity = it.ReturnQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -398,7 +404,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock + it.ReturnQuantity; accountBookG2Total.AddQuantity = accountBookG2Total.AddQuantity + it.ReturnQuantity;
accountBookG2Total.ManuStock=nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.TotalStock = nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -409,13 +417,15 @@ namespace DM_Weight.ViewModels
DrugId = it.DrugId, DrugId = it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.ReturnQuantity,
TotalStock = it.ReturnQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
AddQuantity=it.ReturnQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx => itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -374,7 +374,9 @@ namespace DM_Weight.ViewModels
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate=DateTime.Now.ToString("yyyy-MM-dd"), CreateDate=DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now, CreateTime = DateTime.Now,
InvoiceNo=OrderInfo.OrderNo InvoiceNo=OrderInfo.OrderNo,
ManuStock=nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock=nowChannels.Sum(itx=>itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存与总结存数据 //修改凌晨生成的日结存与总结存数据
@ -386,7 +388,9 @@ namespace DM_Weight.ViewModels
.Where(ab=>ab.CreateDate==DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab=>ab.CreateDate==DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - it.TakeQuantity; accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + it.TakeQuantity;
accountBookG2Day.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock=nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -399,13 +403,16 @@ namespace DM_Weight.ViewModels
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.TakeQuantity,
TotalStock = it.TakeQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
Department=OrderInfo.DeptName,
OutQuantity=it.TakeQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -420,7 +427,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock - it.TakeQuantity; accountBookG2Total.OutQuantity = accountBookG2Total.OutQuantity + it.TakeQuantity;
accountBookG2Total.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.TotalStock = nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -431,13 +440,16 @@ namespace DM_Weight.ViewModels
DrugId = it.DrugId, DrugId = it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.TakeQuantity,
TotalStock = it.TakeQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department=OrderInfo.DeptName,
OutQuantity = it.TakeQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -283,8 +283,9 @@ namespace DM_Weight.ViewModels
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now CreateTime = DateTime.Now,
TotalStock=nowChannels.Sum(itx=>itx.Quantity),
ManuStock=nowChannels.Where(itx => itx.ManuNo == ChannelStock.ManuNo && itx.EffDate == ChannelStock.EffDate).Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存数据 //修改凌晨生成的日结存数据
AccountBookG2 accountBookG2Day = SqlSugarHelper.Db.Queryable<AccountBookG2>() AccountBookG2 accountBookG2Day = SqlSugarHelper.Db.Queryable<AccountBookG2>()
@ -295,7 +296,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + ChannelStock.ReturnQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + ChannelStock.ReturnQuantity;
accountBookG2Day.ManuStock = nowChannels.Where(itx => itx.ManuNo == ChannelStock.ManuNo && itx.EffDate == ChannelStock.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock = nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -308,13 +311,15 @@ namespace DM_Weight.ViewModels
ManuNo = ChannelStock.ManuNo, ManuNo = ChannelStock.ManuNo,
EffDate = ChannelStock.EffDate, EffDate = ChannelStock.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = ChannelStock.ReturnQuantity,
TotalStock = ChannelStock.ReturnQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
AddQuantity = ChannelStock.ReturnQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == ChannelStock.ManuNo && itx.EffDate == ChannelStock.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -329,7 +334,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock + ChannelStock.ReturnQuantity; accountBookG2Total.AddQuantity = accountBookG2Total.AddQuantity + ChannelStock.ReturnQuantity;
accountBookG2Total.ManuStock = nowChannels.Where(itx => itx.ManuNo == ChannelStock.ManuNo && itx.EffDate == ChannelStock.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.TotalStock = nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -340,13 +347,15 @@ namespace DM_Weight.ViewModels
DrugId = ChannelStock.DrugId, DrugId = ChannelStock.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = ChannelStock.ReturnQuantity,
TotalStock = ChannelStock.ReturnQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
AddQuantity = ChannelStock.ReturnQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == ChannelStock.ManuNo && itx.EffDate == ChannelStock.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -283,7 +283,9 @@ namespace DM_Weight.ViewModels
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now CreateTime = DateTime.Now,
ManuStock=nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存数据 //修改凌晨生成的日结存数据
@ -295,8 +297,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock + it.AddQuantity; accountBookG2Day.AddQuantity = accountBookG2Day.AddQuantity + it.AddQuantity;
accountBookG2Day.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock=nowChannels.Sum(itx => itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -309,13 +312,16 @@ namespace DM_Weight.ViewModels
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.AddQuantity,
TotalStock = it.AddQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
AddQuantity = it.AddQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -331,7 +337,9 @@ namespace DM_Weight.ViewModels
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock + it.AddQuantity; accountBookG2Total.AddQuantity=accountBookG2Total.AddQuantity + it.AddQuantity;
accountBookG2Total.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.TotalStock = nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -342,13 +350,15 @@ namespace DM_Weight.ViewModels
DrugId = it.DrugId, DrugId = it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.AddQuantity,
TotalStock = it.AddQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
AddQuantity = it.AddQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -260,7 +260,9 @@ namespace DM_Weight.ViewModels
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
CreateTime = DateTime.Now CreateTime = DateTime.Now,
ManuStock=nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx => itx.Quantity)
}).ExecuteCommand(); }).ExecuteCommand();
//修改凌晨生成的日结存数据 //修改凌晨生成的日结存数据
@ -272,8 +274,9 @@ namespace DM_Weight.ViewModels
.Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First(); .Where(ab => ab.CreateDate == DateTime.Now.ToString("yyyy-MM-dd")).First();
if (accountBookG2Day != null) if (accountBookG2Day != null)
{ {
accountBookG2Day.ManuStock = accountBookG2Day.ManuStock - it.TakeQuantity; accountBookG2Day.OutQuantity = accountBookG2Day.OutQuantity + it.TakeQuantity;
accountBookG2Day.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Day.TotalStock=nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Day).ExecuteCommand();
} }
else else
@ -286,13 +289,16 @@ namespace DM_Weight.ViewModels
ManuNo = it.ManuNo, ManuNo = it.ManuNo,
EffDate = it.EffDate, EffDate = it.EffDate,
YQuantity = 0, YQuantity = 0,
ManuStock = it.TakeQuantity,
TotalStock = it.TakeQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "日结存" InvoiceNo = "日结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
OutQuantity = it.TakeQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iDayResult <= 0) if (iDayResult <= 0)
{ {
@ -308,7 +314,9 @@ namespace DM_Weight.ViewModels
if (accountBookG2Total != null) if (accountBookG2Total != null)
{ {
accountBookG2Total.TotalStock = accountBookG2Total.TotalStock - it.TakeQuantity; accountBookG2Total.OutQuantity = accountBookG2Total.OutQuantity + it.TakeQuantity;
accountBookG2Total.ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity);
accountBookG2Total.TotalStock = nowChannels.Sum(itx=>itx.Quantity);
SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand(); SqlSugarHelper.Db.Updateable(accountBookG2Total).ExecuteCommand();
} }
else else
@ -319,13 +327,15 @@ namespace DM_Weight.ViewModels
DrugId = it.DrugId, DrugId = it.DrugId,
Type = 4, Type = 4,
YQuantity = 0, YQuantity = 0,
ManuStock = it.TakeQuantity,
TotalStock = it.TakeQuantity,
UserId1 = HomeWindowViewModel.Operator?.Id, UserId1 = HomeWindowViewModel.Operator?.Id,
UserId2 = HomeWindowViewModel.Reviewer?.Id, UserId2 = HomeWindowViewModel.Reviewer?.Id,
MachineId = ConfigurationManager.AppSettings["machineId"].ToString(), MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
CreateDate = DateTime.Now.ToString("yyyy-MM-dd"), CreateDate = DateTime.Now.ToString("yyyy-MM-dd"),
InvoiceNo = "总结存" InvoiceNo = "总结存",
Department = ConfigurationManager.AppSettings["department"].ToString(),
OutQuantity = it.TakeQuantity,
ManuStock = nowChannels.Where(itx => itx.ManuNo == it.ManuNo && itx.EffDate == it.EffDate).Sum(itx => itx.Quantity),
TotalStock = nowChannels.Sum(itx=>itx.Quantity),
}).ExecuteCommand(); }).ExecuteCommand();
if (iTotalResult <= 0) if (iTotalResult <= 0)
{ {

View File

@ -71,7 +71,7 @@
SelectedItem="{Binding DrugInfo}" SelectedItem="{Binding DrugInfo}"
DisplayMemberPath="DrugName" IsEditable="True" IsTextSearchEnabled="False" KeyUp="ComboBox_KeyUp" DisplayMemberPath="DrugName" IsEditable="True" IsTextSearchEnabled="False" KeyUp="ComboBox_KeyUp"
/> />
<ComboBox <ComboBox Visibility="Collapsed"
Margin="12 0 0 0" Margin="12 0 0 0"
Grid.Column="3" Grid.Column="3"
materialDesign:HintAssist.Hint="账册类型" materialDesign:HintAssist.Hint="账册类型"
@ -81,7 +81,7 @@
DisplayMemberPath="AccountTypeName" DisplayMemberPath="AccountTypeName"
/> />
<StackPanel Grid.Column="4" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Grid.Column="4" Orientation="Horizontal" HorizontalAlignment="Right">
<Button <Button Visibility="Collapsed"
Margin="0 0 3 0" Margin="0 0 3 0"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource MaterialDesignOutlinedLightButton}" Style="{StaticResource MaterialDesignOutlinedLightButton}"
@ -91,7 +91,7 @@
<TextBlock Text="导出发药登记表" /> <TextBlock Text="导出发药登记表" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button <Button Visibility="Collapsed"
Margin="0 0 3 0" Margin="0 0 3 0"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource MaterialDesignOutlinedLightButton}" Style="{StaticResource MaterialDesignOutlinedLightButton}"
@ -101,6 +101,26 @@
<TextBlock Text="导出账册" /> <TextBlock Text="导出账册" />
</StackPanel> </StackPanel>
</Button> </Button>
<Button
Margin="0 0 3 0"
VerticalAlignment="Center"
Style="{StaticResource MaterialDesignOutlinedLightButton}"
ToolTip="导出" Command="{Binding DownloadAccountBookForDrug}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="download" />
<TextBlock Text="药品专用账册" />
</StackPanel>
</Button>
<Button
Margin="0 0 3 0"
VerticalAlignment="Center"
Style="{StaticResource MaterialDesignOutlinedLightButton}"
ToolTip="导出" Command="{Binding DownloadAccountBookForOrder}">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="download" />
<TextBlock Text="处方专用账册" />
</StackPanel>
</Button>
<Button <Button
Margin="0 0 6 0" Margin="0 0 6 0"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -113,7 +133,7 @@
</Grid> </Grid>
<DataGrid x:Name="dgv1" <DataGrid x:Name="dgv1" Visibility="Collapsed"
Grid.Row="1" Grid.Row="1"
materialDesign:DataGridAssist.ColumnHeaderPadding="15" materialDesign:DataGridAssist.ColumnHeaderPadding="15"
ItemsSource="{Binding AccountList}" ItemsSource="{Binding AccountList}"