ソースを参照

1.控制台利润分析报错

wuhp 1 年間 前
コミット
b762737c48

+ 7 - 3
src/main/java/com/ydtech/modules/admin/service/impl/ProfitAnalysisServiceImpl.java

@@ -81,11 +81,15 @@ public class ProfitAnalysisServiceImpl implements ProfitAnalysisService {
                     String enterCardNum = analysisDto.getEnterCardNum();
                     InvAccountCardVo outAccount = invAccountMapper.getByCarNumber(outCardNum);
                     InvAccountCardVo enterAccount  = invAccountMapper.getByCarNumber(enterCardNum);
-                    if(StringUtils.isNotEmpty(outAccount.getOuterFlag()) && StringUtils.isNotEmpty(enterAccount.getOuterFlag())){
-                        if(!enterAccount.getOuterFlag().equals(outAccount.getOuterFlag())){
-                            variableCost=variableCost.add(analysisDto.getApplyAmount());
+                    if(ObjectUtils.isNotEmpty(outAccount) &&  ObjectUtils.isNotEmpty(enterAccount) ){
+                        if( (StringUtils.isNotEmpty(outAccount.getOuterFlag()) && StringUtils.isNotEmpty(enterAccount.getOuterFlag()))){
+                            if(!enterAccount.getOuterFlag().equals(outAccount.getOuterFlag())){
+                                variableCost=variableCost.add(analysisDto.getApplyAmount());
+                            }
                         }
                     }
+
+
                 }
                 profitAnalysisDto.setVariableCost(variableCost);
             }