insert into business_workflow_step_staff(
wss_id,operate,step_id,staff_name,b_id,community_id,staff_id,staff_role
) values (
#{wssId},#{operate},#{stepId},#{staffName},#{bId},#{communityId},#{staffId},#{staffRole}
)
insert into workflow_step_staff(
wss_id,step_id,staff_name,status_cd,b_id,community_id,staff_id,staff_role
) select t.wss_id,t.step_id,t.staff_name,'0',t.b_id,t.community_id,t.staff_id,t.staff_role
from business_workflow_step_staff
t where 1=1
and t.wss_id= #{wssId}
and t.operate= 'ADD'
and t.step_id= #{stepId}
and t.staff_name= #{staffName}
and t.b_id= #{bId}
and t.community_id= #{communityId}
and t.staff_id= #{staffId}
update workflow_step_staff t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.step_id= #{stepId}
, t.staff_name= #{staffName}
, t.community_id= #{communityId}
, t.staff_id= #{staffId}
, t.staff_role= #{staffRole}
where 1=1
and t.wss_id= #{wssId}
and t.b_id= #{bId}