select investigation_manage_detail_id, organization_id, organization_name, top_organization_id, investigation_number, investigation_status, investigation_range, investigation_type, investigation_method, investigation_frequency, different_number, investigation_quantity, different_quantity, material_inventory_id,investigation_result, material_base_info_id, material_code, material_name, bar_code, inventory_quantity, quantity, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_id, storage_location_code, storage_location_name, pack_id, pack_code, pack_name, pack_detail_id, unit_code, unit_name, unit_number, material_warehouse_control_id, serial_number_manage, container_id, container_code, container_type, container_type_name, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag,
material_status_code , material_status_name from investigetion_manage_detail
and del_flag = 1
and organization_id = #{organizationId}
and organization_name like concat('%', #{organizationName}, '%')
and top_organization_id = #{topOrganizationId}
and investigation_number = #{investigationNumber}
and investigation_status = #{investigationStatus}
and investigation_range = #{investigationRange}
and investigation_type = #{investigationType}
and investigation_method = #{investigationMethod}
and investigation_frequency = #{investigationFrequency}
and different_number = #{differentNumber}
and investigation_quantity = #{investigationQuantity}
and different_quantity = #{differentQuantity}
and investigation_result = #{investigationResult}
and material_base_info_id = #{materialBaseInfoId}
and material_code = #{materialCode}
and material_name like concat('%', #{materialName}, '%')
and bar_code = #{barCode}
and inventory_quantity = #{inventoryQuantity}
and quantity = #{quantity}
and warehouse_id = #{warehouseId}
and warehouse_code = #{warehouseCode}
and warehouse_name like concat('%', #{warehouseName}, '%')
and storage_section_id = #{storageSectionId}
and storage_code = #{storageCode}
and storage_name like concat('%', #{storageName}, '%')
and storage_location_id = #{storageLocationId}
and storage_location_code = #{storageLocationCode}
and storage_location_name like concat('%', #{storageLocationName}, '%')
and pack_id = #{packId}
and pack_code = #{packCode}
and pack_name like concat('%', #{packName}, '%')
and pack_detail_id = #{packDetailId}
and unit_code = #{unitCode}
and unit_name like concat('%', #{unitName}, '%')
and unit_number = #{unitNumber}
and material_warehouse_control_id = #{materialWarehouseControlId}
and serial_number_manage = #{serialNumberManage}
and container_id = #{containerId}
and container_code = #{containerCode}
and container_type = #{containerType}
and container_type_name like concat('%', #{containerTypeName}, '%')
and create_by_name like concat('%', #{createByName}, '%')
and update_by_name like concat('%', #{updateByName}, '%')
and remark like concat('%',#{remark},'%')
and material_status_code = #{materialStatusCode}
and material_status_name like concat('%', #{materialStatusName}, '%')
and del_flag = #{delFlag} and del_flag = 1
update investigation_manage set investigation_status = 2,audit_status = #{auditStatus}
where investigation_number = #{investigationNumber}
update investigetion_manage_detail set investigation_status = 2
where investigation_number = #{investigationNumber}