提交 a8f1e58a authored 作者: 吕本才's avatar 吕本才

1、百分比 小程序端优化

上级 170f2e79
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.NumberUtil;
import com.ruoyi.dealer.domain.DealerBaseInfo;
import com.ruoyi.dealer.domain.DealerRoundResult;
import com.ruoyi.dealer.domain.dto.WechatDealerRoundInfoRes;
......@@ -60,7 +61,8 @@ public class DealerBaseInfoImpl extends ServiceImpl<DealerBaseInfoMapper, Dealer
// 获取支付百分比 保留两位小数点
roundInfoRes.setPaymentPercentage(getPercentage(dealerBaseInfo.getPaymentTtl(),dealerBaseInfo.getGoalTtlAct()) + "%");
// roundInfoRes.setPaymentPercentage(getPercentage(dealerBaseInfo.getPaymentTtl(),dealerBaseInfo.getGoalTtlAct()) + "%");
roundInfoRes.setPaymentPercentage(NumberUtil.formatNumber(dealerBaseInfo.getPaymentPercentage(),2) + "%");
// 轮次
roundInfoRes.setRoundTime(round);
......@@ -71,7 +73,8 @@ public class DealerBaseInfoImpl extends ServiceImpl<DealerBaseInfoMapper, Dealer
.eq(DealerRoundResult::getDealerId, dealerId));
if (result != null) {
roundInfoRes.setPaymentTtl(result.getPaymentTtl());
roundInfoRes.setPaymentPercentage(getPercentage(result.getPaymentTtl(),dealerBaseInfo.getGoalTtlAct()) + "%");
// roundInfoRes.setPaymentPercentage(getPercentage(result.getPaymentTtl(),dealerBaseInfo.getGoalTtlAct()) + "%");
roundInfoRes.setPaymentPercentage(NumberUtil.formatNumber(result.getPaymentPercentage(),2) + "%");
}
// 没有结果数据 数据怎么初始化 ??
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论