INSERT INTO t_project_cost_calculation ( project_id, project_name, start_time, end_time, total_amount, create_time, create_user, del_flag ) VALUES ( #{projectId}, #{projectName}, #{startTime}, #{endTime}, #{totalAmount}, #{createTime}, #{createUser}, #{delFlag} ) INSERT INTO t_project_cost_calculation_detail ( calculation_id, machine_type_id, machine_type_name, machine_model, machine_unit, price, current_count, amount ) VALUES ( #{calculationId}, #{machineTypeId}, #{machineTypeName}, #{machineModel}, #{machineUnit}, #{price}, #{currentCount}, #{amount} ) INSERT INTO t_project_cost_calculation_segment ( calculation_detail_id, start_time, end_time, days, count, amount ) VALUES (#{item.calculationDetailId}, #{item.startTime}, #{item.endTime}, #{item.days}, #{item.count}, #{item.amount}) UPDATE t_project_cost_calculation SET del_flag = 1 WHERE id = #{id}