Browse Source

销售数据计算方法修改,入库数据增加字段

master
lzh 2 years ago
parent
commit
368a568644
  1. 2
      base-ui/src/views/kucun/kcxxcx/index.vue
  2. 1
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorage.java
  3. 1
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageGd.java
  4. 1
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmd.java
  5. 11
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageService.java
  6. 2
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYc.java
  7. 6
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYcMapper.java
  8. 3
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcMapper.java
  9. 4
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcService.java
  10. 4
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesReportday.java
  11. 15
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesReportdayService.java
  12. 20
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesService.java
  13. BIN
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/销售汇总日报表.xlsx
  14. 59
      yxt_supervise/supervise-portal/supervise-portal-biz/src/test/java/com/yxt/supervise/portal/biz/storein/MathTest.java

2
base-ui/src/views/kucun/kcxxcx/index.vue

@ -160,7 +160,7 @@ export default {
}, },
resetCache() { resetCache() {
resetAllCache() resetAllCache()
.then()(res => { .then(res => {
this.$message({ this.$message({
message: '缓存数据已重置!', message: '缓存数据已重置!',
type: 'success' type: 'success'

1
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorage.java

@ -71,4 +71,5 @@ public class GdInstorage extends EntityWithId {
private String colv21; // 进项税率 private String colv21; // 进项税率
private String orderDate; // 单据日期 private String orderDate; // 单据日期
private String supplierCodeUnified; // 供货商编码统一 private String supplierCodeUnified; // 供货商编码统一
private String inOrderNo; // 入库定单号
} }

1
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageGd.java

@ -71,4 +71,5 @@ public class GdInstorageGd extends EntityWithId {
private String colv21; // 进项税率 private String colv21; // 进项税率
private String orderDate; // 单据日期 private String orderDate; // 单据日期
private String supplierCodeUnified; // 供货商编码统一 private String supplierCodeUnified; // 供货商编码统一
private String inOrderNo; // 入库定单号
} }

1
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmd.java

@ -70,4 +70,5 @@ public class GdInstorageJmd extends EntityWithId {
private String colv21; // 进项税率 private String colv21; // 进项税率
private String orderDate; // 单据日期 private String orderDate; // 单据日期
private String supplierCodeUnified; // 供货商编码统一 private String supplierCodeUnified; // 供货商编码统一
private String inOrderNo; // 入库定单号
} }

11
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageService.java

@ -148,6 +148,7 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
gd.setColt19("" + r.get(20)); // 成本税额 gd.setColt19("" + r.get(20)); // 成本税额
gd.setColu20("" + r.get(21)); // 不含税成本 gd.setColu20("" + r.get(21)); // 不含税成本
gd.setColv21("" + r.get(22)); // 进项税率 gd.setColv21("" + r.get(22)); // 进项税率
gd.setInOrderNo("" + r.get(23)); // 入库定单号
return gd; return gd;
} }
@ -195,6 +196,15 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
return "0811".equals(subCode) || "0813".equals(subCode) || "0815".equals(subCode); return "0811".equals(subCode) || "0813".equals(subCode) || "0815".equals(subCode);
} }
private String ycInOrderNo(String inOrderNo) {
if (StrUtil.isBlank(inOrderNo))
return "";
if (inOrderNo.length() < 10)
return "";
// return "20" + inOrderNo.substring(4, 10);
return "20" + inOrderNo.substring(4, 6) + "." + inOrderNo.substring(6, 8) + "." + inOrderNo.substring(8, 10);
}
@Override @Override
public void handle(int sheetIndex, long rowIndex, List<Object> r) { public void handle(int sheetIndex, long rowIndex, List<Object> r) {
if (rowIndex > 0) { if (rowIndex > 0) {
@ -242,6 +252,7 @@ public class GdInstorageService extends ServiceImpl<GdInstorageMapper, GdInstora
if (checkYcProd(gd.getColm12()) && storeInfoService.containsCodeOfYc(warehouseCode)) { if (checkYcProd(gd.getColm12()) && storeInfoService.containsCodeOfYc(warehouseCode)) {
GdInstorageYc gyc = new GdInstorageYc(); GdInstorageYc gyc = new GdInstorageYc();
BeanUtil.copyProperties(gd, gyc); BeanUtil.copyProperties(gd, gyc);
gyc.setPurchaseDate(ycInOrderNo(gd.getInOrderNo()));
toInsertListYc.add(gyc); toInsertListYc.add(gyc);
} }

2
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYc.java

@ -70,4 +70,6 @@ public class GdInstorageYc extends EntityWithId {
private String colv21; // 进项税率 private String colv21; // 进项税率
private String orderDate; // 单据日期 private String orderDate; // 单据日期
private String supplierCodeUnified; // 供货商编码统一 private String supplierCodeUnified; // 供货商编码统一
private String inOrderNo; // 入库定单号
private String purchaseDate; // 采购日期
} }

6
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYcMapper.java

@ -54,11 +54,11 @@ public interface GdInstorageYcMapper extends BaseMapper<GdInstorageYc> {
@Select("select IFNULL(sum(t.colq16),0) as amount from ( " + @Select("select IFNULL(sum(t.colq16),0) as amount from ( " +
" select gig.* from gd_instorage_yc gig left join store_index si on gig.colb1=si.code " + " select gig.* from gd_instorage_yc gig left join store_index si on gig.colb1=si.code " +
" where gig.orderDate=#{orderDate} and si.`type` ='连锁外加盟(销配结算)' ) t ") " where gig.orderDate=#{orderDate} and (si.`type` ='连锁外加盟(销配结算)' OR si.`type` ='连锁外加盟(销配结算)' ) ) t ")
double amountOfDayJmd(@Param("orderDate") String orderDate); double amountOfDayJmd(@Param("orderDate") String orderDate);
@Select("select colb1 storeCode,colc2 name,IFNULL(sum(colq16),0) amount from gd_instorage_yc giy where orderDate=#{orderDate} " + @Select("select colb1 storeCode,colc2 name,IFNULL(sum(colq16),0) amount from gd_instorage_yc giy where orderDate=#{orderDate} " +
"and colb1 in (select code from store_index si where si.`type`='连锁外加盟(销配结算)') " + "and colb1 in (select code from store_index si where si.`type` ='连锁外加盟(销配结算)' OR si.`type` ='连锁外加盟(销配结算)' ) " +
"group by colb1,colc2 order by colb1 ") "group by colb1,colc2 order by colb1 ")
List<Map<String, Object>> listOfJmdStoreDay(@Param("orderDate") String orderDate); List<Map<String, Object>> listOfJmdStoreDay(@Param("orderDate") String orderDate);
@ -71,7 +71,7 @@ public interface GdInstorageYcMapper extends BaseMapper<GdInstorageYc> {
" colr17 saleNum, " + " colr17 saleNum, " +
" '无' as salePrice, " + " '无' as salePrice, " +
" colq16 amount from gd_instorage_yc giy where orderDate=#{orderDate} " + " colq16 amount from gd_instorage_yc giy where orderDate=#{orderDate} " +
"and colb1 in (select code from store_index si where si.`type`='连锁外加盟(销配结算)') " + "and colb1 in (select code from store_index si where si.`type`='连锁外加盟(销配结算)' OR si.`type` ='连锁外加盟(销配结算)' ) " +
"order by colb1") "order by colb1")
List<Map<String, Object>> listOfJmdProductDay(@Param("orderDate")String orderDate); List<Map<String, Object>> listOfJmdProductDay(@Param("orderDate")String orderDate);
} }

3
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcMapper.java

@ -65,4 +65,7 @@ public interface GdInventoryYcMapper extends BaseMapper<GdInventoryYc> {
@Select("select IFNULL(count(1),0) FROM (SELECT DISTINCT warehouseCode from gd_inventory_yc) t ") @Select("select IFNULL(count(1),0) FROM (SELECT DISTINCT warehouseCode from gd_inventory_yc) t ")
int countType2(); int countType2();
@Select("select IFNULL(sum(prodValue),0) from gd_inventory_yc")
double amountCurrent();
} }

4
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcService.java

@ -160,4 +160,8 @@ public class GdInventoryYcService extends ServiceImpl<GdInventoryYcMapper, GdInv
return rb.success().setData(url); return rb.success().setData(url);
} }
public double amountCurrent() {
return baseMapper.amountCurrent();
}
} }

4
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesReportday.java

@ -44,8 +44,8 @@ public class GdSalesReportday extends EntityWithId {
private double yskxa = 0; // 预收款项(元),大前天 private double yskxa = 0; // 预收款项(元),大前天
private double yskxb = 0; // 预收款项(元),前天 private double yskxb = 0; // 预收款项(元),前天
private double yskxc = 0; // 预收款项(元),昨天 private double yskxc = 0; // 预收款项(元),昨天
private String qczhz; // 期初总货值 private double qczhz=0; // 期初总货值
private String ycqchz; // 烟草期初货值 private double ycqchz=0; // 烟草期初货值
private String xmdatea; // 项目/日,前天 private String xmdatea; // 项目/日,前天
private String xmdateb; // 项目/日,昨天 private String xmdateb; // 项目/日,昨天
private String xmdatec; // 项目/日,今天 private String xmdatec; // 项目/日,今天

15
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesReportdayService.java

@ -9,6 +9,7 @@ import com.yxt.supervise.portal.biz.gdinstorage.GdInstorageCountService;
import com.yxt.supervise.portal.biz.gdinstorage.GdInstorageJmdService; import com.yxt.supervise.portal.biz.gdinstorage.GdInstorageJmdService;
import com.yxt.supervise.portal.biz.gdinstorage.GdInstorageYcService; import com.yxt.supervise.portal.biz.gdinstorage.GdInstorageYcService;
import com.yxt.supervise.portal.biz.gdinventory.GdInventoryOkService; import com.yxt.supervise.portal.biz.gdinventory.GdInventoryOkService;
import com.yxt.supervise.portal.biz.gdinventory.GdInventoryYcService;
import com.yxt.supervise.portal.biz.gdwholesale.GdWholesaleService; import com.yxt.supervise.portal.biz.gdwholesale.GdWholesaleService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -33,6 +34,8 @@ public class GdSalesReportdayService extends ServiceImpl<GdSalesReportdayMapper,
private GdInventoryOkService gdInventoryOkService; private GdInventoryOkService gdInventoryOkService;
@Autowired @Autowired
private GdInstorageCountService gdInstorageCountService; private GdInstorageCountService gdInstorageCountService;
@Autowired
private GdInventoryYcService gdInventoryYcService;
public GdSalesReportday clearAndInitByOrderDate(String orderDate) { public GdSalesReportday clearAndInitByOrderDate(String orderDate) {
this.clearByOrderDate(orderDate); // 清除数据日的数据 this.clearByOrderDate(orderDate); // 清除数据日的数据
@ -80,8 +83,8 @@ public class GdSalesReportdayService extends ServiceImpl<GdSalesReportdayMapper,
// rp.setYskxa(""); // 预收款项(元),大前天 // rp.setYskxa(""); // 预收款项(元),大前天
// rp.setYskxb(""); // 预收款项(元),前天 // rp.setYskxb(""); // 预收款项(元),前天
// rp.setYskxc(""); // 预收款项(元),昨天 // rp.setYskxc(""); // 预收款项(元),昨天
rp.setQczhz(""); // 期初总货值 // rp.setQczhz(""); // 期初总货值
rp.setYcqchz(""); // 烟草期初货值 // rp.setYcqchz(""); // 烟草期初货值
rp.setXmdatea(StrUtil.isBlank(preRp.getXmdateb()) ? preOrderDate : preRp.getXmdateb()); // 项目/日,前天 rp.setXmdatea(StrUtil.isBlank(preRp.getXmdateb()) ? preOrderDate : preRp.getXmdateb()); // 项目/日,前天
rp.setXmdateb(StrUtil.isBlank(preRp.getXmdatec()) ? orderDate : preRp.getXmdatec()); // 项目/日,昨天 rp.setXmdateb(StrUtil.isBlank(preRp.getXmdatec()) ? orderDate : preRp.getXmdatec()); // 项目/日,昨天
rp.setXmdatec(dfmt); // 项目/日,今天 rp.setXmdatec(dfmt); // 项目/日,今天
@ -130,7 +133,8 @@ public class GdSalesReportdayService extends ServiceImpl<GdSalesReportdayMapper,
// rp.setYcjmdyszk(""); // 烟草连锁外加盟(销配结算),应收帐款(元) // rp.setYcjmdyszk(""); // 烟草连锁外加盟(销配结算),应收帐款(元)
rp.setYcjmdkcje(xsYcJmd); // 烟草连锁外加盟(销配结算),扣除应收金额(元) rp.setYcjmdkcje(xsYcJmd); // 烟草连锁外加盟(销配结算),扣除应收金额(元)
double xshz1 = Math.round((xsLwlsd + xsLsnjm + xsPszx + xsLswjm + xsYc + xsYcJmd) * 100) / 100; // double xshz1 = ((double) Math.round((xsLwlsd + xsLsnjm + xsPszx + xsLswjm + xsYc + xsYcJmd) * 100)) / 100;
double xshz1 = xsLwlsd + xsLsnjm + xsPszx + xsLswjm + xsYc + xsYcJmd;
rp.setXsxjc(xshz1); // 销售商品收到的现金(元),昨天 //后面计算 rp.setXsxjc(xshz1); // 销售商品收到的现金(元),昨天 //后面计算
rp.setCwfxhjc(xshz1); // 财务分析本项合计,昨天 //后面计算 rp.setCwfxhjc(xshz1); // 财务分析本项合计,昨天 //后面计算
@ -140,7 +144,10 @@ public class GdSalesReportdayService extends ServiceImpl<GdSalesReportdayMapper,
//库存货值 //库存货值
double kzhz = gdInventoryOkService.amountCurrent(); double kzhz = gdInventoryOkService.amountCurrent();
rp.setKchzc(kzhz); // 库存货值(元),今天 // 计算 double kzhzyc = gdInventoryYcService.amountCurrent();
// double kzhz1 = ((double) Math.round((kzhz + kzhzyc) * 100)) / 100;
double kzhz1 = kzhz + kzhzyc;
rp.setKchzc(kzhz1); // 库存货值(元),今天 // 计算
baseMapper.insert(rp); baseMapper.insert(rp);
return rp; return rp;

20
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesService.java

@ -238,8 +238,7 @@ public class GdSalesService extends ServiceImpl<GdSalesMapper, GdSales> {
String xlsxpath = xlsxtmplPath + "销售汇总日报表.xlsx"; String xlsxpath = xlsxtmplPath + "销售汇总日报表.xlsx";
File srcFile = FileUtil.file(xlsxpath); File srcFile = FileUtil.file(xlsxpath);
String tfile = "kchzb/销售汇总日报表" + dfmt + ".xlsx"; String tfile = "kchzb/销售汇总日报表" + timestr + ".xlsx";
String url = urlPrefix + tfile;
String toFileName = uploadPath + tfile; String toFileName = uploadPath + tfile;
File file = FileUtil.file(toFileName); File file = FileUtil.file(toFileName);
FileUtil.copy(srcFile, file, true); FileUtil.copy(srcFile, file, true);
@ -298,7 +297,7 @@ public class GdSalesService extends ServiceImpl<GdSalesMapper, GdSales> {
writer.writeCellValue(2, y, map.get("orderNo")); writer.writeCellValue(2, y, map.get("orderNo"));
writer.writeCellValue(3, y, map.get("prodCode")); writer.writeCellValue(3, y, map.get("prodCode"));
writer.writeCellValue(4, y, map.get("prodName")); writer.writeCellValue(4, y, map.get("prodName"));
writer.writeCellValue(5, y, Math.round(ExcelTool.toDouble( map.get("saleNum")))); writer.writeCellValue(5, y, Math.round(ExcelTool.toDouble(map.get("saleNum"))));
writer.writeCellValue(6, y, map.get("salePrice")); writer.writeCellValue(6, y, map.get("salePrice"));
writer.writeCellValue(7, y, map.get("amount")); writer.writeCellValue(7, y, map.get("amount"));
hj2 = hj2 + ExcelTool.toDouble(map.get("amount")); hj2 = hj2 + ExcelTool.toDouble(map.get("amount"));
@ -310,8 +309,8 @@ public class GdSalesService extends ServiceImpl<GdSalesMapper, GdSales> {
writer.setSheet(3); writer.setSheet(3);
int storeCountyc = gdSalesYcService.countStoreOnDay(orderDate); int storeCountyc = gdSalesYcService.countStoreOnDay(orderDate);
List<Map<String, Object>> list1yc = gdSalesYcService.listOfStoreOnDay(orderDate); List<Map<String, Object>> list1yc = gdSalesYcService.listOfStoreOnDay(orderDate);
// List<Map<String, Object>> list1ycjmd = gdInstorageYcService.listOfJmdStoreDay(orderDate); List<Map<String, Object>> list1ycjmd = gdInstorageYcService.listOfJmdStoreDay(orderDate);
// list1yc.addAll(list1ycjmd); list1yc.addAll(list1ycjmd);
// writer.writeCellValue(0, 1, "编号:ycmdxsmxb" + dfmt1); // writer.writeCellValue(0, 1, "编号:ycmdxsmxb" + dfmt1);
writer.merge(1, 1, 0, 2, "编号:ycmdxsmxb" + dfmt1, false); writer.merge(1, 1, 0, 2, "编号:ycmdxsmxb" + dfmt1, false);
writer.writeCellValue(3, 1, "渠道数量: " + storeCountyc); writer.writeCellValue(3, 1, "渠道数量: " + storeCountyc);
@ -337,8 +336,8 @@ public class GdSalesService extends ServiceImpl<GdSalesMapper, GdSales> {
writer.setSheet(4); writer.setSheet(4);
int productCountyc = gdSalesYcService.countProductOnDay(orderDate); int productCountyc = gdSalesYcService.countProductOnDay(orderDate);
List<Map<String, Object>> list2yc = gdSalesYcService.listOfProductOnDay(orderDate); List<Map<String, Object>> list2yc = gdSalesYcService.listOfProductOnDay(orderDate);
// List<Map<String, Object>> list2ycjmd = gdInstorageYcService.listOfJmdProductDay(orderDate); List<Map<String, Object>> list2ycjmd = gdInstorageYcService.listOfJmdProductDay(orderDate);
// list2yc.addAll(list2ycjmd); list2yc.addAll(list2ycjmd);
writer.merge(1, 1, 0, 2, "编号:ycmdspxsmxb" + dfmt1, false); writer.merge(1, 1, 0, 2, "编号:ycmdspxsmxb" + dfmt1, false);
writer.merge(1, 1, 3, 4, "商品数量: " + productCountyc, false); writer.merge(1, 1, 3, 4, "商品数量: " + productCountyc, false);
writer.merge(1, 1, 5, 7, "上报时间:" + dfmt2, false); writer.merge(1, 1, 5, 7, "上报时间:" + dfmt2, false);
@ -352,7 +351,7 @@ public class GdSalesService extends ServiceImpl<GdSalesMapper, GdSales> {
writer.writeCellValue(2, y, map.get("orderNo")); writer.writeCellValue(2, y, map.get("orderNo"));
writer.writeCellValue(3, y, map.get("prodCode")); writer.writeCellValue(3, y, map.get("prodCode"));
writer.writeCellValue(4, y, map.get("prodName")); writer.writeCellValue(4, y, map.get("prodName"));
writer.writeCellValue(5, y, Math.round(ExcelTool.toDouble( map.get("saleNum")))); writer.writeCellValue(5, y, Math.round(ExcelTool.toDouble(map.get("saleNum"))));
writer.writeCellValue(6, y, map.get("salePrice")); writer.writeCellValue(6, y, map.get("salePrice"));
writer.writeCellValue(7, y, map.get("amount")); writer.writeCellValue(7, y, map.get("amount"));
hj2yc = hj2yc + ExcelTool.toDouble(map.get("amount")); hj2yc = hj2yc + ExcelTool.toDouble(map.get("amount"));
@ -363,8 +362,11 @@ public class GdSalesService extends ServiceImpl<GdSalesMapper, GdSales> {
writer.flush(); writer.flush();
writer.close(); writer.close();
String newFileName = "销售汇总日报表" + orderDate + ".xlsx";
FileUtil.rename(file, newFileName, true);
String url = urlPrefix + "kchzb/" + newFileName;
gdLog.setFileUrl(url); gdLog.setFileUrl(url);
gdLog.setOutFilePath(toFileName); gdLog.setOutFilePath(uploadPath + "kchzb/" + newFileName);
gdSalesLogService.updateById(gdLog); gdSalesLogService.updateById(gdLog);
return rb.success().setData(gdLog); return rb.success().setData(gdLog);

BIN
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/销售汇总日报表.xlsx

Binary file not shown.

59
yxt_supervise/supervise-portal/supervise-portal-biz/src/test/java/com/yxt/supervise/portal/biz/storein/MathTest.java

@ -0,0 +1,59 @@
/*********************************************************
*********************************************************
******************** *******************
************* ************
******* _oo0oo_ *******
*** o8888888o ***
* 88" . "88 *
* (| -_- |) *
* 0\ = /0 *
* ___/`---'\___ *
* .' \\| |// '. *
* / \\||| : |||// \ *
* / _||||| -:- |||||- \ *
* | | \\\ - /// | | *
* | \_| ''\---/'' |_/ | *
* \ .-\__ '-' ___/-. / *
* ___'. .' /--.--\ `. .'___ *
* ."" '< `.___\_<|>_/___.' >' "". *
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
* \ \ `_. \_ __\ /__ _/ .-` / / *
* =====`-.____`.___ \_____/___.-`___.-'===== *
* `=---=' *
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
*********************************************************/
package com.yxt.supervise.portal.biz.storein;
/**
* Project: yxt_supervise <br/>
* File: MathTest.java <br/>
* Class: com.yxt.supervise.portal.biz.storein.MathTest <br/>
* Description: <描述类的功能>. <br/>
* Copyright: Copyright (c) 2011 <br/>
* Company: https://gitee.com/liuzp315 <br/>
* Makedate: 2023/1/12 11:34 <br/>
*
* @author liupopo
* @version 1.0
* @since 1.0
*/
public class MathTest {
public static void main(String[] args) {
double a1= 4846.30;
double a2= 198800.80;
double a3= 11974.10;
double a4= 11820.05;
double a5= 277609.00;
double a6= 16298.74;
double x = a1 + a2 + a3 + a4 + a5 + a6;
double y = ((double) Math.round((a1 + a2 + a3 + a4 + a5 + a6)*100))/100;
double y1 = Math.round(1234.5);
System.out.println(y);
}
}
Loading…
Cancel
Save