Ver Fonte

非空判断

hurugang há 3 anos atrás
pai
commit
adb04c320d

+ 6 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -270,6 +270,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         returnMzChargeDetail.setAmount(BigDecimal.ZERO);
         returnMzChargeDetail.setNotDiscountAmount(BigDecimal.ZERO);
         for (MzChargeDetail md : mzChargeDetails) {
+            if(md==null){
+                continue;
+            }
             if (StringUtils.isBlank(returnMzChargeDetail.getName())) {
                 returnMzChargeDetail.setName(md.getName());
             }
@@ -619,6 +622,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             Set<String> hasHandle = new HashSet<>();
             MzChargeDetail mzChargeDetail = new MzChargeDetail();
             for (Map<String, Object> map : unPaidChargeDetails) {
+                if(map==null){
+                    continue;
+                }
                 String key = map.get("patient_id") + "-" + map.get("times");
                 if (hasHandle.contains(key)) {
                     continue;