견적서 특이사항 타이틀 목록 조회 API 개발

This commit is contained in:
LAPTOP-L3VE7KK2\USER 2024-11-25 17:37:43 +09:00
parent 8e1d151630
commit 1e1a8edb00
5 changed files with 55 additions and 0 deletions

View File

@ -34,6 +34,13 @@ public class EstimateController {
return estimateService.selectItemPriceList(priceRequest);
}
@Operation(description = "견적서 특이사항 타이틀 목록을 조회한다.")
@GetMapping("/special-note-title-list")
@ResponseStatus(HttpStatus.OK)
public List<NoteResponse> selectSpecialNoteTitleList(NoteRequest noteRequest) throws Exception {
return estimateService.selectSpecialNoteTitleList(noteRequest);
}
@Operation(description = "견적서 특이사항 목록을 조회한다.")
@GetMapping("/special-note-list")
@ResponseStatus(HttpStatus.OK)

View File

@ -42,6 +42,9 @@ public interface EstimateMapper {
// 견적서 지붕재 용량 목록 조회
public List<RoofResponse> selectEstimateRoofVolList(EstimateRequest estimateRequest);
// 견적서 특이사항 타이틀 목록 조회
public List<NoteResponse> selectEstimateNoteTitleList(NoteRequest noteRequest);
// 견적서 특이사항 목록 조회
public List<NoteResponse> selectEstimateNoteList(NoteRequest noteRequest);

View File

@ -178,6 +178,17 @@ public class EstimateService {
return response;
}
/**
* 견적 특이사항 타이틀 목록 조회
*
* @param noteRequest 견적 특이사항 조회 정보
* @return List<NoteResponse> 견적 특이사항 목록
* @throws Exception
*/
public List<NoteResponse> selectSpecialNoteTitleList(NoteRequest noteRequest) throws Exception {
return estimateMapper.selectEstimateNoteTitleList(noteRequest);
}
/**
* 견적 특이사항 목록 조회
*
@ -618,6 +629,7 @@ public class EstimateService {
estimateMapper.updateEstimateApi(estimateRequest);
}
} catch (Exception e) {
e.printStackTrace();
throw new QcastException(ErrorCode.INTERNAL_SERVER_ERROR);
}
}

View File

@ -16,4 +16,7 @@ public class NoteResponse {
@Schema(description = "견적특이사항")
private String remarks;
@Schema(description = "특이사항 묶음 여부")
private String pkgYn;
}

View File

@ -465,6 +465,36 @@
GROUP BY T.OBJECT_NO, T.PLAN_NO, T.ROOF_NO, T.ROOF_SURFACE, T.SLOPE, T.ANGLE, T.CLASS_TYPE
</select>
<select id="selectEstimateNoteTitleList" parameterType="com.interplug.qcast.biz.estimate.dto.NoteRequest" resultType="com.interplug.qcast.biz.estimate.dto.NoteResponse">
/* sqlid : com.interplug.qcast.biz.estimate.selectEstimateNoteTitleList */
SELECT
MAX(T.CODE_NM) AS CODE_NM
, STUFF((
SELECT ',' + CODE FROM M_COMM_L T2
WHERE T2.HEAD_CD = '202400' AND T.REF_CHR3 = T2.REF_CHR3
FOR XML PATH('')),1,1,''
) AS CODE
, CASE WHEN T.REF_CHR1 = 'PROD' AND COUNT(1) > 1 THEN '1' ELSE '0' END AS PKG_YN
FROM (
SELECT
CL.CODE
, CL.CODE_NM
, CL.REF_CHR1
, CAST(CL.REF_CHR3 AS INT) AS REF_CHR3
, CL.PRIORITY
, OSN.REMARKS
FROM M_COMM_L CL WITH (NOLOCK)
INNER JOIN T_OBJECT_SPECIAL_NOTE OSN WITH (NOLOCK)
ON CL.CODE = OSN.SPN_ATTR_CD
WHERE CL.HEAD_CD = '202400'
AND CL.DEL_FLG = '0'
AND OSN.USE_FLG = '1'
AND OSN.DEL_FLG = '0'
) T
GROUP BY T.REF_CHR1, T.REF_CHR3
ORDER BY T.REF_CHR3 ASC
</select>
<select id="selectEstimateNoteList" parameterType="com.interplug.qcast.biz.estimate.dto.NoteRequest" resultType="com.interplug.qcast.biz.estimate.dto.NoteResponse">
/* sqlid : com.interplug.qcast.biz.estimate.selectEstimateNoteList */
SELECT