zouxuan 2 tahun lalu
induk
melakukan
42d86d4a71

+ 3 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/FinancialExpenditureServiceImpl.java

@@ -268,7 +268,6 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                 FeeProjectEnum feeProjectEnum = FeeProjectEnum.REFUND;
                 BigDecimal totalAmount = BigDecimal.ZERO;
 
-                Boolean continueFlag = false;
                 for (OaInputDto oaInputDto : oaInputDtos) {
                     String submitForm = oaInputDto.getModel();
                     Object submitValue = formData.get(submitForm);
@@ -291,6 +290,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                         feeProjectEnum = FeeProjectEnum.valueOfDesc(submitValue.toString());
                     }
                 }
+                Boolean continueFlag = false;
                 for (OaInputDto oaInputDto : oaInputDtos) {
                     String submitForm = oaInputDto.getModel();
                     Object submitValue = formData.get(submitForm);
@@ -302,7 +302,6 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                     }
                     List<HashMap> hashMaps = JSONObject.parseArray(formData.get(submitForm).toString(), HashMap.class);
                     if(StringUtils.equals("分摊明细",oaInputDto.getName())){
-                        continueFlag = true;
                         //处理房租的分摊明细
                         nullAmount:
                         for (HashMap hashMap : hashMaps) {
@@ -316,8 +315,10 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                                             String name = inputDto.getName();
                                             Object o = hashMap.get(inputDto.getModel());
                                             if (Objects.isNull(o) || StringUtils.isEmpty(o.toString())) {
+                                                continueFlag = false;
                                                 continue nullAmount;
                                             }
+                                            continueFlag = true;
                                             if (StringUtils.equals(name,"金额")) {
                                                 financialExpenditure.setCurrentAmount(new BigDecimal(Double.parseDouble(o.toString())));
                                             } else if (StringUtils.equals(name,"日期")) {