zouxuan 3 years ago
parent
commit
b168f5901d

+ 13 - 10
mec-biz/src/main/java/com/ym/mec/biz/service/impl/FinancialExpenditureServiceImpl.java

@@ -609,15 +609,6 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                         if(Objects.nonNull(row.get(s))){
                             objectMap.put(columnValue, Objects.equals("是",row.get(s))?true:false);
                         }
-                    }else if(Objects.equals(columnValue,"amount")){
-                        objectMap.put(columnValue, Objects.isNull(row.get(s)) || StringUtils.isEmpty(row.get(s).toString())?0:row.get(s));
-                    }else if(Objects.equals(columnValue,"merNo") ||
-                            Objects.equals(columnValue,"bankAddress") ||
-                            Objects.equals(columnValue,"merNoName")){
-                        if(Objects.isNull(row.get(s)) || StringUtils.isEmpty(row.get(s).toString())){
-                            throw new BizException("乐团退费模板错误: 请完整填写收款账户信息");
-                        }
-                        objectMap.put(columnValue, Objects.isNull(row.get(s)) || StringUtils.isEmpty(row.get(s).toString())?0:row.get(s));
                     }else if(Objects.equals(columnValue,"organName")){
                         if(Objects.isNull(row.get(s)) || StringUtils.isEmpty(row.get(s).toString())){
                             throw new BizException("乐团退费模板错误: 请录入分部信息");
@@ -631,9 +622,21 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
                     }
                 }
                 FinancialExpenditure financialExpenditure = JSONObject.parseObject(objectMap.toJSONString(),FinancialExpenditure.class);
-                if(StringUtils.isEmpty(financialExpenditure.getMusicGroupId()) || Objects.isNull(financialExpenditure.getStudentId())){
+                if(StringUtils.isEmpty(financialExpenditure.getMusicGroupId())
+                        || Objects.isNull(financialExpenditure.getStudentId())){
                     throw new BizException("乐团退费模板错误: 乐团编号或学员编号不可为空");
                 }
+                if(Objects.isNull(financialExpenditure.getOrganId())){
+                    throw new BizException("乐团退费模板错误: 请填写分部信息");
+                }
+                if(Objects.isNull(financialExpenditure.getAmount())){
+                    throw new BizException("乐团退费模板错误: 退费金额不可为空");
+                }
+                if(StringUtils.isEmpty(financialExpenditure.getMerNo()) ||
+                        StringUtils.isEmpty(financialExpenditure.getBankAddress()) ||
+                        StringUtils.isEmpty(financialExpenditure.getMerNoName())){
+                    throw new BizException("乐团退费模板错误: 请完整填写收款账户信息");
+                }
                 financialExpenditureList.add(financialExpenditure);
             }
         }