Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09bebac

Browse files
Merge pull request#11254 from hmislk/External-Laboratory-Workload-Report-#11226-
External laboratory workload report#11226
2 parentsc86bb60 +a7abab3 commit09bebac

File tree

4 files changed

+209
-128
lines changed

4 files changed

+209
-128
lines changed

‎src/main/java/com/divudi/bean/common/ReportsController.java

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,6 +3321,8 @@ public void externalLaboratoryWorkloadReport() {
33213321
bundle.calculateTotalByBillItemsNetTotal();
33223322
}else {
33233323
bundle =generateExternalLaboratoryWorkloadSummaryBillItems(opdBts);
3324+
3325+
bundle.calculateTotalByBillItemRowValues();
33243326
}
33253327
}
33263328

@@ -3414,8 +3416,8 @@ private ReportTemplateRowBundle generateExternalLaboratoryWorkloadBillItems(List
34143416
}
34153417

34163418
if (category !=null) {
3417-
jpql +="AND billItem.item.department.id = :cat ";
3418-
parameters.put("cat",category.getId());
3419+
jpql +="AND billItem.item.category = :cat ";
3420+
parameters.put("cat",category);
34193421
}
34203422

34213423
if (investigation !=null) {
@@ -3433,6 +3435,7 @@ private ReportTemplateRowBundle generateExternalLaboratoryWorkloadBillItems(List
34333435
System.out.println("parameters = " +parameters);
34343436

34353437
List<ReportTemplateRow>rs = (List<ReportTemplateRow>)paymentFacade.findLightsByJpqlWithoutCache(jpql,parameters,TemporalType.TIMESTAMP);
3438+
removeCancelledNonInvestigationBills(rs);
34363439

34373440
ReportTemplateRowBundleb =newReportTemplateRowBundle();
34383441
b.setReportTemplateRows(rs);
@@ -3441,6 +3444,24 @@ private ReportTemplateRowBundle generateExternalLaboratoryWorkloadBillItems(List
34413444
returnb;
34423445
}
34433446

3447+
privatevoidremoveCancelledNonInvestigationBills(finalList<ReportTemplateRow>rs) {
3448+
List<BillTypeAtomic>cancelAndRefundBillTypeAtomics =cancelAndRefundBillTypeAtomics();
3449+
3450+
Iterator<ReportTemplateRow>iterator =rs.iterator();
3451+
3452+
while (iterator.hasNext()) {
3453+
ReportTemplateRowrow =iterator.next();
3454+
BillItembi =row.getBillItem();
3455+
Billb =bi.getBill();
3456+
3457+
if (cancelAndRefundBillTypeAtomics.contains(b.getBillTypeAtomic())) {
3458+
if (bi.getReferanceBillItem() ==null ||bi.getReferanceBillItem().getPatientInvestigation() ==null) {
3459+
iterator.remove();
3460+
}
3461+
}
3462+
}
3463+
}
3464+
34443465
privateReportTemplateRowBundlegenerateExternalLaboratoryWorkloadSummaryBillItems(List<BillTypeAtomic>bts) {
34453466
Map<String,Object>parameters =newHashMap<>();
34463467
parameters.put("bts",bts);
@@ -3507,8 +3528,8 @@ private ReportTemplateRowBundle generateExternalLaboratoryWorkloadSummaryBillIte
35073528
}
35083529

35093530
if (category !=null) {
3510-
jpql +="AND billItem.patientInvestigation.investigation.category.id = :cat ";
3511-
parameters.put("cat",category.getId());
3531+
jpql +="AND billItem.item.category = :cat ";
3532+
parameters.put("cat",category);
35123533
}
35133534

35143535
if (investigationCode !=null) {
@@ -3522,6 +3543,7 @@ private ReportTemplateRowBundle generateExternalLaboratoryWorkloadSummaryBillIte
35223543
System.out.println("parameters = " +parameters);
35233544

35243545
List<ReportTemplateRow>rs = (List<ReportTemplateRow>)paymentFacade.findLightsByJpql(jpql,parameters,TemporalType.TIMESTAMP);
3546+
removeCancelledNonInvestigationBills(rs);
35253547
createSummaryRows(rs);
35263548
rs.removeIf(row ->row.getRowValue() ==0.0);
35273549

‎src/main/java/com/divudi/bean/lab/InvestigationCategoryController.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ public List<InvestigationCategory> getItems() {
167167
returnitems;
168168
}
169169

170+
publicList<InvestigationCategory>getItemsWithServiceCategories() {
171+
if (items ==null) {
172+
items =fillItemsWithServiceCategories();
173+
}
174+
returnitems;
175+
}
176+
170177
publicList<InvestigationCategory>fillItems() {
171178
Stringjpql ="select c "
172179
+" from InvestigationCategory c "
@@ -176,6 +183,14 @@ public List<InvestigationCategory> fillItems() {
176183
m.put("ret",false);
177184
returngetFacade().findByJpql(jpql,m);
178185
}
186+
187+
publicList<InvestigationCategory>fillItemsWithServiceCategories() {
188+
Stringjpql ="SELECT c FROM Category c "
189+
+"WHERE TYPE(c) IN (InvestigationCategory, ServiceCategory) "
190+
+"ORDER BY c.name";
191+
Mapm =newHashMap();
192+
returngetFacade().findByJpql(jpql,m);
193+
}
179194

180195
publicInvestigationCategoryfindAndCreateCategoryByName(Stringqry) {
181196
InvestigationCategoryc;

‎src/main/java/com/divudi/data/ReportTemplateRowBundle.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,20 @@ public void calculateTotalByBillItemsNetTotal() {
12311231
}
12321232
}
12331233

1234+
publicvoidcalculateTotalByBillItemRowValues() {
1235+
total =0.0;
1236+
1237+
if (this.reportTemplateRows !=null && !this.reportTemplateRows.isEmpty()) {
1238+
for (ReportTemplateRowrow :this.reportTemplateRows) {
1239+
if (row.getRowValue() ==null) {
1240+
continue;
1241+
}
1242+
Doubleamount =safeDouble(row.getRowValue());
1243+
total +=amount;
1244+
}
1245+
}
1246+
}
1247+
12341248
publicvoidcalculateTotalHospitalFeeByBillItems() {
12351249
hospitalTotal =0.0;
12361250

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp