|
@@ -80,20 +80,16 @@ public class MenZhengXiangMuServer {
|
|
|
public List<MzChargeDetail> tcTree(List<MzChargeDetail> tempList) {
|
|
|
List<MzChargeDetail> resultList = new ArrayList<>();
|
|
|
Map<String, MzChargeDetail> treeMap = new HashMap<>(tempList.size());
|
|
|
- List<String> noParentNode = new ArrayList<>();
|
|
|
|
|
|
for (MzChargeDetail item : tempList) {
|
|
|
String key = item.getPatientId() + item.getTimes() + item.getReceiptNo() + item.getOrderNo() + item.getChargeItemCode();
|
|
|
treeMap.put(key, item);
|
|
|
- if ("TC".equals(item.getBillItemCode()) || StringUtil.isBlank(item.getTcNo())) {
|
|
|
- if (BigUtils.bigDaYu(item.getUnitPrice(), BigDecimal.ZERO)) {
|
|
|
- item.setChargeFee(item.getUnitPrice().multiply(item.getQuantity()).multiply(item.getDrugWin()));
|
|
|
- } else {
|
|
|
- item.setChargeName(item.getTcName() + "(套餐)");
|
|
|
- }
|
|
|
+ if (BigUtils.bigDaYu(item.getUnitPrice(), BigDecimal.ZERO)) {
|
|
|
+ item.setChargeFee(item.getUnitPrice().multiply(item.getQuantity()).multiply(item.getDrugWin()));
|
|
|
+ }
|
|
|
+ if ("TC".equals(item.getBillItemCode())) {
|
|
|
+ item.setChargeName(item.getTcName() + "(套餐)");
|
|
|
resultList.add(item);
|
|
|
- } else {
|
|
|
- noParentNode.add(key);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -109,15 +105,11 @@ public class MenZhengXiangMuServer {
|
|
|
}
|
|
|
template.setChargeFee(template.getChargeFee().add(item.getUnitPrice().multiply(item.getQuantity()).multiply(item.getDrugWin())));
|
|
|
template.getList().add(item);
|
|
|
- noParentNode.remove(key);
|
|
|
- }
|
|
|
- }
|
|
|
- if (ListUtil.notBlank(noParentNode)) {
|
|
|
- for (String s : noParentNode) {
|
|
|
- log.info("s:{}", s);
|
|
|
- resultList.add(treeMap.get(s));
|
|
|
+ } else {
|
|
|
+ resultList.add(item);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return resultList;
|
|
|
}
|
|
|
|