代码上传

dhzzyy
zdnpc 1 month ago
parent 639ddabc53
commit ee6d42661c
  1. 22
      PEIS/App.config
  2. 12
      PEIS/Entity/EnrollmentOrg.cs
  3. 7
      PEIS/Entity/EnrollmentPatient.cs
  4. 14
      PEIS/Model/Enrollment/EnrollmentCheckCostModel.cs
  5. 17
      PEIS/Model/Enrollment/EnrollmentOrgFeeItemModel.cs
  6. 44
      PEIS/Model/Enrollment/EnrollmentOrgModel.cs
  7. 16
      PEIS/Model/Enrollment/EnrollmentPatientModel.cs
  8. 76
      PEIS/Model/Exam/PartModel.cs
  9. 2
      PEIS/Model/Exam/TotalModel.cs
  10. 6
      PEIS/PEIS.csproj
  11. 5
      PEIS/Presenter/EnrollmentOrgPresenter.cs
  12. 8
      PEIS/Program.cs
  13. 0
      PEIS/ReportFiles/BasicInformationRegistration.xls
  14. 0
      PEIS/ReportFiles/HospitalBasicInformationRegistration.xlsx
  15. 240
      PEIS/ReportFiles/Msfy/PReport.frx
  16. 14
      PEIS/ReportFiles/OrderCount.frx
  17. 106
      PEIS/ReportFiles/OrgExcel.frx
  18. 112
      PEIS/ReportFiles/OrgExcel1.frx
  19. 26
      PEIS/ReportFiles/PReport.frx
  20. 0
      PEIS/ReportFiles/PackExportTemplate.xlsx
  21. 5
      PEIS/Utils/DAOHelp.cs
  22. 3
      PEIS/Utils/ExcelHelper.cs
  23. 13
      PEIS/Utils/ReportHelper.cs
  24. 7
      PEIS/View/Base/NewPersonForm.cs
  25. 2
      PEIS/View/Base/OrgForm.cs
  26. 11
      PEIS/View/Base/PatientImportForm.cs
  27. 38
      PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs
  28. 151
      PEIS/View/Enrollment/EnrollmentOrgForm.cs
  29. 20
      PEIS/View/Enrollment/EnrollmentPersonForm.cs
  30. 1
      PEIS/View/Enrollment/IEnrollmentOrgView.cs
  31. 37
      PEIS/View/Enrollment/NewEnrollmentOrgForm.Designer.cs
  32. 1
      PEIS/View/Enrollment/NewEnrollmentOrgForm.cs
  33. 2
      PEIS/View/Enrollment/NewEnrollmentPersonForm.Designer.cs
  34. 6
      PEIS/View/Enrollment/NewEnrollmentPersonForm.cs
  35. 24
      PEIS/View/Exam/PartForm.Designer.cs
  36. 68
      PEIS/View/Exam/PartForm.cs
  37. 102
      PEIS/View/Exam/TotalForm.Designer.cs
  38. 18
      PEIS/View/Exam/TotalForm.cs
  39. 25
      PEIS/View/Setting/PackForm.cs
  40. 65
      PEIS/View/UControl/HistoryView.cs

@ -7,19 +7,21 @@
<!-- <add value="1.0.3" key="Version"/> -->
<!-- <add value="http://200.200.200.71:5200/version/download" key="DownloadUrl"/> -->
<!-- 德宏中医 -->
<!--<add value="0513" key="UserCode"/>
<add value="赵翠回" key="UserName"/>-->
<!--<add value="0513" key="UserCode"/> 1115-->
<!--<add value="赵翠回" key="UserName"/>-->
<!-- 芒市妇幼 -->
<!--<add value="0465" key="UserCode"/> 2-->
<!--<add value="李信富" key="UserName"/>-->
<!-- 盈江妇幼 -->
<!--<add value="0125" key="UserCode"/> 666-->
<!--<add value="刘华香" key="UserName"/>-->
<!-- 188 -->
<add value="0293" key="UserCode"/>
<add value="罗忠兰" key="UserName"/>
</appSettings>
<connectionStrings>
<!-- 德宏州中医院 peisdb2-->
<!-- <add name="ConnString" connectionString="10C598E364BCAFCF71617738597417B368D095FA1A37D76CC4755C411E5B6E792E0D4950863434F9B242AA9F134426A2922569235322E2342030D4AE0170168D8F1BC9B44D56F367DE9614CDCCBB6CDAEF20B4992B3758AD9FF39A400D08CC48"/> -->
<!-- 德宏州中医院 peisdb-->
<add name="ConnString" connectionString="10C598E364BCAFCF71617738597417B368D095FA1A37D76CC4755C411E5B6E792E0D4950863434F9B242AA9F134426A27810AC34D6EDC4F6ABFC4BE6027BB990824DB7092BFDA15709314FEBC2C3C9E312752DFBDF33BC1BF3C0FC84EAA83A4F"/>
<!--<add name="ConnString" connectionString="10C598E364BCAFCF71617738597417B368D095FA1A37D76CC4755C411E5B6E792E0D4950863434F9B242AA9F134426A27810AC34D6EDC4F6ABFC4BE6027BB990824DB7092BFDA15709314FEBC2C3C9E312752DFBDF33BC1BF3C0FC84EAA83A4F"/>-->
<!-- 192.168.12.188 -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D3D78E221B3E0300765B697A8C044694AA8A0575480464D83E79206ED689FE4A1CE0C479D02BC880B7FDEDDC464EE6B74BDB082FD5B1B9EFC"/>-->
<!-- 盈江妇幼YJFY -->
@ -30,8 +32,10 @@
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C763905B6860F9682000563332FCAB5C73858C4F5055412BEEA4250C4B7F818B1131EA88AF653A3B4CEF4C8709AEC4870673F567CE7499A1B68594877CCF22BD0DBB127636E607D7B6"/>-->
<!-- 102——盈江妇幼 -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D3DB10592B6516FF392A06CF6BBE697638BCAD04DF0DF496E1C332BF92A6874860C05781802A1E73DB9BCDE3FC2DDFD90CF24B75D2553DC3421EF8DCF69412797"/>-->
<!-- 102/112——芒市妇幼 -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D633D848E48ED11DF6B495F1D3AF9FC81959B048C0867E34D998ABDB34CF97D8FA6CC121A7855C73F474C304BCC447B73AC55CB42AA7DCEFB8FF5D776C08381C7DF5946B167D70A5C"/>-->
<!-- 112——盈江妇幼 -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D633D848E48ED11DF6B495F1D3AF9FC81959B048C0867E34D998ABDB34CF97D8FB976771F7C353F03582C9014715850C95ABC7C01A7B6078593BEEC3D0D66205D"/>-->
<!-- 112——芒市妇幼 -->
<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D633D848E48ED11DF6B495F1D3AF9FC81959B048C0867E34D998ABDB34CF97D8FA6CC121A7855C73F474C304BCC447B73AC55CB42AA7DCEFB8FF5D776C08381C7DF5946B167D70A5C"/>
</connectionStrings>
<entityFramework>
<providers>

@ -31,5 +31,17 @@ namespace PEIS.Entity
/// 开票名称
/// </summary>
public String InvoiceName { get; set; }
/// <summary>
/// 团体缴费状态
/// 0: 团体下所有人的团体订单已缴费(已结账)
/// >0:未结账
/// </summary>
[RefFlag(true)]
public Int32? OrgCostStatus { get; set; }
/// <summary>
/// 团体下登记人数
/// </summary>
[RefFlag(true)]
public Int32? OrgPeopleNumber { get; set; }
}
}

@ -117,6 +117,9 @@ namespace PEIS.Entity
[RefFlag(true)]
public Int64 RowNumber { get; set; }
#endregion Other
}
[RefFlag(true)]
public Decimal Discount { get; set; }
#endregion Other
}
}

@ -34,8 +34,18 @@ namespace PEIS.Model.Enrollment
public List<EnrollmentCheckCost> GetCheckCost(Int64 oeID, Int64 enrollmentID)
{
var team = DAOHelp.GetDataBySQL<EnrollmentCheckCost>($"Select a.*,b.Name from Enrollment_CheckCost a LEFT JOIN dbo.Enrollment_Patient b ON a.EID = b.ID Where a.OEID = {oeID} AND DeleteTime is null AND CancelTime is null AND EID > 0");
var person = DAOHelp.GetDataBySQL<EnrollmentCheckCost>($"Select a.*,b.Name from Enrollment_CheckCost a LEFT JOIN dbo.Enrollment_Patient b ON a.EID = b.ID Where EID = {enrollmentID} AND DeleteTime is null AND CancelTime is null");
var team = DAOHelp.GetDataBySQL<EnrollmentCheckCost>($@"Select
a.*,
b.Name
from Enrollment_CheckCost a
LEFT JOIN dbo.Enrollment_Patient b ON a.EID = b.ID
Where a.OEID = {oeID} AND DeleteTime is null AND CancelTime is null AND EID > 0");
var person = DAOHelp.GetDataBySQL<EnrollmentCheckCost>($@"Select
a.*,
b.Name
from Enrollment_CheckCost a
LEFT JOIN dbo.Enrollment_Patient b ON a.EID = b.ID
Where EID = {enrollmentID} AND DeleteTime is null AND CancelTime is null");
return team.Concat(person).GroupBy(g => g.ID).Select(s => s.First()).ToList();
}

@ -70,6 +70,23 @@ namespace PEIS.Model.Enrollment
DAOHelp.ExecuteSql($"UPDATE dbo.Enrollment_OrgGroup SET Checker = '{Global.currentUser.Name}', CheckerCode = '{Global.currentUser.Code}', CheckTime = GETDATE() WHERE OID = {oeID} AND ID = {groupID}");
}
public void CancelOrgFeeItem(Int64 oeID, Int64 groupID, string oeName)
{
// 个人登记信息
int delPatient = DAOHelp.ExecuteSql($@"delete from Enrollment_Patient where OEID = {oeID} and GroupId = {groupID}");
// 个人收费信息
int delFeeItem = DAOHelp.ExecuteSql($@"delete from Enrollment_FeeItem where OEID = {oeID} and GroupId = {groupID}");
// 删除应用时间
DAOHelp.ExecuteSql($@"update Enrollment_OrgGroup set Checker = NULL, CheckerCode = NULL, CheckTime = NULL WHERE OID = {oeID} AND ID = {groupID}");
// 记录日志
if (delPatient > 0 && delFeeItem > 0)
{
List<EnrollmentOrgGroup> orgGroups = DAOHelp.GetDataBySQL<EnrollmentOrgGroup>($@"select * from Enrollment_OrgGroup where ID = {groupID} and OID = {oeID}");
EnrollmentOrgGroup group = orgGroups?.Count > 0 ? orgGroups[0] : null;
new Entity.Log($@"撤销团体分组成员的模版应用:团体={oeName},团体号={oeID}, 分组名称={group?.Name},分组ID={groupID}", "3").Save();
}
}
public void DelItemByPackID(Int64 groupId, Int64 packId)
{
var sql = $"DELETE FROM Enrollment_OrgFeeItem WHERE GroupID = {groupId} AND PackID = {packId}";

@ -36,11 +36,39 @@ namespace PEIS.Model.Enrollment
// EnrollmentPatient c = DAOHelp.GetById(new EnrollmentPatient { ID = 12671 }) as EnrollmentPatient;
if (String.IsNullOrEmpty(name))
{
return DAOHelp.GetDataBySQL<EnrollmentOrg>($"Select * from Enrollment_Org Where ExamDate Between '{begTime}' And DateAdd(day, 1,'{endTime}')");
return DAOHelp.GetDataBySQL<EnrollmentOrg>($@"Select
c.*,
(select COUNT(ID) from Enrollment_Patient where OEID = c.ID) as OrgPeopleNumber,
(SELECT COUNT(A.ID)
FROM Enrollment_Patient A
WHERE A.OEID = c.ID
and NOT EXISTS (
SELECT 1
FROM Enrollment_CheckCost B
WHERE B.EID = A.ID
and b.DeleteTime is null
and b.CostTime is not null
and b.OEID is not null
)) as OrgCostStatus
from Enrollment_Org c Where c.ExamDate Between '{begTime}' And DateAdd(day, 1,'{endTime}')");
}
else
{
return DAOHelp.GetDataBySQL<EnrollmentOrg>($"Select * from Enrollment_Org Where Name like '%{name}%' or SpellCode like '%{name}%'");
return DAOHelp.GetDataBySQL<EnrollmentOrg>($@"Select
c.*,
(select COUNT(ID) from Enrollment_Patient where OEID = c.ID) as OrgPeopleNumber,
(SELECT COUNT(A.ID)
FROM Enrollment_Patient A
WHERE A.OEID = c.ID
and NOT EXISTS (
SELECT 1
FROM Enrollment_CheckCost B
WHERE B.EID = A.ID
and b.DeleteTime is null
and b.CostTime is not null
and b.OEID is not null
)) as OrgCostStatus
from Enrollment_Org c Where c.Name like '%{name}%' or c.SpellCode like '%{name}%'");
}
}
@ -54,18 +82,16 @@ namespace PEIS.Model.Enrollment
// 插入常规检查男/女
var normal = $@"EXEC sp_InsertNormalFeeItem {eID};";
// 发送后变更执行科室 //同步分检
// 发送后变更执行科室
// 同步分检,生成科室分检信息
var dept = $@"EXEC sp_UpdateSendToDept {eID};";
var cResult = DAOHelp.ExecuteSql(checkCost, false);
var eResult = DAOHelp.ExecuteSql(enrollmentPatient, false);
var fResult = DAOHelp.ExecuteSql(enrollmentFeeItem, false);
var nResult = DAOHelp.ExecuteSql(normal);
if (Global._hospital.Name == "德宏州中医医院")
{
var dResult = DAOHelp.ExecuteSql(dept);
}
var dResult = DAOHelp.ExecuteSql(dept);
return cResult > 0 && eResult > 0 && fResult > 0;
}
@ -118,6 +144,8 @@ namespace PEIS.Model.Enrollment
a.Tel1,
c.DeptName,
a.SignTime,
(SELECT SUM ([sum]) FROM Enrollment_CheckCost WHERE a.ID = EID AND a.OEID = OEID AND DeleteTime IS NULL AND CancelTime IS NULL ) AS Price,
(SELECT ROUND(CAST((SUM (Fee) / SUM([Sum]) * 10) AS DECIMAL(10,2)), 2) FROM Enrollment_CheckCost WHERE a.ID = EID AND a.OEID = OEID AND DeleteTime IS NULL AND CancelTime IS NULL ) AS Discount,
(SELECT SUM(Fee) FROM Enrollment_CheckCost WHERE a.ID = EID AND a.OEID = OEID AND DeleteTime IS NULL) AS Fee,
a.Description
FROM

@ -90,10 +90,6 @@ namespace PEIS.Model.Enrollment
END AS Signer
from Enrollment_Patient a LEFT JOIN Base_Patient b ON a.PID = b.ID LEFT JOIN Base_OrgPatient c ON c.OID = a.OID AND c.PID = b.ID Where a.OEID = {oeID} order by c.DeptName,a.SignTime");
}
// 记 账
public bool ChargeOrder(Int64 Id, String isAlll)
@ -119,21 +115,19 @@ namespace PEIS.Model.Enrollment
var enrollmentPatient = $@"UPDATE Enrollment_Patient SET ExamDate = GETDATE(), SignTime = GETDATE(), SignerCode = '{Global.currentUser.Code}', Signer = '{Global.currentUser.Name}' WHERE ID = {EId} AND SignTime is null";
var enrollmentFeeItem = $@"UPDATE a SET a.IsSend = 1 FROM Enrollment_FeeItem a LEFT JOIN Enrollment_CheckCost b ON a.OrderNO = b.ID AND a.EID = b.EID WHERE b.SendTime IS NOT NULL AND a.EID = {EId}; ";
// 插入常规检查男/女 //同步分检
// 插入常规检查男/女
var normal = $@"EXEC sp_InsertNormalFeeItem {EId};";
// 发送后变更执行科室
// 同步分检,生成科室分检信息
var dept = $@"EXEC sp_UpdateSendToDept {EId};";
var cResult = DAOHelp.ExecuteSql(checkCost, false);
var eResult = DAOHelp.ExecuteSql(enrollmentPatient, false);
var fResult = DAOHelp.ExecuteSql(enrollmentFeeItem, false);
var nResult = DAOHelp.ExecuteSql(normal);
if (Global._hospital.Name == "德宏州中医医院")
{
var dResult = DAOHelp.ExecuteSql(dept);
}
var dResult = DAOHelp.ExecuteSql(dept);
return cResult > 0 && eResult > 0 && fResult > 0;
}

@ -233,13 +233,38 @@ namespace PEIS.Model
// 检验检查心电科室Code
var deptCodeList = Global._lstConfig.Where(p => p.Key == "CheckDeptCode").Select(p => p.Code).ToList();
//new List<string>()
//{
// "3101", //病理科
// "3201", //放射科
// "3203", //超声科
//};
#region 各分支科室设置
// dhzzyy
/* new List<string>()
{
"3101", //病理科
"3201", //放射科
"3203", //超声科
};*/
// msfy
/*new List<string>()
{
"01064", //心电室
"3201", //放射科
"3202", //超声科
};*/
// yjfy
/*new List<string>()
{
"3101", //病理科
"3201", //放射科
"3202", //超声科
};*/
// mzzyy
/*new List<string>()
{
"3101", //病理科
"3201", //放射科
"3202", //超声科
};*/
#endregion
var index = 1;
results.GroupBy(g => g.FeeItemName).ToList().ForEach(items =>
{
@ -248,7 +273,24 @@ namespace PEIS.Model
summary += Environment.NewLine;
}
summary += $@"{index}.{items.Key}:" + Environment.NewLine;
if (!deptCodeList.Contains(deptCode) && deptCode != "0141")
if (!deptCodeList.Contains(deptCode))
{
summary += string.Join(Environment.NewLine,
items.Select(s => $@" {s.RptItemName}:{s.TextResult} {s.Unit} {s.UnusualFlag};").ToList());
}
else
{
summary += string.Join(Environment.NewLine, items.Select(s => $@" {s.TextResult}").ToList());
var suggestion = items.FirstOrDefault()?.TextResult ?? "";
if (!string.IsNullOrEmpty(suggestion) && !string.IsNullOrEmpty(items.Key) && part.ID > 0)
{
DAOHelp.ExecuteSql(
$@" INSERT INTO Exam_Conclusion(PID, Conclusion, Suggestion, EID)VALUES({part.ID},'{items.Key}','{suggestion}',{eid})");
}
}
/*if (!deptCodeList.Contains(deptCode) && deptCode != "0141")
{
summary += string.Join(Environment.NewLine,
items.Select(s => $@"{s.RptItemName}:{s.TextResult} {s.Unit} {s.UnusualFlag};").ToList());
@ -265,13 +307,15 @@ namespace PEIS.Model
if (!string.IsNullOrEmpty(suggestion) && !string.IsNullOrEmpty(items.Key) && part.ID > 0)
{
DAOHelp.ExecuteSql(
$@" INSERT INTO Exam_Conclusion(PID, Conclusion, Suggestion, EID)VALUES({part.ID},'{items.Key}','{suggestion}',{eid})");
$@"INSERT INTO Exam_Conclusion(PID, Conclusion, Suggestion, EID)VALUES({part.ID},'{items.Key}','{suggestion}',{eid})");
}
}
}*/
index += 1;
});
if (string.IsNullOrEmpty(summary))
if (string.IsNullOrEmpty(summary))
{
summary = "未见明显异常";
}
DAOHelp.ExecuteSql($@"UPDATE Exam_Part SET Summary='{summary}' Where EID={eid} AND DeptCode='{deptCode}'");
var exits = DAOHelp.ExecuteSql($@"
@ -480,11 +524,10 @@ namespace PEIS.Model
B.Positive,
B.InTime,
B.SpcimenName
FROM
Enrollment_FeeItem A
LEFT JOIN Report B ON A.EID = B.EID AND A.ID= B.ReportNo
LEFT JOIN Dict_FeeItem FeeItem ON A.FID= FeeItem.ID
LEFT JOIN Report B ON A.EID = B.EID AND A.ID = B.ReportNo
LEFT JOIN Dict_FeeItem FeeItem ON A.FID= FeeItem.ID
WHERE
A.ItemClass = '' AND FeeItem.IsHide=0 AND A.eid = {eid}").ToList();
return reportList;
@ -545,14 +588,13 @@ LEFT JOIN Dict_FeeItem FeeItem ON A.FID= FeeItem.ID
var general = GeneralExamResult(eid, deptCode);
var lis = deptCode== "3001" ? LisExamResult(eid, deptCode) : new List<ExamResult>();
var jyLis = GetJyLisResult(eid, deptCode);
var pacs = PacsExamResult(eid, deptCode) ;
var pacs = PacsExamResult(eid, deptCode);
var data = giveUp.Union(general).ToList()
.Union(lis).ToList()
//.Union(jyLis).ToList()
.Union(jyLis).ToList()
.Union(pacs).ToList()
.Distinct().ToList();
// data.RemoveAll(p => p.FID == null);
return data.Distinct().OrderBy(o => o.FID).ThenBy(t => t.RID).ToList();
}

@ -159,7 +159,7 @@ namespace PEIS.Model
}
else
{
return DAOHelp.GetDataBySQL<ExamPart>($@" SELECT * FROM Exam_Part WHERE EID= {eid} ORDER BY DeptCode")
return DAOHelp.GetDataBySQL<ExamPart>($@"SELECT * FROM Exam_Part WHERE EID= {eid} ORDER BY DeptCode")
.ToList();
}
}

@ -786,13 +786,13 @@
<None Include="ReportFiles\Work.frx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="ReportFiles\体检基本信息登记表.xls">
<None Include="ReportFiles\BasicInformationRegistration.xls">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="ReportFiles\体检套餐导出模版.xlsx">
<None Include="ReportFiles\PackExportTemplate.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="ReportFiles\医院体检人员信息收集样表.xlsx">
<None Include="ReportFiles\HospitalBasicInformationRegistration.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Utils\SS860\RDCard64\license.dat" />

@ -73,6 +73,11 @@ namespace PEIS.Presenter
new EnrollmentOrgFeeItemModel().ApplyOrgFeeItem(args.EnrollmentOID, args.GroupID);
View.ShowEnrollmentOrgGroup(new EnrollentOrgGroupModel().GetByoID(args.EnrollmentOID));
};
View.CancelGroupFeeItem += (send, args) =>
{
new EnrollmentOrgFeeItemModel().CancelOrgFeeItem(args.EnrollmentOID, args.GroupID, args.Name);
View.ShowEnrollmentOrgGroup(new EnrollentOrgGroupModel().GetByoID(args.EnrollmentOID));
};
View.GetEnrollmentPatient += (send, args) =>
{
View.ShowEnrollmentPatient(new EnrollmentPatientModel().GetEnrollmentPatientByEnrollmentOrg(args.EnrollmentOID));

@ -2,12 +2,8 @@
using PEIS.Utils;
using PEIS.View;
using System;
using System.Diagnostics;
using System.Threading;
using System.Windows.Forms;
using DevExpress.XtraEditors.NavigatorButtons;
using PEIS.View.Exam;
using PEIS.View.Setting;
namespace PEIS
{
@ -34,6 +30,10 @@ namespace PEIS
//var s = MySecurity.SEncryptString("Data Source=192.168.12.112;Initial Catalog=peisdb;User ID=XBDLISUser;Password=BlueFlag.Lis!@#");
//var s = MySecurity.SEncryptString("Data Source=192.168.12.112;Initial Catalog=peisdb;User ID=sa;Password=xbdLis!@#77911");
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

File diff suppressed because one or more lines are too long

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="06/27/2023 14:18:39" ReportInfo.Modified="07/17/2023 13:45:38" ReportInfo.CreatorVersion="2022.1.0.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="06/27/2023 14:18:39" ReportInfo.Modified="07/09/2025 17:21:49" ReportInfo.CreatorVersion="2022.1.0.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -31,8 +31,8 @@ namespace FastReport
totalSum += Convert.ToDouble(rowData[&quot;Sum&quot;].ToString());
totalHisSum += Convert.ToDouble(rowData[&quot;Fee&quot;].ToString());
Cell50.Text = totalSum.ToString();
Cell51.Text = totalHisSum.ToString();
Cell50.Text = totalSum.ToString(&quot;0.000&quot;);
Cell51.Text = totalHisSum.ToString(&quot;0.000&quot;);
int total = rowData.CurrentRowNo + 1;
Cell49.Text = &quot;-总计- &quot; + total.ToString() +&quot;笔订单&quot;;
@ -55,7 +55,7 @@ namespace FastReport
<TextObject Name="Text6" Left="538.65" Top="56.7" Width="66.15" Height="18.9" Text="统计类型:" HorzAlign="Right" VertAlign="Center" Font="微软雅黑, 9pt"/>
<TextObject Name="Text7" Left="604.8" Top="56.7" Width="113.4" Height="18.9" CanBreak="false" Text="[Type]" VertAlign="Center" WordWrap="false" Font="微软雅黑, 9pt"/>
</PageHeaderBand>
<DataBand Name="OrderCount" Top="119.8" Width="1047.06" Height="28.35" CanGrow="true" CanShrink="true" AfterDataEvent="OrderCount_AfterData" KeepTogether="true" KeepDetail="true">
<DataBand Name="OrderCount" Top="121.4" Width="1047.06" Height="28.35" CanGrow="true" CanShrink="true" AfterDataEvent="OrderCount_AfterData" KeepTogether="true" KeepDetail="true">
<TableObject Name="Table2" Width="1046.87" Height="28.35">
<TableColumn Name="Column15" Width="60.6"/>
<TableColumn Name="Column16" Width="51.15"/>
@ -88,7 +88,7 @@ namespace FastReport
<TableCell Name="Cell48" Border.Lines="All" VertAlign="Center" Font="微软雅黑, 8pt"/>
</TableRow>
</TableObject>
<DataHeaderBand Name="DataHeader1" Top="78.8" Width="1047.06" Height="37.8" CanGrow="true" CanShrink="true" KeepWithData="true" RepeatOnEveryPage="true">
<DataHeaderBand Name="DataHeader1" Top="79.6" Width="1047.06" Height="37.8" CanGrow="true" CanShrink="true" KeepWithData="true" RepeatOnEveryPage="true">
<TableObject Name="Table1" Width="1046.87" Height="37.8">
<TableColumn Name="Column1" Width="60.6"/>
<TableColumn Name="Column2" Width="51.15"/>
@ -122,7 +122,7 @@ namespace FastReport
</TableRow>
</TableObject>
</DataHeaderBand>
<DataFooterBand Name="DataFooter1" Top="151.35" Width="1047.06" Height="28.35" CanGrow="true" CanShrink="true" KeepWithData="true">
<DataFooterBand Name="DataFooter1" Top="153.75" Width="1047.06" Height="28.35" CanGrow="true" CanShrink="true" KeepWithData="true">
<TableObject Name="Table3" Width="1047.06" Height="28.35">
<TableColumn Name="Column29" Width="445.07"/>
<TableColumn Name="Column30" Width="325"/>
@ -135,7 +135,7 @@ namespace FastReport
</TableObject>
</DataFooterBand>
</DataBand>
<PageFooterBand Name="PageFooter1" Top="182.9" Width="1047.06" Height="37.8">
<PageFooterBand Name="PageFooter1" Top="186.1" Width="1047.06" Height="37.8">
<TextObject Name="Text8" Width="1047.06" Height="37.8" Text="第[Page#]页,共[TotalPages#]页" HorzAlign="Center" Font="微软雅黑, 10pt"/>
</PageFooterBand>
</ReportPage>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="06/26/2023 17:47:58" ReportInfo.Modified="10/21/2024 09:58:59" ReportInfo.CreatorVersion="2022.1.0.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="06/26/2023 17:47:58" ReportInfo.Modified="07/03/2025 14:48:19" ReportInfo.CreatorVersion="2022.1.0.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -18,11 +18,17 @@ namespace FastReport
{
public class ReportScript
{
private void Cell96_AfterData(object sender, EventArgs e)
{
if(Cell96.Text.Contains(&quot;合计&quot;)){
Cell96.Font = new Font(&quot;微软雅黑&quot;, (float)10, FontStyle.Bold);
}
}
private void PeopleCount_AfterData(object sender, EventArgs e)
private void Cell83_AfterData(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource(&quot;O&quot;);
Cell87.Text = rowData[&quot;SignTime&quot;] == null ? &quot;&quot; : Convert.ToDateTime(rowData[&quot;SignTime&quot;]).ToString(&quot;yyyy-MM-dd&quot;);
Cell83.Text = rowData[&quot;SignTime&quot;] == null ? &quot;&quot; : Convert.ToDateTime(rowData[&quot;SignTime&quot;]).ToString(&quot;yyyy-MM-dd&quot;);
}
}
}
@ -33,77 +39,99 @@ namespace FastReport
<Parameter Name="Yes" DataType="System.String"/>
<Parameter Name="No" DataType="System.String"/>
<Parameter Name="TotalFee" DataType="System.String"/>
<Parameter Name="TotalSum" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" RawPaperSize="9" Watermark.Font="宋体, 60pt">
<ColumnHeaderBand Name="ColumnHeader1" Width="718.2" Height="56.7" PrintOn="FirstPage">
<TextObject Name="Text1" Width="718.2" Height="56.7" Text="[OrgName]" AutoShrink="FontWidth" HorzAlign="Center" VertAlign="Center" WordWrap="false" Font="微软雅黑, 26pt, style=Bold"/>
</ColumnHeaderBand>
<DataBand Name="OrgExcel" Top="98.5" Width="718.2" Height="37.8" CanGrow="true" CanShrink="true" AfterDataEvent="PeopleCount_AfterData">
<GroupHeaderBand Name="GroupHeader1" Top="58.7" Width="718.2" Height="28.35" Condition="[F.GroupID]" SortOrder="None">
<TableObject Name="Table9" Width="718.2" Height="28.35" Border.Lines="All">
<TableColumn Name="Column69" Width="107.1"/>
<TableColumn Name="Column70" Width="494.55"/>
<TableColumn Name="Column71" Width="116.55"/>
<TableRow Name="Row9" Height="28.35">
<TableCell Name="Cell89" Border.Lines="All" Text="套餐名称" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt, style=Bold"/>
<TableCell Name="Cell90" Border.Lines="All" Text="体检项目" VertAlign="Center" Font="微软雅黑, 10pt, style=Bold"/>
<TableCell Name="Cell91" Border.Lines="All" Text="体检费用" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt, style=Bold"/>
</TableRow>
</TableObject>
<DataBand Name="OrgFeeItem" Top="89.05" Width="718.2" Height="28.35" CanGrow="true" CanShrink="true">
<TableObject Name="Table11" Width="718.2" Height="28.35" Border.Lines="All">
<TableColumn Name="Column75" Width="107.1"/>
<TableColumn Name="Column76" Width="494.55"/>
<TableColumn Name="Column77" Width="116.55"/>
<TableRow Name="Row11" MinHeight="28.35" Height="28.35" AutoSize="true">
<TableCell Name="Cell95" Border.Lines="All" Text="[F.PackName]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt" CellDuplicates="Merge"/>
<TableCell Name="Cell96" Border.Lines="All" AfterDataEvent="Cell96_AfterData" Text="[F.FeeItemName]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell97" Border.Lines="All" Text="[F.Price]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
</TableRow>
</TableObject>
</DataBand>
<GroupFooterBand Name="GroupFooter1" Top="119.4" Width="718.2" Height="28.35"/>
</GroupHeaderBand>
</ReportPage>
<ReportPage Name="Page2" Watermark.Font="宋体, 60pt">
<DataBand Name="OrgExcel" Top="41.8" Width="718.2" Height="37.8" CanGrow="true" CanShrink="true">
<TableObject Name="Table8" Width="718.19" Height="37.8">
<TableColumn Name="Column57" Width="36.96"/>
<TableColumn Name="Column58" Width="55.86"/>
<TableColumn Name="Column59" Width="55.86"/>
<TableColumn Name="Column60" Width="36.95"/>
<TableColumn Name="Column61" Width="36.96"/>
<TableColumn Name="Column62" Width="46.41"/>
<TableColumn Name="Column63" Width="103.1"/>
<TableColumn Name="Column61" Width="46.41"/>
<TableColumn Name="Column62" Width="188.16"/>
<TableColumn Name="Column63" Width="93.65"/>
<TableColumn Name="Column64" Width="74.76"/>
<TableColumn Name="Column65" Width="65.32"/>
<TableColumn Name="Column66" Width="73.71"/>
<TableColumn Name="Column67"/>
<TableColumn Name="Column70"/>
<TableColumn Name="Column65" Width="46.42"/>
<TableColumn Name="Column66" Width="83.16"/>
<TableRow Name="Row8" Height="37.8">
<TableCell Name="Cell77" Border.Lines="All" Text="[Row#]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell78" Border.Lines="All" Text="[O.ID]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell79" Border.Lines="All" Text="[O.Name]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell80" Border.Lines="All" Text="[O.Sex]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell81" Border.Lines="All" Text="[O.Marriage]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell82" Border.Lines="All" Text="[O.AgeClass]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell83" Border.Lines="All" Text="[O.CardNo]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell84" Border.Lines="All" Text="[O.Tel1]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell85" Border.Lines="All" Text="[O.DeptName]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell86" Border.Lines="All" Text="[O.Description]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell87" Border.Lines="All" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell90" Border.Lines="All" Text="[O.Fee]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell81" Border.Lines="All" Text="[O.AgeClass]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell82" Border.Lines="All" Text="[O.CardNo]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell83" Border.Lines="All" AfterDataEvent="Cell83_AfterData" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell84" Border.Lines="All" Text="[O.Price]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell85" Border.Lines="All" Text="[O.Discount]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell86" Border.Lines="All" Text="[O.Fee]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
</TableRow>
</TableObject>
<DataHeaderBand Name="DataHeader1" Top="58.7" Width="718.2" Height="37.8">
<DataHeaderBand Name="DataHeader1" Width="718.2" Height="37.8">
<TableObject Name="Table1" Width="718.19" Height="37.8">
<TableColumn Name="Column1" Width="36.96"/>
<TableColumn Name="Column2" Width="55.86"/>
<TableColumn Name="Column3" Width="55.86"/>
<TableColumn Name="Column4" Width="36.95"/>
<TableColumn Name="Column5" Width="36.96"/>
<TableColumn Name="Column6" Width="46.41"/>
<TableColumn Name="Column7" Width="103.1"/>
<TableColumn Name="Column5" Width="46.41"/>
<TableColumn Name="Column6" Width="188.16"/>
<TableColumn Name="Column7" Width="93.65"/>
<TableColumn Name="Column8" Width="74.76"/>
<TableColumn Name="Column9" Width="65.32"/>
<TableColumn Name="Column45" Width="73.71"/>
<TableColumn Name="Column56"/>
<TableColumn Name="Column69"/>
<TableColumn Name="Column9" Width="46.42"/>
<TableColumn Name="Column45" Width="83.16"/>
<TableRow Name="Row1" Height="37.8">
<TableCell Name="Cell1" Border.Lines="All" Text="序号" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell2" Border.Lines="All" Text="体检号" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell3" Border.Lines="All" Text="姓名" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell4" Border.Lines="All" Text="性别" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell5" Border.Lines="All" Text="婚姻" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell6" Border.Lines="All" Text="年龄" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell7" Border.Lines="All" Text="证件号" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell8" Border.Lines="All" Text="联系方式" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell9" Border.Lines="All" Text="部门" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell65" Border.Lines="All" Text="备注" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell76" Border.Lines="All" Text="体检日期" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell89" Border.Lines="All" Text="体检费用" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell5" Border.Lines="All" Text="年龄" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell6" Border.Lines="All" Text="证件号" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell7" Border.Lines="All" Text="体检日期" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell8" Border.Lines="All" Text="体检费用" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell9" Border.Lines="All" Text="折扣" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell65" Border.Lines="All" Text="实收费用" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
</TableRow>
</TableObject>
</DataHeaderBand>
<DataFooterBand Name="DataFooter1" Top="138.3" Width="718.2" Height="28.35">
<DataFooterBand Name="DataFooter1" Top="83.6" Width="718.2" Height="28.35">
<TableObject Name="Table5" Width="718.2" Height="28.35" Fill.Color="InactiveBorder">
<TableColumn Name="Column35" Width="578.34"/>
<TableColumn Name="Column68" Width="139.86"/>
<TableColumn Name="Column35" Width="514.08"/>
<TableColumn Name="Column68" Width="120.96"/>
<TableColumn Name="Column78" Width="83.16"/>
<TableRow Name="Row5" Height="28.35" AutoSize="true">
<TableCell Name="Cell55" Border.Lines="All" Fill.Color="InactiveBorder" Text="-总计-:[TotalCount]人,已体检:[Yes]人,未体检:[No]人" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell88" Border.Lines="All" Text="[TotalFee]" HorzAlign="Right" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell88" Border.Lines="All" Text="[TotalPrice]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell98" Border.Lines="All" Text="[TotalFee]" HorzAlign="Right" VertAlign="Center" Font="微软雅黑, 10pt"/>
</TableRow>
</TableObject>
</DataFooterBand>

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="06/26/2023 17:47:58" ReportInfo.Modified="10/21/2024 09:58:59" ReportInfo.CreatorVersion="2022.1.0.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;
namespace FastReport
{
public class ReportScript
{
private void PeopleCount_AfterData(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource(&quot;O&quot;);
Cell87.Text = rowData[&quot;SignTime&quot;] == null ? &quot;&quot; : Convert.ToDateTime(rowData[&quot;SignTime&quot;]).ToString(&quot;yyyy-MM-dd&quot;);
}
}
}
</ScriptText>
<Dictionary>
<Parameter Name="OrgName" DataType="System.String"/>
<Parameter Name="TotalCount" DataType="System.String"/>
<Parameter Name="Yes" DataType="System.String"/>
<Parameter Name="No" DataType="System.String"/>
<Parameter Name="TotalFee" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" RawPaperSize="9" Watermark.Font="宋体, 60pt">
<ColumnHeaderBand Name="ColumnHeader1" Width="718.2" Height="56.7" PrintOn="FirstPage">
<TextObject Name="Text1" Width="718.2" Height="56.7" Text="[OrgName]" AutoShrink="FontWidth" HorzAlign="Center" VertAlign="Center" WordWrap="false" Font="微软雅黑, 26pt, style=Bold"/>
</ColumnHeaderBand>
<DataBand Name="OrgExcel" Top="98.5" Width="718.2" Height="37.8" CanGrow="true" CanShrink="true" AfterDataEvent="PeopleCount_AfterData">
<TableObject Name="Table8" Width="718.19" Height="37.8">
<TableColumn Name="Column57" Width="36.96"/>
<TableColumn Name="Column58" Width="55.86"/>
<TableColumn Name="Column59" Width="55.86"/>
<TableColumn Name="Column60" Width="36.95"/>
<TableColumn Name="Column61" Width="36.96"/>
<TableColumn Name="Column62" Width="46.41"/>
<TableColumn Name="Column63" Width="103.1"/>
<TableColumn Name="Column64" Width="74.76"/>
<TableColumn Name="Column65" Width="65.32"/>
<TableColumn Name="Column66" Width="73.71"/>
<TableColumn Name="Column67"/>
<TableColumn Name="Column70"/>
<TableRow Name="Row8" Height="37.8">
<TableCell Name="Cell77" Border.Lines="All" Text="[Row#]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell78" Border.Lines="All" Text="[O.ID]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell79" Border.Lines="All" Text="[O.Name]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell80" Border.Lines="All" Text="[O.Sex]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell81" Border.Lines="All" Text="[O.Marriage]" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell82" Border.Lines="All" Text="[O.AgeClass]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell83" Border.Lines="All" Text="[O.CardNo]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell84" Border.Lines="All" Text="[O.Tel1]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell85" Border.Lines="All" Text="[O.DeptName]" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell86" Border.Lines="All" Text="[O.Description]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell87" Border.Lines="All" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell90" Border.Lines="All" Text="[O.Fee]" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
</TableRow>
</TableObject>
<DataHeaderBand Name="DataHeader1" Top="58.7" Width="718.2" Height="37.8">
<TableObject Name="Table1" Width="718.19" Height="37.8">
<TableColumn Name="Column1" Width="36.96"/>
<TableColumn Name="Column2" Width="55.86"/>
<TableColumn Name="Column3" Width="55.86"/>
<TableColumn Name="Column4" Width="36.95"/>
<TableColumn Name="Column5" Width="36.96"/>
<TableColumn Name="Column6" Width="46.41"/>
<TableColumn Name="Column7" Width="103.1"/>
<TableColumn Name="Column8" Width="74.76"/>
<TableColumn Name="Column9" Width="65.32"/>
<TableColumn Name="Column45" Width="73.71"/>
<TableColumn Name="Column56"/>
<TableColumn Name="Column69"/>
<TableRow Name="Row1" Height="37.8">
<TableCell Name="Cell1" Border.Lines="All" Text="序号" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell2" Border.Lines="All" Text="体检号" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell3" Border.Lines="All" Text="姓名" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell4" Border.Lines="All" Text="性别" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell5" Border.Lines="All" Text="婚姻" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell6" Border.Lines="All" Text="年龄" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell7" Border.Lines="All" Text="证件号" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell8" Border.Lines="All" Text="联系方式" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell9" Border.Lines="All" Text="部门" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell65" Border.Lines="All" Text="备注" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell76" Border.Lines="All" Text="体检日期" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell89" Border.Lines="All" Text="体检费用" HorzAlign="Center" VertAlign="Center" Font="微软雅黑, 10pt"/>
</TableRow>
</TableObject>
</DataHeaderBand>
<DataFooterBand Name="DataFooter1" Top="138.3" Width="718.2" Height="28.35">
<TableObject Name="Table5" Width="718.2" Height="28.35" Fill.Color="InactiveBorder">
<TableColumn Name="Column35" Width="578.34"/>
<TableColumn Name="Column68" Width="139.86"/>
<TableRow Name="Row5" Height="28.35" AutoSize="true">
<TableCell Name="Cell55" Border.Lines="All" Fill.Color="InactiveBorder" Text="-总计-:[TotalCount]人,已体检:[Yes]人,未体检:[No]人" VertAlign="Center" Font="微软雅黑, 10pt"/>
<TableCell Name="Cell88" Border.Lines="All" Text="[TotalFee]" HorzAlign="Right" VertAlign="Center" Font="微软雅黑, 10pt"/>
</TableRow>
</TableObject>
</DataFooterBand>
</DataBand>
</ReportPage>
</Report>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="05/23/2023 15:50:00" ReportInfo.Modified="06/19/2025 15:18:44" ReportInfo.CreatorVersion="2022.1.0.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="05/23/2023 15:50:00" ReportInfo.Modified="07/23/2025 17:01:18" ReportInfo.CreatorVersion="2022.1.0.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@ -29,9 +29,9 @@ namespace FastReport
private void General_AfterData(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource(&quot;G&quot;);
Text95.Text = rowData[&quot;Summary&quot;].ToString();
Text97.Text = rowData[&quot;Checker&quot;].ToString();
Text99.Text = rowData[&quot;CheckTime&quot;].ToString();
Text95.Text = (rowData[&quot;Summary&quot;] ?? &quot;&quot;).ToString();
Text97.Text = (rowData[&quot;Checker&quot;] ?? &quot;&quot;).ToString();
Text99.Text = (rowData[&quot;CheckTime&quot;] ?? &quot;&quot;).ToString();
}
private void FeeItems_AfterData(object sender, EventArgs e)
@ -168,12 +168,14 @@ namespace FastReport
}
private void Text12_AfterData(object sender, EventArgs e)
{
if(Report.GetParameterValue(&quot;TeamName&quot;).ToString().Equals(Report.GetParameterValue(&quot;Company&quot;).ToString()))
{
string teamName = (string)Report.GetParameterValue(&quot;TeamName&quot;) ?? &quot;&quot;;
string company = (string)Report.GetParameterValue(&quot;Company&quot;) ?? &quot;&quot;;
if (teamName.ToString().Equals(company.ToString()))
{
Text12.Text = Report.GetParameterValue(&quot;TeamName&quot;).ToString();
Text12.Text = teamName.ToString();
}
}
}
}
}
</ScriptText>
@ -343,13 +345,13 @@ namespace FastReport
<TableCell Name="Cell75" Font="宋体, 9pt"/>
</TableRow>
</TableObject>
<DataBand Name="DeptSummary" Top="390" Width="642.6" Height="85.05">
<DataBand Name="DeptSummary" Top="390" Width="642.6" Height="85.05" CanGrow="true" PrintIfDetailEmpty="true" PrintIfDatasourceEmpty="true">
<TableObject Name="Table45" Width="642.6" Height="85.05">
<TableColumn Name="Column136" Width="642.6"/>
<TableRow Name="Row54" Height="85.05">
<TableRow Name="Row54" Height="85.05" AutoSize="true">
<TableCell Name="Cell180" Border.Lines="All" Font="宋体, 9pt">
<TextObject Name="Text398" Left="9.45" Width="642.6" Height="28.35" Text="[Row#].[D.DeptName]" VertAlign="Center" Font="楷体, 12pt, style=Bold"/>
<TextObject Name="Text399" Left="9.45" Top="28.35" Width="642.6" Height="56.7" Text="[D.Summary]" Font="微软雅黑, 10pt"/>
<TextObject Name="Text398" Left="9.45" Width="642.6" Height="28.35" Text="[[D.DeptCode]==&quot;-9999&quot;?&quot;&quot;:[Row#]+&quot;.&quot;][[D.DeptCode]==&quot;-9999&quot;?&quot;&quot;:[D.DeptName]]" VertAlign="Center" Font="楷体, 12pt, style=Bold"/>
<TextObject Name="Text399" Left="9.45" Top="28.35" Width="642.6" Height="56.7" CanGrow="true" Text="[D.Summary]" Font="微软雅黑, 10pt"/>
</TableCell>
</TableRow>
</TableObject>

@ -352,8 +352,9 @@ namespace PEIS.Utils
}
else
{
// item.IsDefined(typeof(RefFlagAttribute), false)
if (string.IsNullOrEmpty(dr[item.Name]?.ToString()))
// Attribute.IsDefined(item, typeof(RefFlagAttribute))
// FixFlagAttribute
if (Attribute.IsDefined(item, typeof(RefFlagAttribute)) || Attribute.IsDefined(item, typeof(FixFlagAttribute)) || string.IsNullOrEmpty(dr[item.Name]?.ToString()))
{
continue;
}

@ -107,6 +107,7 @@ namespace PEIS.Utils
private static BasePatient ReadRowToBasePatient(IRow dataRow)
{
var sex = dataRow.GetCell(2)?.ToString()??"";
var s = dataRow.GetCell(1);
return new BasePatient()
{
// A-0-序号,B-1-姓名,C-2-性别,D-3-民族,E-4-婚姻,F-5-身份证号,G-6-住址,H-7-电话,I-8-部门,J-9备注
@ -189,7 +190,7 @@ namespace PEIS.Utils
/// <returns></returns>
private IWorkbook GetPackExcelModelFile()
{
string filePath = AppDomain.CurrentDomain.BaseDirectory + "\\ReportFiles\\体检套餐导出模版.xlsx";
string filePath = AppDomain.CurrentDomain.BaseDirectory + "\\ReportFiles\\PackExportTemplate.xlsx";
using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
return new XSSFWorkbook(stream);

@ -25,7 +25,6 @@ using PEIS.Entity;
using PEIS.Model;
using PEIS.Model.Enrollment;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using FastReport.Export.Pdf;
using PEIS.Model.Exam;
@ -444,6 +443,15 @@ namespace PEIS.Utils
var lstPacsPhotos = new ReportModel().GetPacsPhoto(eid);
// 科室小结
var lstExamParts = new ReportModel().GetDeptSummary(eid).Where(p => !string.IsNullOrEmpty(p.Summary)).ToList();
if (lstExamParts.Count == 0)
{
lstExamParts.Add(new ExamPart
{
DeptCode = "-9999",
DeptName = "",
Summary = "暂无科室小结"
});
}
// 第三方报告
var lstExts = new ReportModel().GetReportExt(eid);
@ -728,6 +736,9 @@ namespace PEIS.Utils
rpt.SetParameterValue("CardNo", regInfo.CardNo);
rpt.SetParameterValue("HospitalName", Global._hospital?.Name);
rpt.SetParameterValue("Remark", regInfo.Description);
rpt.SetParameterValue("Url",
Global.GetWeChatPayUrl() +
Convert.ToBase64String(System.Text.Encoding.Default.GetBytes(regInfo.CardNo)));
if (string.IsNullOrEmpty(regInfo.Photo))
{

@ -41,6 +41,7 @@ namespace PEIS.View.Base
// 单位
CompanyTxtBox.TextUpdate += CompanyTxtBox_TextUpdate;
CompanyTxtBox.Enter += CompanyTxtBox_Enter;
// 民族
NationBoxTxt.TextUpdate += NationBoxTxt_TextUpdate;
@ -337,7 +338,11 @@ namespace PEIS.View.Base
OnGetCompanyData();
}
private void CompanyTxtBox_Enter(object sender, EventArgs e)
{
CompanyTxtBox.DroppedDown = true;
}
private void NationBoxTxt_TextUpdate(object sender, EventArgs e)
{
OnGetNationData();

@ -47,7 +47,6 @@ namespace PEIS.View.Base
TxtSearchPerson.Enter += TxtSearchPerson_Enter;
TxtSearchPerson.Leave += TxtSearchPerson_Leave;
//
DgvPatient.Initialize();
DgvOrg.Initialize();
@ -119,6 +118,7 @@ namespace PEIS.View.Base
}
item.SaveOrUpdate();
}
Global.Msg("info", "团体信息保存成功!");
}
/// <summary>

@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using PEIS.Base;
using PEIS.Entity;
using PEIS.Event;
using PEIS.Presenter;
using PEIS.Utils;
namespace PEIS.View.Base
@ -44,8 +41,8 @@ namespace PEIS.View.Base
private void TsmiDown_Click(object sender, EventArgs e)
{
// var file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportFiles", "体检基本信息登记表.xls");
var file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportFiles", "医院体检人员信息收集样表.xlsx");
// var file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportFiles", "BasicInformationRegistration.xls");
var file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportFiles", "HospitalBasicInformationRegistration.xlsx");
if (!File.Exists(file))
{
Global.MsgErr(@"未找到模板文件!");
@ -57,8 +54,8 @@ namespace PEIS.View.Base
{
if (folderDialog.ShowDialog() != DialogResult.OK) return;
var targetFolderPath = folderDialog.SelectedPath;
// var targetFilePath = Path.Combine(targetFolderPath, "体检基本信息登记表.xls");
var targetFilePath = Path.Combine(targetFolderPath, "医院体检人员信息收集样表.xlsx");
// var targetFilePath = Path.Combine(targetFolderPath, "BasicInformationRegistration.xls");
var targetFilePath = Path.Combine(targetFolderPath, "HospitalBasicInformationRegistration.xlsx");
try
{
// 复制文件

@ -29,11 +29,11 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EnrollmentOrgForm));
DevExpress.XtraGrid.GridFormatRule gridFormatRule1 = new DevExpress.XtraGrid.GridFormatRule();
DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression1 = new DevExpress.XtraEditors.FormatConditionRuleExpression();
DevExpress.XtraGrid.GridFormatRule gridFormatRule2 = new DevExpress.XtraGrid.GridFormatRule();
DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression2 = new DevExpress.XtraEditors.FormatConditionRuleExpression();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EnrollmentOrgForm));
this.gridColumn99 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn102 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemMemoEdit21 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit();
@ -58,6 +58,7 @@
this.menuStrip2 = new System.Windows.Forms.MenuStrip();
this.TsmiOrgRefresh = new System.Windows.Forms.ToolStripMenuItem();
this.TsmiOrgAdd = new System.Windows.Forms.ToolStripMenuItem();
this.TsmiOrgUpdate = new System.Windows.Forms.ToolStripMenuItem();
this.label19 = new System.Windows.Forms.Label();
this.DtpEndDate = new System.Windows.Forms.DateTimePicker();
this.DtpBegDate = new System.Windows.Forms.DateTimePicker();
@ -199,6 +200,7 @@
this.gridColumn65 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn66 = new DevExpress.XtraGrid.Columns.GridColumn();
this.panel4 = new System.Windows.Forms.Panel();
this.BtnCancelGroupFeeItem = new System.Windows.Forms.Button();
this.BtnApplyGroupFeeItem = new System.Windows.Forms.Button();
this.TpPerson = new DevExpress.XtraTab.XtraTabPage();
this.panel6 = new System.Windows.Forms.Panel();
@ -383,7 +385,6 @@
this.gridView5 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.gridView7 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.gridView8 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.TsmiOrgUpdate = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemMemoEdit21)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DgcOrg)).BeginInit();
@ -830,6 +831,13 @@
this.TsmiOrgAdd.Size = new System.Drawing.Size(70, 30);
this.TsmiOrgAdd.Text = "登记";
//
// TsmiOrgUpdate
//
this.TsmiOrgUpdate.Image = ((System.Drawing.Image)(resources.GetObject("TsmiOrgUpdate.Image")));
this.TsmiOrgUpdate.Name = "TsmiOrgUpdate";
this.TsmiOrgUpdate.Size = new System.Drawing.Size(64, 30);
this.TsmiOrgUpdate.Text = "编辑";
//
// label19
//
this.label19.AutoSize = true;
@ -2858,6 +2866,7 @@
//
// panel4
//
this.panel4.Controls.Add(this.BtnCancelGroupFeeItem);
this.panel4.Controls.Add(this.BtnApplyGroupFeeItem);
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
this.panel4.Location = new System.Drawing.Point(0, 0);
@ -2866,6 +2875,23 @@
this.panel4.Size = new System.Drawing.Size(1196, 44);
this.panel4.TabIndex = 141;
//
// BtnCancelGroupFeeItem
//
this.BtnCancelGroupFeeItem.BackColor = System.Drawing.Color.White;
this.BtnCancelGroupFeeItem.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.BtnCancelGroupFeeItem.Dock = System.Windows.Forms.DockStyle.Right;
this.BtnCancelGroupFeeItem.FlatAppearance.BorderSize = 0;
this.BtnCancelGroupFeeItem.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.BtnCancelGroupFeeItem.Image = global::PEIS.Properties.Resources.2;
this.BtnCancelGroupFeeItem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.BtnCancelGroupFeeItem.Location = new System.Drawing.Point(846, 0);
this.BtnCancelGroupFeeItem.Name = "BtnCancelGroupFeeItem";
this.BtnCancelGroupFeeItem.Size = new System.Drawing.Size(167, 44);
this.BtnCancelGroupFeeItem.TabIndex = 35;
this.BtnCancelGroupFeeItem.Text = "取消分组成员模版应用";
this.BtnCancelGroupFeeItem.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.BtnCancelGroupFeeItem.UseVisualStyleBackColor = true;
//
// BtnApplyGroupFeeItem
//
this.BtnApplyGroupFeeItem.BackColor = System.Drawing.Color.White;
@ -5279,13 +5305,6 @@
//
this.gridView8.Name = "gridView8";
//
// TsmiOrgUpdate
//
this.TsmiOrgUpdate.Image = ((System.Drawing.Image)(resources.GetObject("TsmiOrgUpdate.Image")));
this.TsmiOrgUpdate.Name = "TsmiOrgUpdate";
this.TsmiOrgUpdate.Size = new System.Drawing.Size(64, 30);
this.TsmiOrgUpdate.Text = "编辑";
//
// EnrollmentOrgForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
@ -5760,5 +5779,6 @@
private System.Windows.Forms.Button DelPatientBtn;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn38;
private System.Windows.Forms.ToolStripMenuItem TsmiOrgUpdate;
private System.Windows.Forms.Button BtnCancelGroupFeeItem;
}
}

@ -87,6 +87,7 @@ namespace PEIS.View.Enrollment
DgvOrg.SelectionChanged += DgvOrg_SelectionChanged;
DgvOrg.CustomDrawRowIndicator += DgvOrg_CustomDrawRowIndicator;
DgvOrg.RowStyle += DgvOrg_RowStyle;
DgvGroup.SelectionChanged += DgvGroup_SelectionChanged;
DgvGroup2.SelectionChanged += DgvGroup2_SelectionChanged;
@ -99,7 +100,7 @@ namespace PEIS.View.Enrollment
ImportBtn.Click += ImportBtn_Click;
DgvGroupPatient.MouseDown += DgvGroupPatient_MouseDown;
DgvGroupPatient.DoubleClick += DgvGroupPatient_DoubleClick; ;
DgvGroupPatient.DoubleClick += DgvGroupPatient_DoubleClick;
DgvGroupFeeItem.MouseDown += DgvGroupFeeItem_MouseDown;
DgvGroupFeeItem.DoubleClick += DgvGroupFeeItem_DoubleClick;
@ -111,7 +112,10 @@ namespace PEIS.View.Enrollment
DgvFeeItem.MouseDown += DgvFeeItem_MouseDown;
DgvFeeItem.DoubleClick += DgvFeeItem_DoubleClick;
// 应用模版
BtnApplyGroupFeeItem.Click += BtnApplyGroupFeeItem_Click;
// 取消模版应用
BtnCancelGroupFeeItem.Click += BtnCancelGroupFeeItem_Click;
FastCamera.Click += FastCamera_Click;
DgvEnrollment.SelectionChanged += DgvEnrollment_SelectionChanged;
@ -475,7 +479,14 @@ namespace PEIS.View.Enrollment
{
if (DgvPatient.FocusedRowHandle < 0) return;
if (!DgvGroup.GetSelectedRows().Any()) return;
if (Convert.ToInt64(DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "ID").ToString()) == 0) return;
// 团体登记不存在
if (Convert.ToInt64(DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "OID").ToString()) == 0) return;
// 分组不存在或为保存
if (Convert.ToInt64(DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "ID").ToString()) == 0)
{
Global.Msg("info", "分组不存在或者分组未保存,请检查分组设置!");
return;
}
if (!_hInfo.InRowCell) return;
var item = _lstPatient[_lstPatient.IndexOf(_lstPatient.Where(a => a.ID == Convert.ToInt64(DgvPatient.GetRowCellValue(DgvPatient.GetSelectedRows()[0], "ID").ToString())).ToList()[0])];
@ -558,8 +569,22 @@ namespace PEIS.View.Enrollment
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()));
}
private void BtnCancelGroupFeeItem_Click(object sender, EventArgs e)
{
Int64 _oeid = Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString());
Int64 _groupId = Convert.ToInt64(DgvGroup2.GetRowCellValue(DgvGroup2.GetSelectedRows()[0], "ID").ToString());
String _oename = DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "Name").ToString();
List<EnrollmentCheckCost> _checkCost = DAOHelp.GetDataBySQL<EnrollmentCheckCost>($@"select a.* from Enrollment_CheckCost a left join Enrollment_Patient b on a.EID = b.ID and a.OEID = b.OEID where b.OEID = {_oeid} and b.GroupId = {_groupId}");
if (_checkCost.Count > 0)
{
Global.Msg("info", "该团体分组成员已生成订单,无法撤销分组成员的模版应用!");
return;
}
if (Global.Msg("info", "确定撤销分组成员的模版应用?") == DialogResult.No) return;
OnCancelGroupFeeItem(_oeid, _groupId, _oename);
}
private void DgvFeeItem_DoubleClick(object sender, EventArgs e) // 双击添加分组项目
@ -959,7 +984,14 @@ namespace PEIS.View.Enrollment
private void ImportBtn_Click(object sender, EventArgs e) // 全部导入
{
if (!DgvPatient.GetSelectedRows().Any()) return;
// 团体登记不存在
if (Convert.ToInt64(DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "OID").ToString()) == 0) return;
// 分组不存在或为保存
if (Convert.ToInt64(DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "ID").ToString()) == 0)
{
Global.Msg("info", "分组不存在或者分组未保存,请检查分组设置!");
return;
}
var item = new EnrollmentOrgPatient();
var orgPatients = _lstPatient.Where(a => (DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "Marriage").ToString() == "所有" ? true : a?.Marriage == DgvGroup.GetRowCellValue(DgvGroup.GetSelectedRows()[0], "Marriage").ToString())
@ -1076,11 +1108,13 @@ namespace PEIS.View.Enrollment
var reportFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportFiles", "OrgExcel.frx");
rpt.Load(reportFile);
rpt.SetParameterValue("TotalCount", _lstExcelEPatient.Count());
rpt.SetParameterValue("No", _lstExcelEPatient.Where(w => w.SignTime == null).ToList().Count());
rpt.SetParameterValue("Yes", _lstExcelEPatient.Where(w => w.SignTime != null).ToList().Count());
rpt.SetParameterValue("OrgName", DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "Name").ToString());
rpt.SetParameterValue("TotalFee", _lstExcelEPatient.Sum(s => s.Fee));
rpt.SetParameterValue("TotalPrice", _lstExcelEPatient.Sum(s => s.Price));
// 人员数据
rpt.RegisterData(_lstExcelEPatient, "O");
@ -1088,6 +1122,31 @@ namespace PEIS.View.Enrollment
checkCost.DataSource = rpt.Report.GetDataSource("O");
rpt.GetDataSource("O").Enabled = true;
if (Global._hospital.Name == "芒市妇幼保健院")
{
// 收费项目
var oeID = Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString());
var groupFeeItem = DAOHelp.GetDataBySQL<EnrollmentOrgFeeItem>($@"SELECT PackName,FeeItemName,Price,GroupID FROM Enrollment_OrgFeeItem WHERE OEID = {oeID} ORDER BY GroupID, DeptName").ToList();
var grouped = groupFeeItem.GroupBy(item => item.GroupID)
.Select(grp => new EnrollmentOrgFeeItem
{
GroupID = grp.Key,
Price = grp.Sum(item => item.Price),
PackName = grp.Where(item => item.PackName != null).ToList().Count() == 0 ? "加项" : grp.Where(item => item.PackName != null).ToList()[0].PackName
});
foreach (var group in grouped)
{
groupFeeItem.Add(new EnrollmentOrgFeeItem { GroupID = group.GroupID, PackName = group.PackName, FeeItemName = "合计", Price = group.Price });
}
rpt.RegisterData(groupFeeItem.OrderBy(o => o.GroupID).ThenBy(t => t.Price).ToList(), "F");
DataBand feeItem = rpt.Report.FindObject("OrgFeeItem") as DataBand;
feeItem.DataSource = rpt.Report.GetDataSource("F");
rpt.GetDataSource("F").Enabled = true;
}
rpt.Prepare();
rpt.Show();
}
@ -1137,16 +1196,22 @@ namespace PEIS.View.Enrollment
var rpt = new FastReport.Report(); //实例化一个Report报表
try
{
var list = _lstExcelEPatient.Where(w => w.SignTime > begTime.Value.Date && w.SignTime < endTime.Value.AddDays(1).Date).ToList();
if (list.Count == 0)
{
Global.Msg("info", "所选日期范围内没有签到的体检者,请检查日期范围!");
return;
}
var reportFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ReportFiles", "OrgExcel.frx");
rpt.Load(reportFile);
var list = _lstExcelEPatient.Where(w => w.SignTime > begTime.Value.Date && w.SignTime < endTime.Value.AddDays(1).Date);
rpt.SetParameterValue("TotalCount", list.Count());
rpt.SetParameterValue("No", list.Where(w => w.SignTime == null).ToList().Count());
rpt.SetParameterValue("Yes", list.Where(w => w.SignTime != null).ToList().Count());
rpt.SetParameterValue("OrgName", DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "Name").ToString());
rpt.SetParameterValue("TotalFee", list.Sum(s => s.Fee));
rpt.SetParameterValue("TotalPrice", _lstExcelEPatient.Sum(s => s.Price));
// 人员数据
rpt.RegisterData(list, "O");
@ -1154,6 +1219,31 @@ namespace PEIS.View.Enrollment
checkCost.DataSource = rpt.Report.GetDataSource("O");
rpt.GetDataSource("O").Enabled = true;
if (Global._hospital.Name == "芒市妇幼保健院")
{
// 收费项目
var oeID = Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString());
var groupFeeItem = DAOHelp.GetDataBySQL<EnrollmentOrgFeeItem>($@"SELECT PackName,FeeItemName,Price,GroupID FROM Enrollment_OrgFeeItem WHERE OEID = {oeID} ORDER BY GroupID, DeptName").ToList();
var grouped = groupFeeItem.GroupBy(item => item.GroupID)
.Select(grp => new EnrollmentOrgFeeItem
{
GroupID = grp.Key,
Price = grp.Sum(item => item.Price),
PackName = grp.Where(item => item.PackName != null).ToList().Count() == 0 ? "加项" : grp.Where(item => item.PackName != null).ToList()[0].PackName
});
foreach (var group in grouped)
{
groupFeeItem.Add(new EnrollmentOrgFeeItem { GroupID = group.GroupID, PackName = group.PackName, FeeItemName = "合计", Price = group.Price });
}
rpt.RegisterData(groupFeeItem.OrderBy(o => o.GroupID).ThenBy(t => t.Price).ToList(), "F");
DataBand feeItem = rpt.Report.FindObject("OrgFeeItem") as DataBand;
feeItem.DataSource = rpt.Report.GetDataSource("F");
rpt.GetDataSource("F").Enabled = true;
}
rpt.Prepare();
rpt.Show();
}
@ -1561,39 +1651,49 @@ namespace PEIS.View.Enrollment
private void DgvCheckCost_RowStyle(object sender, RowStyleEventArgs e)
{
if (DgvCheckCost.RowCount == 0) return;
if (DgvCheckCost.GetRowCellValue(e.RowHandle, "SendTime") != null)
int hand = e.RowHandle;
if (hand < 0) return;
if (!(DgvCheckCost.GetRow(hand) is EnrollmentCheckCost _order)) return;
if (_order.ChargeTime == null && _order.SendTime == null && _order.CostTime == null)
{
e.Appearance.ForeColor = Color.FromArgb(103, 194, 58);
e.Appearance.ForeColor = Color.Black;
}
else if (DgvCheckCost.GetRowCellValue(e.RowHandle, "ChargeTime") != null)
if (_order.ChargeTime != null)
{
e.Appearance.ForeColor = Color.DodgerBlue;
}
else if (DgvCheckCost.GetRowCellValue(e.RowHandle, "CostTime") != null)
if (_order.SendTime != null)
{
e.Appearance.ForeColor = Color.FromArgb(234, 149, 24);
}
else
e.Appearance.ForeColor = Color.Black;
if (_order.CostTime != null)
{
e.Appearance.ForeColor = Color.ForestGreen;
}
}
private void DgvCheckCost2_RowStyle(object sender, RowStyleEventArgs e)
{
if (DgvCheckCost2.RowCount == 0) return;
if (DgvCheckCost2.GetRowCellValue(e.RowHandle, "SendTime") != null)
int hand = e.RowHandle;
if (hand < 0) return;
if (!(DgvCheckCost2.GetRow(hand) is EnrollmentCheckCost _order)) return;
if (_order.ChargeTime == null && _order.SendTime == null && _order.CostTime == null)
{
e.Appearance.ForeColor = Color.FromArgb(103, 194, 58);
e.Appearance.ForeColor = Color.Black;
}
else if (DgvCheckCost2.GetRowCellValue(e.RowHandle, "ChargeTime") != null)
if (_order.ChargeTime != null)
{
e.Appearance.ForeColor = Color.DodgerBlue;
}
else if (DgvCheckCost2.GetRowCellValue(e.RowHandle, "CostTime") != null)
if (_order.SendTime != null)
{
e.Appearance.ForeColor = Color.FromArgb(234, 149, 24);
}
else
e.Appearance.ForeColor = Color.Black;
if (_order.CostTime != null)
{
e.Appearance.ForeColor = Color.ForestGreen;
}
}
private void DgvCheckCost_CustomDrawGroupRow(object sender, DevExpress.XtraGrid.Views.Base.RowObjectCustomDrawEventArgs e)
@ -1683,6 +1783,18 @@ namespace PEIS.View.Enrollment
e.Info.DisplayText = (e.RowHandle + 1).ToString();
}
private void DgvOrg_RowStyle(object sender, RowStyleEventArgs e)
{
if (DgvOrg.RowCount == 0) return;
int hand = e.RowHandle;
if (hand < 0) return;
if (!(DgvOrg.GetRow(hand) is EnrollmentOrg _org)) return;
if (_org.OrgCostStatus == 0 && _org.OrgPeopleNumber > 0)
{
e.Appearance.ForeColor = Color.ForestGreen;
}
}
private void DgvGroupFeeItem_MouseDown(object sender, MouseEventArgs e)
{
_hInfo = DgvGroupFeeItem.CalcHitInfo(e.X, e.Y);
@ -1783,6 +1895,8 @@ namespace PEIS.View.Enrollment
public event EventHandler<Args<EnrollmentOrgFeeItem>> ApplyGroupFeeItem;
public event EventHandler<Args<EnrollmentOrgFeeItem>> CancelGroupFeeItem;
public event EventHandler<Args<EnrollmentPatient>> GetEnrollmentPatient;
public event EventHandler<Args<EnrollmentFeeItem>> GetEnrollmentFeeItem;
@ -1910,6 +2024,11 @@ namespace PEIS.View.Enrollment
ApplyGroupFeeItem?.Invoke(this, new Args<EnrollmentOrgFeeItem> { EnrollmentOID = oeID, GroupID = groupID });
}
protected virtual void OnCancelGroupFeeItem(Int64 OEID, Int64 GroupId, String oeName)
{
CancelGroupFeeItem?.Invoke(this, new Args<EnrollmentOrgFeeItem> { EnrollmentOID = OEID, GroupID = GroupId, Name = oeName });
}
protected virtual void OnAddEnrollmentOrgFeeItem(Int64 groupID, Int64 oeID, Int64 packID, Int64 oID, Int64 feeItemID)
{
AddEnrollmentOrgFeeItem?.Invoke(this, new Args<EnrollmentOrgFeeItem> { GroupID = groupID, EnrollmentOID = oeID, PackID = packID, BaseOID = oID, FeeItemID = feeItemID });

@ -171,27 +171,27 @@ namespace PEIS.View.Enrollment
private void DgvCheckCost_RowStyle(object sender, RowStyleEventArgs e)
{
if (DgvCheckCost.RowCount == 0) return;
if (DgvCheckCost.GetRowCellValue(e.RowHandle, "SendTime") != null)
int hand = e.RowHandle;
if (hand < 0) return;
if (!(DgvCheckCost.GetRow(hand) is EnrollmentCheckCost _order)) return;
if (_order.ChargeTime == null && _order.SendTime == null && _order.CostTime == null)
{
e.Appearance.ForeColor = Color.FromArgb(103, 194, 58);
e.Appearance.ForeColor = Color.Black;
}
else if (DgvCheckCost.GetRowCellValue(e.RowHandle, "ChargeTime") != null)
if (_order.ChargeTime != null)
{
e.Appearance.ForeColor = Color.DodgerBlue;
}
else if (DgvCheckCost.GetRowCellValue(e.RowHandle, "CostTime") != null)
if (_order.SendTime != null)
{
e.Appearance.ForeColor = Color.FromArgb(234, 149, 24);
}
else
if (_order.CostTime != null)
{
e.Appearance.ForeColor = Color.Black;
}
e.Appearance.ForeColor = Color.ForestGreen;
}
}
private void DgvEFeeItem_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e)
{
if (e.Column.FieldName == "PackName") // 替换"PackName"

@ -36,6 +36,7 @@ namespace PEIS.View.Enrollment
event EventHandler<Args<EnrollmentOrgFeeItem>> AddEnrollmentOrgFeeItem;
event EventHandler<Args<EnrollmentOrgFeeItem>> ApplyGroupFeeItem;
event EventHandler<Args<EnrollmentOrgFeeItem>> CancelGroupFeeItem;
event EventHandler<Args<EnrollmentPatient>> GetEnrollmentPatient;
event EventHandler<Args<EnrollmentFeeItem>> GetEnrollmentFeeItem;

@ -30,6 +30,8 @@
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewEnrollmentOrgForm));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.TxtInvoiceName = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.occupationFalse = new System.Windows.Forms.RadioButton();
this.occupationTrue = new System.Windows.Forms.RadioButton();
this.label9 = new System.Windows.Forms.Label();
@ -52,8 +54,6 @@
this.label1 = new System.Windows.Forms.Label();
this.BtnCancel = new System.Windows.Forms.Button();
this.BtnOk = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.TxtInvoiceName = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
@ -87,6 +87,22 @@
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
//
// TxtInvoiceName
//
this.TxtInvoiceName.Location = new System.Drawing.Point(76, 262);
this.TxtInvoiceName.Name = "TxtInvoiceName";
this.TxtInvoiceName.Size = new System.Drawing.Size(357, 23);
this.TxtInvoiceName.TabIndex = 42;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 264);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 41;
this.label10.Text = "发票名称";
//
// occupationFalse
//
this.occupationFalse.AutoSize = true;
@ -248,7 +264,6 @@
//
// TxtName
//
this.TxtName.Enabled = false;
this.TxtName.Location = new System.Drawing.Point(76, 22);
this.TxtName.Name = "TxtName";
this.TxtName.Size = new System.Drawing.Size(357, 23);
@ -289,22 +304,6 @@
this.BtnOk.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.BtnOk.UseVisualStyleBackColor = true;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 264);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 41;
this.label10.Text = "发票名称";
//
// TxtInvoiceName
//
this.TxtInvoiceName.Location = new System.Drawing.Point(76, 262);
this.TxtInvoiceName.Name = "TxtInvoiceName";
this.TxtInvoiceName.Size = new System.Drawing.Size(357, 23);
this.TxtInvoiceName.TabIndex = 42;
//
// NewEnrollmentOrgForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

@ -47,6 +47,7 @@ namespace PEIS.View.Enrollment
TxtTel1.Text = enrollmentOrg.Tel1;
TxtContactor2.Text = enrollmentOrg.Contactor2;
TxtTel2.Text = enrollmentOrg.Tel2;
this.Text = "编辑团体登记信息";
}
}

@ -663,8 +663,6 @@
//
// CompanyTxtBox
//
this.CompanyTxtBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.CompanyTxtBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
this.CompanyTxtBox.FormattingEnabled = true;
this.CompanyTxtBox.Location = new System.Drawing.Point(84, 591);
this.CompanyTxtBox.Name = "CompanyTxtBox";

@ -64,6 +64,7 @@ namespace PEIS.View.Enrollment
// 单位
CompanyTxtBox.TextUpdate += CompanyTxtBox_TextUpdate;
CompanyTxtBox.Enter += CompanyTxtBox_Enter;
// 民族
NationBoxTxt.TextUpdate += NationBoxTxt_TextUpdate;
@ -522,6 +523,11 @@ namespace PEIS.View.Enrollment
OnGetCompanyData();
}
private void CompanyTxtBox_Enter(object sender, EventArgs e)
{
CompanyTxtBox.DroppedDown = true;
}
private void NationBoxTxt_TextUpdate(object sender, EventArgs e)
{
OnGetNationData();

@ -879,9 +879,9 @@
//
this.panel1.Controls.Add(this.splitContainerExam);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(176, 70);
this.panel1.Location = new System.Drawing.Point(176, 45);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1018, 558);
this.panel1.Size = new System.Drawing.Size(1018, 583);
this.panel1.TabIndex = 132;
//
// splitContainerExam
@ -899,8 +899,8 @@
this.splitContainerExam.Panel1.Text = "Panel1";
this.splitContainerExam.Panel2.Controls.Add(this.splitContainer2);
this.splitContainerExam.Panel2.Text = "Panel2";
this.splitContainerExam.Size = new System.Drawing.Size(1018, 558);
this.splitContainerExam.SplitterPosition = 367;
this.splitContainerExam.Size = new System.Drawing.Size(1018, 583);
this.splitContainerExam.SplitterPosition = 384;
this.splitContainerExam.TabIndex = 60;
this.splitContainerExam.Text = "splitContainerControl1";
//
@ -961,7 +961,7 @@
this.dgcExamResult.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.SearchLookUpEditSign,
this.popupContainerEdit1});
this.dgcExamResult.Size = new System.Drawing.Size(1018, 367);
this.dgcExamResult.Size = new System.Drawing.Size(1018, 384);
this.dgcExamResult.TabIndex = 130;
this.dgcExamResult.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.DgvExamResult});
@ -1200,7 +1200,7 @@
this.splitContainer2.Panel2.BackColor = System.Drawing.Color.White;
this.splitContainer2.Panel2.Controls.Add(this.panel5);
this.splitContainer2.Panel2.Controls.Add(this.panel6);
this.splitContainer2.Size = new System.Drawing.Size(1018, 186);
this.splitContainer2.Size = new System.Drawing.Size(1018, 194);
this.splitContainer2.SplitterDistance = 495;
this.splitContainer2.TabIndex = 0;
//
@ -1211,7 +1211,7 @@
this.panel17.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel17.Location = new System.Drawing.Point(0, 0);
this.panel17.Name = "panel17";
this.panel17.Size = new System.Drawing.Size(495, 186);
this.panel17.Size = new System.Drawing.Size(495, 194);
this.panel17.TabIndex = 1;
//
// txtSummary
@ -1223,7 +1223,7 @@
this.txtSummary.Multiline = true;
this.txtSummary.Name = "txtSummary";
this.txtSummary.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtSummary.Size = new System.Drawing.Size(495, 146);
this.txtSummary.Size = new System.Drawing.Size(495, 154);
this.txtSummary.TabIndex = 4;
//
// label17
@ -1245,7 +1245,7 @@
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(0, 40);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(519, 146);
this.panel5.Size = new System.Drawing.Size(519, 154);
this.panel5.TabIndex = 1;
//
// dgcConclusion
@ -1258,7 +1258,7 @@
this.dgcConclusion.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.CmbSearchConclusion,
this.repositoryItemMemoEdit1});
this.dgcConclusion.Size = new System.Drawing.Size(519, 146);
this.dgcConclusion.Size = new System.Drawing.Size(519, 154);
this.dgcConclusion.TabIndex = 124;
this.dgcConclusion.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.DgvConclusion,
@ -1466,7 +1466,7 @@
this.panelExamBtn.Dock = System.Windows.Forms.DockStyle.Top;
this.panelExamBtn.Location = new System.Drawing.Point(176, 0);
this.panelExamBtn.Name = "panelExamBtn";
this.panelExamBtn.Size = new System.Drawing.Size(1018, 70);
this.panelExamBtn.Size = new System.Drawing.Size(1018, 45);
this.panelExamBtn.TabIndex = 60;
//
// panelDoctor
@ -1481,7 +1481,7 @@
this.panelDoctor.Location = new System.Drawing.Point(0, 0);
this.panelDoctor.Margin = new System.Windows.Forms.Padding(0);
this.panelDoctor.Name = "panelDoctor";
this.panelDoctor.Size = new System.Drawing.Size(1018, 70);
this.panelDoctor.Size = new System.Drawing.Size(1018, 45);
this.panelDoctor.TabIndex = 132;
//
// cmbVerifier

@ -332,10 +332,6 @@ namespace PEIS.View.Exam
/// <param name="items"></param>
public void ShowDeptList(List<User> items)
{
// items.ForEach(i =>
// {
// i.IsSelected=false;
// });
var index = dgvDept.GetFocusedDataSourceRowIndex();
if (index < 0 || index >= items.Count)
{
@ -410,7 +406,7 @@ namespace PEIS.View.Exam
private void DgvDept_RowCellClick(object sender, RowCellClickEventArgs e)
{
var rowHandle = e.RowHandle;
if (_lstAllDept[rowHandle] is User dept1 && dept1.Status != "科室分检") return;
// if (_lstAllDept[rowHandle] is User dept1 && dept1.Status != "科室分检") return;
dgvDept.SetRowCellValue(rowHandle, colDeptSelected, true);
//ResetView();
// 取消其他行的选中状态
@ -444,7 +440,7 @@ namespace PEIS.View.Exam
//OnGetPatients();
// 选中检查科室提取结果按钮显示
// _currentDept.DeptCode == "3201" || _currentDept.DeptCode == "3203" || _currentDept.DeptCode == "3204" || _currentDept.DeptCode == "3101"
// dhzzyy: _currentDept.DeptCode == "3201" || _currentDept.DeptCode == "3203" || _currentDept.DeptCode == "3204" || _currentDept.DeptCode == "3101"
if (Global._lstConfig.Where(p => p.Key == "CheckDeptCode").Select(p => p.Code).ToList().Contains(_currentDept.DeptCode))
{
tsmiPick.Visible = true;
@ -861,13 +857,43 @@ namespace PEIS.View.Exam
// 检验检查心电科室Code
var deptCodeList = Global._lstConfig.Where(p => p.Key == "PartFormDept").Select(p => p.Code).ToList();
//var deptCodeList = new List<string>()
//{
// "3001", //检验科
// "01416", //迪安检验
// "3201", //放射科
// "3203", //超声科
//};
#region 各分支科室设置
// dhzzyy
/* var deptCodeList = new List<string>()
{
"3001", //检验科
"01416", //迪安检验
"3201", //放射科
"3203", //超声科
};*/
// msfy
/*var deptCodeList = new List<string>()
{
"3001", //检验科
"3002", //金域检验
"3201", //放射科
"3202", //超声科
"01064", //心电科
};*/
// yjfy
/*var deptCodeList = new List<string>()
{
"3001", //检验科
"3002", //金域检验
"3201", //放射科
"3202", //超声科
"3203", //心电科
};*/
// mzzyy
/*var deptCodeList = new List<string>()
{
"3001", //检验科
"3002", //金域检验
"3201", //放射科
"3202", //超声科
};*/
#endregion
if (deptCodeList.Contains(_currentDept.DeptCode) && _examPart.VerifyTime == null &&
_examPart.GiveUpTime == null && _examPart.ID == 0)
{
@ -1203,6 +1229,11 @@ namespace PEIS.View.Exam
if (_patient.ID <= 0 || _patient.FinishTime != null || _examPart.VerifyTime != null ||
_examPart.GiveUpTime != null || _examPart.ID <= 0) return;
if (_examPart.CheckTime == null) {
MessageBox.Show(@"请先保存科室分检的检查结果!", @"审核失败");
return;
}
var result = MessageBox.Show(@"是否确认审核?", @"审核", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result != DialogResult.Yes) return;
@ -1294,8 +1325,15 @@ namespace PEIS.View.Exam
/// <param name="e"></param>
private void TsmiReviewCancel_Click(object sender, EventArgs e)
{
if (_patient.ID <= 0 || _patient.FinishTime != null || _examPart.VerifyTime == null ||
if (_patient.ID <= 0 || _examPart.VerifyTime == null ||
_examPart.GiveUpTime != null || _examPart.ID <= 0) return;
EnrollmentPatient _p = (EnrollmentPatient)DAOHelp.GetById(new EnrollmentPatient { ID = _patient.ID });
// 已完结
if (_p.FinishTime != null)
{
Global.Msg("info", "体检已完结,不允许取消审核!");
return;
}
var result = MessageBox.Show(@"是否取消审核?", @"审核", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result != DialogResult.Yes) return;
@ -1634,7 +1672,7 @@ namespace PEIS.View.Exam
/// <param name="item"></param>
private void RefreshPatient(EnrollmentPatient item = null)
{
Invoke(new Action(() => _patient = item ?? _patient));
Invoke(new Action(() => _patient = item ?? _patient ));
Invoke(new Action(() => stripTxtEid.Text = _patient?.ID.ToString()));
// Invoke(new Action(() => patientInfo.Values = item ?? _patient));
SetPatientInfo(item ?? _patient);

@ -178,6 +178,8 @@
this.gridColumn36 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn37 = new DevExpress.XtraGrid.Columns.GridColumn();
this.tabPageHistory = new DevExpress.XtraTab.XtraTabPage();
this.tabPageResult = new DevExpress.XtraTab.XtraTabPage();
this.panel6 = new System.Windows.Forms.Panel();
this.panelPatientInfo = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
@ -315,6 +317,7 @@
((System.ComponentModel.ISupportInitialize)(this.PictureBoxReportExt)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DgcRptExt)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.DgvRptExt)).BeginInit();
this.tabPageResult.SuspendLayout();
this.panelPatientInfo.SuspendLayout();
this.panel3.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
@ -860,19 +863,20 @@
//
this.splitContainerExamInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(132)))), ((int)(((byte)(162)))), ((int)(((byte)(202)))));
this.splitContainerExamInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainerExamInfo.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainerExamInfo.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainerExamInfo.Location = new System.Drawing.Point(0, 0);
this.splitContainerExamInfo.Name = "splitContainerExamInfo";
//
// splitContainerExamInfo.Panel1
//
this.splitContainerExamInfo.Panel1.Controls.Add(this.panelTxtSummary);
this.splitContainerExamInfo.Panel1MinSize = 500;
//
// splitContainerExamInfo.Panel2
//
this.splitContainerExamInfo.Panel2.Controls.Add(this.panelExamInfoL);
this.splitContainerExamInfo.Size = new System.Drawing.Size(860, 506);
this.splitContainerExamInfo.SplitterDistance = 402;
this.splitContainerExamInfo.SplitterDistance = 740;
this.splitContainerExamInfo.TabIndex = 0;
//
// panelTxtSummary
@ -882,7 +886,7 @@
this.panelTxtSummary.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelTxtSummary.Location = new System.Drawing.Point(0, 0);
this.panelTxtSummary.Name = "panelTxtSummary";
this.panelTxtSummary.Size = new System.Drawing.Size(402, 506);
this.panelTxtSummary.Size = new System.Drawing.Size(740, 506);
this.panelTxtSummary.TabIndex = 2;
//
// splitExamPart
@ -899,8 +903,8 @@
// splitExamPart.Panel2
//
this.splitExamPart.Panel2.Controls.Add(this.txtSummary);
this.splitExamPart.Size = new System.Drawing.Size(402, 506);
this.splitExamPart.SplitterDistance = 186;
this.splitExamPart.Size = new System.Drawing.Size(740, 506);
this.splitExamPart.SplitterDistance = 310;
this.splitExamPart.TabIndex = 0;
//
// panel5
@ -911,7 +915,7 @@
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(0, 0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(186, 506);
this.panel5.Size = new System.Drawing.Size(310, 506);
this.panel5.TabIndex = 0;
//
// DgcExamResultData
@ -924,7 +928,7 @@
this.DgcExamResultData.Name = "DgcExamResultData";
this.DgcExamResultData.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.repositoryItemMemoEdit4});
this.DgcExamResultData.Size = new System.Drawing.Size(600, 489);
this.DgcExamResultData.Size = new System.Drawing.Size(423, 489);
this.DgcExamResultData.TabIndex = 0;
this.DgcExamResultData.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.DgvExamResultData});
@ -1086,7 +1090,7 @@
this.txtSummary.Name = "txtSummary";
this.txtSummary.ReadOnly = true;
this.txtSummary.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtSummary.Size = new System.Drawing.Size(212, 506);
this.txtSummary.Size = new System.Drawing.Size(426, 506);
this.txtSummary.TabIndex = 4;
this.txtSummary.Text = "科室小结";
//
@ -1096,7 +1100,7 @@
this.panelExamInfoL.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelExamInfoL.Location = new System.Drawing.Point(0, 0);
this.panelExamInfoL.Name = "panelExamInfoL";
this.panelExamInfoL.Size = new System.Drawing.Size(454, 506);
this.panelExamInfoL.Size = new System.Drawing.Size(116, 506);
this.panelExamInfoL.TabIndex = 2;
//
// TabPart
@ -1124,7 +1128,7 @@
this.TabPart.Name = "TabPart";
this.TabPart.SelectedTabPage = this.tabPageConslusion;
this.TabPart.ShowTabHeader = DevExpress.Utils.DefaultBoolean.True;
this.TabPart.Size = new System.Drawing.Size(454, 506);
this.TabPart.Size = new System.Drawing.Size(116, 506);
this.TabPart.TabIndex = 0;
this.TabPart.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.tabPageConslusion,
@ -1133,7 +1137,8 @@
this.tabPageLis,
this.tabPagePacs,
this.tabPageReport,
this.tabPageHistory});
this.tabPageHistory,
this.tabPageResult});
//
// tabPageConslusion
//
@ -1143,7 +1148,7 @@
this.tabPageConslusion.Image = global::PEIS.Properties.Resources.menu;
this.tabPageConslusion.Margin = new System.Windows.Forms.Padding(2);
this.tabPageConslusion.Name = "tabPageConslusion";
this.tabPageConslusion.Size = new System.Drawing.Size(448, 467);
this.tabPageConslusion.Size = new System.Drawing.Size(110, 467);
this.tabPageConslusion.Text = "结论词";
//
// panelConclussion
@ -1153,7 +1158,7 @@
this.panelConclussion.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelConclussion.Location = new System.Drawing.Point(0, 40);
this.panelConclussion.Name = "panelConclussion";
this.panelConclussion.Size = new System.Drawing.Size(107, 427);
this.panelConclussion.Size = new System.Drawing.Size(0, 427);
this.panelConclussion.TabIndex = 3;
//
// DgcExamConclusion
@ -1168,7 +1173,7 @@
this.repositoryItemMemoEdit2,
this.CmbSearchConclusion,
this.repositoryItemCheckEdit1});
this.DgcExamConclusion.Size = new System.Drawing.Size(107, 427);
this.DgcExamConclusion.Size = new System.Drawing.Size(0, 427);
this.DgcExamConclusion.TabIndex = 5;
this.DgcExamConclusion.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.DgvExamConclusion,
@ -1337,7 +1342,7 @@
this.panelAllConclusion.Controls.Add(this.DgcAllConclusion);
this.panelAllConclusion.Controls.Add(this.panel2);
this.panelAllConclusion.Dock = System.Windows.Forms.DockStyle.Right;
this.panelAllConclusion.Location = new System.Drawing.Point(107, 40);
this.panelAllConclusion.Location = new System.Drawing.Point(-231, 40);
this.panelAllConclusion.Name = "panelAllConclusion";
this.panelAllConclusion.Size = new System.Drawing.Size(341, 427);
this.panelAllConclusion.TabIndex = 2;
@ -1459,7 +1464,7 @@
this.panelConclussionMenu.Dock = System.Windows.Forms.DockStyle.Top;
this.panelConclussionMenu.Location = new System.Drawing.Point(0, 0);
this.panelConclussionMenu.Name = "panelConclussionMenu";
this.panelConclussionMenu.Size = new System.Drawing.Size(448, 40);
this.panelConclussionMenu.Size = new System.Drawing.Size(110, 40);
this.panelConclussionMenu.TabIndex = 0;
//
// OpsConclusion
@ -1468,7 +1473,7 @@
this.OpsConclusion.Location = new System.Drawing.Point(0, 0);
this.OpsConclusion.Margin = new System.Windows.Forms.Padding(3, 7, 3, 7);
this.OpsConclusion.Name = "OpsConclusion";
this.OpsConclusion.Size = new System.Drawing.Size(448, 40);
this.OpsConclusion.Size = new System.Drawing.Size(110, 40);
this.OpsConclusion.TabIndex = 5;
//
// tabPageExam
@ -1491,7 +1496,7 @@
this.tabPageExam.Image = global::PEIS.Properties.Resources.menu;
this.tabPageExam.Margin = new System.Windows.Forms.Padding(2);
this.tabPageExam.Name = "tabPageExam";
this.tabPageExam.Size = new System.Drawing.Size(448, 467);
this.tabPageExam.Size = new System.Drawing.Size(110, 467);
this.tabPageExam.Text = "一般项目";
//
// DgcExamResult
@ -1502,7 +1507,7 @@
this.DgcExamResult.Name = "DgcExamResult";
this.DgcExamResult.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.repositoryItemMemoEdit3});
this.DgcExamResult.Size = new System.Drawing.Size(448, 467);
this.DgcExamResult.Size = new System.Drawing.Size(110, 467);
this.DgcExamResult.TabIndex = 140;
this.DgcExamResult.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.DgvExamResult});
@ -1690,7 +1695,7 @@
this.tabPageSummary.Image = global::PEIS.Properties.Resources.menu;
this.tabPageSummary.Margin = new System.Windows.Forms.Padding(2);
this.tabPageSummary.Name = "tabPageSummary";
this.tabPageSummary.Size = new System.Drawing.Size(448, 467);
this.tabPageSummary.Size = new System.Drawing.Size(110, 467);
this.tabPageSummary.Text = "科室小结";
//
// panelDeptSummary
@ -1700,7 +1705,7 @@
this.panelDeptSummary.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelDeptSummary.Location = new System.Drawing.Point(0, 0);
this.panelDeptSummary.Name = "panelDeptSummary";
this.panelDeptSummary.Size = new System.Drawing.Size(448, 467);
this.panelDeptSummary.Size = new System.Drawing.Size(110, 467);
this.panelDeptSummary.TabIndex = 61;
//
// DgcSummary
@ -1713,7 +1718,7 @@
this.repositoryItemRichTextEdit1,
this.repositoryItemTextEdit1,
this.repositoryItemMemoEdit1});
this.DgcSummary.Size = new System.Drawing.Size(448, 467);
this.DgcSummary.Size = new System.Drawing.Size(110, 467);
this.DgcSummary.TabIndex = 0;
this.DgcSummary.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.DgvSummary});
@ -1777,7 +1782,7 @@
this.tabPageLis.Image = global::PEIS.Properties.Resources.menu;
this.tabPageLis.Margin = new System.Windows.Forms.Padding(2);
this.tabPageLis.Name = "tabPageLis";
this.tabPageLis.Size = new System.Drawing.Size(448, 467);
this.tabPageLis.Size = new System.Drawing.Size(110, 467);
this.tabPageLis.Text = "检验报告";
//
// DgcLisReport
@ -1786,7 +1791,7 @@
this.DgcLisReport.Location = new System.Drawing.Point(0, 0);
this.DgcLisReport.MainView = this.DgvLisReport;
this.DgcLisReport.Name = "DgcLisReport";
this.DgcLisReport.Size = new System.Drawing.Size(448, 467);
this.DgcLisReport.Size = new System.Drawing.Size(110, 467);
this.DgcLisReport.TabIndex = 1;
this.DgcLisReport.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.DgvLisReport});
@ -1897,7 +1902,7 @@
this.tabPagePacs.Image = global::PEIS.Properties.Resources.menu;
this.tabPagePacs.Margin = new System.Windows.Forms.Padding(2);
this.tabPagePacs.Name = "tabPagePacs";
this.tabPagePacs.Size = new System.Drawing.Size(448, 467);
this.tabPagePacs.Size = new System.Drawing.Size(110, 467);
this.tabPagePacs.Text = "检查报告";
//
// panelPacsBase
@ -1907,7 +1912,7 @@
this.panelPacsBase.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelPacsBase.Location = new System.Drawing.Point(0, 0);
this.panelPacsBase.Name = "panelPacsBase";
this.panelPacsBase.Size = new System.Drawing.Size(448, 467);
this.panelPacsBase.Size = new System.Drawing.Size(110, 467);
this.panelPacsBase.TabIndex = 1;
//
// xtraTabControl1
@ -1918,7 +1923,7 @@
this.xtraTabControl1.Location = new System.Drawing.Point(260, 0);
this.xtraTabControl1.Name = "xtraTabControl1";
this.xtraTabControl1.SelectedTabPage = this.tabPacsRpt;
this.xtraTabControl1.Size = new System.Drawing.Size(188, 467);
this.xtraTabControl1.Size = new System.Drawing.Size(0, 467);
this.xtraTabControl1.TabIndex = 1;
this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.tabPacsRpt,
@ -1928,7 +1933,7 @@
//
this.tabPacsRpt.Controls.Add(this.panelPacsRpt);
this.tabPacsRpt.Name = "tabPacsRpt";
this.tabPacsRpt.Size = new System.Drawing.Size(144, 461);
this.tabPacsRpt.Size = new System.Drawing.Size(0, 461);
this.tabPacsRpt.Text = "报告";
//
// panelPacsRpt
@ -1939,7 +1944,7 @@
this.panelPacsRpt.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelPacsRpt.Location = new System.Drawing.Point(0, 0);
this.panelPacsRpt.Name = "panelPacsRpt";
this.panelPacsRpt.Size = new System.Drawing.Size(144, 461);
this.panelPacsRpt.Size = new System.Drawing.Size(0, 461);
this.panelPacsRpt.TabIndex = 3;
//
// pictureBoxPacsRpt
@ -1957,7 +1962,7 @@
//
this.tabPacsImg.Controls.Add(this.panel12);
this.tabPacsImg.Name = "tabPacsImg";
this.tabPacsImg.Size = new System.Drawing.Size(144, 461);
this.tabPacsImg.Size = new System.Drawing.Size(0, 461);
this.tabPacsImg.Text = "图片";
//
// panel12
@ -1966,7 +1971,7 @@
this.panel12.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel12.Location = new System.Drawing.Point(0, 0);
this.panel12.Name = "panel12";
this.panel12.Size = new System.Drawing.Size(144, 461);
this.panel12.Size = new System.Drawing.Size(0, 461);
this.panel12.TabIndex = 3;
//
// panel13
@ -1976,7 +1981,7 @@
this.panel13.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel13.Location = new System.Drawing.Point(0, 0);
this.panel13.Name = "panel13";
this.panel13.Size = new System.Drawing.Size(144, 461);
this.panel13.Size = new System.Drawing.Size(0, 461);
this.panel13.TabIndex = 6;
//
// panel15
@ -1985,7 +1990,7 @@
this.panel15.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel15.Location = new System.Drawing.Point(0, 0);
this.panel15.Name = "panel15";
this.panel15.Size = new System.Drawing.Size(144, 461);
this.panel15.Size = new System.Drawing.Size(0, 461);
this.panel15.TabIndex = 4;
//
// panelPacsImg
@ -1995,7 +2000,7 @@
this.panelPacsImg.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelPacsImg.Location = new System.Drawing.Point(0, 0);
this.panelPacsImg.Name = "panelPacsImg";
this.panelPacsImg.Size = new System.Drawing.Size(144, 461);
this.panelPacsImg.Size = new System.Drawing.Size(0, 461);
this.panelPacsImg.TabIndex = 5;
//
// flowLayoutPanelPacsImg
@ -2005,7 +2010,7 @@
this.flowLayoutPanelPacsImg.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanelPacsImg.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanelPacsImg.Name = "flowLayoutPanelPacsImg";
this.flowLayoutPanelPacsImg.Size = new System.Drawing.Size(144, 461);
this.flowLayoutPanelPacsImg.Size = new System.Drawing.Size(0, 461);
this.flowLayoutPanelPacsImg.TabIndex = 0;
//
// panelPacsRptList
@ -2090,7 +2095,7 @@
this.tabPageReport.Image = global::PEIS.Properties.Resources.menu;
this.tabPageReport.Margin = new System.Windows.Forms.Padding(2);
this.tabPageReport.Name = "tabPageReport";
this.tabPageReport.Size = new System.Drawing.Size(448, 467);
this.tabPageReport.Size = new System.Drawing.Size(110, 467);
this.tabPageReport.Text = "其他报告";
//
// panelReportBase
@ -2100,7 +2105,7 @@
this.panelReportBase.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelReportBase.Location = new System.Drawing.Point(0, 0);
this.panelReportBase.Name = "panelReportBase";
this.panelReportBase.Size = new System.Drawing.Size(448, 467);
this.panelReportBase.Size = new System.Drawing.Size(110, 467);
this.panelReportBase.TabIndex = 0;
//
// panelReport
@ -2111,7 +2116,7 @@
this.panelReport.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelReport.Location = new System.Drawing.Point(260, 0);
this.panelReport.Name = "panelReport";
this.panelReport.Size = new System.Drawing.Size(188, 467);
this.panelReport.Size = new System.Drawing.Size(0, 467);
this.panelReport.TabIndex = 2;
//
// PictureBoxReportExt
@ -2186,9 +2191,25 @@
//
this.tabPageHistory.Margin = new System.Windows.Forms.Padding(2);
this.tabPageHistory.Name = "tabPageHistory";
this.tabPageHistory.Size = new System.Drawing.Size(448, 467);
this.tabPageHistory.Size = new System.Drawing.Size(110, 467);
this.tabPageHistory.Text = "历史结果";
//
// tabPageResult
//
this.tabPageResult.Controls.Add(this.panel6);
this.tabPageResult.Name = "tabPageResult";
this.tabPageResult.PageVisible = false;
this.tabPageResult.Size = new System.Drawing.Size(110, 467);
this.tabPageResult.Text = "本次体检结果";
//
// panel6
//
this.panel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel6.Location = new System.Drawing.Point(0, 0);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(110, 467);
this.panel6.TabIndex = 0;
//
// panelPatientInfo
//
this.panelPatientInfo.BackColor = System.Drawing.Color.White;
@ -2974,6 +2995,7 @@
((System.ComponentModel.ISupportInitialize)(this.PictureBoxReportExt)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DgcRptExt)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.DgvRptExt)).EndInit();
this.tabPageResult.ResumeLayout(false);
this.panelPatientInfo.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
@ -3204,5 +3226,7 @@
private System.Windows.Forms.ToolStripMenuItem TsmiOccupational;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn33;
private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit repositoryItemCheckEdit1;
private DevExpress.XtraTab.XtraTabPage tabPageResult;
private System.Windows.Forms.Panel panel6;
}
}

@ -250,6 +250,20 @@ namespace PEIS.View.Exam
DgvExamConclusion.OptionsBehavior.Editable = true;
// 设置行头自动调整高度以显示勾选框
DgvExamConclusion.OptionsView.RowAutoHeight = true;
this.InitResultView();
}
private void InitResultView()
{
string _resultView = Global._lstConfig.FirstOrDefault(p => p.Key == "TotalResultView")?.Value;
if (_resultView == "1")
{
splitExamPart.Panel1Collapsed = true;
tabPageResult.PageVisible = true;
DgcExamResultData.Dock = DockStyle.Fill;
panel6.Controls.Add(DgcExamResultData);
}
}
private void ConclusionSort(int i)
@ -745,10 +759,12 @@ namespace PEIS.View.Exam
break;
case @"历史结果":
AddHistoryView();
historyView.SearchHistory(_patient.CardNo);
break;
case @"检查结果":
break;
}
}

@ -9,6 +9,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using DevExpress.XtraGrid.Views.Grid;
namespace PEIS.View.Setting
{
@ -34,8 +35,9 @@ namespace PEIS.View.Setting
MenuPack.TsmiSave.Click += MenuPackSave_Click;
MenuPack.TsmiDelete.Click += MenuPackDelete_Click;
MenuPack.TsmiExport.Click += MenuPackExport_Click;
DgvPack.SelectionChanged += DgvPack_SelectionChanged;
// DgvPack.SelectionChanged += DgvPack_SelectionChanged;
DgvPack.CellValueChanged += DgvPack_CellValueChanged;
DgvPack.Click += DgvPack_Click;
MenuPack.TsmiRefresh.Click += (s, e) =>
{
OnGetPackItem();
@ -178,6 +180,27 @@ namespace PEIS.View.Setting
if (DgvPack.GetRow(e.RowHandle) is Pack item && item.ID > 0)
_lstPackChange.Add(item.ID);
}
/// <summary>
/// 点击套餐行
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void DgvPack_Click(object sender, EventArgs e)
{
/*int index = DgvPack.GetFocusedDataSourceRowIndex();
DgvPack.SelectRow(index);*/
if (DgvPack.GetFocusedRow() is Pack pack && pack.ID > 0)
{
PackNameTxt.Text = pack.Name;
OnGetFeeItemByPack(pack.ID);
}
else
{
PackNameTxt.Text = "";
}
}
#endregion

@ -74,28 +74,44 @@ namespace PEIS.View.UControl
Patient = patients.FirstOrDefault();
lblPatientName.Text = Patient.Name;
}
var sql = $@"
WITH TextResultCTE AS (
SELECT E.RptItemName, E.PID,
STUFF((SELECT ',' + t2.TextResult FROM Exam_Result t2
WHERE t2.RptItemName = E.RptItemName AND t2.PID = E.PID
FOR XML PATH('')), 1, 1, '') AS TextResult
FROM Exam_Result E GROUP BY E.RptItemName, E.PID
)
SELECT
A.ExamDate,B.EID,B.DeptCode,B.DeptName,B.FeeItemName,D.VerifyTime,E.RptItemName,
CASE WHEN TR.TextResult IS NOT NULL THEN TR.TextResult + ' ' + E.Unit ELSE TR.TextResult END AS TextResult
FROM Enrollment_Patient A
LEFT JOIN Enrollment_FeeItem B ON A.ID = B.EID
LEFT JOIN Dict_ReportItem C ON C.FID = B.FID
LEFT JOIN Exam_Part D ON B.EID = D.EID AND B.DeptCode = D.DeptCode
LEFT JOIN Exam_Result E ON E.PID = D.ID AND E.RID = C.ID
LEFT JOIN TextResultCTE TR ON TR.RptItemName = E.RptItemName AND TR.PID = E.PID
WHERE
A.SignTime IS NOT NULL
AND A.CardNo LIKE '{cardNo}'
AND D.VerifyTime IS NOT NULL
ORDER BY RptItemName, ExamDate, DeptName, FeeItemName;";
//var sql = $@"
// WITH TextResultCTE AS (
// SELECT E.RptItemName, E.PID,
// STUFF((SELECT ',' + t2.TextResult FROM Exam_Result t2
// WHERE t2.RptItemName = E.RptItemName AND t2.PID = E.PID
// FOR XML PATH('')), 1, 1, '') AS TextResult
// FROM Exam_Result E GROUP BY E.RptItemName, E.PID
// )
// SELECT
// A.ExamDate,B.EID,B.DeptCode,B.DeptName,B.FeeItemName,D.VerifyTime,E.RptItemName,
// CASE WHEN TR.TextResult IS NOT NULL THEN TR.TextResult + ' ' + E.Unit ELSE TR.TextResult END AS TextResult
// FROM Enrollment_Patient A
// LEFT JOIN Enrollment_FeeItem B ON A.ID = B.EID
// LEFT JOIN Dict_ReportItem C ON C.FID = B.FID
// LEFT JOIN Exam_Part D ON B.EID = D.EID AND B.DeptCode = D.DeptCode
// LEFT JOIN Exam_Result E ON E.PID = D.ID AND E.RID = C.ID
// LEFT JOIN TextResultCTE TR ON TR.RptItemName = E.RptItemName AND TR.PID = E.PID
// WHERE
// A.SignTime IS NOT NULL
// AND A.CardNo LIKE '{cardNo}'
// AND D.VerifyTime IS NOT NULL
// ORDER BY RptItemName, ExamDate, DeptName, FeeItemName;";
var sql = $@"select
a.ExamDate
,a.ID
,b.DeptCode
,b.DeptName
,c.FeeItemName
,b.VerifyTime
,c.RptItemName
,CASE WHEN c.TextResult IS NOT NULL THEN c.TextResult + ' ' + c.Unit ELSE c.TextResult END AS TextResult
from Enrollment_Patient a
left join Exam_Part b on b.EID = a.ID
left join Exam_Result c on c.PID = b.ID
where a.SignTime is not null
and a.CardNo LIKE '533103198603294034'
and b.VerifyTime is not null
ORDER BY c.RptItemName, a.ExamDate, b.DeptName, c.FeeItemName;";
// AND A.ExamDate BETWEEN '{beg}' AND '{end}'
var data = DAOHelp.GetDataBySQL<HistoryModel>(sql).ToList();
@ -130,8 +146,7 @@ namespace PEIS.View.UControl
// 填充日期和EID组合的值
dayList.ForEach(i =>
{
var textResult = group.FirstOrDefault(p => p.ExamDate == i.ExamDate && p.EID == i.EID)
?.TextResult ?? "";
var textResult = group.FirstOrDefault(p => p.ExamDate == i.ExamDate && p.EID == i.EID)?.TextResult ?? "";
newRow[$"{i.ExamDate:yyyy-MM-dd}({i.EID})"] = textResult;
});
});
@ -139,13 +154,11 @@ namespace PEIS.View.UControl
dgcHistory.DataSource = null;
dgcHistory.DataSource = dtLeft;
SetWidth();
// dgvHistory.BestFitColumns();
dgvHistory.RowHeight = 40;
dgcHistory.RefreshDataSource();
dgvHistory.BestFitColumns();
dgcHistory.Refresh();
dgcHistory.Invalidate();
dgvHistory.Invalidate();
this.Invalidate();
}

Loading…
Cancel
Save