SELECT
to_char(
CASE
WHEN to_char(to_date(to_char(sysdate,'yyyymm'),'yyyymm'),'D') = '2'
THEN to_date(to_char(sysdate,'yyyymm'),'yyyymm')
ELSE
next_day(to_date(to_char(sysdate,'yyyymm'),'yyyymm'),'星期一')
END ,'yyyy-mm-dd') AS 星期一,
to_char(
CASE WHEN
To_Char(last_day(sysdate),'d')=1
THEN
last_day(sysdate)-to_char(last_day(sysdate),'d')+1
ELSE
last_day(sysdate)+(7-to_char(last_day(sysdate),'d'))+1
END ,'yyyy-mm-dd') 星期日
from
dual