Browse Source

销售来源统计导出百分比处理

anderx 3 years ago
parent
commit
d28b478cfc

+ 1 - 1
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -470,7 +470,7 @@ public class NewExcelUtil<T> {
 		if (ColumnType.STRING == attr.cellType()) {
 			if (attr.percentage()==1){
 				BigDecimal v=new BigDecimal(value.toString());
-				value=v.multiply(new BigDecimal(100)).stripTrailingZeros().toPlainString();
+				value=v.multiply(new BigDecimal(100)).stripTrailingZeros().toPlainString()+"%";
 			}
 			cell.setCellValue(StringUtils.isNull(value) ? attr.defaultValue() : value + attr.suffix());
 		} else if (ColumnType.NUMERIC == attr.cellType()) {

+ 8 - 8
src/main/java/com/goafanti/order/bo/OutOrderSalesSource.java

@@ -14,35 +14,35 @@ public class OutOrderSalesSource {
     private Integer counts;
     @Excel(name = "电话新开发",width = 10)
     private Integer dhxkf;
-    @Excel(name = "电话新开发占比",suffix = "%",percentage = 1,width = 10)
+    @Excel(name = "电话新开发占比",percentage = 1,width = 10)
     private String dhxkfl;
     @Excel(name = "电话自带资源",width = 10)
     private Integer dhzdzy;
-    @Excel(name = "电话自带资源占比",suffix = "%",percentage = 1,width = 10)
+    @Excel(name = "电话自带资源占比",percentage = 1,width = 10)
     private String dhzdzyl;
     @Excel(name = "网络",width = 10)
     private Integer wl;
-    @Excel(name = "网络占比",suffix = "%",percentage = 1,width = 10)
+    @Excel(name = "网络占比",percentage = 1,width = 10)
     private String wll;
     @Excel(name = "渠道",width = 10)
     private Integer qd;
-    @Excel(name = "渠道占比",suffix = "%",percentage = 1,width = 10)
+    @Excel(name = "渠道占比",percentage = 1,width = 10)
     private String qdl;
     @Excel(name = "转介绍",width = 10)
     private Integer zjs;
-    @Excel(name = "转介绍占比",suffix = "%",percentage = 1,width = 10)
+    @Excel(name = "转介绍占比",percentage = 1,width = 10)
     private String zjsl;
     @Excel(name = "其他",width = 10)
     private Integer qt;
-    @Excel(name = "其他占比",suffix = "%",percentage = 1,width = 10)
+    @Excel(name = "其他占比",percentage = 1,width = 10)
     private String qtl;
     @Excel(name = "高新复购",width = 10)
     private Integer gxfg;
-    @Excel(name = "高新复购占比",suffix = "%",percentage = 1,width = 10)
+    @Excel(name = "高新复购占比",percentage = 1,width = 10)
     private String gxfgl;
     @Excel(name = "其他复购",width = 10)
     private Integer qtfg;
-    @Excel(name = "其他复购占比",suffix = "%",percentage = 1,width = 10)
+    @Excel(name = "其他复购占比",percentage = 1,width = 10)
     private String qtfgl;
 
     public Integer getProvince() {