견적서 조회 API 검색 조건 수정

This commit is contained in:
DESKTOP-6E8S9S5\LEE 2026-06-12 13:55:54 +09:00
parent 73f0005f86
commit c888b564be
2 changed files with 6 additions and 17 deletions

View File

@ -3199,10 +3199,6 @@ public class EstimateService {
SimulationEstimateListResponse response = new SimulationEstimateListResponse();
if (!"T01".equals(objectRequest.getSaleStoreId())) {
objectRequest.setSchSelSaleStoreId("");
}
// 견적서 목록 조회
List<ObjectResponse> objectList = estimateMapper.selectSimulationEstimateList(objectRequest);

View File

@ -1549,7 +1549,7 @@
<select id="selectSimulationEstimateList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse">
/* sqlid : com.interplug.qcast.biz.estimate.selectSimulationEstimateList */
<if test='(saleStoreId != null and saleStoreId != "T01") or (schSelSaleStoreId != null and schSelSaleStoreId != "")'>
<if test='saleStoreId != null and saleStoreId != "T01"'>
/* 계층형 구조에 맞는 SALE_STORE_ID 축출 - 재귀함수 */
WITH SALES_STORE_CTE AS (
SELECT
@ -1559,14 +1559,7 @@
FROM M_SALES_STORE WITH(NOLOCK)
WHERE APPROVE_FLG = '2'
AND DEL_FLG = '0'
<choose>
<when test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
AND SALE_STORE_ID = #{schSelSaleStoreId}
</when>
<otherwise>
AND SALE_STORE_ID = #{saleStoreId}
</otherwise>
</choose>
UNION ALL
SELECT
@ -1602,7 +1595,7 @@
ON O.SALE_STORE_ID = S.SALE_STORE_ID
INNER JOIN T_PLAN P WITH (NOLOCK)
ON O.OBJECT_NO = P.OBJECT_NO
<if test='(saleStoreId != null and saleStoreId != "T01") or (schSelSaleStoreId != null and schSelSaleStoreId != "")'>
<if test='saleStoreId != null and saleStoreId != "T01"'>
INNER JOIN SALES_STORE_CTE T
ON S.SALE_STORE_ID = T.SALE_STORE_ID
</if>
@ -1614,9 +1607,9 @@
<if test='schObjectNo != null and schObjectNo != ""'>
AND O.OBJECT_NO LIKE '%' + #{schObjectNo} + '%'
</if>
<if test='schOtherSelSaleStoreId != null and schOtherSelSaleStoreId != ""'>
/* 2차점까지 고름 */
AND O.SALE_STORE_ID = #{schOtherSelSaleStoreId}
<if test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
/* 판매점 아이디 선택 */
AND O.SALE_STORE_ID = #{schSelSaleStoreId}
</if>
<if test='schObjectName != null and schObjectName != ""'>
AND O.OBJECT_NAME LIKE '%' + #{schObjectName} + '%'