delete from fact_index_service_ablity_grid_monthly
where CUSTOMER_ID = #{customerId} AND AGENCY_ID = #{agencyId} AND GRID_ID = #{gridId}
AND MONTH_ID = #{monthId} AND QUARTER_ID = #{quarterId} AND YEAR_ID = #{yearId}
insert into fact_index_service_ablity_grid_monthly
(
ID,
CUSTOMER_ID,
AGENCY_ID,
GRID_ID,
MONTH_ID,
QUARTER_ID,
YEAR_ID,
ACTIVITY_COUNT,
VOLUNTEER_RATIO,
PARTY_VOLUNTEER_RATIO,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
) values
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.agencyId},
#{item.gridId},
#{item.monthId},
#{item.quarterId},
#{item.yearId},
#{item.activityCount},
#{item.volunteerRatio},
#{item.partyVolunteerRatio},
0,
0,
'APP_USER',
now(),
'APP_USER',
now()
)