diff --git a/admin/src/main/resources/mappers/household/GetDailyRecordStatusDetailMapper.xml b/admin/src/main/resources/mappers/household/GetDailyRecordStatusDetailMapper.xml index b4e961ad..5075a9ae 100644 --- a/admin/src/main/resources/mappers/household/GetDailyRecordStatusDetailMapper.xml +++ b/admin/src/main/resources/mappers/household/GetDailyRecordStatusDetailMapper.xml @@ -309,14 +309,17 @@ ORDER BY dr.start_date asc, df.created_at asc + diff --git a/admin/src/main/resources/mappers/household/excelDownload/GetHouseholdsExcelMapper.xml b/admin/src/main/resources/mappers/household/excelDownload/GetHouseholdsExcelMapper.xml index eff214b6..c655e7d6 100644 --- a/admin/src/main/resources/mappers/household/excelDownload/GetHouseholdsExcelMapper.xml +++ b/admin/src/main/resources/mappers/household/excelDownload/GetHouseholdsExcelMapper.xml @@ -236,7 +236,7 @@ ds.carry_over from daily_summary ds JOIN household h on ds.household_seq = h.seq and h.is_deleted = false - where ds.record_month = #{recordMonth} + where ds.record_month = TO_CHAR(TO_DATE(#{recordMonth}, 'YYYYMM') + INTERVAL '-1 MONTH', 'yyyyMM') AND ds.household_seq IN #{seq} diff --git a/front/src/main/resources/mappers/daily/RecordCalendarMapper.xml b/front/src/main/resources/mappers/daily/RecordCalendarMapper.xml index 7f040da6..0ec69b7f 100644 --- a/front/src/main/resources/mappers/daily/RecordCalendarMapper.xml +++ b/front/src/main/resources/mappers/daily/RecordCalendarMapper.xml @@ -20,7 +20,7 @@ select ds.carry_over from daily_summary ds where ds.household_seq = #{householdSeq} - and ds.record_month = #{searchMonth} + and ds.record_month = TO_CHAR(TO_DATE(#{searchMonth}, 'YYYYMM') + INTERVAL '-1 MONTH', 'yyyyMM') order by ds.id desc limit 1