단속자료별 발송상세정보 조회 쿼리 추가

main
이범준 8 months ago
parent a6d88fae03
commit 544023fb59

@ -27,4 +27,9 @@ public interface IntegrationSearchMapper extends AbstractMapper {
*/
List<DataObject> selectIntegrationDataList(SprtQuery query);
/** ID .<br />
* @param crdnId ID
* @return
*/
DataObject selectLatestSndngDtlInfo(String crdnId);
}

@ -776,6 +776,12 @@ public class Sprt01Controller extends ApplicationController {
SprtQuery sprtQuery = new SprtQuery();
sprtQuery.setCrdnIds(crdnIds);
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
for(int i=0; i < dataObjectList.size(); i++) {
DataObject sndngDtl = integrationSearchMapper.selectLatestSndngDtlInfo(dataObjectList.get(i).string("CRDN_ID"));
dataObjectList.get(i).set("RG_NO",sndngDtl.string("RG_NO"));
}
for(int i=0; i < dataObjectList.size(); i++) {
DataObject dataObject = dataObjectList.get(i);
@ -945,6 +951,12 @@ public class Sprt01Controller extends ApplicationController {
SprtQuery sprtQuery = new SprtQuery();
sprtQuery.setCrdnIds(crdnIds);
List<DataObject> dataObjectList = integrationSearchMapper.selectIntegrationDataList(sprtQuery);
for(int i=0; i < dataObjectList.size(); i++) {
DataObject sndngDtl = integrationSearchMapper.selectLatestSndngDtlInfo(dataObjectList.get(i).string("CRDN_ID"));
dataObjectList.get(i).set("RG_NO",sndngDtl.string("RG_NO"));
}
for(int i=0; i < dataObjectList.size(); i++) {
DataObject dataObject = dataObjectList.get(i);

@ -358,4 +358,20 @@ LEFT OUTER JOIN TB_RCVMT R ON (L.LEVY_ID = R.LEVY_ID AND R.DEL_YN = 'N
<include refid="utility.sortBy" />
</select>
<select id="selectLatestSndngDtlInfo" parameterType="string" resultType="dataObject">
/* 최근 발송 상세 정보 조회(integrationSearchMapper.selectLatestSndngDtlInfo) */
SELECT *
FROM
(
SELECT ROW_NUMBER() OVER (ORDER BY SD.SNDNG_DTL_ID) AS ROWNUM
, SD.RG_NO
, SD.CRDN_ID
FROM TB_SNDNG_DTL SD
WHERE SD.CRDN_ID = #{crdnId}
AND SD.DEL_YN = 'N'
) SD2
WHERE SD2.ROWNUM=1
</select>
</mapper>
Loading…
Cancel
Save