简单优化

1.优化应用模板的SQL
2.优化删除登记项目时PACS是否已登记的SQL
3.优化团体登记界面显示逻辑
dhzzyy
LiJiaWen 3 weeks ago
parent 9519e0c779
commit da584fff1a
  1. 2
      PEIS/Model/Enrollment/EnrollmentOrgFeeItemModel.cs
  2. 1
      PEIS/View/Enrollment/EnrollmentOrgForm.cs
  3. 2
      PEIS/View/Enrollment/EnrollmentPersonForm.cs

@ -69,7 +69,7 @@ namespace PEIS.Model.Enrollment
if (groupFeeItem.Count != 0) if (groupFeeItem.Count != 0)
{ {
// 个人收费项目信息 // 个人收费项目信息
DAOHelp.ExecuteSql($"INSERT INTO Enrollment_FeeItem(OEID, GroupID, EID, PackID, PackName, FID, FeeItemCode, FeeItemName, Quantity, Unit, Price, SettlePrice, ItemClass, CreateTime, CreatorCode, Creator, DeptCode, DeptName, Seq, KeyNo, Part) SELECT a.OEID, a.GroupID, a.ID, b.PackID, b.PackName, b.FID, b.FeeItemCode, b.FeeItemName, b.Quantity, b.Unit, b.Price, b.SettlePrice, b.ItemClass, GETDATE(), '{Global.currentUser.Code}', '{Global.currentUser.Name}', b.DeptCode, b.DeptName, b.Seq, b.KeyNo, B.Part FROM Enrollment_patient a LEFT JOIN dbo.Enrollment_OrgFeeItem b ON a.GroupID = b.GroupID WHERE a.GroupID = { groupID} AND a.OEID = {oeID} AND a.ID NOT IN ( SELECT EID FROM Enrollment_FeeItem )"); DAOHelp.ExecuteSql($"INSERT INTO Enrollment_FeeItem(OEID, GroupID, EID, PackID, PackName, FID, FeeItemCode, FeeItemName, Quantity, Unit, Price, SettlePrice, ItemClass, CreateTime, CreatorCode, Creator, DeptCode, DeptName, Seq, KeyNo, Part) SELECT a.OEID, a.GroupID, a.ID, b.PackID, b.PackName, b.FID, b.FeeItemCode, b.FeeItemName, b.Quantity, b.Unit, b.Price, b.SettlePrice, b.ItemClass, GETDATE(), '{Global.currentUser.Code}', '{Global.currentUser.Name}', b.DeptCode, b.DeptName, b.Seq, b.KeyNo, B.Part FROM Enrollment_patient a LEFT JOIN dbo.Enrollment_OrgFeeItem b ON a.GroupID = b.GroupID LEFT JOIN dbo.Enrollment_FeeItem c ON a.ID = c.EID WHERE a.GroupID = { groupID} AND a.OEID = {oeID} AND c.ID IS NULL");
} }
// 更新应用时间 // 更新应用时间

@ -687,6 +687,7 @@ namespace PEIS.View.Enrollment
if (Global.Msg("warn", "是否将收费模板应用到当前分组成员?") == System.Windows.Forms.DialogResult.No) return; if (Global.Msg("warn", "是否将收费模板应用到当前分组成员?") == System.Windows.Forms.DialogResult.No) return;
OnApplyGroupFeeItem(Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString()), Convert.ToInt64(DgvGroup2.GetRowCellValue(DgvGroup2.GetSelectedRows()[0], "ID").ToString())); OnApplyGroupFeeItem(Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString()), Convert.ToInt64(DgvGroup2.GetRowCellValue(DgvGroup2.GetSelectedRows()[0], "ID").ToString()));
topRowIndex = -1;
} }
private void BtnCancelGroupFeeItem_Click(object sender, EventArgs e) private void BtnCancelGroupFeeItem_Click(object sender, EventArgs e)

@ -555,7 +555,7 @@ namespace PEIS.View.Enrollment
bool _isPacsRegist = false; bool _isPacsRegist = false;
foreach (EnrollmentFeeItem _feeItem in _packCheckFeeItem) foreach (EnrollmentFeeItem _feeItem in _packCheckFeeItem)
{ {
System.Data.DataTable dataTable = DAOHelp.GetDataBySQL($@"select * from pacs.DICOMSERVER.dbo.PatientSchedule where XMNo = {_feeItem.ID} and DelDate is NULL"); System.Data.DataTable dataTable = DAOHelp.GetDataBySQL($@"select * from pacs.DICOMSERVER.dbo.PatientSchedule where Patient ID = 'T_{_feeItem.EID}' and XMNo = {_feeItem.ID} and DelDate is NULL");
if (dataTable.Rows.Count > 0) if (dataTable.Rows.Count > 0)
{ {
_isPacsRegist = true; _isPacsRegist = true;

Loading…
Cancel
Save