[loadOriginal] select fnc_update_motocyo_uri(:s_id, ':syori_ymd_fr', ':syori_ymd_to', ':tok_cd', ':login_id') [load_grdList] select w.* , (case(w.motocyo_kind)when(0)then('繰越')when(1)then('集計')when(2)then('売上')when(3)then('売上')when(4)then('入金')when(5)then('入金')when(6)then('締め')end) as motocyo_kind_nm , (case when(w.motocyo_kind = 2 and um.mng1_flg = 1)then(1)when(w.motocyo_kind = 3 and uh.mng1_flg = 1)then(1)when(w.motocyo_kind = 4 and nm.mng1_flg = 1)then(1)else(0)end) as keshi_flg , (case when(w.motocyo_kind = 2 and um.mng1_flg = 1)then('X')when(w.motocyo_kind = 3 and uh.mng1_flg = 1)then('X')else('')end) as keshi_uri , (case when(w.motocyo_kind = 4 and nm.mng1_flg = 1)then('X')else('')end) as keshi_nyu , (case when(w.motocyo_kind = 2)then(um.kingaku)when(w.motocyo_kind = 3)then(uh.soto_gaku)else(null)end) as keshi_gaku_uri , (case when(w.motocyo_kind = 4)then(nm.nyukin_gaku)else(null)end) as keshi_gaku_nyu from w_uri_motocyo w left join t_uri uh on (uh.den_no = w.den_no and w.motocyo_kind = 3) left join t_uri_m um on (um.den_no = w.den_no and um.row_no = w.row_no and w.motocyo_kind = 2) left join t_nyukin_m nm on (nm.nyukin_no = w.den_no and nm.row_no = w.row_no and w.motocyo_kind = 4) where w.s_id = :s_id and w.tok_cd = ':tok_cd' order by s_id, tok_cd, syori_ymd, (case(motocyo_kind)when(5)then(4)when(3)then(2)else(motocyo_kind)end), motocyo_key1, motocyo_key2, motocyo_kind [getRange] select (case when(seikyu_ymd != '')then( to_char(to_date(seikyu_ymd,'YYYYMMDD') + interval '1 days','YYYYMMDD') )else('')end) as syori_ymd_fr , '' as syori_ymd_to from m_tokui where tok_cd = ':tok_cd' [doKeshikomi_uri] update t_uri set mng1_flg = :chg_keshi_flg, upd_id = ':login_id', upd_time = now() where den_no = :den_no [doKeshikomi_uri_m] update t_uri_m set mng1_flg = :chg_keshi_flg, upd_id = ':login_id', upd_time = now() where den_no = :den_no and row_no = :row_no [doKeshikomi_nyukin_m] update t_nyukin_m set mng1_flg = :chg_keshi_flg, upd_id = ':login_id', upd_time = now() where nyukin_no = :den_no and row_no = :row_no