|
@@ -10,6 +10,8 @@ import thyyxxk.webserver.entity.ResultVo;
|
|
|
import thyyxxk.webserver.entity.datamodify.MzChargeDetail;
|
|
|
import thyyxxk.webserver.utils.*;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.math.BigInteger;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -79,8 +81,8 @@ public class MenZhengXiangMuServer {
|
|
|
for (MzChargeDetail item : tempList) {
|
|
|
String key = item.getPatientId() + item.getTimes() + item.getReceiptNo() + item.getOrderNo() + item.getChargeItemCode();
|
|
|
treeMap.put(key, item);
|
|
|
- if (item.getBillItemCode().equals("TC") || BigUtils.dengYu(item.getUnitPrice(), 0) || item.getChargeItemCode().length() > 3) {
|
|
|
- if (item.getChargeItemCode().length() > 3) {
|
|
|
+ if (item.getBillItemCode().equals("TC")) {
|
|
|
+ if (BigUtils.bigDaYu(item.getUnitPrice(), BigDecimal.ZERO)) {
|
|
|
item.setChargeFee(item.getUnitPrice().multiply(item.getQuantity()).multiply(item.getDrugWin()));
|
|
|
} else {
|
|
|
item.setChargeName(item.getTcName() + "(套餐)");
|
|
@@ -96,7 +98,10 @@ public class MenZhengXiangMuServer {
|
|
|
if (template.getList() == null) {
|
|
|
template.setList(new ArrayList<>());
|
|
|
}
|
|
|
- template.setChargeFee(item.getUnitPrice().multiply(item.getQuantity()).multiply(item.getDrugWin()));
|
|
|
+ if (template.getChargeFee() == null || BigUtils.dengYu(template.getChargeFee(), BigDecimal.ZERO)) {
|
|
|
+ template.setChargeFee(new BigDecimal(BigInteger.ZERO));
|
|
|
+ }
|
|
|
+ template.setChargeFee(template.getChargeFee().add(item.getUnitPrice().multiply(item.getQuantity()).multiply(item.getDrugWin())));
|
|
|
template.getList().add(item);
|
|
|
}
|
|
|
}
|
|
@@ -129,12 +134,10 @@ public class MenZhengXiangMuServer {
|
|
|
item.getChargeItemCode(),
|
|
|
a -> a, (k1, k2) -> k1
|
|
|
));
|
|
|
- log.info("map:{}", JSON.toJSONString(map));
|
|
|
List<MzChargeDetail> xuYaoBaoCunDeShuJu = new ArrayList<>();
|
|
|
for (MzChargeDetail item : mz.getList()) {
|
|
|
String key = item.getPatientId() + item.getTimes() + item.getReceiptNo() + item.getOrderNo() + item.getItemNo() +
|
|
|
item.getChargeItemCode();
|
|
|
- log.info("父节点:{}", key);
|
|
|
MzChargeDetail mzChargeDetail = map.get(key);
|
|
|
if (mzChargeDetail != null) {
|
|
|
if (!item.getConfirmFlag().equals(mzChargeDetail.getConfirmFlag()) && item.getConfirmFlag() != 0) {
|
|
@@ -145,7 +148,6 @@ public class MenZhengXiangMuServer {
|
|
|
chargeDetail.setConfirmFlag(item.getConfirmFlag());
|
|
|
String templateKey = chargeDetail.getPatientId() + chargeDetail.getTimes() + chargeDetail.getReceiptNo() + chargeDetail.getOrderNo()
|
|
|
+ chargeDetail.getItemNo() + chargeDetail.getChargeItemCode();
|
|
|
- log.info("子节点:{}", templateKey);
|
|
|
MzChargeDetail template = map.get(templateKey);
|
|
|
if (template != null) {
|
|
|
if (!chargeDetail.getConfirmFlag().equals(mzChargeDetail.getConfirmFlag()) && chargeDetail.getConfirmFlag() != 0) {
|