diff --git a/supervise-customer-ui/src/views/kucun/xssjgl/index.vue b/supervise-customer-ui/src/views/kucun/xssjgl/index.vue
index 29c2ce4e..ff744639 100644
--- a/supervise-customer-ui/src/views/kucun/xssjgl/index.vue
+++ b/supervise-customer-ui/src/views/kucun/xssjgl/index.vue
@@ -82,7 +82,8 @@
下载销售报表文件
- 下载烟草分销数据文件
+
+
diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageCountMapper.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageCountMapper.java
index ae29b4d9..2e58da98 100644
--- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageCountMapper.java
+++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageCountMapper.java
@@ -70,7 +70,7 @@ public interface GdInstorageCountMapper extends BaseMapper {
@Select("SELECT t.*, " +
" CONVERT(IF((t.billTotalPrice-t.prodValue)>0,t.billTotalPrice-t.prodValue,0),DECIMAL(12,2)) wdhjz, " +
" CONVERT(IF((t.prodValue-t.billTotalPrice)>0,t.prodValue-t.billTotalPrice,0),DECIMAL(12,2)) cchjz, " +
- " IF((t.billTotalPrice-t.prodValue)>0,'是','否') sfyq " +
+ " IF((t.billTotalPrice-t.prodValue)>0 and DATEDIFF(arrivaldate, CURDATE())<0 ,'是','否') sfyq " +
"FROM( " +
" SELECT " +
" MAX(sbi.codeUnified) codeUnified, " +
@@ -80,8 +80,8 @@ public interface GdInstorageCountMapper extends BaseMapper {
" ( " +
" SELECT CONVERT(IFNULL(SUM(colq16),0),DECIMAL(12,2)) FROM gd_instorage gic LEFT JOIN `product_information` PI ON pi.code=gic.colh7 " +
" WHERE gic.supplierCodeUnified=pr.supplierOnlyCode " +
- " AND pi.categoryKey IN(SELECT categoryKey FROM `restricted_category`) " +
- " AND pi.brandsid IN(SELECT CODE FROM `restricted_brand`) " +
+// " AND pi.categoryKey IN(SELECT categoryKey FROM `restricted_category`) " +
+// " AND pi.brandsid IN(SELECT CODE FROM `restricted_brand`) " +
" ) prodvalue, " +
" MAX(pr.`arrivalDate`) arrivaldate " +
" FROM `supplier_bank_info` sbi " +
diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageCountService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageCountService.java
index 34eacd55..fb84d9ae 100644
--- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageCountService.java
+++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageCountService.java
@@ -270,38 +270,38 @@ public class GdInstorageCountService extends ServiceImpl map = list1.get(y - 3);
writer.writeCellValue(0, y, map.get("name"));
- writer.writeCellValue(1, y, "");
- writer.writeCellValue(2, y, map.get("billtotalprice"));
+// writer.writeCellValue(1, y, "");
+ writer.writeCellValue(1, y, map.get("billtotalprice"));
cbilltotalprice = cbilltotalprice + ExcelTool.toDouble(map.get("billtotalprice"));
- writer.writeCellValue(3, y, map.get("prodvalue"));
+ writer.writeCellValue(2, y, map.get("prodvalue"));
cprodvalue = cprodvalue + ExcelTool.toDouble(map.get("prodvalue"));
- writer.writeCellValue(4, y, map.get("wdhjz"));
+ writer.writeCellValue(3, y, map.get("wdhjz"));
cwdhjz = cwdhjz + ExcelTool.toDouble(map.get("wdhjz"));
- writer.writeCellValue(5, y, map.get("cchjz"));
+ writer.writeCellValue(4, y, map.get("cchjz"));
ccchjz = ccchjz + ExcelTool.toDouble(map.get("cchjz"));
- writer.writeCellValue(6, y, map.get("arrivaldate"));
- writer.writeCellValue(7, y, map.get("sfyq"));
+ writer.writeCellValue(5, y, map.get("arrivaldate"));
+ writer.writeCellValue(6, y, map.get("sfyq"));
}
writer.writeCellValue(0, countRow, "市烟草");
- writer.writeCellValue(1, countRow, "");
- writer.writeCellValue(2, countRow, cPrice);
+// writer.writeCellValue(1, countRow, "");
+ writer.writeCellValue(1, countRow, cPrice);
cbilltotalprice = cbilltotalprice + cPrice;
- writer.writeCellValue(3, countRow, cghje);
+ writer.writeCellValue(2, countRow, cghje);
cprodvalue = cprodvalue + cghje;
- writer.writeCellValue(4, countRow, cztje);
+ writer.writeCellValue(3, countRow, cztje);
cwdhjz = cwdhjz + cztje;
- writer.writeCellValue(5, countRow, "0.0");
- writer.writeCellValue(6, countRow, maxDate);
- writer.writeCellValue(7, countRow, "否");
+ writer.writeCellValue(4, countRow, "0.0");
+ writer.writeCellValue(5, countRow, maxDate);
+ writer.writeCellValue(6, countRow, "否");
writer.writeCellValue(0, countRow + 1, "合计");
- writer.writeCellValue(1, countRow + 1, "");
- writer.writeCellValue(2, countRow + 1, cbilltotalprice);
- writer.writeCellValue(3, countRow + 1, cprodvalue);
- writer.writeCellValue(4, countRow + 1, cwdhjz);
- writer.writeCellValue(5, countRow + 1, ccchjz);
+// writer.writeCellValue(1, countRow + 1, "");
+ writer.writeCellValue(1, countRow + 1, cbilltotalprice);
+ writer.writeCellValue(2, countRow + 1, cprodvalue);
+ writer.writeCellValue(3, countRow + 1, cwdhjz);
+ writer.writeCellValue(4, countRow + 1, ccchjz);
+ writer.writeCellValue(5, countRow + 1, "");
writer.writeCellValue(6, countRow + 1, "");
- writer.writeCellValue(7, countRow + 1, "");
writer.flush();
writer.close();
diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesService.java
index a44336ed..f1f4212c 100644
--- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesService.java
+++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesService.java
@@ -367,6 +367,34 @@ public class GdSalesService extends ServiceImpl {
String url = urlPrefix + "kchzb/" + newFileName;
gdLog.setFileUrl(url);
gdLog.setOutFilePath(uploadPath + "kchzb/" + newFileName);
+
+// String newFileNameyc = "kchzb/烟草分销数据" + orderDate + "-" + System.currentTimeMillis() + ".xlsx";
+// ExcelWriter writerYcfx = ExcelUtil.getWriter(uploadPath + newFileNameyc);
+// List gdSalesYcs = gdSalesYcService.listFxOfDay(orderDate);
+// writerYcfx.addHeaderAlias("orderType", "订单类型");
+// writerYcfx.addHeaderAlias("orderNo", "销售订单号");
+// writerYcfx.addHeaderAlias("prodCode", "商品编码");
+// writerYcfx.addHeaderAlias("prodBarCode", "商品条码");
+// writerYcfx.addHeaderAlias("prodName", "商品名称");
+// writerYcfx.addHeaderAlias("brandCode", "品牌代码");
+// writerYcfx.addHeaderAlias("brandName", "品牌名称");
+// writerYcfx.addHeaderAlias("categoryb", "商品大类");
+// writerYcfx.addHeaderAlias("categorym", "商品中类");
+// writerYcfx.addHeaderAlias("categorys", "商品小类");
+// writerYcfx.addHeaderAlias("customerCode", "客户代码");
+// writerYcfx.addHeaderAlias("customerName", "客户名称");
+// writerYcfx.addHeaderAlias("saleNum", "销售数量");
+// writerYcfx.addHeaderAlias("storeCode", "销售渠道");
+// writerYcfx.addHeaderAlias("salePrice", "销售价格");
+// writerYcfx.addHeaderAlias("saleCost", "销售成本");
+// writerYcfx.addHeaderAlias("profit", "利润");
+// writerYcfx.addHeaderAlias("dataDate", "数据日期");
+// writerYcfx.setOnlyAlias(true);
+// writerYcfx.write(gdSalesYcs, true);
+// writerYcfx.close();
+// String urlyc = urlPrefix + newFileNameyc;
+// gdLog.setRemarks(urlyc);
+
gdSalesLogService.updateById(gdLog);
return rb.success().setData(gdLog);
diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcMapper.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcMapper.java
index 92093496..e0a5e3c4 100644
--- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcMapper.java
+++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcMapper.java
@@ -79,5 +79,8 @@ public interface GdSalesYcMapper extends BaseMapper {
@Select("SELECT CONVERT(IFNULL(sum(saleNum*salePrice),0),DECIMAL(12,2)) as amount FROM gd_sales_yc where dataDate=#{dataDate} " +
" and storeCode in (select code from store_index si where si.`type`='连锁内加盟') ")
- double amountOfLsnjmDay(String orderDate);
+ double amountOfLsnjmDay(@Param("dataDate") String orderDate);
+
+ @Select("SELECT * FROM gd_sales_gd where orderType='批发' and (customerName='客户' or customerName='客户1') and dataDate=#{dataDate} " )
+ List listFxOfDay(@Param("dataDate") String orderDate);
}
diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcService.java
index 257ed5b9..262fbfaa 100644
--- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcService.java
+++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesYcService.java
@@ -78,4 +78,8 @@ public class GdSalesYcService extends ServiceImpl {
public double amountOfLsnjmDay(String orderDate) {
return baseMapper.amountOfLsnjmDay(orderDate);
}
+
+ public List listFxOfDay(String orderDate) {
+ return baseMapper.listFxOfDay(orderDate);
+ }
}