insert into allocation_storehouse_apply(
apply_type,apply_id,start_user_id,start_user_name,apply_count,remark,state,store_id,community_id
) values (
#{applyType},#{applyId},#{startUserId},#{startUserName},#{applyCount},#{remark},#{state},#{storeId},#{communityId}
)
update allocation_storehouse_apply t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.apply_type= #{applyType}
, t.start_user_id= #{startUserId}
, t.start_user_name= #{startUserName}
, t.apply_count= #{applyCount}
, t.remark= #{remark}
, t.state= #{state}
, t.store_id= #{storeId}
, t.community_id= #{communityId}
where 1=1
and t.apply_id= #{applyId}