Pārlūkot izejas kodu

盯盘-运营经理-人均账户数量向上取整

yangzian 3 gadi atpakaļ
vecāks
revīzija
069633b362

+ 2 - 1
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/service/impl/MaterialStareServiceImpl.java

@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.text.DecimalFormat;
 import java.text.ParseException;
@@ -225,7 +226,7 @@ public class MaterialStareServiceImpl implements MaterialStareService {
             // 人均消耗 = 时间段内 总消耗 / 人数
             Double userAveragecost = Double.valueOf(totalCost.getString("totalCost")) / operatorUserIds.size();
             DecimalFormat df = new DecimalFormat("#.000");
-            resultMap.put("userAverageAccount",df.format(userAverageAccount));
+            resultMap.put("userAverageAccount",new Double(Math.ceil(userAverageAccount)).intValue());
             resultMap.put("userAveragecost",df.format(userAveragecost));
         }catch (Exception e){
             e.printStackTrace();