diff --git a/base-ui/src/views/kucun/kcxxcx/index.vue b/base-ui/src/views/kucun/kcxxcx/index.vue index 5159dde1..3a9894d6 100644 --- a/base-ui/src/views/kucun/kcxxcx/index.vue +++ b/base-ui/src/views/kucun/kcxxcx/index.vue @@ -160,7 +160,7 @@ export default { }, resetCache() { resetAllCache() - .then()(res => { + .then(res => { this.$message({ message: '缓存数据已重置!', type: 'success' diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorage.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorage.java index 7be30410..bc3e716d 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorage.java +++ b/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 orderDate; // 单据日期 private String supplierCodeUnified; // 供货商编码统一 + private String inOrderNo; // 入库定单号 } diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageGd.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageGd.java index 2e4fc659..19038b18 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageGd.java +++ b/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 orderDate; // 单据日期 private String supplierCodeUnified; // 供货商编码统一 + private String inOrderNo; // 入库定单号 } diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmd.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmd.java index b327960f..eee3178c 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmd.java +++ b/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 orderDate; // 单据日期 private String supplierCodeUnified; // 供货商编码统一 + private String inOrderNo; // 入库定单号 } diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageService.java index 3bee2e8e..e35ff6a4 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageService.java +++ b/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 r) { if (rowIndex > 0) { @@ -242,6 +252,7 @@ public class GdInstorageService extends ServiceImpl { @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 " + - " 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); @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 ") List> listOfJmdStoreDay(@Param("orderDate") String orderDate); @@ -71,7 +71,7 @@ public interface GdInstorageYcMapper extends BaseMapper { " colr17 saleNum, " + " '无' as salePrice, " + " 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") List> listOfJmdProductDay(@Param("orderDate")String orderDate); } diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcMapper.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcMapper.java index 525e95d7..b8847d41 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcMapper.java +++ b/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 { @Select("select IFNULL(count(1),0) FROM (SELECT DISTINCT warehouseCode from gd_inventory_yc) t ") int countType2(); + + @Select("select IFNULL(sum(prodValue),0) from gd_inventory_yc") + double amountCurrent(); } diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcService.java index eea91bc8..59487883 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryYcService.java +++ b/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 { String xlsxpath = xlsxtmplPath + "销售汇总日报表.xlsx"; File srcFile = FileUtil.file(xlsxpath); - String tfile = "kchzb/销售汇总日报表" + dfmt + ".xlsx"; - String url = urlPrefix + tfile; + String tfile = "kchzb/销售汇总日报表" + timestr + ".xlsx"; String toFileName = uploadPath + tfile; File file = FileUtil.file(toFileName); FileUtil.copy(srcFile, file, true); @@ -253,7 +252,7 @@ public class GdSalesService extends ServiceImpl { writer.setSheet(1); int storeCount = baseMapper.countStoreOnDay(orderDate); List> list1 = baseMapper.listOfStoreOnDay(orderDate); - List> list1jmd = gdInstorageJmdService.listOfStoreDay(orderDate); + List> list1jmd = gdInstorageJmdService.listOfStoreDay(orderDate); list1.addAll(list1jmd); // writer.writeCellValue(0, 1, "编号:mdxsmxb" + dfmt1); writer.merge(1, 1, 0, 2, "编号:mdxsmxb" + dfmt1, false); @@ -298,7 +297,7 @@ public class GdSalesService extends ServiceImpl { writer.writeCellValue(2, y, map.get("orderNo")); writer.writeCellValue(3, y, map.get("prodCode")); 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(7, y, map.get("amount")); hj2 = hj2 + ExcelTool.toDouble(map.get("amount")); @@ -310,8 +309,8 @@ public class GdSalesService extends ServiceImpl { writer.setSheet(3); int storeCountyc = gdSalesYcService.countStoreOnDay(orderDate); List> list1yc = gdSalesYcService.listOfStoreOnDay(orderDate); - // List> list1ycjmd = gdInstorageYcService.listOfJmdStoreDay(orderDate); - // list1yc.addAll(list1ycjmd); + List> list1ycjmd = gdInstorageYcService.listOfJmdStoreDay(orderDate); + list1yc.addAll(list1ycjmd); // writer.writeCellValue(0, 1, "编号:ycmdxsmxb" + dfmt1); writer.merge(1, 1, 0, 2, "编号:ycmdxsmxb" + dfmt1, false); writer.writeCellValue(3, 1, "渠道数量: " + storeCountyc); @@ -337,8 +336,8 @@ public class GdSalesService extends ServiceImpl { writer.setSheet(4); int productCountyc = gdSalesYcService.countProductOnDay(orderDate); List> list2yc = gdSalesYcService.listOfProductOnDay(orderDate); - // List> list2ycjmd = gdInstorageYcService.listOfJmdProductDay(orderDate); - // list2yc.addAll(list2ycjmd); + List> list2ycjmd = gdInstorageYcService.listOfJmdProductDay(orderDate); + list2yc.addAll(list2ycjmd); writer.merge(1, 1, 0, 2, "编号:ycmdspxsmxb" + dfmt1, false); writer.merge(1, 1, 3, 4, "商品数量: " + productCountyc, false); writer.merge(1, 1, 5, 7, "上报时间:" + dfmt2, false); @@ -352,7 +351,7 @@ public class GdSalesService extends ServiceImpl { writer.writeCellValue(2, y, map.get("orderNo")); writer.writeCellValue(3, y, map.get("prodCode")); 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(7, y, map.get("amount")); hj2yc = hj2yc + ExcelTool.toDouble(map.get("amount")); @@ -363,8 +362,11 @@ public class GdSalesService extends ServiceImpl { writer.flush(); writer.close(); + String newFileName = "销售汇总日报表" + orderDate + ".xlsx"; + FileUtil.rename(file, newFileName, true); + String url = urlPrefix + "kchzb/" + newFileName; gdLog.setFileUrl(url); - gdLog.setOutFilePath(toFileName); + gdLog.setOutFilePath(uploadPath + "kchzb/" + newFileName); gdSalesLogService.updateById(gdLog); return rb.success().setData(gdLog); diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/销售汇总日报表.xlsx b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/销售汇总日报表.xlsx index 772f4e21..1771704f 100644 Binary files a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/销售汇总日报表.xlsx and b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/resources/xlsx-tmpl/销售汇总日报表.xlsx differ diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/test/java/com/yxt/supervise/portal/biz/storein/MathTest.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/test/java/com/yxt/supervise/portal/biz/storein/MathTest.java new file mode 100644 index 00000000..bfb6678e --- /dev/null +++ b/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
+ * File: MathTest.java
+ * Class: com.yxt.supervise.portal.biz.storein.MathTest
+ * Description: <描述类的功能>.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2023/1/12 11:34
+ * + * @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); + + } +}