diff --git a/DM_Weight/DM_Weight.csproj b/DM_Weight/DM_Weight.csproj
index 98dcd9a..6d71208 100644
--- a/DM_Weight/DM_Weight.csproj
+++ b/DM_Weight/DM_Weight.csproj
@@ -94,6 +94,9 @@
Always
+
+ Always
+
Always
diff --git a/DM_Weight/Report/GridReportUtil.cs b/DM_Weight/Report/GridReportUtil.cs
index 1d8f3f1..20d2ea8 100644
--- a/DM_Weight/Report/GridReportUtil.cs
+++ b/DM_Weight/Report/GridReportUtil.cs
@@ -379,7 +379,7 @@ namespace DM_Weight.Report
SQL = $@"
SELECT YEAR(operationtime) as DMYear,MONTH(operationtime) DMMonth,DAY(operationtime) DMDay, 0 as TotalBaseNum,
DATE_FORMAT(Senddate,'%Y/%m/%d %H:%i:%s') as Senddate,SendUser as SendUser,receiveuser as ReceiveUser,realnum as SendNum,infactnum as InfactNum,emptynum as EmptyNum,
- DATE_FORMAT(returntime,'%Y/%m/%d %H:%i:%s') as ReturnDate,returnuser as ReturnUser,returnreceiveuser as ReturnReceiveUser,
+ IF(returnTime is null,'',DATE_FORMAT(returnTime,'%H:%i')) as ReturnDate,returnuser as ReturnUser,returnreceiveuser as ReturnReceiveUser,
adduser as AddUser,addcheckuser as AddCheckUser,DATE_FORMAT(operationtime,'%Y/%m/%d %H:%i:%s') as OperationTime,drugid as drugId,drugname as drugName,drugspec,basenum as TotalNum,drawerno
from rejection_report -- where DATE_FORMAT(operationtime,'%Y-%m-%d')= '2024-09-19'
GROUP BY Senddate,drugId order by Senddate,drugId";
@@ -392,5 +392,26 @@ namespace DM_Weight.Report
Report.PrintPreview(true);
}
+
+ public static void AccountNewReport()
+ {
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ string SQL = string.Empty;
+
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "Account_Book_New.grf");
+ SQL = $@" SELECT opertiontype,VOUCHER,department,Drug_type,FACTURE,DRUG_NAME,Drug_Spec,drug_base,DRUG_ID,
+ INQUANTITY,OUTQUANTITY,STOCKQUANTITY,MANUNO,EFF_DATE,SENDUSER,SENDCHECKUSER,RECEIVEUSER,RECEIVECHECKUSER FROM TEST
+ ORDER BY opertiontype desc,voucher desc,department desc,Drug_type desc,FACTURE";
+
+ Dictionary>> records = new Dictionary>>();
+ List> tableList = SqlSugarHelper.Db.SqlQueryable(SQL).ToDictionaryList();
+ records.Add("Table", tableList);
+ string str = JsonConvert.SerializeObject(records);
+ Report.LoadDataFromXML(str);
+
+ Report.PrintPreview(true);
+ }
}
}
diff --git a/DM_Weight/ReportTemp/Account_Book_New.grf b/DM_Weight/ReportTemp/Account_Book_New.grf
new file mode 100644
index 0000000..6cd3dd4
--- /dev/null
+++ b/DM_Weight/ReportTemp/Account_Book_New.grf
@@ -0,0 +1,386 @@
+{
+ "Version":"6.8.1.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape"
+ },
+ "DetailGrid":{
+ "Recordset":{
+ "Field":[
+ {
+ "Name":"操作类型",
+ "DBFieldName":"operationtype"
+ },
+ {
+ "Name":"药品类型",
+ "DBFieldName":"Drug_type"
+ },
+ {
+ "Name":"生产厂家",
+ "DBFieldName":"FACTURE"
+ },
+ {
+ "Name":"药品id",
+ "DBFieldName":"DRUG_ID"
+ },
+ {
+ "Name":"品名",
+ "DBFieldName":"DRUG_NAME"
+ },
+ {
+ "Name":"规格",
+ "DBFieldName":"Drug_Spec"
+ },
+ {
+ "Name":"基数",
+ "DBFieldName":"drug_base"
+ },
+ {
+ "Name":"入库数量",
+ "DBFieldName":"INQUANTITY"
+ },
+ {
+ "Name":"出库数量",
+ "DBFieldName":"OUTQUANTITY"
+ },
+ {
+ "Name":"结余数量",
+ "DBFieldName":"STOCKQUANTITY"
+ },
+ {
+ "Name":"批号",
+ "DBFieldName":"MANUNO"
+ },
+ {
+ "Name":"有效期",
+ "DBFieldName":"EFF_DATE"
+ },
+ {
+ "Name":"发药/核对者1",
+ "DBFieldName":"SENDUSER"
+ },
+ {
+ "Name":"领药/核对者2",
+ "DBFieldName":"RECEIVEUSER"
+ },
+ {
+ "Name":"部门",
+ "DBFieldName":"department"
+ },
+ {
+ "Name":"凭证号",
+ "DBFieldName":"VOUCHER"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"Column1"
+ },
+ {
+ "Name":"Column2"
+ },
+ {
+ "Name":"Column3"
+ },
+ {
+ "Name":"Column4"
+ },
+ {
+ "Name":"Column5"
+ },
+ {
+ "Name":"Column6"
+ },
+ {
+ "Name":"Column7"
+ },
+ {
+ "Name":"Column8"
+ },
+ {
+ "Name":"Column9"
+ },
+ {
+ "Name":"Column10"
+ },
+ {
+ "Name":"Column11"
+ },
+ {
+ "Name":"Column12"
+ },
+ {
+ "Name":"Column13"
+ },
+ {
+ "Name":"Column14"
+ },
+ {
+ "Name":"Column15"
+ }
+ ],
+ "ColumnContent":{
+ "Height":1.79917,
+ "ColumnContentCell":[
+ {
+ "Column":"Column1",
+ "TextAlign":"TopLeft",
+ "ShrinkFontToFit":true,
+ "DataField":"操作类型"
+ },
+ {
+ "Column":"Column2",
+ "TextAlign":"TopLeft",
+ "ShrinkFontToFit":true,
+ "DataField":"凭证号"
+ },
+ {
+ "Column":"Column3",
+ "TextAlign":"TopLeft",
+ "ShrinkFontToFit":true,
+ "DataField":"部门"
+ },
+ {
+ "Column":"Column4",
+ "TextAlign":"MiddleCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"药品类型"
+ },
+ {
+ "Column":"Column5",
+ "TextAlign":"MiddleCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"生产厂家"
+ },
+ {
+ "Column":"Column6",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"品名"
+ },
+ {
+ "Column":"Column7",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"规格"
+ },
+ {
+ "Column":"Column8",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"基数"
+ },
+ {
+ "Column":"Column9",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"入库数量"
+ },
+ {
+ "Column":"Column10",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"出库数量"
+ },
+ {
+ "Column":"Column11",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"结余数量"
+ },
+ {
+ "Column":"Column12",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"批号"
+ },
+ {
+ "Column":"Column13",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"有效期"
+ },
+ {
+ "Column":"Column14",
+ "TextAlign":"BottomCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"发药/核对者1"
+ },
+ {
+ "Column":"Column15",
+ "TextAlign":"BottomCenter",
+ "DataField":"领药/核对者2"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.79917,
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"Column16",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"Column1",
+ "TextAlign":"BottomCenter",
+ "Text":"入(出)\r\n库日期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column2",
+ "TextAlign":"BottomCenter",
+ "Text":"入(出)\r\n库凭证号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column3",
+ "TextAlign":"BottomCenter",
+ "Text":"入(出)\r\n部门"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column4",
+ "TextAlign":"BottomCenter"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column5",
+ "TextAlign":"BottomCenter",
+ "Text":"生产厂家"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column6",
+ "TextAlign":"BottomCenter",
+ "Text":"品名"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column7",
+ "TextAlign":"BottomCenter",
+ "Text":"规格"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column8",
+ "TextAlign":"BottomCenter",
+ "Text":"基数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column9",
+ "TextAlign":"BottomCenter",
+ "Text":"入库数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column10",
+ "TextAlign":"BottomCenter",
+ "Text":"出库数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column11",
+ "TextAlign":"BottomCenter",
+ "Text":"结余数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column12",
+ "TextAlign":"BottomCenter",
+ "Text":"批号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column13",
+ "TextAlign":"BottomCenter",
+ "Text":"有效期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column14",
+ "TextAlign":"BottomCenter",
+ "Text":"发药/核对者1"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column15",
+ "TextAlign":"BottomCenter",
+ "Text":"领药/核对者2"
+ }
+ ],
+ "Text":"使用部门:麻醉科 品名:见下表 规格:见下表 剂型:注射剂 单位:支 生产厂家:见下表"
+ }
+ ]
+ },
+ "Group":[
+ {
+ "Name":"Group1",
+ "ByFields":"操作类型",
+ "GroupHeader":{
+ "OccupyColumn":true,
+ "OccupiedColumns":"Column1;Column2;Column3;Column14;Column15",
+ "VAlign":"Middle"
+ },
+ "GroupFooter":{
+ "Visible":false,
+ "Height":0,
+ "PrintGridBorder":false
+ }
+ },
+ {
+ "Name":"Group2",
+ "ByFields":"药品类型",
+ "GroupHeader":{
+ "OccupyColumn":true,
+ "OccupiedColumns":"Column4",
+ "VAlign":"Middle"
+ },
+ "GroupFooter":{
+ "Visible":false,
+ "Height":0,
+ "PrintGridBorder":false
+ }
+ },
+ {
+ "Name":"Group3",
+ "ByFields":"生产厂家",
+ "GroupHeader":{
+ "OccupyColumn":true,
+ "OccupiedColumns":"Column5"
+ },
+ "GroupFooter":{
+ "Height":0
+ }
+ }
+ ]
+ },
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":2,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox1",
+ "Dock":"Fill",
+ "Font":{
+ "Name":"宋体",
+ "Size":262500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"湘乡市人民医院麻醉科麻醉、精神药品专用账册(2024)年"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/use_jiaojie - 副本 (2).grf b/DM_Weight/ReportTemp/use_jiaojie - 副本 (2).grf
new file mode 100644
index 0000000..d7bbe66
--- /dev/null
+++ b/DM_Weight/ReportTemp/use_jiaojie - 副本 (2).grf
@@ -0,0 +1,564 @@
+{
+ "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,
+ "IsCrossTab":true,
+ "FixCols":2,
+ "AppendBlankRow":true,
+ "Recordset":{
+ "Field":[
+ {
+ "Name":"DMYear",
+ "Type":"Integer"
+ },
+ {
+ "Name":"DMMonth",
+ "Type":"Integer"
+ },
+ {
+ "Name":"DMDay",
+ "Type":"Integer"
+ },
+ {
+ "Name":"TotalNum"
+ },
+ {
+ "Name":"Senddate",
+ "Type":"DateTime",
+ "Format":"HH:mm"
+ },
+ {
+ "Name":"SendUser"
+ },
+ {
+ "Name":"ReceiveUser"
+ },
+ {
+ "Name":"SendNum",
+ "Type":"Integer"
+ },
+ {
+ "Name":"InfactNum",
+ "Type":"Integer"
+ },
+ {
+ "Name":"EmptyNum",
+ "Type":"Integer"
+ },
+ {
+ "Name":"ReturnDate",
+ "Format":"HH:mm"
+ },
+ {
+ "Name":"ReturnUser"
+ },
+ {
+ "Name":"ReturnReceiveUser"
+ },
+ {
+ "Name":"AddUser"
+ },
+ {
+ "Name":"AddCheckUser"
+ },
+ {
+ "Name":"drugId"
+ },
+ {
+ "Name":"drugName"
+ },
+ {
+ "Name":"drugSpec"
+ },
+ {
+ "Name":"drawerno",
+ "Type":"Integer"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"Column4"
+ },
+ {
+ "Name":"Column6"
+ },
+ {
+ "Name":"Column31"
+ },
+ {
+ "Name":"Column14"
+ },
+ {
+ "Name":"Column19"
+ },
+ {
+ "Name":"Column20"
+ },
+ {
+ "Name":"Column36"
+ },
+ {
+ "Name":"Column23"
+ },
+ {
+ "Name":"Column24"
+ }
+ ],
+ "ColumnContent":{
+ "Height":2.19604,
+ "ColumnContentCell":[
+ {
+ "Column":"Column4",
+ "TextAlign":"MiddleCenter",
+ "DataField":"Senddate"
+ },
+ {
+ "Column":"Column6",
+ "TextAlign":"MiddleCenter",
+ "DataField":"SendUser"
+ },
+ {
+ "Column":"Column31",
+ "TextAlign":"MiddleCenter",
+ "DataField":"ReceiveUser"
+ },
+ {
+ "Column":"Column14",
+ "TextAlign":"MiddleCenter",
+ "DataField":"SendNum"
+ },
+ {
+ "Column":"Column19",
+ "TextAlign":"MiddleCenter",
+ "DataField":"InfactNum"
+ },
+ {
+ "Column":"Column20",
+ "TextAlign":"MiddleCenter",
+ "DataField":"EmptyNum"
+ },
+ {
+ "Column":"Column36",
+ "TextAlign":"MiddleCenter",
+ "DataField":"ReturnDate"
+ },
+ {
+ "Column":"Column23",
+ "TextAlign":"MiddleCenter",
+ "DataField":"ReturnUser"
+ },
+ {
+ "Column":"Column24",
+ "TextAlign":"MiddleCenter",
+ "DataField":"ReturnReceiveUser"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":4.10104,
+ "RepeatStyle":"OnGroupHeaderPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"Column3",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"Column12",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"Column25",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"Column26",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"Column4",
+ "TextAlign":"BottomCenter",
+ "Text":"发药\r\n时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column6",
+ "TextAlign":"BottomCenter",
+ "Text":"发药者"
+ }
+ ],
+ "TextAlign":"MiddleRight",
+ "Text":"交接状态",
+ "BorderCustom":true,
+ "Border":{
+ "Styles":"[DrawBottom]"
+ }
+ }
+ ]
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"药品信息",
+ "BorderCustom":true,
+ "Border":{
+ "Styles":"[DrawRight]"
+ }
+ }
+ ],
+ "BorderCustom":true,
+ "Border":{
+ "Styles":"[DrawRight]"
+ }
+ },
+ {
+ "GroupTitle":true,
+ "Name":"品名",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"规格",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"总基数",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"Column30",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"Column31",
+ "TextAlign":"BottomCenter",
+ "Text":"领药者"
+ }
+ ]
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"总基数"
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"规格"
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"品名"
+ },
+ {
+ "GroupTitle":true,
+ "Name":"drugname",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"drugspec",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"totalnum",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":true,
+ "Name":"发药",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"Column14",
+ "TextAlign":"BottomCenter",
+ "Text":"实发数"
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"发药"
+ },
+ {
+ "GroupTitle":true,
+ "Name":"还药",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"Column19",
+ "TextAlign":"BottomCenter",
+ "Text":"实物数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column20",
+ "TextAlign":"BottomCenter",
+ "Text":"空安瓿"
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"还药"
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"[#TotalNum#]"
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"[#drugSpec#]"
+ }
+ ],
+ "TextAlign":"MiddleCenter",
+ "Text":"[#drugName#]"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column36",
+ "TextAlign":"BottomCenter",
+ "Text":"还药\r\n时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column23",
+ "TextAlign":"BottomCenter",
+ "Text":"还药者"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column24",
+ "TextAlign":"BottomCenter",
+ "Text":"接收者"
+ }
+ ]
+ },
+ "Group":[
+ {
+ "Name":"Group1",
+ "GroupHeader":{
+ "Height":0.79375,
+ "PrintGridBorder":false,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox7",
+ "AlignColumnSide":"Right",
+ "Left":19.394,
+ "Top":0.211667,
+ "Width":7.59354,
+ "Height":0.396875,
+ "TextAlign":"MiddleRight",
+ "Text":"[#DMMonth#]月[#DMDay#]日"
+ }
+ ]
+ },
+ "GroupFooter":{
+ "Height":2,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox4",
+ "AlignColumn":"Column31",
+ "AlignColumnEx":"Column4",
+ "Width":8.96938,
+ "Height":2,
+ "Border":{
+ "Styles":"[DrawRight]"
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"日消耗总计(支)"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox5",
+ "AlignColumn":"Column14",
+ "Left":8.96938,
+ "Width":2.98979,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight|DrawBottom]"
+ },
+ "TextAlign":"BottomCenter",
+ "Text":"安瓿"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox6",
+ "AlignColumn":"Column19",
+ "Left":11.9592,
+ "Width":2.99,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight|DrawBottom]"
+ },
+ "TextAlign":"BottomCenter",
+ "Text":"处方"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox7",
+ "AlignColumn":"Column20",
+ "Left":14.949,
+ "Width":2.99,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight|DrawBottom]"
+ },
+ "TextAlign":"BottomCenter",
+ "Text":"补充"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox2",
+ "AlignColumn":"Column14",
+ "Left":8.96938,
+ "Top":1.00542,
+ "Width":2.9898,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight]"
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"[#Sum(EmptyNum)#]"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox3",
+ "AlignColumn":"Column19",
+ "Left":11.9592,
+ "Top":1.0054,
+ "Width":2.98979,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight]"
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"[#Sum(SendNum-InfactNum)#]"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox4",
+ "AlignColumn":"Column20",
+ "Left":14.949,
+ "Top":1.0054,
+ "Width":2.98979,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight]"
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"[#Sum(SendNum-InfactNum)#]"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox8",
+ "Anchor":"[Left|Top|Right|Bottom]",
+ "AlignColumn":"Column36",
+ "AlignColumnEx":"Column23",
+ "Left":17.9388,
+ "Width":5.95313,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight|DrawBottom]"
+ },
+ "TextAlign":"BottomCenter",
+ "Text":"补充者"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox9",
+ "AlignColumn":"Column24",
+ "Left":23.8919,
+ "Width":3.01625,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawLeft|DrawRight|DrawBottom]"
+ },
+ "TextAlign":"BottomCenter",
+ "Text":"核对者"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox5",
+ "AlignColumn":"Column36",
+ "AlignColumnEx":"Column23",
+ "Left":17.9388,
+ "Top":1.0054,
+ "Width":5.95313,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight]"
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"[#AddUser#]"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox6",
+ "AlignColumn":"Column24",
+ "Left":23.8919,
+ "Top":1.00542,
+ "Width":3.01625,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawLeft|DrawRight]"
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"[#AddCheckUser#]"
+ }
+ ]
+ }
+ }
+ ],
+ "CrossTab":{
+ "PercentFormat":"0.##%",
+ "HCrossFields":"drugId;ReturnDate;ReturnUser;ReturnReceiveUser;AddUser;AddCheckUser",
+ "VCrossFields":"Senddate;drawerno",
+ "ListCols":3,
+ "TotalCols":3
+ }
+ },
+ "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":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "ShrinkFontToFit":true,
+ "TextAlign":"MiddleCenter",
+ "Text":"麻醉科小药箱麻醉、精神药品(注射剂)使用与交接记录([#DMYear#])年"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/use_jiaojie.grf b/DM_Weight/ReportTemp/use_jiaojie.grf
index 27b1a7f..6a797e7 100644
--- a/DM_Weight/ReportTemp/use_jiaojie.grf
+++ b/DM_Weight/ReportTemp/use_jiaojie.grf
@@ -59,8 +59,7 @@
"Type":"Integer"
},
{
- "Name":"ReturnTime",
- "Type":"DateTime",
+ "Name":"ReturnDate",
"Format":"HH:mm"
},
{
@@ -155,7 +154,7 @@
{
"Column":"Column36",
"TextAlign":"MiddleCenter",
- "DataField":"ReturnTime"
+ "DataField":"ReturnDate"
},
{
"Column":"Column23",
@@ -388,32 +387,6 @@
"TextAlign":"BottomCenter",
"Text":"安瓿"
},
- {
- "Type":"StaticBox",
- "Name":"StaticBox6",
- "AlignColumn":"Column19",
- "Left":11.9592,
- "Width":2.99,
- "Height":1,
- "Border":{
- "Styles":"[DrawRight|DrawBottom]"
- },
- "TextAlign":"BottomCenter",
- "Text":"处方"
- },
- {
- "Type":"StaticBox",
- "Name":"StaticBox7",
- "AlignColumn":"Column20",
- "Left":14.949,
- "Width":2.99,
- "Height":1,
- "Border":{
- "Styles":"[DrawRight|DrawBottom]"
- },
- "TextAlign":"BottomCenter",
- "Text":"补充"
- },
{
"Type":"MemoBox",
"Name":"MemoBox2",
@@ -429,11 +402,24 @@
"Text":"[#Sum(EmptyNum)#]"
},
{
- "Type":"MemoBox",
- "Name":"MemoBox3",
+ "Type":"StaticBox",
+ "Name":"StaticBox6",
"AlignColumn":"Column19",
"Left":11.9592,
- "Top":1.0054,
+ "Width":2.99,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight|DrawBottom]"
+ },
+ "TextAlign":"BottomCenter",
+ "Text":"处方"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox8",
+ "AlignColumn":"Column19",
+ "Left":11.9592,
+ "Top":1.00542,
"Width":2.98979,
"Height":1,
"Border":{
@@ -443,11 +429,24 @@
"Text":"[#Sum(SendNum-InfactNum)#]"
},
{
- "Type":"MemoBox",
- "Name":"MemoBox4",
+ "Type":"StaticBox",
+ "Name":"StaticBox7",
"AlignColumn":"Column20",
"Left":14.949,
- "Top":1.0054,
+ "Width":2.98979,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawRight|DrawBottom]"
+ },
+ "TextAlign":"BottomCenter",
+ "Text":"补充"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox9",
+ "AlignColumn":"Column20",
+ "Left":14.949,
+ "Top":1.00542,
"Width":2.98979,
"Height":1,
"Border":{
@@ -459,18 +458,29 @@
{
"Type":"StaticBox",
"Name":"StaticBox8",
- "Anchor":"[Left|Top|Right|Bottom]",
+ "AlignColumnSide":"Right",
"AlignColumn":"Column36",
- "AlignColumnEx":"Column23",
- "Left":17.9388,
- "Width":5.95313,
+ "Left":17.9123,
+ "Width":3,
"Height":1,
"Border":{
"Styles":"[DrawBottom]"
},
- "TextAlign":"BottomCenter",
+ "TextAlign":"BottomRight",
"Text":"补充者"
},
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox10",
+ "AlignColumnSide":"Right",
+ "AlignColumn":"Column36",
+ "Left":17.9123,
+ "Top":1.00542,
+ "Width":3,
+ "Height":1,
+ "TextAlign":"MiddleRight",
+ "Text":"[#AddUser#]"
+ },
{
"Type":"StaticBox",
"Name":"StaticBox9",
@@ -486,29 +496,29 @@
},
{
"Type":"MemoBox",
- "Name":"MemoBox5",
- "AlignColumn":"Column36",
- "AlignColumnEx":"Column23",
- "Left":17.9388,
- "Top":1.0054,
- "Width":5.95313,
- "Height":1,
- "TextAlign":"MiddleCenter",
- "Text":"[#AddUser#]"
- },
- {
- "Type":"MemoBox",
- "Name":"MemoBox6",
+ "Name":"MemoBox11",
"AlignColumn":"Column24",
"Left":23.8919,
"Top":1.00542,
- "Width":3.01625,
+ "Width":3.02,
"Height":1,
"Border":{
"Styles":"[DrawLeft|DrawRight]"
},
"TextAlign":"MiddleCenter",
"Text":"[#AddCheckUser#]"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox10",
+ "AlignColumnSide":"Left",
+ "AlignColumn":"Column23",
+ "Left":20.9285,
+ "Width":3,
+ "Height":1,
+ "Border":{
+ "Styles":"[DrawBottom]"
+ }
}
]
}
@@ -516,7 +526,7 @@
],
"CrossTab":{
"PercentFormat":"0.##%",
- "HCrossFields":"drugId",
+ "HCrossFields":"drugId;ReturnDate;ReturnUser;ReturnReceiveUser;AddUser;AddCheckUser",
"VCrossFields":"Senddate;drawerno",
"ListCols":3,
"TotalCols":3
diff --git a/DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs b/DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs
index 4e355c0..764df77 100644
--- a/DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs
+++ b/DM_Weight/ViewModels/AddToJiaoJieDialogViewModel.cs
@@ -33,12 +33,12 @@ namespace DM_Weight.ViewModels
///
/// 交接柜的库位信息
///
- private List _jiaojei_channelStocks;
+ private List _jiaojie_channelStocks;
public List Jiaojie_ChannelStocks
{
- get => _jiaojei_channelStocks;
- set => SetProperty(ref _jiaojei_channelStocks, value);
+ get => _jiaojie_channelStocks;
+ set => SetProperty(ref _jiaojie_channelStocks, value);
}
///
/// 交接柜的库位信息
@@ -388,27 +388,31 @@ namespace DM_Weight.ViewModels
InvoiceId = InvoiceId
}).ExecuteCommand();
}
+
//保存注射剂报表信息
for (int j = 0; j < Jiaojie_ChannelStocks.Count; j++)
{
ChannelStock jStock = Jiaojie_ChannelStocks[j];
- int totalBaseNum = SqlSugarHelper.Db.Queryable().
- Where(db => db.DrugId == jStock.DrugId && db.MachineId == (ConfigurationManager.AppSettings["machineId"] ?? "DM3")).Select(db => db.BaseQuantity).First();
-
- string belognUser = SqlSugarHelper.Db.Queryable().
- Where(cl => cl.DrawerNo == jStock.DrawerNo && cl.MachineId == jStock.MachineId).Select(cl => cl.BelongUser).First();
- DrugInfo di = SqlSugarHelper.Db.Queryable().Where(di => di.DrugId == jStock.DrugId).First();
- SqlSugarHelper.Db.Insertable(new RejectionReport()
+ if (jStock.DrugInfo.Dosage == "注射剂")
{
- SendDate =DateTime.Parse(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm")),
- SendUser = HomeWindowViewModel.Operator?.Nickname,
- ReceiveUser = belognUser,//Jiaojie_ChannelStocks
- DrugId = jStock.DrugId,
- DrugName=di.DrugName,
- DrugSpec=di.DrugSpec,
- BaseNum = totalBaseNum + "支",//总基数
- DrawerNo = jStock.DrawerNo
- }).ExecuteCommand();
+ int totalBaseNum = SqlSugarHelper.Db.Queryable().
+ Where(db => db.DrugId == jStock.DrugId && db.MachineId == (ConfigurationManager.AppSettings["machineId"] ?? "DM3")).Select(db => db.BaseQuantity).First();
+
+ string belognUser = SqlSugarHelper.Db.Queryable().
+ Where(cl => cl.DrawerNo == jStock.DrawerNo && cl.MachineId == jStock.MachineId).Select(cl => cl.BelongUser).First();
+ DrugInfo di = SqlSugarHelper.Db.Queryable().Where(di => di.DrugId == jStock.DrugId).First();
+ SqlSugarHelper.Db.Insertable(new RejectionReport()
+ {
+ SendDate = DateTime.Parse(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm")),
+ SendUser = HomeWindowViewModel.Operator?.Nickname,
+ ReceiveUser = belognUser,//Jiaojie_ChannelStocks
+ DrugId = jStock.DrugId,
+ DrugName = di.DrugName,
+ DrugSpec = di.DrugSpec,
+ BaseNum = totalBaseNum + "支",//总基数
+ DrawerNo = jStock.DrawerNo
+ }).ExecuteCommand();
+ }
}
return true;
});
diff --git a/DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs b/DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs
index 88733cc..19706ae 100644
--- a/DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs
+++ b/DM_Weight/ViewModels/AddToJiaoJieWindowViewModel.cs
@@ -399,6 +399,14 @@ namespace DM_Weight.ViewModels
GridReportUtil.RejectionReport("");
});
}
+ public DelegateCommand Account_Download
+ {
+ get => new DelegateCommand(() =>
+ {
+ GridReportUtil.AccountNewReport();
+ });
+ }
+
private List csList = new List();
//取药 弹出出药列表
public DelegateCommand TakeDrugCommand
diff --git a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs
index 43ae471..08db0f2 100644
--- a/DM_Weight/ViewModels/CheckStockWindowViewModel.cs
+++ b/DM_Weight/ViewModels/CheckStockWindowViewModel.cs
@@ -47,27 +47,24 @@ namespace DM_Weight.ViewModels
switch (msg.EventType)
{
// 抽屉打开
- case EventType.DRAWEROPEN:
- if (Status == 1)
- {
- Status = 2;
- }
+ //case EventType.DRAWEROPEN:
+ // if (Status == 1)
+ // {
+ // Status = 2;
+ // }
- break;
+ // break;
// 抽屉关闭
case EventType.DRAWERCLOSE:
- if (Status == 2)
- {
- Status = 3;
- }
- break;
- // 数量变化
- case EventType.UPDATEQUANTITY:
- if (Status == 2)
- {
- logger.Info($"抽屉【{DrawerNo}】库位药品数量【{msg.Quantitys}】");
- }
+ Status = 0;
break;
+ //// 数量变化
+ //case EventType.UPDATEQUANTITY:
+ // if (Status == 2)
+ // {
+ // logger.Info($"抽屉【{DrawerNo}】库位药品数量【{msg.Quantitys}】");
+ // }
+ // break;
// 打开失败
case EventType.OPENERROR:
AlertMsg alertMsg = new AlertMsg
@@ -198,7 +195,7 @@ namespace DM_Weight.ViewModels
Operator = HomeWindowViewModel.Operator?.Id,
Reviewer = HomeWindowViewModel.Reviewer?.Id,
OperationTime = DateTime.Now,
- Quantity = it.CheckQuantity - it.Quantity,
+ Quantity = it.CheckQuantity - it.Quantity,
Type = 4,
InvoiceId = InvoiceId
//,StockQuantity = nowChannels.Sum(it => it.Quantity),
@@ -332,7 +329,7 @@ namespace DM_Weight.ViewModels
//这个方法用于拦截请求
public void OnNavigatedFrom(NavigationContext navigationContext)
- {
+ {
// 取消消息订阅
_eventAggregator.GetEvent().Unsubscribe(DoMyPrismEvent);
}
diff --git a/DM_Weight/Views/AddToJiaoJieWindow.xaml b/DM_Weight/Views/AddToJiaoJieWindow.xaml
index 63d18fc..fa85c17 100644
--- a/DM_Weight/Views/AddToJiaoJieWindow.xaml
+++ b/DM_Weight/Views/AddToJiaoJieWindow.xaml
@@ -64,6 +64,13 @@
Style="{StaticResource MaterialDesignOutlinedLightButton}"
Content="注射剂报表" />
+
+
-
+ Content="取消" />-->
-->
-
-
+