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