Explorar o código

销售订单统计报表 数量金额 保留小数点

liuchaohui %!s(int64=3) %!d(string=hai) anos
pai
achega
99e5fce3a9

+ 11 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/controller/SoSoDetailsController.java

@@ -199,6 +199,17 @@ public class SoSoDetailsController extends JeecgController<SoSoDetails, ISoSoDet
 		 Page<SoSoDetails> page = new Page<SoSoDetails>(pageNo, pageSize);
 		 try {
 			 IPage<SoSoDetails> list=soSoDetailsService.getSO_SOMainReport(page,map);
+			 for (SoSoDetails so:list.getRecords()) {
+			 	if(oConvertUtils.isNotEmpty(so.getINatMoney())){
+					so.setINatMoney(so.getINatMoney().setScale(2));
+				}
+				if(oConvertUtils.isNotEmpty(so.getINatUnitPrice())){
+					so.setINatUnitPrice(so.getINatUnitPrice().setScale(5));
+				}
+				if(oConvertUtils.isNotEmpty(so.getIQuantity())){
+					so.setIQuantity(so.getIQuantity().setScale(5));
+				}
+			 }
 			 result.setResult(list);
 			 result.success("查询成功");
 		 } catch (Exception e) {

+ 4 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/SoSoDetails.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.report.entity;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.Date;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -38,11 +39,11 @@ public class SoSoDetails {
 	@TableField(exist = false)
 	private String	yearMonth;
 	@TableField(exist = false)
-	private String	iNatUnitPrice;
+	private BigDecimal iNatUnitPrice;
 	@TableField(exist = false)
-	private String	iQuantity;
+	private BigDecimal	iQuantity;
 	@TableField(exist = false)
-	private String	iNatMoney;
+	private BigDecimal	iNatMoney;
 
 
 	/*以下非订单统计报表字段,因为不知道有没有用没删除*/