From 4c54cd41df5f89e364f71cced36546318db73c5e Mon Sep 17 00:00:00 2001 From: bawei <95887577@qq.com> Date: Thu, 8 Jun 2023 14:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E7=BB=8F=E8=90=A5=E3=80=81=E9=87=87=E8=B4=AD=E9=94=80=E5=94=AE?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messageCenter/MessageCenterMapper.xml | 93 +++++++------------ .../admin/components/PurchasingTodayList.vue | 10 +- .../admin/components/SaleTodayList.vue | 4 +- SC-web/src/views/dashboard/admin/index.vue | 28 ++++-- 4 files changed, 60 insertions(+), 75 deletions(-) diff --git a/SC-boot/linkage-scm/src/main/resources/mapper/messageCenter/MessageCenterMapper.xml b/SC-boot/linkage-scm/src/main/resources/mapper/messageCenter/MessageCenterMapper.xml index 341d7a5e..f1002f17 100644 --- a/SC-boot/linkage-scm/src/main/resources/mapper/messageCenter/MessageCenterMapper.xml +++ b/SC-boot/linkage-scm/src/main/resources/mapper/messageCenter/MessageCenterMapper.xml @@ -505,28 +505,11 @@ FROM ( SELECT - count(*) poundNum, + count(*) bangdannum, IFNULL( ROUND( SUM( CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), 6 ), 0 - ) buckleWeightSum, - IFNULL( - ROUND( - SUM( - CASE - a.unit - WHEN '0' THEN - ( CASE a.is_Invoicing WHEN '1' THEN a.settlement ELSE 0 END ) - WHEN '1' THEN - ( CASE a.is_Invoicing WHEN '1' THEN a.settlement ELSE 0 END ) / 1000 - END - ), - 6 - ), - 0 - ) settlementSum, - IFNULL( ROUND( SUM( a.settlement * a.purchase_price ), 6 ), 0 ) purchaseAmountSum, - IFNULL( ROUND( SUM( a.settlement * a.sales_price ), 6 ), 0 ) salesAmountSum + ) buckleWeightSum FROM jg_poundlist a WHERE @@ -855,34 +838,35 @@ SET @i = 0; SELECT ( @i := @i + 1 ) AS Number, F_FullName AS FFullName, - COUNT( id ) AS bangdan, - IFNULL( - ROUND( SUM( CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), 6 ), - 0 - ) settlement, - IFNULL( - ROUND( - SUM( purchase_price * CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), - 2 - ), - 0 - ) amout, - IF(is_pay='0',ROUND( - SUM( purchase_price * CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), - 2 - ),0) AS notPaypalAmounts, - IF(is_pay='1',ROUND( - SUM( purchase_price * CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), - 2 - ),0) AS paypalamounts + COUNT( b.id ) AS bangdan, + SUM( + Round( IF ( b.unit = '1', b.settlement / 1000, b.settlement ), 6 )) AS settlement, + SUM( b.amount ) AS amout, + SUM( b.amount ) - c.pay_price AS notPaypalAmounts, + c.pay_price AS paypalamounts FROM - jg_poundlist a + jg_purchaseorder a + LEFT JOIN jg_purchaseorder_item0 b ON a.id = b.purchaseorder_id + AND b.delete_mark = '0' + LEFT JOIN ( + SELECT + SUM( amount ) - SUM( pay_price ) AS notPaypalAmounts, + SUM( pay_price ) AS pay_price, + department_id + FROM + jg_purchaseorder + WHERE + to_days( creator_time ) = to_days( + now()) + AND delete_mark = '0' + GROUP BY + department_id + ) c ON a.department_id = c.department_id LEFT JOIN base_organize z ON a.department_id = z.F_Id - WHERE - to_days( a.pound_date ) = to_days( + to_days( a.creator_time ) = to_days( now()) - AND delete_mark = '0' + AND a.delete_mark = '0' GROUP BY a.department_id @@ -901,28 +885,19 @@ GROUP BY - SET @i = 0; SELECT ( @i := @i + 1 ) AS 'Number', - F_FullName AS FFullName,-- SUM( sales_price ) / COUNT( id ) AS asda, - ROUND( - SUM( sales_price * CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), - 2 - ) amout , - IF(is_collection='0',ROUND( - SUM( sales_price * CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), - 2 - ),0) AS notCollectionAmounts, - IF(is_collection='1',ROUND( - SUM( sales_price * CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), - 2 - ),0) AS collectionamounts + F_FullName AS FFullName, + SUM(price) AS amout, + SUM(price)- SUM(amount_collected) AS notCollectionAmounts, + SUM(amount_collected) AS collectionamounts + FROM - jg_poundlist a + jg_salesorder a LEFT JOIN base_organize z ON a.department_id = z.F_Id WHERE - to_days( a.pound_date ) = to_days( + to_days( a.creator_time ) = to_days( now()) AND a.delete_mark='0' diff --git a/SC-web/src/views/dashboard/admin/components/PurchasingTodayList.vue b/SC-web/src/views/dashboard/admin/components/PurchasingTodayList.vue index ad421877..7cd4779c 100644 --- a/SC-web/src/views/dashboard/admin/components/PurchasingTodayList.vue +++ b/SC-web/src/views/dashboard/admin/components/PurchasingTodayList.vue @@ -9,13 +9,13 @@ + 上货量(吨) + + - - + - - - + diff --git a/SC-web/src/views/dashboard/admin/components/SaleTodayList.vue b/SC-web/src/views/dashboard/admin/components/SaleTodayList.vue index a36a8c5b..7ca8c27e 100644 --- a/SC-web/src/views/dashboard/admin/components/SaleTodayList.vue +++ b/SC-web/src/views/dashboard/admin/components/SaleTodayList.vue @@ -11,10 +11,10 @@ - + - + diff --git a/SC-web/src/views/dashboard/admin/index.vue b/SC-web/src/views/dashboard/admin/index.vue index 3b66c807..083b0818 100644 --- a/SC-web/src/views/dashboard/admin/index.vue +++ b/SC-web/src/views/dashboard/admin/index.vue @@ -8,24 +8,19 @@ - 磅单张数(张) + 磅单上传张数 + - 上货量(吨) - - - - - - - 总结算重量(吨) + 总净重(吨) {{tadayPoundist.settlementSum}} + 采购总额(元) @@ -39,6 +34,20 @@ + + 今日磅单张数 + + + + + + + 上货量(吨) + + + + + @@ -223,6 +232,7 @@ export default { }).then(res => { if (res.code == 200) { this.tadayPoundist.buckleWeightSum = res.data.buckleWeightSum; + this.tadayPoundist.bangdannum = res.data.bangdannum; } }).catch(() => { })
- -
@@ -39,6 +34,20 @@
+ +