insert into work_cycle(work_cycle, period, before_time, cycle_id, period_workday, hours, store_id, work_id,
staff_name, period_month, community_id, staff_id, period_day)
values (#{workCycle}, #{period}, #{beforeTime}, #{cycleId}, #{periodWorkday}, #{hours}, #{storeId}, #{workId},
#{staffName}, #{periodMonth}, #{communityId}, #{staffId}, #{periodDay})
update work_cycle t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.work_cycle= #{workCycle}
, t.period= #{period}
, t.before_time= #{beforeTime}
, t.period_workday= #{periodWorkday}
, t.hours= #{hours}
, t.staff_name= #{staffName}
, t.period_month= #{periodMonth}
, t.staff_id= #{staffId}
, t.period_day= #{periodDay}
where 1=1
and t.cycle_id= #{cycleId}
and t.community_id= #{communityId}
and t.store_id= #{storeId}
and t.work_id= #{workId}