From 2cd5e574b1de21cfa5b4ad107810e73501d9d947 Mon Sep 17 00:00:00 2001
From: zdnpc <9670595+zdbanality@user.noreply.gitee.com>
Date: Mon, 26 May 2025 09:33:42 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=B7=E5=AE=8F=E5=B7=9E=E4=B8=AD=E5=8C=BB?=
=?UTF-8?q?=E9=99=A2=E5=88=86=E6=94=AF=E7=B3=BB=E7=BB=9F=E9=83=A8=E7=BD=B2?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B0=E5=BE=B7=E5=AE=8F=E5=B7=9E=E5=A6=87?=
=?UTF-8?q?=E5=B9=BC=E5=8C=BB=E9=99=A2,=E5=87=BA=E7=8E=B0=E7=9A=84?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=E6=8E=92=E6=9F=A5=E8=A7=A3=E5=86=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
PEIS/App.config | 4 +-
PEIS/Event/Args.cs | 3 +
.../Enrollment/EnrollentOrgGroupModel.cs | 3 +-
PEIS/Model/Enrollment/EnrollmentOrgModel.cs | 10 +--
.../Enrollment/EnrollmentPatientModel.cs | 32 +++-------
PEIS/Model/Exam/PartModel.cs | 4 +-
PEIS/Presenter/EnrollmentOrgPresenter.cs | 6 +-
PEIS/Presenter/EnrollmentPersonPresenter.cs | 6 +-
PEIS/ReportFiles/Guide.frx | 46 +++++++-------
PEIS/View/Base/OrgForm.cs | 4 +-
PEIS/View/Enrollment/EnrollmentOrgForm.cs | 35 ++++++-----
PEIS/View/Enrollment/EnrollmentPersonForm.cs | 25 +++++---
.../Enrollment/NewEnrollmentPersonForm.cs | 14 ++---
PEIS/View/Exam/PartForm.Designer.cs | 62 +++++++++----------
PEIS/View/Exam/PartForm.cs | 25 +++++---
PEIS/View/Exam/TotalForm.Designer.cs | 52 ++++++++--------
PEIS/View/Exam/TotalForm.cs | 2 +-
17 files changed, 166 insertions(+), 167 deletions(-)
diff --git a/PEIS/App.config b/PEIS/App.config
index e81023c..789040a 100644
--- a/PEIS/App.config
+++ b/PEIS/App.config
@@ -21,13 +21,13 @@
-
+
-
+
diff --git a/PEIS/Event/Args.cs b/PEIS/Event/Args.cs
index c090562..f804b82 100644
--- a/PEIS/Event/Args.cs
+++ b/PEIS/Event/Args.cs
@@ -27,6 +27,7 @@ namespace PEIS.Event
{
public Int64 ID { get; set; }
public Int64 BaseOID { get; set; }
+ // EID
public Int64 EnrollmentID { get; set; }
public Int64 EnrollmentOID { get; set; }
public Int64 GroupID { get; set; }
@@ -41,12 +42,14 @@ namespace PEIS.Event
public DateTime EndTime { get; set; }
public Decimal Discount { get; set; }
public Decimal Fee { get; set; }
+ public Int64 OEID { get; set; }
///
/// 科室分检保存
///
public ExamPart Part { get; set; }
public String DeptCode { get; set; }
public Int64 Eid{ get; set; }
+ public Int64 Pid { get; set; }
public Args()
{
diff --git a/PEIS/Model/Enrollment/EnrollentOrgGroupModel.cs b/PEIS/Model/Enrollment/EnrollentOrgGroupModel.cs
index 3a79f4e..946e17d 100644
--- a/PEIS/Model/Enrollment/EnrollentOrgGroupModel.cs
+++ b/PEIS/Model/Enrollment/EnrollentOrgGroupModel.cs
@@ -45,7 +45,7 @@ namespace PEIS.Model.Enrollment
return;
}
- if (item.Type.Contains("职业"))
+ if (item.Type != null && item.Type.Contains("职业"))
{
DAOHelp.ExecuteSql($@"UPDATE ENROLLMENT_ORGGROUP SET Name= '{item.Name}',Sex= '{item.Sex}', Marriage= '{item.Marriage}', AgeMin= {item.AgeMin}, AgeMax= {item.AgeMax}, Type= '{item.Type}',
JobStatus = '{item.JobStatus}', HazardFactors = '{item.HazardFactors}' WHERE ID= {item.ID}", false);
@@ -55,7 +55,6 @@ namespace PEIS.Model.Enrollment
DAOHelp.ExecuteSql($@"UPDATE ENROLLMENT_ORGGROUP SET Name= '{item.Name}',Sex= '{item.Sex}', Marriage= '{item.Marriage}', AgeMin= {item.AgeMin}, AgeMax= {item.AgeMax}, Type= '{item.Type}',
JobStatus = null, JobTypes = null, HazardFactors = null WHERE ID= {item.ID}", false);
}
-
}
}
}
\ No newline at end of file
diff --git a/PEIS/Model/Enrollment/EnrollmentOrgModel.cs b/PEIS/Model/Enrollment/EnrollmentOrgModel.cs
index 99228b3..8afb345 100644
--- a/PEIS/Model/Enrollment/EnrollmentOrgModel.cs
+++ b/PEIS/Model/Enrollment/EnrollmentOrgModel.cs
@@ -86,8 +86,8 @@ namespace PEIS.Model.Enrollment
}
}
-
- public bool RecallDept(Int64 EId) // 撤回发送科室
+ // 撤回发送科室
+ public bool RecallDept(Int64 EId, String Name, long OEID)
{
var checkCost = $@"UPDATE Enrollment_CheckCost SET SendTime = null, SenderCode = null, Sender = null WHERE EID = {EId} AND SendTime is not null AND DeleteTime is null AND WeChatCostTime is null";
var enrollmentPatient = $@"UPDATE Enrollment_Patient SET SignTime = null, SignerCode = null, Signer = null WHERE ID = {EId} AND SignTime is not null";
@@ -99,11 +99,7 @@ namespace PEIS.Model.Enrollment
if (cResult > 0 && eResult > 0 && fResult > 0)
{
- var enPatients = DAOHelp.GetDataBySQL($@"select Name, OEID from Enrollment_Patient where Id = {EId}");
- if (enPatients != null && enPatients.Count > 0)
- {
- new Entity.Log($@"撤回发送到科室:体检号={EId},体检者={enPatients[0].Name},OEID={enPatients[0].OEID}", "3").Save();
- }
+ new Entity.Log($@"撤回发送到科室:体检号={EId},姓名={Name},OEID={OEID}", "3").Save();
return true;
}
diff --git a/PEIS/Model/Enrollment/EnrollmentPatientModel.cs b/PEIS/Model/Enrollment/EnrollmentPatientModel.cs
index 775f3f2..8efb9b9 100644
--- a/PEIS/Model/Enrollment/EnrollmentPatientModel.cs
+++ b/PEIS/Model/Enrollment/EnrollmentPatientModel.cs
@@ -139,11 +139,8 @@ namespace PEIS.Model.Enrollment
}
// 取消登记
- public bool CancelRegInfo(Int64 EId)
+ public bool CancelRegInfo(Int64 EId, String Name, Int64 Pid, Int64 OEID, Int64 GroupID)
{
- List _patients = DAOHelp.GetDataBySQL($@"Select * From Enrollment_Patient where ID = {EId}");
- if (_patients == null || _patients.Count == 0) return false;
-
// 删除项目信息
var feeItem = $@"DELETE FROM Enrollment_FeeItem WHERE EID = {EId}";
// 删除体检号
@@ -158,15 +155,15 @@ namespace PEIS.Model.Enrollment
string _logStr = "删除体检者:";
if (fResult > 0 && eResult > 0)
{
- EnrollmentPatient orgPatient = _patients[0];
- if (orgPatient.OEID != null)
+ //EnrollmentPatient orgPatient = _patients[0];
+ if (OEID != 0)
{
// 剔除分组
- var enrollmentOrgPatient = $@"delete from Enrollment_OrgPatient where GroupID = {orgPatient.GroupID} and PID = {orgPatient.PID} and OID = {orgPatient.OEID}";
+ var enrollmentOrgPatient = $@"delete from Enrollment_OrgPatient where GroupID = {GroupID} and PID = {Pid} and OID = {OEID}";
var oResulr = DAOHelp.ExecuteSql(enrollmentOrgPatient, false);
_logStr = "删除团体成员:";
}
- new Entity.Log($@"{_logStr}PID={orgPatient.PID},EID={orgPatient.ID},Name={orgPatient.Name}", "3").Save();
+ new Entity.Log($@"{_logStr}PID={Pid},体检号={EId},姓名={Name}", "3").Save();
return true;
}
return false;
@@ -185,7 +182,7 @@ namespace PEIS.Model.Enrollment
var costs = DAOHelp.GetDataBySQL($"Select a.Id, a.EID, a.OEID, b.Name From Enrollment_CheckCost a left join Enrollment_Patient b on a.Eid = b.Id WHERE a.Id = {id}");
if (costs != null && costs.Count > 0)
{
- new Entity.Log($@"删除体检订单:体检号={costs[0].EID},体检者={costs[0].Name},订单号={costs[0].ID},OEID={costs[0].OEID}", "3").Save();
+ new Entity.Log($@"删除体检订单:体检号={costs[0].EID},姓名={costs[0].Name},订单号={costs[0].ID},OEID={costs[0].OEID}", "3").Save();
}
return true;
}
@@ -193,16 +190,12 @@ namespace PEIS.Model.Enrollment
}
// 取消记账
- public bool CancelCharge(Int64 id)
+ public bool CancelCharge(Int64 id, Int64 EID, String Name, Int64 OEID)
{
var sql = $@"UPDATE Enrollment_CheckCost SET ChargeTime = null, ChargerCode = null, Charger = null WHERE ID = {id}";
if (DAOHelp.ExecuteSql(sql, false) > 0)
{
- var costs = DAOHelp.GetDataBySQL($"Select a.Id, a.EID, a.OEID, b.Name From Enrollment_CheckCost a left join Enrollment_Patient b on a.Eid = b.Id WHERE a.Id = {id}");
- if (costs != null && costs.Count > 0)
- {
- new Entity.Log($@"体检订单取消记账:体检号={costs[0].EID},体检者={costs[0].Name},订单号={costs[0].ID},OEID={costs[0].OEID}", "3").Save();
- }
+ new Entity.Log($@"体检订单取消记账:体检号={EID},姓名={Name},订单号={id},OEID={OEID}", "3").Save();
return true;
}
return false;
@@ -219,7 +212,7 @@ namespace PEIS.Model.Enrollment
}
// 撤回发送到科室
- public bool RecallDept(Int64 EId) // 撤回发送科室
+ public bool RecallDept(Int64 EId, String Name)
{
var checkCost = $@"UPDATE Enrollment_CheckCost SET SendTime = null, SenderCode = null, Sender = null WHERE EID = {EId} AND SendTime is not null AND DeleteTime is null AND WeChatCostTime is null";
var enrollmentPatient = $@"UPDATE Enrollment_Patient SET SignTime = null, SignerCode = null, Signer = null WHERE ID = {EId} AND SignTime is not null";
@@ -231,12 +224,7 @@ namespace PEIS.Model.Enrollment
if (cResult > 0 && eResult > 0 && fResult > 0)
{
-
- var enPatients = DAOHelp.GetDataBySQL($@"select Name, OEID from Enrollment_Patient where Id = {EId}");
- if (enPatients != null && enPatients.Count > 0)
- {
- new Entity.Log($@"撤回发送到科室:体检号={EId},体检者={enPatients[0].Name},OEID={enPatients[0].OEID}", "3").Save();
- }
+ new Entity.Log($@"撤回发送到科室:体检号={EId},姓名={Name}", "3").Save();
return true;
}
return false;
diff --git a/PEIS/Model/Exam/PartModel.cs b/PEIS/Model/Exam/PartModel.cs
index 6c95a94..1f783be 100644
--- a/PEIS/Model/Exam/PartModel.cs
+++ b/PEIS/Model/Exam/PartModel.cs
@@ -163,7 +163,7 @@ namespace PEIS.Model
{
Debug.WriteLine("[DEBUG] SetConclusion,生成结论");
var part = DAOHelp
- .GetDataBySQL($@"SELECT * FROM Exam_Part Where EID={eid} AND DeptCode='{deptCode}'")
+ .GetDataBySQL($@"SELECT * FROM Exam_Part Where EID={eid} AND DeptCode='{deptCode}'")
.FirstOrDefault();
if (part == null)
{
@@ -175,7 +175,7 @@ namespace PEIS.Model
var resultStr = "";
// 判断是否为检验科
- if(deptCode == "3001")
+ if(deptCode == "3001" && Global._hospital.Name == "德宏州中医医院")
{
resultStr = $@"SELECT
C.FeeItemName,
diff --git a/PEIS/Presenter/EnrollmentOrgPresenter.cs b/PEIS/Presenter/EnrollmentOrgPresenter.cs
index bb099bd..5f2c84c 100644
--- a/PEIS/Presenter/EnrollmentOrgPresenter.cs
+++ b/PEIS/Presenter/EnrollmentOrgPresenter.cs
@@ -95,7 +95,7 @@ namespace PEIS.Presenter
};
View.RecallDept += (send, args) =>
{
- View.ShowRecallDept(new EnrollmentOrgModel().RecallDept(args.ID));
+ View.ShowRecallDept(new EnrollmentOrgModel().RecallDept(args.ID, args.Name, args.OEID));
};
View.FeeCheckCost += (send, args) =>
{
@@ -122,7 +122,7 @@ namespace PEIS.Presenter
};
View.CancelCharge += (send, args) =>
{
- new EnrollmentPatientModel().CancelCharge(args.ID);
+ new EnrollmentPatientModel().CancelCharge(args.ID, args.Eid, args.Name, args.OEID);
};
View.AddOrgPatient += (send, args) =>
{
@@ -145,7 +145,7 @@ namespace PEIS.Presenter
};
View.CancelRegInfo += (send, args) =>
{
- View.ShowCancelRegInfo(new EnrollmentPatientModel().CancelRegInfo(args.ID));
+ View.ShowCancelRegInfo(new EnrollmentPatientModel().CancelRegInfo(args.ID, args.Name, args.Pid, args.OEID, args.GroupID));
};
View.ChangeCost += (send, args) =>
{
diff --git a/PEIS/Presenter/EnrollmentPersonPresenter.cs b/PEIS/Presenter/EnrollmentPersonPresenter.cs
index d7900d6..19fd0ef 100644
--- a/PEIS/Presenter/EnrollmentPersonPresenter.cs
+++ b/PEIS/Presenter/EnrollmentPersonPresenter.cs
@@ -55,7 +55,7 @@ namespace PEIS.Presenter
};
View.CancelRegInfo += (send, args) =>
{
- View.ShowCancelRegInfo(new EnrollmentPatientModel().CancelRegInfo(args.ID));
+ View.ShowCancelRegInfo(new EnrollmentPatientModel().CancelRegInfo(args.ID, args.Name, args.Pid, args.OEID, args.GroupID));
};
View.DeleteOrder += (send, args) =>
{
@@ -63,7 +63,7 @@ namespace PEIS.Presenter
};
View.CancelCharge += (send, args) =>
{
- View.ShowCancelCharge(new EnrollmentPatientModel().CancelCharge(args.ID));
+ View.ShowCancelCharge(new EnrollmentPatientModel().CancelCharge(args.ID, args.Eid, args.Name, args.OEID));
};
View.GetExamFeeItem += (send, args) =>
{
@@ -87,7 +87,7 @@ namespace PEIS.Presenter
};
View.RecallDept += (send, args) =>
{
- new EnrollmentPatientModel().RecallDept(args.ID);
+ new EnrollmentPatientModel().RecallDept(args.ID, args.Name);
};
}
}
diff --git a/PEIS/ReportFiles/Guide.frx b/PEIS/ReportFiles/Guide.frx
index 8d7c7bc..6ea7b69 100644
--- a/PEIS/ReportFiles/Guide.frx
+++ b/PEIS/ReportFiles/Guide.frx
@@ -1,5 +1,5 @@
-
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -167,7 +167,7 @@ namespace FastReport
-
+
@@ -192,29 +192,27 @@ namespace FastReport
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/PEIS/View/Base/OrgForm.cs b/PEIS/View/Base/OrgForm.cs
index f36f0a6..4d7494d 100644
--- a/PEIS/View/Base/OrgForm.cs
+++ b/PEIS/View/Base/OrgForm.cs
@@ -135,7 +135,7 @@ namespace PEIS.View.Base
if (delConfirm == DialogResult.Cancel) return;
bool _orgDelState = _lstOrg.Where(a => a.ID == oid).ToList()[0].Delete();
if (!_orgDelState) return;
- new Log($"删除团体信息:团体名称={name}", "3").Save();
+ new Entity.Log($"删除团体信息:团体名称={name}", "3").Save();
_lstPatient.ForEach(item => item.Delete());
_lstOrg.RemoveAt(_lstOrg.IndexOf(_lstOrg.Where(a => a.ID == Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString())).ToList()[0]));
DgvOrg.RefreshData();
@@ -247,7 +247,7 @@ namespace PEIS.View.Base
bool delState = _lstPatient.Where(a => a.ID == id).ToList()[0].Delete();
if (delState)
{
- new Log($@"删除团体成员:PID={DgvPatient.GetRowCellValue(row, "PID")},姓名={DgvPatient.GetRowCellValue(row, "Name")}", "3").Save();
+ new Entity.Log($@"删除团体成员:PID={DgvPatient.GetRowCellValue(row, "PID")},姓名={DgvPatient.GetRowCellValue(row, "Name")}", "3").Save();
_lstPatient.RemoveAt(_lstPatient.IndexOf(_lstPatient.Where(a => a.ID == id).ToList()[0]));
}
}
diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.cs b/PEIS/View/Enrollment/EnrollmentOrgForm.cs
index 9335110..8943ef7 100644
--- a/PEIS/View/Enrollment/EnrollmentOrgForm.cs
+++ b/PEIS/View/Enrollment/EnrollmentOrgForm.cs
@@ -355,7 +355,7 @@ namespace PEIS.View.Enrollment
}
//
- if (IsOccupational && item.Type.Contains("职业"))
+ if (IsOccupational && item.Type != null && item.Type.Contains("职业"))
{
if(string.IsNullOrEmpty(item.JobStatus) || string.IsNullOrEmpty(item.HazardFactors))
{
@@ -385,7 +385,7 @@ namespace PEIS.View.Enrollment
foreach (var item in _lstGroup)
{
// 同步后的不可更改项目
- if (item.CheckTime != null || !(item.Type.Contains("职业"))) continue;
+ if (item.CheckTime != null || item.Type == null || !(item.Type.Contains("职业"))) continue;
// 避免重复开设,删除分组原有所有项目
DAOHelp.ExecuteSql($@" DELETE FROM Enrollment_OrgFeeItem WHERE GroupID = {item?.ID}");
@@ -887,7 +887,7 @@ namespace PEIS.View.Enrollment
ShowOrgPatient(_lstPatient);
DgvPatient.ClearSelection();
DgvPatient.RefreshData();
- new Log($@"删除团体成员:PID={baseOrgPatient.PID},Name={baseOrgPatient.Name}", "3").Save();
+ new Entity.Log($@"删除团体成员:PID={baseOrgPatient.PID},姓名={baseOrgPatient.Name}", "3").Save();
}
else
{
@@ -1149,7 +1149,7 @@ namespace PEIS.View.Enrollment
DialogResult delConfirm = MessageBox.Show($"确定删除成员【{item.Name}】的收费项目信息并剔除分组?", "警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if(delConfirm == DialogResult.OK)
{
- OnCancelRegInfo(item.ID);
+ OnCancelRegInfo(item);
OnGetOrgPatient();
OnGetGroupPatient(Convert.ToInt64(DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "ID").ToString()), Convert.ToInt64(DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "OID").ToString()));
}
@@ -1278,14 +1278,15 @@ namespace PEIS.View.Enrollment
}
}
+ // 撤回发送
private void FastRecall_Click(object sender, EventArgs e)
{
if (DgvEnrollment.GetRowCellValue(DgvEnrollment.GetSelectedRows()[0], "ID") == null && _chooseRegItem == null) return;
EnrollmentPatient item = DgvEnrollment.GetRow(DgvEnrollment.GetSelectedRows()[0]) as EnrollmentPatient;
if (item.SignTime == null) return;
- OnRecallDept(item.ID);
- } // 撤回发送
+ OnRecallDept(item);
+ }
private void DgvGroup_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) // 在岗情况判断
{
@@ -1326,7 +1327,7 @@ namespace PEIS.View.Enrollment
return;
}
- OnCancelCharge(item.ID);
+ OnCancelCharge(item);
OnGetCheckCost(Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString()), _chooseRegItem.ID);
}
@@ -1443,7 +1444,7 @@ namespace PEIS.View.Enrollment
return;
}
- OnCancelCharge(item.ID);
+ OnCancelCharge(item);
OnGetCheckCost(Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString()), _chooseRegItem.ID);
}
@@ -1804,14 +1805,18 @@ namespace PEIS.View.Enrollment
ChangeCost?.Invoke(this, new Args { ID = ID, EnrollmentOID = oeID });
}
- protected virtual void OnCancelRegInfo(Int64 EID)
+ protected virtual void OnCancelRegInfo(EnrollmentPatient patient)
{
- CancelRegInfo?.Invoke(this, new Args { ID = EID });
+ var oEid = patient.OEID == null ? 0 : (long)patient.OEID;
+ var pid = patient.PID == null ? 0 : (long)patient.PID;
+ var groupId = patient.GroupID == null ? 0 : (long)patient.GroupID;
+ CancelRegInfo?.Invoke(this, new Args { ID = patient.ID, OEID = oEid, Name = patient.Name, Pid = pid, GroupID = groupId });
}
- protected virtual void OnRecallDept(Int64 Id)
+ protected virtual void OnRecallDept(EnrollmentPatient patient)
{
- RecallDept?.Invoke(this, new Args { ID = Id });
+ var oEid = patient.OEID == null ? 0 : (long)patient.OEID;
+ RecallDept?.Invoke(this, new Args { ID = patient.ID, Name = patient.Name, OEID = oEid });
}
protected virtual void OnDelItemByPackId(Int64 Id, Int64 groupId, Int64 packId)
@@ -1833,9 +1838,11 @@ namespace PEIS.View.Enrollment
AddOrgPatient?.Invoke(this, new Args { BaseOID = oid, ID = pid });
}
- protected virtual void OnCancelCharge(Int64 id)
+ protected virtual void OnCancelCharge(EnrollmentCheckCost cost)
{
- CancelCharge?.Invoke(this, new Args { ID = id });
+ var oEid = cost.OEID == null ? 0 : (long)cost.OEID;
+ var eId = cost.EID == null ? 0 : (long)cost.EID;
+ CancelCharge?.Invoke(this, new Args { ID = cost.ID, Name = cost.Name, Eid = eId, OEID = oEid });
}
protected virtual void OnDeleteOrder(Int64 id)
diff --git a/PEIS/View/Enrollment/EnrollmentPersonForm.cs b/PEIS/View/Enrollment/EnrollmentPersonForm.cs
index b703f1b..59cb3dc 100644
--- a/PEIS/View/Enrollment/EnrollmentPersonForm.cs
+++ b/PEIS/View/Enrollment/EnrollmentPersonForm.cs
@@ -341,7 +341,7 @@ namespace PEIS.View.Enrollment
if (Global.Msg("warn", "确定取消登记该信息?") == DialogResult.No) return;
- OnCancelRegInfo(_chooseRegItem.ID);
+ OnCancelRegInfo(_chooseRegItem);
OnGetRegItems(0);
}
@@ -491,7 +491,7 @@ namespace PEIS.View.Enrollment
return;
}
- if (item.IsOccupational && _chooseRegItem.Type.Contains("职业"))
+ if (item.IsOccupational && _chooseRegItem.Type != null && _chooseRegItem.Type.Contains("职业"))
{
Global.Msg("info", "此为职业体检必检项目,不可改动!");
return;
@@ -692,7 +692,7 @@ namespace PEIS.View.Enrollment
return;
}
- OnCancelCharge(item.ID);
+ OnCancelCharge(item);
OnGetCheckCost(_chooseRegItem.ID);
}
@@ -771,7 +771,7 @@ namespace PEIS.View.Enrollment
private void FastRecallDept_Click(object sender, EventArgs e)
{
if (_chooseRegItem == null || _chooseRegItem.SignTime == null) return;
- OnRecallDept(_chooseRegItem.ID);
+ OnRecallDept(_chooseRegItem);
OnGetRegItems(0);
}
@@ -979,9 +979,12 @@ namespace PEIS.View.Enrollment
{
}
- protected virtual void OnCancelRegInfo(Int64 EID)
+ protected virtual void OnCancelRegInfo(EnrollmentPatient patient)
{
- CancelRegInfo?.Invoke(this, new Args { ID = EID });
+ var oEid = patient.OEID == null ? 0 : (long)patient.OEID;
+ var pid = patient.PID == null ? 0 : (long)patient.PID;
+ var groupId = patient.GroupID == null ? 0 : (long)patient.GroupID;
+ CancelRegInfo?.Invoke(this, new Args { ID = patient.ID, OEID = oEid, Name = patient.Name, Pid = pid, GroupID = groupId });
}
// 删除订单
@@ -1014,9 +1017,11 @@ namespace PEIS.View.Enrollment
}));
}
}
- protected virtual void OnCancelCharge(Int64 id)
+ protected virtual void OnCancelCharge(EnrollmentCheckCost cost)
{
- CancelCharge?.Invoke(this, new Args { ID = id });
+ var oEid = cost.OEID == null ? 0 : (long)cost.OEID;
+ var eId = cost.EID == null ? 0 : (long)cost.EID;
+ CancelCharge?.Invoke(this, new Args { ID = cost.ID, Name = cost.Name, Eid = eId, OEID = oEid });
}
// 移除套餐
@@ -1028,9 +1033,9 @@ namespace PEIS.View.Enrollment
// 撤回发送
public event EventHandler> RecallDept;
- protected virtual void OnRecallDept(Int64 Id)
+ protected virtual void OnRecallDept(EnrollmentPatient patient)
{
- RecallDept?.Invoke(this, new Args { ID = Id });
+ RecallDept?.Invoke(this, new Args { ID = patient.ID, Name = patient.Name });
}
#endregion
diff --git a/PEIS/View/Enrollment/NewEnrollmentPersonForm.cs b/PEIS/View/Enrollment/NewEnrollmentPersonForm.cs
index e605ab7..5c9341d 100644
--- a/PEIS/View/Enrollment/NewEnrollmentPersonForm.cs
+++ b/PEIS/View/Enrollment/NewEnrollmentPersonForm.cs
@@ -90,7 +90,7 @@ namespace PEIS.View.Enrollment
private void ExamTypeComboBox_SelectedValueChanged(object sender, EventArgs e)
{
var type = ExamTypeComboBox.SelectedValue?.ToString();
- if (type.Contains("职业"))
+ if (type != null && type.Contains("职业"))
{
JobTypes.Enabled = true;
WorkYears.Enabled = true;
@@ -309,7 +309,7 @@ namespace PEIS.View.Enrollment
var ExamType = ExamTypeComboBox.SelectedValue?.ToString();
- if (ExamType.Contains("职业"))
+ if (ExamType != null && ExamType.Contains("职业"))
{
if(string.IsNullOrEmpty(JobTypes.Text.Trim()))
{
@@ -344,7 +344,7 @@ namespace PEIS.View.Enrollment
}
var _photo = ImageToBase64();
- if (string.IsNullOrEmpty(_photo) && !string.IsNullOrEmpty(_regInfo.Photo))
+ if (string.IsNullOrEmpty(_photo) && !string.IsNullOrEmpty(_regInfo?.Photo))
{
_photo = _regInfo.Photo;
}
@@ -374,9 +374,8 @@ namespace PEIS.View.Enrollment
Description = Description.Text.Trim(),
SpellCode = PingYinHelper.GetTotalPingYin(NameTextBox.Text.Trim()).FirstPingYin.Count == 0 ? null : PingYinHelper.GetTotalPingYin(NameTextBox.Text.Trim()).FirstPingYin[0]
};
-
- if (ExamType.Contains("职业"))
+ if (ExamType != null && ExamType.Contains("职业"))
{
item.JobTypes = JobTypes.Text.Trim();
item.WorkYears = WorkYears.Text.Trim();
@@ -385,7 +384,6 @@ namespace PEIS.View.Enrollment
item.HazardFactors = HazardFactorsComboBox.Text;
}
-
var _hazardListeee = HazardFactorsComboBox.EditValue as List