insert into storehouse(
sh_desc,sh_id,sh_name,store_id,is_show,purchase_switch,purchase_raf_id,
use_switch,use_raf_id,allocation_switch,allocation_raf_id
) values (
#{shDesc},#{shType},#{shObjId},#{shId},#{shName},#{storeId},#{isShow}
,#{purchaseSwitch},#{purchaseRafId},#{useSwitch},#{useRafId},#{allocationSwitch},#{allocationRafId}
)
update storehouse t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.sh_desc= #{shDesc}
, t.purchase_switch= #{purchaseSwitch}
, t.purchase_raf_id= #{purchaseRafId}
, t.use_switch= #{useSwitch}
, t.use_raf_id= #{useRafId}
, t.allocation_switch= #{allocationSwitch}
, t.allocation_raf_id= #{allocationRafId}
, t.sh_name= #{shName}
, t.store_id= #{storeId}
, t.is_show= #{isShow}
where 1=1
and t.sh_id= #{shId}