From 731ee0f2e6fd00397ecac284cbbc4af3c4a1e81f Mon Sep 17 00:00:00 2001 From: isol2011 Date: Tue, 2 Aug 2022 20:17:31 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=88=98=EC=A0=95]=20=EA=B0=84=EC=8B=9D=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EC=97=90=EB=9F=AC=20ex)=20=EC=9C=A0?= =?UTF-8?q?=EC=82=B0=EA=B7=A0=20=EB=B9=84=ED=83=80=EB=AF=BC=20=EB=93=B1?= =?UTF-8?q?=EC=9D=98=20=EC=98=81=EC=96=91=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com.backoffice.m.bf_daily_nutrition.xml | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/resources/sqlmap/m/bf_daily_nutrition/com.backoffice.m.bf_daily_nutrition.xml b/src/main/resources/sqlmap/m/bf_daily_nutrition/com.backoffice.m.bf_daily_nutrition.xml index e367468..71d568e 100644 --- a/src/main/resources/sqlmap/m/bf_daily_nutrition/com.backoffice.m.bf_daily_nutrition.xml +++ b/src/main/resources/sqlmap/m/bf_daily_nutrition/com.backoffice.m.bf_daily_nutrition.xml @@ -1260,7 +1260,12 @@ ,#db_dn_no# ,#db_dn_tp# - ,#eat_qty#/(SELECT srv from tbl_db_nutrient where dn_no=(#db_dn_no#)) + + ,#eat_qty#/(SELECT case srv when 0 then 1 else srv end from tbl_db_nutrient where dn_no=(#db_dn_no#)) + + + ,#eat_qty#/(SELECT case srv when 0 then 1 else srv end from tbl_db_sf_commerce where dbc_no=(#db_dn_no#)) + ,#eat_qty# ) @@ -1506,7 +1511,12 @@ ,#db_dhb_no# ,#db_dhb_tp# - ,#eat_qty#/(SELECT srv from tbl_db_home_bf where dhb_no=(#db_dhb_no#)) + + ,#eat_qty#/(SELECT srv from tbl_db_home_bf where dhb_no=(#db_dhb_no#)) + + + ,#eat_qty#/(SELECT sum(rate_100) as srv FROM tbl_db_home_sf_ingre WHERE dhb_no=(#db_dhb_no#)) + ,#eat_qty# @@ -1554,7 +1564,14 @@ ,#allergy_cd_no# ,#db_dbc_no# ,#db_dbc_tp# - ,((#eat_qty#)/(SELECT srv from tbl_db_bf_commerce where dbc_no=(#db_dbc_no#))) + + + ,((#eat_qty#)/(SELECT srv from tbl_db_bf_commerce where dbc_no=(#db_dbc_no#))) + + + ,#eat_qty#/(SELECT srv from tbl_db_sf_commerce where dbc_no=(#db_dn_no#)) + + ,#eat_qty# )