From a10b4646f9c688498d71a4058fc4042dda019060 Mon Sep 17 00:00:00 2001 From: jianghongdong Date: Tue, 7 Aug 2018 15:54:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=BA=E5=87=86=E5=88=A9?= =?UTF-8?q?=E7=8E=87sql=E9=97=AE=E9=A2=98~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/Tenwa/Core/Standard/LCStandardInterestInfo3.jsp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/WebContent/Tenwa/Core/Standard/LCStandardInterestInfo3.jsp b/WebContent/Tenwa/Core/Standard/LCStandardInterestInfo3.jsp index fdbfdf4fb..975d6c375 100644 --- a/WebContent/Tenwa/Core/Standard/LCStandardInterestInfo3.jsp +++ b/WebContent/Tenwa/Core/Standard/LCStandardInterestInfo3.jsp @@ -8,9 +8,11 @@ */ String option = CurPage.getParameter("option"); //新增和修改的查询逻辑不同,需要判断 - String sql = "select max(start_date),BASE_RATE_HALF,BASE_RATE_ONE,BASE_RATE_THREE,BASE_RATE_FIVE,BASE_RATE_ABOVEFIVE from LC_STANDARD_INTEREST "; + String sql = "select BASE_RATE_HALF,BASE_RATE_ONE,BASE_RATE_THREE,BASE_RATE_FIVE,BASE_RATE_ABOVEFIVE from LC_STANDARD_INTEREST "; if("edit".equals(option)){ - sql += "where start_date<(select start_date from LC_STANDARD_INTEREST where id='"+CurPage.getParameter("id")+"')"; + sql+="where start_date=(select max(start_date) from LC_STANDARD_INTEREST where start_date<(select start_date from LC_STANDARD_INTEREST where id='"+CurPage.getParameter("id")+"'))"; + }else{ + sql += "where start_date=(select max(start_date) from LC_STANDARD_INTEREST)"; } ASResultSet rs = Sqlca.getASResultSet2(sql); String BASE_RATE_HALF = "";