瀏覽代碼

解决空指针

yumeng 5 年之前
父節點
當前提交
80b64e8ebc

+ 1 - 1
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/DailyReportServiceImpl.java

@@ -51,7 +51,7 @@ public class DailyReportServiceImpl implements IDailyReportService {
             if (!Check.isNull(dailyAccountReport)) {
                 BigDecimal cost = dailyAccountReport.getCost();
                 BigDecimal contractRebateRealCharged = dailyAccountReport.getContractRebateRealCharged();
-                if (!Check.isNull(cost)) {
+                if (!Check.isNull(cost) && !Check.isNull(contractRebateRealCharged)) {
                     BigDecimal actualCost = ((cost.subtract(contractRebateRealCharged)).divide(discount, 2, RoundingMode.HALF_UP));
                     dailyAccountReport.setActualCost(actualCost);
                 }