wngur6076 há 2 meses atrás
pai
commit
42c7aa7035

+ 5 - 0
.idea/.gitignore

@@ -0,0 +1,5 @@
+# 디폴트 무시된 파일
+/shelf/
+/workspace.xml
+# 에디터 기반 HTTP 클라이언트 요청
+/httpRequests/

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/useful-qry.iml" filepath="$PROJECT_DIR$/.idea/useful-qry.iml" />
+    </modules>
+  </component>
+</project>

+ 12 - 0
.idea/useful-qry.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/temp" />
+      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
+      <excludeFolder url="file://$MODULE_DIR$/tmp" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 6 - 6
function-in-db/procedures/dash_board/shop_dash/lt1_shop_dash_2_left_top.sql

@@ -1,11 +1,11 @@
 drop procedure if exists lt1_shop_dash_2_left_top;
 
 DELIMITER //
-CREATE PROCEDURE lt1_shop_dash_2_left_top( _listToken varchar(21), _sdate varchar(8), _edate varchar(8),
-                                              _s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32),
-                                              _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
-                                              _where varchar(386), _having varchar(386), _orderby varchar(64),
-                                              _branch int, _storage int)
+CREATE PROCEDURE lt1_shop_dash_2_left_top( _listToken varchar(21), _sdate varchar(8), _edate varchar(8), 
+_s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32), 
+_s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32), 
+_having varchar(386), _orderby varchar(64), 
+_branch int, _storage int, _member_company_id int, _lt_filter int)
 BEGIN
 
 -- 로컬 변수 선언
@@ -75,4 +75,4 @@ END //
 DELIMITER ;
 
 CALL lt1_shop_dash_2_left_top('', '', '', '', '', '', '', '',
-'', '', '', '', '', '', 1, 1);
+'', '', '', '', '', 1, 1, 1, 1);

+ 5 - 5
function-in-db/procedures/dash_board/shop_dash/lt1_shop_dash_order_delayed.sql

@@ -1,11 +1,11 @@
 drop procedure if exists lt1_shop_dash_order_delayed;
 
 DELIMITER //
-CREATE PROCEDURE lt1_shop_dash_order_delayed( _listToken varchar(21), _sdate varchar(8), _edate varchar(8),
-                                              _s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32),
-                                              _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
-                                              _where varchar(386), _having varchar(386), _orderby varchar(64),
-                                              _branch int, _storage int)
+CREATE PROCEDURE lt1_shop_dash_order_delayed( _listToken varchar(21), _sdate varchar(8), _edate varchar(8), 
+_s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32), 
+_s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32), 
+_having varchar(386), _orderby varchar(64), 
+_branch int, _storage int, _member_company_id int, _lt_filter int)
 BEGIN
 
 -- 로컬 변수 선언

+ 5 - 5
function-in-db/procedures/dash_board/shop_dash/lt1_shop_sales_statistics_graph.sql

@@ -1,11 +1,11 @@
 drop procedure if exists lt1_shop_sales_statistics_graph;
 
 DELIMITER //
-CREATE PROCEDURE lt1_shop_sales_statistics_graph( _listToken varchar(21), _sdate varchar(8), _edate varchar(8),
-                                              _s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32),
-                                              _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
-                                              _where varchar(386), _having varchar(386), _orderby varchar(64),
-                                              _branch int, _storage int)
+CREATE PROCEDURE lt1_shop_sales_statistics_graph( _listToken varchar(21), _sdate varchar(8), _edate varchar(8), 
+_s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32), 
+_s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32), 
+_having varchar(386), _orderby varchar(64), 
+_branch int, _storage int, _member_company_id int, _lt_filter int)
 BEGIN
 	  DECLARE start_date varchar(8);
 	  DECLARE end_date varchar(8);

+ 7 - 7
function-in-db/procedures/dash_board/shop_dash/zds_door_sales_cancel_month.sql

@@ -1,11 +1,11 @@
 drop procedure if exists zds_door_sales_cancel_month;
 
 DELIMITER //
-CREATE PROCEDURE zds_door_sales_cancel_month( _listToken varchar(21), _sdate varchar(8), _edate varchar(8),
-                                              _s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32),
-                                              _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
-                                              _where varchar(386), _having varchar(386), _orderby varchar(64),
-                                              _branch int, _storage int)
+CREATE PROCEDURE zds_door_sales_cancel_month( _listToken varchar(21), _sdate varchar(8), _edate varchar(8), 
+_s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32), 
+_s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32), 
+_having varchar(386), _orderby varchar(64), 
+_branch int, _storage int, _member_company_id int, _lt_filter int)
 BEGIN
 	  DECLARE start_date varchar(8);
 	  DECLARE end_date varchar(8);
@@ -52,7 +52,7 @@ FROM (
     SUM(sorder_qty) as sum_sorder_qty
     FROM dbr_sorder as mx
     INNER JOIN dbr_sorder_bd as mb ON mx.id = mb.sorder_id
-       WHERE true and seller_id = 88  and sorder_date between '20240801' and '20240831' 
+       WHERE mx.seller_id = _member_company_id and sorder_date >= previous_month_start_date and sorder_date <= previous_month_end_date
     GROUP BY seller_id, item_id
     ) as june_data ON mc.id = june_data.seller_id AND md.id = june_data.item_id
     LEFT JOIN (
@@ -62,7 +62,7 @@ FROM (
     SUM(CASE WHEN mx.status = 'C' THEN sorder_qty ELSE 0 END) AS sum_sorder_claim_qty
     FROM dbr_sorder as mx
     INNER JOIN dbr_sorder_bd as mb ON mx.id = mb.sorder_id
-      WHERE true and seller_id = 88  and sorder_date between '20240801' and '20240831' 
+      WHERE mx.seller_id = _member_company_id and sorder_date >= start_date and sorder_date <= end_date
     GROUP BY seller_id, item_id
     ) as july_data ON mc.id = july_data.seller_id AND md.id = july_data.item_id
     WHERE me.cgroup_code = 'A-0001'